aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2015-02-12 13:50:54 +0100
committerhjk <hjk@theqtcompany.com>2015-02-12 15:14:55 +0000
commitf1c5889e7753a4eea6f6dd4e9d94b5a25bf0e964 (patch)
tree2be3e96f3f6a4d52e093e389d27dc4a97ed24849 /src/plugins/debugger/gdb/remotegdbserveradapter.cpp
parent0eabe627864137220087cf4a25f79a57b21b5f54 (diff)
Debugger: Some code modernization
Qt 5 signal/slot, a few auto. Change-Id: Ia17f1b3dcd41dfe0a373c14e7c1d34d210d084f1 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'src/plugins/debugger/gdb/remotegdbserveradapter.cpp')
-rw-r--r--src/plugins/debugger/gdb/remotegdbserveradapter.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
index e2339f8e4b..351211efb0 100644
--- a/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
+++ b/src/plugins/debugger/gdb/remotegdbserveradapter.cpp
@@ -46,6 +46,8 @@
#include <QFileInfo>
+using namespace Utils;
+
namespace Debugger {
namespace Internal {
@@ -60,8 +62,9 @@ namespace Internal {
GdbRemoteServerEngine::GdbRemoteServerEngine(const DebuggerStartParameters &startParameters)
: GdbEngine(startParameters), m_startAttempted(false)
{
- if (Utils::HostOsInfo::isWindowsHost())
+ if (HostOsInfo::isWindowsHost())
m_gdbProc->setUseCtrlCStub(startParameters.useCtrlCStub); // This is only set for QNX/BlackBerry
+
connect(&m_uploadProc, static_cast<void (QProcess::*)(QProcess::ProcessError)>(&QProcess::error),
this, &GdbRemoteServerEngine::uploadProcError);
connect(&m_uploadProc, &QProcess::readyReadStandardOutput,
@@ -80,9 +83,9 @@ void GdbRemoteServerEngine::setupEngine()
// Provide script information about the environment
QString arglist;
- Utils::QtcProcess::addArg(&arglist, startParameters().serverStartScript);
- Utils::QtcProcess::addArg(&arglist, startParameters().executable);
- Utils::QtcProcess::addArg(&arglist, startParameters().remoteChannel);
+ QtcProcess::addArg(&arglist, startParameters().serverStartScript);
+ QtcProcess::addArg(&arglist, startParameters().executable);
+ QtcProcess::addArg(&arglist, startParameters().remoteChannel);
m_uploadProc.start(_("/bin/sh ") + arglist);
m_uploadProc.waitForStarted();
@@ -172,12 +175,12 @@ void GdbRemoteServerEngine::setupInferior()
//const QByteArray sysroot = sp.sysroot.toLocal8Bit();
//const QByteArray remoteArch = sp.remoteArchitecture.toLatin1();
- const QString args = isMasterEngine() ? startParameters().processArgs : masterEngine()->startParameters().processArgs;
+ const QString args = isMasterEngine() ? startParameters().processArgs
+ : masterEngine()->startParameters().processArgs;
// if (!remoteArch.isEmpty())
// postCommand("set architecture " + remoteArch);
- const QString solibSearchPath
- = sp.solibSearchPath.join(Utils::HostOsInfo::pathListSeparator());
+ const QString solibSearchPath = sp.solibSearchPath.join(HostOsInfo::pathListSeparator());
if (!solibSearchPath.isEmpty())
postCommand("set solib-search-path " + solibSearchPath.toLocal8Bit());
@@ -431,7 +434,7 @@ void GdbRemoteServerEngine::interruptInferior2()
if (boolSetting(TargetAsync)) {
postCommand("-exec-interrupt", GdbEngine::Immediate,
CB(handleInterruptInferior));
- } else if (m_isQnxGdb && Utils::HostOsInfo::isWindowsHost()) {
+ } else if (m_isQnxGdb && HostOsInfo::isWindowsHost()) {
m_gdbProc->winInterruptByCtrlC();
} else {
bool ok = m_gdbProc->interrupt();