Port away from deprecated QTime::start()/elapsed() to QElapsedTimer

GIT_SILENT
parent 5584e2f4
......@@ -20,7 +20,7 @@
#ifndef KDEVPLATFORM_STATUSBAR_H
#define KDEVPLATFORM_STATUSBAR_H
#include <QTime>
#include <QElapsedTimer>
#include <QHash>
#include <QStatusBar>
......@@ -84,7 +84,7 @@ private:
QHash<IStatus*, Message> m_messages;
QTimer* const m_timer;
QTime m_time;
QElapsedTimer m_time;
Sublime::View* m_currentView;
QHash<IStatus*,ProgressItem*> m_progressItems;
StatusbarProgressWidget* m_progressWidget; // embedded in the statusbar, shows a single progressbar & button to expand the overlay widget
......
......@@ -23,7 +23,7 @@
#include "testproject.h"
#include <QTemporaryFile>
#include <QTime>
#include <QElapsedTimer>
#include <QTest>
#include <language/duchain/duchainlock.h>
......@@ -176,7 +176,7 @@ bool TestFile::waitForParsed(int timeout)
// optimize: we don't want to wait the usual timeout before parsing documents here
ICore::self()->languageController()->backgroundParser()->parseDocuments();
}
QTime t;
QElapsedTimer t;
t.start();
while (!d->ready && t.elapsed() < timeout) {
QTest::qWait(10);
......
......@@ -107,7 +107,7 @@ bool waitForState(MIDebugSession *session, KDevelop::IDebugSession::DebuggerStat
const char *file, int line, bool waitForIdle)
{
QPointer<MIDebugSession> s(session); //session can get deleted in DebugController
QTime stopWatch;
QElapsedTimer stopWatch;
stopWatch.start();
// legacy behavior for tests that implicitly may require waiting for idle,
......
......@@ -29,7 +29,7 @@
#include <QPointer>
#include <QString>
#include <QTime>
#include <QElapsedTimer>
#include <QUrl>
namespace KDevMI
......@@ -57,7 +57,7 @@ public:
bool waitUnless(bool ok);
private:
QTime stopWatch;
QElapsedTimer stopWatch;
QPointer<MIDebugSession> session;
const char* condition;
const char* file;
......
......@@ -54,6 +54,7 @@
#include <QSignalSpy>
#include <QTest>
#include <QTemporaryFile>
#include <QElapsedTimer>
#define SKIP_IF_ATTACH_FORBIDDEN() \
do { \
......@@ -219,7 +220,7 @@ public:
}
private:
QTime stopWatch;
QElapsedTimer stopWatch;
QPointer<DebugSession> session;
const char * condition;
const char * file;
......@@ -2082,7 +2083,7 @@ bool GdbTest::waitForState(DebugSession *session, DebugSession::DebuggerState st
const char *file, int line, bool waitForIdle)
{
QPointer<MIDebugSession> s(session); //session can get deleted in DebugController
QTime stopWatch;
QElapsedTimer stopWatch;
stopWatch.start();
// legacy behavior for tests that implicitly may require waiting for idle,
......
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