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:
hjk
2015-05-27 15:44:02 +02:00
parent 04733e35ec
commit 6eada122a3
8 changed files with 8 additions and 11 deletions

View File

@@ -126,8 +126,7 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *
params.projectBuildDirectory = target->activeBuildConfiguration()->buildDirectory().toString();
}
DebuggerRunControl * const debuggerRunControl
= DebuggerRunControlFactory::doCreate(params, errorMessage);
DebuggerRunControl * const debuggerRunControl = createDebuggerRunControl(params, errorMessage);
new AndroidDebugSupport(runConfig, debuggerRunControl);
return debuggerRunControl;
}

View File

@@ -157,7 +157,7 @@ RunControl *BareMetalRunControlFactory::create(
sp.remoteSetupNeeded = true;
sp.runConfiguration = rc;
DebuggerRunControl *runControl = DebuggerRunControlFactory::doCreate(sp, errorMessage);
DebuggerRunControl *runControl = createDebuggerRunControl(sp, errorMessage);
if (runControl && sp.remoteSetupNeeded) {
const auto debugSupport = new BareMetalDebugSupport(dev, runControl);
Q_UNUSED(debugSupport);

View File

@@ -170,8 +170,7 @@ RunControl *IosDebugSupport::createDebugRunControl(IosRunConfiguration *runConfi
params.startMode = AttachToRemoteServer;
}
DebuggerRunControl * const debuggerRunControl
= DebuggerRunControlFactory::doCreate(params, errorMessage);
DebuggerRunControl * const debuggerRunControl = createDebuggerRunControl(params, errorMessage);
if (debuggerRunControl)
new IosDebugSupport(runConfig, debuggerRunControl, cppDebug, qmlDebug);
return debuggerRunControl;

View File

@@ -132,7 +132,7 @@ void QnxAttachDebugSupport::attachToProcess()
sp.solibSearchPath = QnxUtils::searchPaths(qtVersion);
QString errorMessage;
Debugger::DebuggerRunControl * const runControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
Debugger::DebuggerRunControl * const runControl = Debugger::createDebuggerRunControl(sp, &errorMessage);
if (!errorMessage.isEmpty()) {
handleError(errorMessage);
stopPDebug();

View File

@@ -180,7 +180,7 @@ RunControl *QnxRunControlFactory::create(RunConfiguration *runConfig, RunMode mo
return new QnxRunControl(rc);
case DebugRunMode: {
const DebuggerStartParameters params = createDebuggerStartParameters(rc);
DebuggerRunControl * const runControl = DebuggerRunControlFactory::doCreate(params, errorMessage);
DebuggerRunControl * const runControl = createDebuggerRunControl(params, errorMessage);
if (!runControl)
return 0;

View File

@@ -107,8 +107,7 @@ RunControl *RemoteLinuxRunControlFactory::create(RunConfiguration *runConfig, Ru
if (mode == DebugRunModeWithBreakOnMain)
params.breakOnMain = true;
params.runConfiguration = runConfig;
DebuggerRunControl * const runControl
= DebuggerRunControlFactory::doCreate(params, errorMessage);
DebuggerRunControl * const runControl = createDebuggerRunControl(params, errorMessage);
if (!runControl)
return 0;
LinuxDeviceDebugSupport * const debugSupport =

View File

@@ -188,7 +188,7 @@ void MemcheckWithGdbRunControl::startDebugger()
sp.runConfiguration = rc;
QString errorMessage;
RunControl *gdbRunControl = Debugger::DebuggerRunControlFactory::doCreate(sp, &errorMessage);
RunControl *gdbRunControl = Debugger::createDebuggerRunControl(sp, &errorMessage);
QTC_ASSERT(gdbRunControl, return);
connect(gdbRunControl, &RunControl::finished,
gdbRunControl, &RunControl::deleteLater);

View File

@@ -127,7 +127,7 @@ RunControl *WinRtDebugSupport::createDebugRunControl(WinRtRunConfiguration *runC
server.close();
params.runConfiguration = runConfig;
Debugger::DebuggerRunControl *debugRunControl
= DebuggerRunControlFactory::doCreate(params, errorMessage);
= createDebuggerRunControl(params, errorMessage);
runner->setRunControl(debugRunControl);
new WinRtDebugSupport(debugRunControl, runner);
return debugRunControl;