forked from qt-creator/qt-creator
Debugger: Use QElapsedTimer instead of QTime::elapsed()
Deprecation looming. Change-Id: Ibafbac6fbe48d74ba7d88c22400d581e49e4e45d Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
@@ -324,12 +324,9 @@ static QStringList mergeEnvironment(QStringList runConfigEnvironment,
|
||||
return runConfigEnvironment;
|
||||
}
|
||||
|
||||
int CdbEngine::elapsedLogTime() const
|
||||
int CdbEngine::elapsedLogTime()
|
||||
{
|
||||
const int elapsed = m_logTime.elapsed();
|
||||
const int delta = elapsed - m_elapsedLogTime;
|
||||
m_elapsedLogTime = elapsed;
|
||||
return delta;
|
||||
return m_logTimer.restart();
|
||||
}
|
||||
|
||||
void CdbEngine::createFullBacktrace()
|
||||
@@ -352,8 +349,8 @@ void CdbEngine::setupEngine()
|
||||
qDebug(">setupEngine");
|
||||
|
||||
init();
|
||||
if (!m_logTime.elapsed())
|
||||
m_logTime.start();
|
||||
if (!m_logTimer.elapsed())
|
||||
m_logTimer.start();
|
||||
|
||||
// Console: Launch the stub with the suspended application and attach to it
|
||||
// CDB in theory has a command line option '-2' that launches a
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
|
||||
#include <QTime>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
@@ -195,7 +195,7 @@ private:
|
||||
NormalizedSourceFileName sourceMapNormalizeFileNameFromDebugger(const QString &f);
|
||||
void doUpdateLocals(const UpdateParameters ¶ms) override;
|
||||
void updateAll() override;
|
||||
int elapsedLogTime() const;
|
||||
int elapsedLogTime();
|
||||
unsigned parseStackTrace(const GdbMi &data, bool sourceStepInto);
|
||||
void mergeStartParametersSourcePathMap();
|
||||
|
||||
@@ -223,8 +223,7 @@ private:
|
||||
wow64Stack32Bit,
|
||||
wow64Stack64Bit
|
||||
} m_wow64State = wow64Uninitialized;
|
||||
QTime m_logTime;
|
||||
mutable int m_elapsedLogTime = 0;
|
||||
QElapsedTimer m_logTimer;
|
||||
QString m_extensionMessageBuffer;
|
||||
bool m_sourceStepInto = false;
|
||||
int m_watchPointX = 0;
|
||||
|
Reference in New Issue
Block a user