Commit e8d06774 authored by Michael Reeves's avatar Michael Reeves

Use QElapsedTimer not QTime for determining duration

QTime yeilds undefined results if the time is changed while timing is going on.
parent a0fa668d
......@@ -28,6 +28,7 @@
#include <QApplication>
#include <QDialogButtonBox>
#include <QDir>
#include <QElapsedTimer>
#include <QFileDialog>
#include <QImage>
#include <QKeyEvent>
......@@ -1691,7 +1692,7 @@ void DirectoryMergeWindow::DirectoryMergeWindowPrivate::prepareListView(Progress
t_fileMergeMap::iterator j;
int nrOfFiles = m_fileMergeMap.size();
int currentIdx = 1;
QTime t;
QElapsedTimer t;
t.start();
pp.setMaxNofSteps(nrOfFiles);
......
......@@ -15,7 +15,7 @@
#include <QDialog>
#include <QPointer>
#include <QTime>
#include <QElapsedTimer>
#include <QList>
class KJob;
......@@ -93,8 +93,8 @@ private:
QLabel* m_pSubInformation;
QLabel* m_pSlowJobInfo;
QPushButton* m_pAbortButton;
QTime m_t1;
QTime m_t2;
QElapsedTimer m_t1;
QElapsedTimer m_t2;
bool m_bWasCancelled;
e_CancelReason m_eCancelReason;
KJob* m_pJob = nullptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment