forked from qt-creator/qt-creator
Use free Debugger::createDebuggerRunControl() function
Allows us to un-export DebuggerRunControlFactory in an attempt to slim down the publicly visible Debugger plugin interface Change-Id: I0c2e7351ffa7a9d16586172816635be8ff40172e Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: David Schulz <david.schulz@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -126,8 +126,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
|
|||||||
params.projectBuildDirectory = target->activeBuildConfiguration()->buildDirectory().toString();
|
params.projectBuildDirectory = target->activeBuildConfiguration()->buildDirectory().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
DebuggerRunControl * const debuggerRunControl
|
DebuggerRunControl * const debuggerRunControl = createDebuggerRunControl(params, errorMessage);
|
||||||
= DebuggerRunControlFactory::doCreate(params, errorMessage);
|
|
||||||
new AndroidDebugSupport(runConfig, debuggerRunControl);
|
new AndroidDebugSupport(runConfig, debuggerRunControl);
|
||||||
return debuggerRunControl;
|
return debuggerRunControl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ RunControl *BareMetalRunControlFactory::create(
|
|||||||
sp.remoteSetupNeeded = true;
|
sp.remoteSetupNeeded = true;
|
||||||
|
|
||||||
sp.runConfiguration = rc;
|
sp.runConfiguration = rc;
|
||||||
DebuggerRunControl *runControl = DebuggerRunControlFactory::doCreate(sp, errorMessage);
|
DebuggerRunControl *runControl = createDebuggerRunControl(sp, errorMessage);
|
||||||
if (runControl && sp.remoteSetupNeeded) {
|
if (runControl && sp.remoteSetupNeeded) {
|
||||||
const auto debugSupport = new BareMetalDebugSupport(dev, runControl);
|
const auto debugSupport = new BareMetalDebugSupport(dev, runControl);
|
||||||
Q_UNUSED(debugSupport);
|
Q_UNUSED(debugSupport);
|
||||||
|
|||||||
@@ -170,8 +170,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
|
|||||||
params.startMode = AttachToRemoteServer;
|
params.startMode = AttachToRemoteServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
DebuggerRunControl * const debuggerRunControl
|
DebuggerRunControl * const debuggerRunControl = createDebuggerRunControl(params, errorMessage);
|
||||||
= DebuggerRunControlFactory::doCreate(params, errorMessage);
|
|
||||||
if (debuggerRunControl)
|
if (debuggerRunControl)
|
||||||
new IosDebugSupport(runConfig, debuggerRunControl, cppDebug, qmlDebug);
|
new IosDebugSupport(runConfig, debuggerRunControl, cppDebug, qmlDebug);
|
||||||
return debuggerRunControl;
|
return debuggerRunControl;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ void QnxAttachDebugSupport::attachToProcess()
|
|||||||
sp.solibSearchPath = QnxUtils::searchPaths(qtVersion);
|
sp.solibSearchPath = QnxUtils::searchPaths(qtVersion);
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
|
Debugger::DebuggerRunControl * const runControl = Debugger::createDebuggerRunControl(sp, &errorMessage);
|
||||||
if (!errorMessage.isEmpty()) {
|
if (!errorMessage.isEmpty()) {
|
||||||
handleError(errorMessage);
|
handleError(errorMessage);
|
||||||
stopPDebug();
|
stopPDebug();
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mo
|
|||||||
return new QnxRunControl(rc);
|
return new QnxRunControl(rc);
|
||||||
case DebugRunMode: {
|
case DebugRunMode: {
|
||||||
const DebuggerStartParameters params = createDebuggerStartParameters(rc);
|
const DebuggerStartParameters params = createDebuggerStartParameters(rc);
|
||||||
DebuggerRunControl * const runControl = DebuggerRunControlFactory::doCreate(params, errorMessage);
|
DebuggerRunControl * const runControl = createDebuggerRunControl(params, errorMessage);
|
||||||
if (!runControl)
|
if (!runControl)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|||||||
@@ -107,8 +107,7 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Ru
|
|||||||
if (mode == DebugRunModeWithBreakOnMain)
|
if (mode == DebugRunModeWithBreakOnMain)
|
||||||
params.breakOnMain = true;
|
params.breakOnMain = true;
|
||||||
params.runConfiguration = runConfig;
|
params.runConfiguration = runConfig;
|
||||||
DebuggerRunControl * const runControl
|
DebuggerRunControl * const runControl = createDebuggerRunControl(params, errorMessage);
|
||||||
= DebuggerRunControlFactory::doCreate(params, errorMessage);
|
|
||||||
if (!runControl)
|
if (!runControl)
|
||||||
return 0;
|
return 0;
|
||||||
LinuxDeviceDebugSupport * const debugSupport =
|
LinuxDeviceDebugSupport * const debugSupport =
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ void MemcheckWithGdbRunControl::startDebugger()
|
|||||||
sp.runConfiguration = rc;
|
sp.runConfiguration = rc;
|
||||||
|
|
||||||
QString errorMessage;
|
QString errorMessage;
|
||||||
RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
|
RunControl *gdbRunControl = Debugger::createDebuggerRunControl(sp, &errorMessage);
|
||||||
QTC_ASSERT(gdbRunControl, return);
|
QTC_ASSERT(gdbRunControl, return);
|
||||||
connect(gdbRunControl, &RunControl::finished,
|
connect(gdbRunControl, &RunControl::finished,
|
||||||
gdbRunControl, &RunControl::deleteLater);
|
gdbRunControl, &RunControl::deleteLater);
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ RunControl *WinRtDebugSupport::createDebugRunControl(WinRtRunConfiguration *runC
|
|||||||
server.close();
|
server.close();
|
||||||
params.runConfiguration = runConfig;
|
params.runConfiguration = runConfig;
|
||||||
Debugger::DebuggerRunControl *debugRunControl
|
Debugger::DebuggerRunControl *debugRunControl
|
||||||
= DebuggerRunControlFactory::doCreate(params, errorMessage);
|
= createDebuggerRunControl(params, errorMessage);
|
||||||
runner->setRunControl(debugRunControl);
|
runner->setRunControl(debugRunControl);
|
||||||
new WinRtDebugSupport(debugRunControl, runner);
|
new WinRtDebugSupport(debugRunControl, runner);
|
||||||
return debugRunControl;
|
return debugRunControl;
|
||||||
|
|||||||
Reference in New Issue
Block a user