aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-04-19 22:49:23 +0200
committerhjk <hjk@theqtcompany.com>2016-05-12 15:08:16 +0000
commit60f092f6bb0b3ba76cc227bda94ca9e4ad84eaa0 (patch)
tree10700513b89cc9b60162d97a9f679bac002eec02
parent3b83b8b989c4b7c943e848ffbae40b7a681b32ab (diff)
Debugger: Cosmetics
Qt 5 connects, unused declaration, QLatin1Strings, ... Change-Id: If09929993d750907ee3f4e2fa9f18acfcc28d9c1 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/debugger/breakhandler.h6
-rw-r--r--src/plugins/debugger/debuggercore.h4
-rw-r--r--src/plugins/debugger/debuggerdialogs.cpp4
-rw-r--r--src/plugins/debugger/debuggerdialogs.h18
-rw-r--r--src/plugins/debugger/debuggerengine.cpp143
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp4
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.cpp10
-rw-r--r--src/plugins/debugger/debuggertooltipmanager.h4
-rw-r--r--src/plugins/debugger/gdb/coregdbadapter.cpp4
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp8
-rw-r--r--src/plugins/debugger/gdb/gdbengine.h17
-rw-r--r--src/plugins/debugger/gdb/gdboptionspage.cpp4
-rw-r--r--src/plugins/debugger/lldb/lldbengine.h6
-rw-r--r--src/plugins/debugger/logwindow.cpp12
-rw-r--r--src/plugins/debugger/logwindow.h9
-rw-r--r--src/plugins/debugger/outputcollector.cpp6
-rw-r--r--src/plugins/debugger/outputcollector.h8
-rw-r--r--src/plugins/debugger/qml/qmlengine.cpp10
-rw-r--r--src/plugins/debugger/snapshothandler.h7
-rw-r--r--src/plugins/debugger/stackhandler.h2
-rw-r--r--src/plugins/debugger/watchhandler.h2
-rw-r--r--src/plugins/debugger/watchwindow.cpp7
-rw-r--r--src/plugins/debugger/watchwindow.h9
23 files changed, 133 insertions, 171 deletions
diff --git a/src/plugins/debugger/breakhandler.h b/src/plugins/debugger/breakhandler.h
index af1ac48556..7569d92127 100644
--- a/src/plugins/debugger/breakhandler.h
+++ b/src/plugins/debugger/breakhandler.h
@@ -33,12 +33,6 @@
#include <QCoreApplication>
#include <QPointer>
-//////////////////////////////////////////////////////////////////
-//
-// BreakHandler
-//
-//////////////////////////////////////////////////////////////////
-
namespace Debugger {
namespace Internal {
diff --git a/src/plugins/debugger/debuggercore.h b/src/plugins/debugger/debuggercore.h
index 2b5557f4fd..9a89a55842 100644
--- a/src/plugins/debugger/debuggercore.h
+++ b/src/plugins/debugger/debuggercore.h
@@ -36,7 +36,6 @@ QT_BEGIN_NAMESPACE
class QIcon;
class QMessageBox;
class QWidget;
-class QTreeView;
QT_END_NAMESPACE
namespace CPlusPlus { class Snapshot; }
@@ -51,6 +50,7 @@ class DebuggerEngine;
class Symbol;
class Section;
class GlobalDebuggerOptions;
+class WatchTreeView;
enum TestCases
{
@@ -87,7 +87,7 @@ void setThreadBoxContents(const QStringList &list, int index);
QSharedPointer<Internal::GlobalDebuggerOptions> globalDebuggerOptions();
-QTreeView *inspectorView();
+WatchTreeView *inspectorView();
QVariant sessionValue(const QByteArray &name);
void setSessionValue(const QByteArray &name, const QVariant &value);
QVariant configValue(const QByteArray &name);
diff --git a/src/plugins/debugger/debuggerdialogs.cpp b/src/plugins/debugger/debuggerdialogs.cpp
index 66bf3b1a2a..1e5e7cc295 100644
--- a/src/plugins/debugger/debuggerdialogs.cpp
+++ b/src/plugins/debugger/debuggerdialogs.cpp
@@ -865,8 +865,8 @@ TypeFormatsDialog::TypeFormatsDialog(QWidget *parent)
m_ui->addPage(tr("Standard Types"));
m_ui->addPage(tr("Misc Types"));
- connect(m_ui->buttonBox, SIGNAL(accepted()), SLOT(accept()));
- connect(m_ui->buttonBox, SIGNAL(rejected()), SLOT(reject()));
+ connect(m_ui->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
+ connect(m_ui->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
}
TypeFormatsDialog::~TypeFormatsDialog()
diff --git a/src/plugins/debugger/debuggerdialogs.h b/src/plugins/debugger/debuggerdialogs.h
index 6365c3baf5..60cdedefeb 100644
--- a/src/plugins/debugger/debuggerdialogs.h
+++ b/src/plugins/debugger/debuggerdialogs.h
@@ -33,20 +33,14 @@
#include <QDialog>
QT_BEGIN_NAMESPACE
-class QModelIndex;
class QPushButton;
class QLineEdit;
class QDialogButtonBox;
-class QSettings;
QT_END_NAMESPACE
-namespace Core { class Id; }
-namespace ProjectExplorer { class Kit; }
-
namespace Debugger {
namespace Internal {
-class AttachCoreDialogPrivate;
class AttachToQmlPortDialogPrivate;
class DebuggerRunParameters;
class StartApplicationParameters;
@@ -80,11 +74,9 @@ public:
static bool run(QWidget *parent, DebuggerRunParameters *rp, ProjectExplorer::Kit **kit);
-private slots:
+private:
void historyIndexChanged(int);
void updateState();
-
-private:
StartApplicationParameters parameters() const;
void setParameters(const StartApplicationParameters &p);
void setHistory(const QList<StartApplicationParameters> &l);
@@ -121,10 +113,8 @@ public:
QString connection() const;
void setConnection(const QString &);
-private slots:
- void textChanged(const QString &);
-
private:
+ void textChanged(const QString &);
void accept();
QPushButton *m_okButton;
@@ -140,10 +130,8 @@ public:
void setAddress(quint64 a);
quint64 address() const;
-private slots:
- void textChanged();
-
private:
+ void textChanged();
void accept();
void setOkButtonEnabled(bool v);
diff --git a/src/plugins/debugger/debuggerengine.cpp b/src/plugins/debugger/debuggerengine.cpp
index 164d837345..ddd457e793 100644
--- a/src/plugins/debugger/debuggerengine.cpp
+++ b/src/plugins/debugger/debuggerengine.cpp
@@ -200,10 +200,9 @@ public:
Utils::globalMacroExpander()->registerFileVariables(PrefixDebugExecutable,
tr("Debugged executable"),
- [this]() { return m_runParameters.inferior.executable; });
+ [this] { return m_runParameters.inferior.executable; });
}
-public slots:
void doSetupEngine();
void doSetupInferior();
void doRunEngine();
@@ -220,36 +219,36 @@ public slots:
void queueSetupEngine()
{
m_engine->setState(EngineSetupRequested);
- m_engine->showMessage(_("QUEUE: SETUP ENGINE"));
- QTimer::singleShot(0, this, SLOT(doSetupEngine()));
+ m_engine->showMessage("QUEUE: SETUP ENGINE");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doSetupEngine);
}
void queueSetupInferior()
{
m_engine->setState(InferiorSetupRequested);
- m_engine->showMessage(_("QUEUE: SETUP INFERIOR"));
- QTimer::singleShot(0, this, SLOT(doSetupInferior()));
+ m_engine->showMessage("QUEUE: SETUP INFERIOR");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doSetupInferior);
}
void queueRunEngine()
{
m_engine->setState(EngineRunRequested);
- m_engine->showMessage(_("QUEUE: RUN ENGINE"));
- QTimer::singleShot(0, this, SLOT(doRunEngine()));
+ m_engine->showMessage("QUEUE: RUN ENGINE");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doRunEngine);
}
void queueShutdownEngine()
{
m_engine->setState(EngineShutdownRequested);
- m_engine->showMessage(_("QUEUE: SHUTDOWN ENGINE"));
- QTimer::singleShot(0, this, SLOT(doShutdownEngine()));
+ m_engine->showMessage("QUEUE: SHUTDOWN ENGINE");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doShutdownEngine);
}
void queueShutdownInferior()
{
m_engine->setState(InferiorShutdownRequested);
- m_engine->showMessage(_("QUEUE: SHUTDOWN INFERIOR"));
- QTimer::singleShot(0, this, SLOT(doShutdownInferior()));
+ m_engine->showMessage("QUEUE: SHUTDOWN INFERIOR");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doShutdownInferior);
}
void queueFinishDebugger()
@@ -259,8 +258,8 @@ public slots:
m_engine->setState(DebuggerFinished);
resetLocation();
if (isMasterEngine()) {
- m_engine->showMessage(_("QUEUE: FINISH DEBUGGER"));
- QTimer::singleShot(0, this, SLOT(doFinishDebugger()));
+ m_engine->showMessage("QUEUE: FINISH DEBUGGER");
+ QTimer::singleShot(0, this, &DebuggerEnginePrivate::doFinishDebugger);
}
}
@@ -861,7 +860,7 @@ void DebuggerEngine::notifyEngineRunOkAndInferiorUnrunnable()
void DebuggerEngine::notifyEngineRunFailed()
{
- showMessage(_("NOTE: ENGINE RUN FAILED"));
+ showMessage("NOTE: ENGINE RUN FAILED");
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
d->m_progress.setProgressValue(900);
d->m_progress.reportCanceled();
@@ -874,7 +873,7 @@ void DebuggerEngine::notifyEngineRunFailed()
void DebuggerEngine::notifyEngineRequestRemoteSetup()
{
- showMessage(_("NOTE: REQUEST REMOTE SETUP"));
+ showMessage("NOTE: REQUEST REMOTE SETUP");
QTC_ASSERT(state() == EngineSetupRequested, qDebug() << this << state());
QTC_ASSERT(d->remoteSetupState() == RemoteSetupNone, qDebug() << this
<< "remoteSetupState" << d->remoteSetupState());
@@ -885,7 +884,7 @@ void DebuggerEngine::notifyEngineRequestRemoteSetup()
void DebuggerEngine::notifyEngineRemoteServerRunning(const QByteArray &, int /*pid*/)
{
- showMessage(_("NOTE: REMOTE SERVER RUNNING IN MULTIMODE"));
+ showMessage("NOTE: REMOTE SERVER RUNNING IN MULTIMODE");
}
void DebuggerEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &result)
@@ -899,7 +898,7 @@ void DebuggerEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &re
qDebug() << this << "remoteSetupState" << d->remoteSetupState());
if (result.success) {
- showMessage(_("NOTE: REMOTE SETUP DONE: GDB SERVER PORT: %1 QML PORT %2")
+ showMessage(QString("NOTE: REMOTE SETUP DONE: GDB SERVER PORT: %1 QML PORT %2")
.arg(result.gdbServerPort.number()).arg(result.qmlServerPort.number()));
if (d->remoteSetupState() != RemoteSetupCancelled)
@@ -919,19 +918,19 @@ void DebuggerEngine::notifyEngineRemoteSetupFinished(const RemoteSetupResult &re
if (result.qmlServerPort.isValid()) {
d->m_runParameters.qmlServerPort = result.qmlServerPort;
- d->m_runParameters.inferior.commandLineArguments.replace(
- _("%qml_port%"), QString::number(result.qmlServerPort.number()));
+ d->m_runParameters.inferior.commandLineArguments.replace("%qml_port%",
+ QString::number(result.qmlServerPort.number()));
}
} else {
d->setRemoteSetupState(RemoteSetupFailed);
- showMessage(_("NOTE: REMOTE SETUP FAILED: ") + result.reason);
+ showMessage("NOTE: REMOTE SETUP FAILED: " + result.reason);
}
}
void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
{
- showMessage(_("NOTE: ENGINE RUN AND INFERIOR RUN OK"));
+ showMessage("NOTE: ENGINE RUN AND INFERIOR RUN OK");
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
@@ -941,7 +940,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorRunOk()
void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
{
- showMessage(_("NOTE: ENGINE RUN AND INFERIOR STOP OK"));
+ showMessage("NOTE: ENGINE RUN AND INFERIOR STOP OK");
d->m_progress.setProgressValue(1000);
d->m_progress.reportFinished();
QTC_ASSERT(state() == EngineRunRequested, qDebug() << this << state());
@@ -951,7 +950,7 @@ void DebuggerEngine::notifyEngineRunAndInferiorStopOk()
void DebuggerEngine::notifyInferiorRunRequested()
{
- showMessage(_("NOTE: INFERIOR RUN REQUESTED"));
+ showMessage("NOTE: INFERIOR RUN REQUESTED");
QTC_ASSERT(state() == InferiorStopOk, qDebug() << this << state());
showStatusMessage(tr("Run requested..."));
setState(InferiorRunRequested);
@@ -960,10 +959,10 @@ void DebuggerEngine::notifyInferiorRunRequested()
void DebuggerEngine::notifyInferiorRunOk()
{
if (state() == InferiorRunOk) {
- showMessage(_("NOTE: INFERIOR RUN OK - REPEATED."));
+ showMessage("NOTE: INFERIOR RUN OK - REPEATED.");
return;
}
- showMessage(_("NOTE: INFERIOR RUN OK"));
+ showMessage("NOTE: INFERIOR RUN OK");
showStatusMessage(tr("Running."));
// Transition from StopRequested can happen in remotegdbadapter.
QTC_ASSERT(state() == InferiorRunRequested
@@ -974,7 +973,7 @@ void DebuggerEngine::notifyInferiorRunOk()
void DebuggerEngine::notifyInferiorRunFailed()
{
- showMessage(_("NOTE: INFERIOR RUN FAILED"));
+ showMessage("NOTE: INFERIOR RUN FAILED");
QTC_ASSERT(state() == InferiorRunRequested, qDebug() << this << state());
setState(InferiorRunFailed);
setState(InferiorStopOk);
@@ -984,20 +983,20 @@ void DebuggerEngine::notifyInferiorRunFailed()
void DebuggerEngine::notifyInferiorStopOk()
{
- showMessage(_("NOTE: INFERIOR STOP OK"));
+ showMessage("NOTE: INFERIOR STOP OK");
// Ignore spurious notifications after we are set to die.
if (isDying()) {
- showMessage(_("NOTE: ... WHILE DYING. "));
+ showMessage("NOTE: ... WHILE DYING. ");
// Forward state to "StopOk" if needed.
if (state() == InferiorStopRequested
|| state() == InferiorRunRequested
|| state() == InferiorRunOk) {
- showMessage(_("NOTE: ... FORWARDING TO 'STOP OK'. "));
+ showMessage("NOTE: ... FORWARDING TO 'STOP OK'. ");
setState(InferiorStopOk);
}
if (state() == InferiorStopOk || state() == InferiorStopFailed)
d->queueShutdownInferior();
- showMessage(_("NOTE: ... IGNORING STOP MESSAGE"));
+ showMessage("NOTE: ... IGNORING STOP MESSAGE");
return;
}
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << this << state());
@@ -1007,7 +1006,7 @@ void DebuggerEngine::notifyInferiorStopOk()
void DebuggerEngine::notifyInferiorSpontaneousStop()
{
- showMessage(_("NOTE: INFERIOR SPONTANEOUS STOP"));
+ showMessage("NOTE: INFERIOR SPONTANEOUS STOP");
QTC_ASSERT(state() == InferiorRunOk, qDebug() << this << state());
showStatusMessage(tr("Stopped."));
setState(InferiorStopOk);
@@ -1017,7 +1016,7 @@ void DebuggerEngine::notifyInferiorSpontaneousStop()
void DebuggerEngine::notifyInferiorStopFailed()
{
- showMessage(_("NOTE: INFERIOR STOP FAILED"));
+ showMessage("NOTE: INFERIOR STOP FAILED");
QTC_ASSERT(state() == InferiorStopRequested, qDebug() << this << state());
setState(InferiorStopFailed);
if (isMasterEngine())
@@ -1029,7 +1028,7 @@ void DebuggerEnginePrivate::doInterruptInferior()
//QTC_ASSERT(isMasterEngine(), return);
QTC_ASSERT(state() == InferiorRunOk, qDebug() << m_engine << state());
m_engine->setState(InferiorStopRequested);
- m_engine->showMessage(_("CALL: INTERRUPT INFERIOR"));
+ m_engine->showMessage("CALL: INTERRUPT INFERIOR");
m_engine->showStatusMessage(tr("Attempting to interrupt."));
m_engine->interruptInferior();
}
@@ -1040,13 +1039,13 @@ void DebuggerEnginePrivate::doShutdownInferior()
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << m_engine << state());
resetLocation();
m_targetState = DebuggerFinished;
- m_engine->showMessage(_("CALL: SHUTDOWN INFERIOR"));
+ m_engine->showMessage("CALL: SHUTDOWN INFERIOR");
m_engine->shutdownInferior();
}
void DebuggerEngine::notifyInferiorShutdownOk()
{
- showMessage(_("INFERIOR SUCCESSFULLY SHUT DOWN"));
+ showMessage("INFERIOR SUCCESSFULLY SHUT DOWN");
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << this << state());
d->m_lastGoodState = DebuggerNotReady; // A "neutral" value.
setState(InferiorShutdownOk);
@@ -1056,7 +1055,7 @@ void DebuggerEngine::notifyInferiorShutdownOk()
void DebuggerEngine::notifyInferiorShutdownFailed()
{
- showMessage(_("INFERIOR SHUTDOWN FAILED"));
+ showMessage("INFERIOR SHUTDOWN FAILED");
QTC_ASSERT(state() == InferiorShutdownRequested, qDebug() << this << state());
setState(InferiorShutdownFailed);
if (isMasterEngine())
@@ -1065,7 +1064,7 @@ void DebuggerEngine::notifyInferiorShutdownFailed()
void DebuggerEngine::notifyInferiorIll()
{
- showMessage(_("NOTE: INFERIOR ILL"));
+ showMessage("NOTE: INFERIOR ILL");
// This can be issued in almost any state. The inferior could still be
// alive as some previous notifications might have been bogus.
d->m_targetState = DebuggerFinished;
@@ -1092,13 +1091,13 @@ void DebuggerEnginePrivate::doShutdownEngine()
QTC_ASSERT(isMasterEngine(), qDebug() << m_engine; return);
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << m_engine << state());
m_targetState = DebuggerFinished;
- m_engine->showMessage(_("CALL: SHUTDOWN ENGINE"));
+ m_engine->showMessage("CALL: SHUTDOWN ENGINE");
m_engine->shutdownEngine();
}
void DebuggerEngine::notifyEngineShutdownOk()
{
- showMessage(_("NOTE: ENGINE SHUTDOWN OK"));
+ showMessage("NOTE: ENGINE SHUTDOWN OK");
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << this << state());
setState(EngineShutdownOk);
d->queueFinishDebugger();
@@ -1106,7 +1105,7 @@ void DebuggerEngine::notifyEngineShutdownOk()
void DebuggerEngine::notifyEngineShutdownFailed()
{
- showMessage(_("NOTE: ENGINE SHUTDOWN FAILED"));
+ showMessage("NOTE: ENGINE SHUTDOWN FAILED");
QTC_ASSERT(state() == EngineShutdownRequested, qDebug() << this << state());
setState(EngineShutdownFailed);
d->queueFinishDebugger();
@@ -1114,7 +1113,7 @@ void DebuggerEngine::notifyEngineShutdownFailed()
void DebuggerEnginePrivate::doFinishDebugger()
{
- m_engine->showMessage(_("NOTE: FINISH DEBUGGER"));
+ m_engine->showMessage("NOTE: FINISH DEBUGGER");
QTC_ASSERT(state() == DebuggerFinished, qDebug() << m_engine << state());
if (isMasterEngine() && m_runControl)
m_runControl->debuggingFinished();
@@ -1147,7 +1146,7 @@ void DebuggerEngine::notifyEngineIll()
CALLGRIND_STOP_INSTRUMENTATION;
CALLGRIND_DUMP_STATS;
#endif
- showMessage(_("NOTE: ENGINE ILL ******"));
+ showMessage("NOTE: ENGINE ILL ******");
d->m_targetState = DebuggerFinished;
d->m_lastGoodState = d->m_state;
switch (state()) {
@@ -1157,14 +1156,14 @@ void DebuggerEngine::notifyEngineIll()
// properly interrupt at least once. If that fails, we are on the
// shutdown path due to d->m_targetState anyways.
setState(InferiorStopRequested, true);
- showMessage(_("ATTEMPT TO INTERRUPT INFERIOR"));
+ showMessage("ATTEMPT TO INTERRUPT INFERIOR");
interruptInferior();
break;
case InferiorStopRequested:
notifyInferiorStopFailed();
break;
case InferiorStopOk:
- showMessage(_("FORWARDING STATE TO InferiorShutdownFailed"));
+ showMessage("FORWARDING STATE TO InferiorShutdownFailed");
setState(InferiorShutdownFailed, true);
if (isMasterEngine())
d->queueShutdownEngine();
@@ -1182,7 +1181,7 @@ void DebuggerEngine::notifyEngineSpontaneousShutdown()
CALLGRIND_STOP_INSTRUMENTATION;
CALLGRIND_DUMP_STATS;
#endif
- showMessage(_("NOTE: ENGINE SPONTANEOUS SHUTDOWN"));
+ showMessage("NOTE: ENGINE SPONTANEOUS SHUTDOWN");
setState(EngineShutdownOk, true);
if (isMasterEngine())
d->queueFinishDebugger();
@@ -1194,7 +1193,7 @@ void DebuggerEngine::notifyInferiorExited()
CALLGRIND_STOP_INSTRUMENTATION;
CALLGRIND_DUMP_STATS;
#endif
- showMessage(_("NOTE: INFERIOR EXITED"));
+ showMessage("NOTE: INFERIOR EXITED");
d->resetLocation();
setState(InferiorShutdownOk);
if (isMasterEngine())
@@ -1204,7 +1203,7 @@ void DebuggerEngine::notifyInferiorExited()
void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
QProcess::ExitStatus exitStatus, const QString &backendName)
{
- showMessage(_("%1 PROCESS FINISHED, status %2, exit code %3")
+ showMessage(QString("%1 PROCESS FINISHED, status %2, exit code %3")
.arg(backendName).arg(exitStatus).arg(exitCode));
switch (state()) {
@@ -1218,7 +1217,7 @@ void DebuggerEngine::notifyDebuggerProcessFinished(int exitCode,
// This could either be a real gdb/lldb crash or a quickly exited inferior
// in the terminal adapter. In this case the stub proc will die soon,
// too, so there's no need to act here.
- showMessage(_("The %1 process exited somewhat unexpectedly.").arg(backendName));
+ showMessage(QString("The %1 process exited somewhat unexpectedly.").arg(backendName));
notifyEngineSpontaneousShutdown();
break;
default: {
@@ -1400,7 +1399,7 @@ void DebuggerEngine::notifyInferiorPid(qint64 pid)
if (d->m_runParameters.startMode == StartInternal
|| d->m_runParameters.startMode == StartExternal
|| d->m_runParameters.startMode == AttachExternal)
- QTimer::singleShot(0, d, SLOT(raiseApplication()));
+ QTimer::singleShot(0, d, &DebuggerEnginePrivate::raiseApplication);
}
}
@@ -1417,7 +1416,7 @@ bool DebuggerEngine::isReverseDebugging() const
// Called by DebuggerRunControl.
void DebuggerEngine::quitDebugger()
{
- showMessage(_("QUIT DEBUGGER REQUESTED IN STATE %1").arg(state()));
+ showMessage(QString("QUIT DEBUGGER REQUESTED IN STATE %1").arg(state()));
d->m_targetState = DebuggerFinished;
switch (state()) {
case InferiorStopOk:
@@ -1594,9 +1593,9 @@ void DebuggerEngine::updateAll()
void DebuggerEngine::attemptBreakpointSynchronization()
{
- showMessage(_("ATTEMPT BREAKPOINT SYNCHRONIZATION"));
+ showMessage("ATTEMPT BREAKPOINT SYNCHRONIZATION");
if (!stateAcceptsBreakpointChanges()) {
- showMessage(_("BREAKPOINT SYNCHRONIZATION NOT POSSIBLE IN CURRENT STATE"));
+ showMessage("BREAKPOINT SYNCHRONIZATION NOT POSSIBLE IN CURRENT STATE");
return;
}
@@ -1605,11 +1604,11 @@ void DebuggerEngine::attemptBreakpointSynchronization()
foreach (Breakpoint bp, handler->unclaimedBreakpoints()) {
// Take ownership of the breakpoint. Requests insertion.
if (acceptsBreakpoint(bp)) {
- showMessage(_("TAKING OWNERSHIP OF BREAKPOINT %1 IN STATE %2")
+ showMessage(QString("TAKING OWNERSHIP OF BREAKPOINT %1 IN STATE %2")
.arg(bp.id().toString()).arg(bp.state()));
bp.setEngine(this);
} else {
- showMessage(_("BREAKPOINT %1 IN STATE %2 IS NOT ACCEPTABLE")
+ showMessage(QString("BREAKPOINT %1 IN STATE %2 IS NOT ACCEPTABLE")
.arg(bp.id().toString()).arg(bp.state()));
}
}
@@ -1651,11 +1650,10 @@ void DebuggerEngine::attemptBreakpointSynchronization()
}
}
- if (done) {
- showMessage(_("BREAKPOINTS ARE SYNCHRONIZED"));
- } else {
- showMessage(_("BREAKPOINTS ARE NOT FULLY SYNCHRONIZED"));
- }
+ if (done)
+ showMessage("BREAKPOINTS ARE SYNCHRONIZED");
+ else
+ showMessage("BREAKPOINTS ARE NOT FULLY SYNCHRONIZED");
}
bool DebuggerEngine::acceptsBreakpoint(Breakpoint bp) const
@@ -1891,19 +1889,18 @@ void DebuggerEngine::validateExecutable(DebuggerRunParameters *sp)
Internal::showMessage(_("EXAMINING ") + symbolFile, LogDebug);
QByteArray msg = "ELF SECTIONS: ";
- static QList<QByteArray> interesting;
- if (interesting.isEmpty()) {
- interesting.append(".debug_info");
- interesting.append(".debug_abbrev");
- interesting.append(".debug_line");
- interesting.append(".debug_str");
- interesting.append(".debug_loc");
- interesting.append(".debug_range");
- interesting.append(".gdb_index");
- interesting.append(".note.gnu.build-id");
- interesting.append(".gnu.hash");
- interesting.append(".gnu_debuglink");
- }
+ static const QList<QByteArray> interesting = {
+ ".debug_info",
+ ".debug_abbrev",
+ ".debug_line",
+ ".debug_str",
+ ".debug_loc",
+ ".debug_range",
+ ".gdb_index",
+ ".note.gnu.build-id",
+ ".gnu.hash",
+ ".gnu_debuglink"
+ };
QSet<QByteArray> seen;
foreach (const Utils::ElfSectionHeader &header, elfData.sectionHeaders) {
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d52b23879e..905b39933b 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1007,7 +1007,7 @@ public:
BaseTreeView *m_returnView = 0;
BaseTreeView *m_localsView = 0;
BaseTreeView *m_watchersView = 0;
- BaseTreeView *m_inspectorView = 0;
+ WatchTreeView *m_inspectorView = 0;
BaseTreeView *m_registerView = 0;
BaseTreeView *m_modulesView = 0;
BaseTreeView *m_snapshotView = 0;
@@ -2809,7 +2809,7 @@ QVariant sessionValue(const QByteArray &key)
return SessionManager::value(QString::fromUtf8(key));
}
-QTreeView *inspectorView()
+WatchTreeView *inspectorView()
{
return dd->m_inspectorView;
}
diff --git a/src/plugins/debugger/debuggertooltipmanager.cpp b/src/plugins/debugger/debuggertooltipmanager.cpp
index bab16deef3..0ce5b3fe50 100644
--- a/src/plugins/debugger/debuggertooltipmanager.cpp
+++ b/src/plugins/debugger/debuggertooltipmanager.cpp
@@ -968,7 +968,7 @@ DebuggerToolTipManager::~DebuggerToolTipManager()
m_instance = 0;
}
-void DebuggerToolTipManager::slotUpdateVisibleToolTips()
+void DebuggerToolTipManager::updateVisibleToolTips()
{
purgeClosedToolTips();
if (m_tooltips.isEmpty())
@@ -1010,7 +1010,7 @@ void DebuggerToolTipManager::updateEngine(DebuggerEngine *engine)
// all others release (arguable, this could be more precise?)
foreach (DebuggerToolTipHolder *tooltip, m_tooltips)
tooltip->updateTooltip(engine);
- slotUpdateVisibleToolTips(); // Move tooltip when stepping in same file.
+ updateVisibleToolTips(); // Move tooltip when stepping in same file.
}
void DebuggerToolTipManager::registerEngine(DebuggerEngine *engine)
@@ -1237,7 +1237,7 @@ static void slotEditorOpened(IEditor *e)
if (BaseTextEditor *textEditor = qobject_cast<BaseTextEditor *>(e)) {
TextEditorWidget *widget = textEditor->editorWidget();
QObject::connect(widget->verticalScrollBar(), &QScrollBar::valueChanged,
- &DebuggerToolTipManager::slotUpdateVisibleToolTips);
+ &DebuggerToolTipManager::updateVisibleToolTips);
QObject::connect(widget, &TextEditorWidget::tooltipOverrideRequested,
slotTooltipOverrideRequested);
}
@@ -1252,14 +1252,14 @@ void DebuggerToolTipManager::debugModeEntered()
topLevel->installEventFilter(this);
EditorManager *em = EditorManager::instance();
connect(em, &EditorManager::currentEditorChanged,
- &DebuggerToolTipManager::slotUpdateVisibleToolTips);
+ &DebuggerToolTipManager::updateVisibleToolTips);
connect(em, &EditorManager::editorOpened, slotEditorOpened);
foreach (IEditor *e, DocumentModel::editorsForOpenedDocuments())
slotEditorOpened(e);
// Position tooltips delayed once all the editor placeholder layouting is done.
if (!m_tooltips.isEmpty())
- QTimer::singleShot(0, this, SLOT(slotUpdateVisibleToolTips()));
+ QTimer::singleShot(0, this, &DebuggerToolTipManager::updateVisibleToolTips);
}
}
diff --git a/src/plugins/debugger/debuggertooltipmanager.h b/src/plugins/debugger/debuggertooltipmanager.h
index cc479d046a..6a5f7ee45f 100644
--- a/src/plugins/debugger/debuggertooltipmanager.h
+++ b/src/plugins/debugger/debuggertooltipmanager.h
@@ -94,9 +94,7 @@ public:
static void saveSessionData();
static void closeAllToolTips();
static void resetLocation();
-
-public slots:
- static void slotUpdateVisibleToolTips();
+ static void updateVisibleToolTips();
};
} // namespace Internal
diff --git a/src/plugins/debugger/gdb/coregdbadapter.cpp b/src/plugins/debugger/gdb/coregdbadapter.cpp
index 109592bd62..6529d87c60 100644
--- a/src/plugins/debugger/gdb/coregdbadapter.cpp
+++ b/src/plugins/debugger/gdb/coregdbadapter.cpp
@@ -262,8 +262,8 @@ void GdbCoreEngine::handleRoundTrip(const DebuggerResponse &response)
CHECK_STATE(InferiorUnrunnable);
Q_UNUSED(response);
loadSymbolsForStack();
- handleStop2();
- QTimer::singleShot(1000, this, SLOT(loadAllSymbols()));
+ handleStop3();
+ QTimer::singleShot(1000, this, &GdbEngine::loadAllSymbols);
}
void GdbCoreEngine::interruptInferior()
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index e369940cfe..d95b6fe172 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -856,8 +856,8 @@ void GdbEngine::interruptInferior()
QTC_ASSERT(!m_signalOperation, notifyInferiorStopFailed());
m_signalOperation = runParameters().device->signalOperation();
QTC_ASSERT(m_signalOperation, notifyInferiorStopFailed());
- connect(m_signalOperation.data(), SIGNAL(finished(QString)),
- SLOT(handleInterruptDeviceInferior(QString)));
+ connect(m_signalOperation.data(), &DeviceProcessSignalOperation::finished,
+ this, &GdbEngine::handleInterruptDeviceInferior);
m_signalOperation->setDebuggerCommand(runParameters().debuggerCommand);
m_signalOperation->interruptProcess(inferiorPid());
@@ -1637,10 +1637,10 @@ void GdbEngine::handleStop2(const GdbMi &data)
// Let the event loop run before deciding whether to update the stack.
m_stackNeeded = true; // setTokenBarrier() might reset this.
- QTimer::singleShot(0, this, SLOT(handleStop2()));
+ QTimer::singleShot(0, this, &GdbEngine::handleStop3);
}
-void GdbEngine::handleStop2()
+void GdbEngine::handleStop3()
{
DebuggerCommand cmd("-thread-info", Discardable);
cmd.callback = CB(handleThreadInfo);
diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h
index f94d4d2eef..9c8a3d2d64 100644
--- a/src/plugins/debugger/gdb/gdbengine.h
+++ b/src/plugins/debugger/gdb/gdbengine.h
@@ -123,6 +123,7 @@ protected: ////////// Gdb Process Management //////////
private slots:
friend class GdbPlainEngine;
+ friend class GdbCoreEngine;
void handleInterruptDeviceInferior(const QString &error);
void handleGdbFinished(int exitCode, QProcess::ExitStatus exitStatus);
void handleGdbError(QProcess::ProcessError error);
@@ -170,7 +171,7 @@ private: ////////// Gdb Command Management //////////
void runCommand(const DebuggerCommand &command) override;
private:
- Q_SLOT void commandTimeout();
+ void commandTimeout();
void setTokenBarrier();
// Sets up an "unexpected result" for the following commeand.
@@ -200,13 +201,13 @@ private:
private: ////////// Gdb Output, State & Capability Handling //////////
protected:
- Q_SLOT void handleResponse(const QByteArray &buff);
+ void handleResponse(const QByteArray &buff);
void handleAsyncOutput(const QByteArray &asyncClass, const GdbMi &result);
void handleStopResponse(const GdbMi &data);
void handleResultRecord(DebuggerResponse *response);
void handleStop1(const GdbMi &data);
void handleStop2(const GdbMi &data);
- Q_SLOT void handleStop2();
+ void handleStop3();
void resetCommandQueue();
bool isSynchronous() const override { return true; }
@@ -289,7 +290,7 @@ private: ////////// View & Data Stuff //////////
//
protected:
void loadSymbols(const QString &moduleName) override;
- Q_SLOT void loadAllSymbols() override;
+ void loadAllSymbols() override;
void loadSymbolsForStack() override;
void requestModuleSymbols(const QString &moduleName) override;
void requestModuleSections(const QString &moduleName) override;
@@ -309,7 +310,7 @@ private: ////////// View & Data Stuff //////////
//
// Register specific stuff
//
- Q_SLOT void reloadRegisters() override;
+ void reloadRegisters() override;
void setRegisterValue(const QByteArray &name, const QString &value) override;
void handleRegisterListNames(const DebuggerResponse &response);
void handleRegisterListing(const DebuggerResponse &response);
@@ -355,8 +356,8 @@ protected:
void handleThreadInfo(const DebuggerResponse &response);
void handleThreadNames(const DebuggerResponse &response);
DebuggerCommand stackCommand(int depth);
- Q_SLOT void reloadStack();
- Q_SLOT virtual void reloadFullStack() override;
+ void reloadStack();
+ virtual void reloadFullStack() override;
virtual void loadAdditionalQmlStack() override;
void handleQmlStackTrace(const DebuggerResponse &response);
int currentFrame() const;
@@ -386,7 +387,7 @@ protected:
void handleThreadGroupCreated(const GdbMi &result);
void handleThreadGroupExited(const GdbMi &result);
- Q_SLOT void createFullBacktrace();
+ void createFullBacktrace();
void doUpdateLocals(const UpdateParameters &parameters) override;
void handleFetchVariables(const DebuggerResponse &response);
diff --git a/src/plugins/debugger/gdb/gdboptionspage.cpp b/src/plugins/debugger/gdb/gdboptionspage.cpp
index 4b6a3594fd..4e5aa80843 100644
--- a/src/plugins/debugger/gdb/gdboptionspage.cpp
+++ b/src/plugins/debugger/gdb/gdboptionspage.cpp
@@ -292,8 +292,8 @@ GdbOptionsPageWidget::GdbOptionsPageWidget()
//lineEditSelectedPluginBreakpointsPattern->
// setEnabled(action(SelectedPluginBreakpoints)->value().toBool());
- //connect(radioButtonSelectedPluginBreakpoints, SIGNAL(toggled(bool)),
- // lineEditSelectedPluginBreakpointsPattern, SLOT(setEnabled(bool)));
+ //connect(radioButtonSelectedPluginBreakpoints, &QRadioButton::toggled,
+ // lineEditSelectedPluginBreakpointsPattern, &QLineEdit::setEnabled);
}
GdbOptionsPage::GdbOptionsPage()
diff --git a/src/plugins/debugger/lldb/lldbengine.h b/src/plugins/debugger/lldb/lldbengine.h
index 5af39f3f98..17cae32246 100644
--- a/src/plugins/debugger/lldb/lldbengine.h
+++ b/src/plugins/debugger/lldb/lldbengine.h
@@ -162,9 +162,9 @@ private:
QHash<int, DebuggerCommand> m_commandForToken;
// Console handling.
- Q_SLOT void stubError(const QString &msg);
- Q_SLOT void stubExited();
- Q_SLOT void stubStarted();
+ void stubError(const QString &msg);
+ void stubExited();
+ void stubStarted();
bool prepareCommand();
Utils::ConsoleProcess m_stubProc;
};
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp
index be79d31790..e30d05c2ca 100644
--- a/src/plugins/debugger/logwindow.cpp
+++ b/src/plugins/debugger/logwindow.cpp
@@ -414,14 +414,14 @@ LogWindow::LogWindow(QWidget *parent)
aggregate->add(m_inputText);
aggregate->add(new Core::BaseTextFind(m_inputText));
- connect(m_inputText, SIGNAL(statusMessageRequested(QString,int)),
- SIGNAL(statusMessageRequested(QString,int)));
- connect(m_inputText, SIGNAL(commandSelected(int)),
- m_combinedText, SLOT(gotoResult(int)));
+ connect(m_inputText, &InputPane::statusMessageRequested,
+ this, &LogWindow::statusMessageRequested);
+ connect(m_inputText, &InputPane::commandSelected,
+ m_combinedText, &CombinedPane::gotoResult);
connect(m_commandEdit, &QLineEdit::returnPressed,
this, &LogWindow::sendCommand);
- connect(m_inputText, SIGNAL(executeLineRequested()),
- SLOT(executeLine()));
+ connect(m_inputText, &InputPane::executeLineRequested,
+ this, &LogWindow::executeLine);
connect(repeatButton, &QAbstractButton::clicked,
this, &LogWindow::repeatLastCommand);
diff --git a/src/plugins/debugger/logwindow.h b/src/plugins/debugger/logwindow.h
index 6f6e3d713e..71bfedccd3 100644
--- a/src/plugins/debugger/logwindow.h
+++ b/src/plugins/debugger/logwindow.h
@@ -32,8 +32,6 @@
QT_BEGIN_NAMESPACE
class QCursor;
-class QLabel;
-class QLineEdit;
class QPlainTextEdit;
QT_END_NAMESPACE
@@ -42,7 +40,8 @@ namespace Utils { class FancyLineEdit; }
namespace Debugger {
namespace Internal {
-class DebuggerPane;
+class CombinedPane;
+class InputPane;
class LogWindow : public QWidget
{
@@ -79,8 +78,8 @@ signals:
void statusMessageRequested(const QString &msg, int);
private:
- DebuggerPane *m_combinedText; // combined input/output
- DebuggerPane *m_inputText; // scriptable input alone
+ CombinedPane *m_combinedText; // combined input/output
+ InputPane *m_inputText; // scriptable input alone
QTimer m_outputTimer;
QString m_queuedOutput;
Utils::FancyLineEdit *m_commandEdit;
diff --git a/src/plugins/debugger/outputcollector.cpp b/src/plugins/debugger/outputcollector.cpp
index f6b8ae635d..4fad571c61 100644
--- a/src/plugins/debugger/outputcollector.cpp
+++ b/src/plugins/debugger/outputcollector.cpp
@@ -75,7 +75,7 @@ bool OutputCollector::listen()
if (m_server)
return m_server->isListening();
m_server = new QLocalServer(this);
- connect(m_server, SIGNAL(newConnection()), SLOT(newConnectionAvailable()));
+ connect(m_server, &QLocalServer::newConnection, this, &OutputCollector::newConnectionAvailable);
return m_server->listen(QString::fromLatin1("creator-%1-%2")
.arg(QCoreApplication::applicationPid())
.arg(rand()));
@@ -111,7 +111,7 @@ bool OutputCollector::listen()
return false;
}
m_serverNotifier = new QSocketNotifier(m_serverFd, QSocketNotifier::Read, this);
- connect(m_serverNotifier, SIGNAL(activated(int)), SLOT(bytesAvailable()));
+ connect(m_serverNotifier, &QSocketNotifier::activated, this, &OutputCollector::bytesAvailable);
return true;
#endif
}
@@ -156,7 +156,7 @@ void OutputCollector::newConnectionAvailable()
if (m_socket)
return;
m_socket = m_server->nextPendingConnection();
- connect(m_socket, SIGNAL(readyRead()), SLOT(bytesAvailable()));
+ connect(m_socket, &QIODevice::readyRead, this, &OutputCollector::bytesAvailable);
}
#endif
diff --git a/src/plugins/debugger/outputcollector.h b/src/plugins/debugger/outputcollector.h
index 476febb865..d6d44367a0 100644
--- a/src/plugins/debugger/outputcollector.h
+++ b/src/plugins/debugger/outputcollector.h
@@ -49,7 +49,7 @@ class OutputCollector : public QObject
public:
OutputCollector(QObject *parent = 0);
- ~OutputCollector();
+ ~OutputCollector() override;
bool listen();
void shutdown();
QString serverName() const;
@@ -58,14 +58,10 @@ public:
signals:
void byteDelivery(const QByteArray &data);
-private slots:
+private:
void bytesAvailable();
#ifdef Q_OS_WIN
void newConnectionAvailable();
-#endif
-
-private:
-#ifdef Q_OS_WIN
QLocalServer *m_server;
QLocalSocket *m_socket;
#else
diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp
index cdce030c80..2b22748929 100644
--- a/src/plugins/debugger/qml/qmlengine.cpp
+++ b/src/plugins/debugger/qml/qmlengine.cpp
@@ -59,6 +59,7 @@
#include <texteditor/texteditor.h>
#include <utils/treemodel.h>
+#include <utils/basetreeview.h>
#include <utils/qtcassert.h>
#include <QDebug>
@@ -248,8 +249,8 @@ QmlEngine::QmlEngine(const DebuggerRunParameters &startParameters, DebuggerEngin
this, &QmlEngine::updateCurrentContext);
connect(stackHandler(), &StackHandler::currentIndexChanged,
this, &QmlEngine::updateCurrentContext);
- connect(inspectorView(), SIGNAL(currentIndexChanged(QModelIndex)),
- SLOT(updateCurrentContext()));
+ connect(inspectorView(), &WatchTreeView::currentIndexChanged,
+ this, &QmlEngine::updateCurrentContext);
connect(&d->applicationLauncher, &ApplicationLauncher::processExited,
this, &QmlEngine::disconnected);
@@ -270,7 +271,8 @@ QmlEngine::QmlEngine(const DebuggerRunParameters &startParameters, DebuggerEngin
// then just try to connect (application output might be redirected / blocked)
d->noDebugOutputTimer.setSingleShot(true);
d->noDebugOutputTimer.setInterval(8000);
- connect(&d->noDebugOutputTimer, SIGNAL(timeout()), this, SLOT(tryToConnect()));
+ connect(&d->noDebugOutputTimer, &QTimer::timeout,
+ this, [this] { tryToConnect(); });
// we won't get any debug output
if (startParameters.useTerminal) {
@@ -407,7 +409,7 @@ void QmlEngine::connectionStartupFailed()
{
if (d->retryOnConnectFail) {
// retry after 3 seconds ...
- QTimer::singleShot(3000, this, SLOT(beginConnection()));
+ QTimer::singleShot(3000, this, [this] { beginConnection(); });
return;
}
diff --git a/src/plugins/debugger/snapshothandler.h b/src/plugins/debugger/snapshothandler.h
index fb9225d335..b17a498867 100644
--- a/src/plugins/debugger/snapshothandler.h
+++ b/src/plugins/debugger/snapshothandler.h
@@ -33,12 +33,6 @@ namespace Internal {
class DebuggerEngine;
-////////////////////////////////////////////////////////////////////////
-//
-// SnapshotModel
-//
-////////////////////////////////////////////////////////////////////////
-
class SnapshotHandler : public QAbstractTableModel
{
Q_OBJECT
@@ -68,7 +62,6 @@ private:
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
- Q_SLOT void resetModel() { beginResetModel(); endResetModel(); }
int m_currentIndex;
QList< QPointer<DebuggerEngine> > m_snapshots;
diff --git a/src/plugins/debugger/stackhandler.h b/src/plugins/debugger/stackhandler.h
index 10649f5b88..cbc298bb04 100644
--- a/src/plugins/debugger/stackhandler.h
+++ b/src/plugins/debugger/stackhandler.h
@@ -83,7 +83,7 @@ private:
QVariant data(const QModelIndex &index, int role) const;
QVariant headerData(int section, Qt::Orientation orientation, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
- Q_SLOT void resetModel() { beginResetModel(); endResetModel(); }
+ void resetModel() { beginResetModel(); endResetModel(); }
DebuggerEngine *m_engine;
StackFrames m_stackFrames;
diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h
index 6b5fc51b11..b64533904d 100644
--- a/src/plugins/debugger/watchhandler.h
+++ b/src/plugins/debugger/watchhandler.h
@@ -68,7 +68,7 @@ public:
void watchExpression(const QString &exp, const QString &name = QString());
void updateWatchExpression(WatchItem *item, const QByteArray &newExp);
void watchVariable(const QString &exp);
- Q_SLOT void clearWatches();
+ void clearWatches();
const WatchItem *watchItem(const QModelIndex &) const;
void fetchMore(const QByteArray &iname) const;
diff --git a/src/plugins/debugger/watchwindow.cpp b/src/plugins/debugger/watchwindow.cpp
index 1574f99113..2327690ea2 100644
--- a/src/plugins/debugger/watchwindow.cpp
+++ b/src/plugins/debugger/watchwindow.cpp
@@ -1003,7 +1003,7 @@ void WatchTreeView::doItemsLayout()
m_sliderPosition = verticalScrollBar()->sliderPosition();
Utils::BaseTreeView::doItemsLayout();
if (m_sliderPosition)
- QTimer::singleShot(0, this, SLOT(adjustSlider()));
+ QTimer::singleShot(0, this, &WatchTreeView::adjustSlider);
}
void WatchTreeView::adjustSlider()
@@ -1056,8 +1056,9 @@ public:
m_lineEdit, &Utils::FancyLineEdit::onEditingFinished);
connect(m_buttons, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(m_buttons, &QDialogButtonBox::rejected, this, &QDialog::reject);
- connect(m_hint, SIGNAL(linkActivated(QString)),
- Core::HelpManager::instance(), SLOT(handleHelpRequest(QString)));
+ connect(m_hint, &QLabel::linkActivated, [](const QString &link) {
+ Core::HelpManager::handleHelpRequest(link);
+ });
}
void setLabelText(const QString &text)
diff --git a/src/plugins/debugger/watchwindow.h b/src/plugins/debugger/watchwindow.h
index f7eefe9bd0..155ab0cd2c 100644
--- a/src/plugins/debugger/watchwindow.h
+++ b/src/plugins/debugger/watchwindow.h
@@ -30,12 +30,6 @@
namespace Debugger {
namespace Internal {
-/////////////////////////////////////////////////////////////////////
-//
-// WatchWindow
-//
-/////////////////////////////////////////////////////////////////////
-
enum WatchType { LocalsType, InspectType, WatchersType, ReturnType, TooltipType };
class WatchTreeView : public Utils::BaseTreeView
@@ -53,7 +47,6 @@ public:
void fillFormatMenu(QMenu *, const QModelIndex &mi);
static void reexpand(QTreeView *view, const QModelIndex &idx);
-public slots:
void watchExpression(const QString &exp);
void watchExpression(const QString &exp, const QString &name);
void handleItemIsExpanded(const QModelIndex &idx);
@@ -65,7 +58,7 @@ private:
void resetHelper();
void expandNode(const QModelIndex &idx);
void collapseNode(const QModelIndex &idx);
- Q_SLOT void adjustSlider(); // Used by single-shot timer.
+ void adjustSlider();
void showUnprintable(int base);
void doItemsLayout();