summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qdeadlinetimer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QDeadlineTimer: round milliseconds up instead of downThiago Macieira2017-07-071-1/+1
| | | | | | | | | | | | | | | | | | | Code like: QElapsedTimer timer; timer.start(); QTest::qWait(30); QVERIFY(timer.elapsed() >= 30); is failing, because qWait sleeps in increments of 10 ms and the last chunk may be off by less than one millisecond, so we end up sleeping too little and thus returning before 30 ms have elapsed. This matches the QElapsedTimer::elapsed() code that rounds down: return nsecsElapsed() / Q_INT64_C(1000000); Task-number: QTBUG-61741 Change-Id: Ic3a088f9f08a4fd7ae91fffd14cea4a91d3f51a8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Core: Replace LGPL21 with LGPL license headerKai Koehne2017-03-281-13/+19
| | | | | | | | Also use canonical contact url. Change-Id: I43f8c6a2c4949ee0e054045bccc17d82575b072c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-161-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure configure.pri examples/widgets/painting/fontsampler/mainwindow.cpp examples/widgets/painting/fontsampler/mainwindow.h mkspecs/features/moc.prf src/corelib/global/qglobal.h src/gui/text/qtextdocument.cpp Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
| * QDeadlineTimer: fix namespace for chrono literals in examplesMarc Mutz2016-11-301-2/+4
| | | | | | | | | | Change-Id: I6d39b4fe653cf89d2bd27af4b3f606d98ac83eba Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix some qdoc-warningsFriedemann Kleint2016-11-231-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/kernel/qdeadlinetimer.cpp:343: warning: Cannot find 'setPreciseRemainingTime(...)' in '\fn' void QDeadlineTimer::setPreciseRemainingTime(qint64 secs, unsigned nsecs, Qt::TimerType type) qtbase/src/corelib/kernel/qdeadlinetimer.cpp:459: warning: Overrides a previous doc qtbase/src/corelib/kernel/qelapsedtimer.cpp:86: warning: Unknown command '\ref' qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_2' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_3_0' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_1' in QSysInfo::MacVersion qtbase/src/corelib/global/qglobal.cpp:1184: warning: Undocumented enum item 'MV_WATCHOS_2_0' in QSysInfo::MacVersion qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: Missing parameter name qtbase/src/corelib/kernel/qdeadlinetimer.cpp:175: warning: No such parameter 'ForeverConstant' in QDeadlineTimer::QDeadlineTimer() qtbase/src/corelib/kernel/qdeadlinetimer.h:156: warning: No documentation for 'QDeadlineTimer::remainingTimeAsDuration()' qtbase/src/gui/painting/qcolor.cpp:796: warning: Undocumented parameter 'name' in QColor::QColor() qtbase/src/gui/painting/qcolor.cpp:802: warning: Undocumented parameter 'name' in QColor::QColor() Some errors in QDeadlineTimer remain due to qdoc not fully supporting templates. Change-Id: Ie7afd91c48048748eeda23c32056583c31fd7490 Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | doc: Upgrade QDeadlineTimer for clang-qdocMartin Smith2016-12-041-68/+27
|/ | | | | | | | | Duplicate qdoc comments removed for setPreciseRemainingTime(), remainingTime(), and deadline(). Added qdoc comments for swap(), and two new assignment operators. Also added a few parameter names. Change-Id: I5c19ca3bdef876019c5742397249ea9e0c066bf3 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Doc: several minor doc issuesNico Vertriest2016-09-271-51/+37
| | | | | | | | - linking errors - parameter definition Change-Id: I879b38c159822900ab9851407f0e9067b318ca1f Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* QDeadlineTimer: inline the isForever functionThiago Macieira2016-08-301-4/+2
| | | | | | | | The constructor that sets it is inline already, so there's no point in hiding this. Change-Id: I66707fdfe8eb460a9c72fffd146d8dbc35b13056 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Long live QDeadlineTimerThiago Macieira2016-08-151-0/+827
It's like QElapsedTimer, but marks a time in the future instead. [ChangeLog][QtCore] Added QDeadlineTimer, a counterpart to QElapsedTimer, used to mark a time point in the future (a deadline) and determine whether such a deadline has passed. Change-Id: Ifea6e497f11a461db432ffff144921f7fbc1d1d3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>