From 58ddbb5f51b03510ef2c0f74fca1f92faad6c6ad Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Thu, 21 Sep 2023 09:56:58 +0800 Subject: [PATCH] fix: use QElapsedTimer instead of QTime (#296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix the following warning in main.cpp: ‘void QTime::start()’ is deprecated: Use QElapsedTimer instead [-Wdeprecated-declarations] 33 | useTime.start(); --- src/main/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index 9fe046da9..cba21b6d6 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include DWIDGET_USE_NAMESPACE @@ -29,7 +29,7 @@ DCORE_USE_NAMESPACE int main(int argc, char *argv[]) { // 应用计时 - QTime useTime; + QElapsedTimer useTime; useTime.start(); //为了更精准,起动就度量时间 qint64 startTime = QDateTime::currentDateTime().toMSecsSinceEpoch();