Backport QTime related deprecation fix

This commit is contained in:
Juergen Spitzmueller 2021-03-13 12:48:13 +01:00
parent 9671f8ca20
commit 511abbf4ce
2 changed files with 5 additions and 5 deletions

View File

@ -28,7 +28,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QList> #include <QList>
#include <QTemporaryFile> #include <QTemporaryFile>
#include <QTime> #include <QElapsedTimer>
#ifdef _WIN32 #ifdef _WIN32
#include <QThread> #include <QThread>
@ -558,7 +558,7 @@ unsigned long FileName::checksum() const
} }
// This is used in the debug output at the end of the method. // This is used in the debug output at the end of the method.
static QTime t; static QElapsedTimer t;
if (lyxerr.debugging(Debug::FILES)) if (lyxerr.debugging(Debug::FILES))
t.restart(); t.restart();
@ -624,7 +624,7 @@ unsigned long FileName::checksum() const
#endif // QT_VERSION #endif // QT_VERSION
LYXERR(Debug::FILES, "Checksumming \"" << absFileName() << "\" " LYXERR(Debug::FILES, "Checksumming \"" << absFileName() << "\" "
<< result << " lasted " << t.elapsed() << " ms."); << result << " lasted " << QString::number(t.elapsed()) << " ms.");
return result; return result;
} }

View File

@ -30,7 +30,7 @@
#include <iostream> #include <iostream>
#include <QProcess> #include <QProcess>
#include <QTime> #include <QElapsedTimer>
#include <QThread> #include <QThread>
#include <QCoreApplication> #include <QCoreApplication>
#include <QDebug> #include <QDebug>
@ -446,7 +446,7 @@ bool SystemcallPrivate::waitWhile(State waitwhile, bool process_events, int time
} }
// process events while waiting with timeout // process events while waiting with timeout
QTime timer; QElapsedTimer timer;
timer.start(); timer.start();
while (state == waitwhile && state != Error && !timedout) { while (state == waitwhile && state != Error && !timedout) {
waitAndProcessEvents(); waitAndProcessEvents();