anthonyfieroni added inline comments.

INLINE COMMENTS

> rjvbb wrote in kjob.cpp:98
> In fact, are you sure that KJob::start won't be ambiguous? Trying to compile 
> this with clang++ I get
> 
>   src/lib/jobs/kjob.cpp:98:5: error: no matching function for call to 
> 'singleShot'
>       QTimer::singleShot(delay, this, &KJob::start);
>       ^~~~~~~~~~~~~~~~~~
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:83:17:
>  note: candidate function not viable: no overload of 'start' matching 'const 
> char *' for 3rd argument
>       static void singleShot(int msec, const QObject *receiver, const char 
> *member);
>                   ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:187:17:
>  note: candidate function not viable: no known conversion from 'int' to 
> 'std::chrono::milliseconds' (aka 'duration<long long, milli>') for 1st 
> argument
>       static void singleShot(std::chrono::milliseconds value, const QObject 
> *receiver, const char *member)
>                   ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:102:24:
>  note: candidate template ignored: couldn't infer template argument 'Func1'
>       static inline void singleShot(Duration interval, const typename 
> QtPrivate::FunctionPointer<Func1>::Object *receiver, Func1 slot)
>                          ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:130:13:
>  note: candidate template ignored: couldn't infer template argument 'Func1'
>               singleShot(Duration interval, Qt::TimerType timerType, Func1 
> slot)
>               ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:138:13:
>  note: candidate template ignored: couldn't infer template argument 'Func1'
>               singleShot(Duration interval, QObject *context, Func1 slot)
>               ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:107:24:
>  note: candidate function template not viable: requires 4 arguments, but 3 
> were provided
>       static inline void singleShot(Duration interval, Qt::TimerType 
> timerType, const typename QtPrivate::FunctionPointer<Func1>::Object *receiver,
>                          ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:123:13:
>  note: candidate function template not viable: requires 2 arguments, but 3 
> were provided
>               singleShot(Duration interval, Func1 slot)
>               ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:145:13:
>  note: candidate function template not viable: requires 4 arguments, but 3 
> were provided
>               singleShot(Duration interval, Qt::TimerType timerType, QObject 
> *context, Func1 slot)
>               ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:84:17:
>  note: candidate function not viable: requires 4 arguments, but 3 were 
> provided
>       static void singleShot(int msec, Qt::TimerType timerType, const QObject 
> *receiver, const char *member);
>                   ^
>   
> /opt/local/libexec/qt5/Library/Frameworks/QtCore.framework/Headers/qtimer.h:193:17:
>  note: candidate function not viable: requires 4 arguments, but 3 were 
> provided
>       static void singleShot(std::chrono::milliseconds value, Qt::TimerType 
> timerType, const QObject *receiver, const char *member)
>                   ^
>   1 error generated.

Oh yes, it ambiguous :) It should use static_cast, if patch is accepted :)

REPOSITORY
  R244 KCoreAddons

REVISION DETAIL
  https://phabricator.kde.org/D8999

To: rjvbb, dfaure
Cc: apol, anthonyfieroni, #frameworks

Reply via email to