D8999: KJob: add start(int delay) method

René J.V. Bertin noreply at phabricator.kde.org
Sat Nov 25 20:22:13 UTC 2017


rjvbb added inline comments.

INLINE COMMENTS

> rjvbb wrote in kjob.cpp:98
> So KJob::emitSpeed() doesn't use the "old" syntax for compatibility reasons?

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.

REPOSITORY
  R244 KCoreAddons

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

To: rjvbb, dfaure
Cc: anthonyfieroni, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171125/11bd6c66/attachment.html>


More information about the Kde-frameworks-devel mailing list