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 <QList>
#include <QTemporaryFile>
#include <QTime>
#include <QElapsedTimer>
#ifdef _WIN32
#include <QThread>
@ -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;
}

View File

@ -30,7 +30,7 @@
#include <iostream>
#include <QProcess>
#include <QTime>
#include <QElapsedTimer>
#include <QThread>
#include <QCoreApplication>
#include <QDebug>
@ -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();