diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2019-05-06 18:19:06 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2019-05-24 16:43:39 +0200 |
commit | ed99a591a83a399458f12341d0a1c0b3152f247a (patch) | |
tree | 93aca7c5042df0549d475f5ccace817c3439877b /src/corelib/tools/qdatetime.h | |
parent | d2090b764aa23f9b50215aa5d276583117c328d3 (diff) |
Deprecate use of QTime as a timer
QElapsedTimer does the job better and without the DST kludges.
Change-Id: Ic4a566f695648cbe069a21ea8d3e84562b665a3c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qdatetime.h')
-rw-r--r-- | src/corelib/tools/qdatetime.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/corelib/tools/qdatetime.h b/src/corelib/tools/qdatetime.h index 1ff187a9bd..3e3b953b52 100644 --- a/src/corelib/tools/qdatetime.h +++ b/src/corelib/tools/qdatetime.h @@ -206,9 +206,11 @@ public: #endif static bool isValid(int h, int m, int s, int ms = 0); - void start(); - int restart(); - int elapsed() const; +#if QT_DEPRECATED_SINCE(5, 14) // ### Qt 6: remove + QT_DEPRECATED_X("Use QElapsedTimer instead") void start(); + QT_DEPRECATED_X("Use QElapsedTimer instead") int restart(); + QT_DEPRECATED_X("Use QElapsedTimer instead") int elapsed() const; +#endif private: enum TimeFlag { NullTime = -1 }; Q_DECL_CONSTEXPR inline int ds() const { return mds == -1 ? 0 : mds; } |