From 160a84e07f16decb622dc61b27c6988ff7d547d6 Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 20 Sep 2023 17:26:34 +0300 Subject: [PATCH] fix: use QElapsedTimer instead of QTime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following warning: ``` /build/deepin-terminal/src/deepin-terminal-6.0.6/src/main/main.cpp:33:18: warning: ‘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();