From 511abbf4ce64b18c96ea0a17e2764b30e4faf070 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 13 Mar 2021 12:48:13 +0100 Subject: [PATCH] Backport QTime related deprecation fix --- src/support/FileName.cpp | 6 +++--- src/support/Systemcall.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index a4075d69ae..482bb93e21 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #ifdef _WIN32 #include @@ -558,7 +558,7 @@ unsigned long FileName::checksum() const } // This is used in the debug output at the end of the method. - static QTime t; + static QElapsedTimer t; if (lyxerr.debugging(Debug::FILES)) t.restart(); @@ -624,7 +624,7 @@ unsigned long FileName::checksum() const #endif // QT_VERSION LYXERR(Debug::FILES, "Checksumming \"" << absFileName() << "\" " - << result << " lasted " << t.elapsed() << " ms."); + << result << " lasted " << QString::number(t.elapsed()) << " ms."); return result; } diff --git a/src/support/Systemcall.cpp b/src/support/Systemcall.cpp index d4f71ffcd9..58c2c225fa 100644 --- a/src/support/Systemcall.cpp +++ b/src/support/Systemcall.cpp @@ -30,7 +30,7 @@ #include #include -#include +#include #include #include #include @@ -446,7 +446,7 @@ bool SystemcallPrivate::waitWhile(State waitwhile, bool process_events, int time } // process events while waiting with timeout - QTime timer; + QElapsedTimer timer; timer.start(); while (state == waitwhile && state != Error && !timedout) { waitAndProcessEvents();