diff options
author | hjk <[email protected]> | 2014-02-12 14:11:52 +0100 |
---|---|---|
committer | hjk <[email protected]> | 2014-02-12 16:18:59 +0100 |
commit | 864d3aa9145f560fb8fc5281d4d47f9b0a17742c (patch) | |
tree | b8a9c5c6a0c8de81a2b42433ee0850ce59aa6b08 /src/plugins/debugger/debuggerplugin.cpp | |
parent | 29acdd89b37ad43f2b08f19408acf02a44796c2a (diff) |
Debugger: Replace a few mainwindow uses with dialogparent
Change-Id: Ie755f7c2716aeee83c0e4a653db25fb46403a16b
Reviewed-by: Friedemann Kleint <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r-- | src/plugins/debugger/debuggerplugin.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index b833456f1d0..b88a1a6a268 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -1078,7 +1078,7 @@ public slots: QTC_ASSERT(act, return); const BreakpointModelId id = act->data().value<BreakpointModelId>(); QTC_ASSERT(id > 0, return); - BreakTreeView::editBreakpoint(id, ICore::mainWindow()); + BreakTreeView::editBreakpoint(id, ICore::dialogParent()); } void slotRunToLine() @@ -1571,13 +1571,13 @@ void DebuggerPluginPrivate::debugProjectBreakMain() void DebuggerPluginPrivate::startAndDebugApplication() { DebuggerStartParameters sp; - if (StartApplicationDialog::run(ICore::mainWindow(), &sp)) + if (StartApplicationDialog::run(ICore::dialogParent(), &sp)) DebuggerRunControlFactory::createAndScheduleRun(sp); } void DebuggerPluginPrivate::attachCore() { - AttachCoreDialog dlg(ICore::mainWindow()); + AttachCoreDialog dlg(ICore::dialogParent()); const QString lastExternalKit = configValue("LastExternalKit").toString(); if (!lastExternalKit.isEmpty()) @@ -1619,7 +1619,7 @@ void DebuggerPluginPrivate::startRemoteCdbSession() QTC_ASSERT(kit && fillParameters(&sp, kit), return); sp.startMode = AttachToRemoteServer; sp.closeMode = KillAtClose; - StartRemoteCdbDialog dlg(ICore::mainWindow()); + StartRemoteCdbDialog dlg(ICore::dialogParent()); QString previousConnection = configValue(connectionKey).toString(); if (previousConnection.isEmpty()) previousConnection = QLatin1String("localhost:1234"); @@ -1635,7 +1635,7 @@ void DebuggerPluginPrivate::attachToRemoteServer() { DebuggerStartParameters sp; sp.startMode = AttachToRemoteServer; - if (StartApplicationDialog::run(ICore::mainWindow(), &sp)) { + if (StartApplicationDialog::run(ICore::dialogParent(), &sp)) { sp.closeMode = KillAtClose; sp.serverStartScript.clear(); DebuggerRunControlFactory::createAndScheduleRun(sp); @@ -1657,7 +1657,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly) const DebuggerKitChooser::Mode mode = startServerOnly ? DebuggerKitChooser::RemoteDebugging : DebuggerKitChooser::LocalDebugging; DebuggerKitChooser *kitChooser = new DebuggerKitChooser(mode); - DeviceProcessesDialog *dlg = new DeviceProcessesDialog(kitChooser, ICore::mainWindow()); + DeviceProcessesDialog *dlg = new DeviceProcessesDialog(kitChooser, ICore::dialogParent()); dlg->addAcceptButton(ProjectExplorer::DeviceProcessesDialog::tr("&Attach to Process")); dlg->showAllDevices(); if (dlg->exec() == QDialog::Rejected) { @@ -1682,7 +1682,7 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly) void DebuggerPluginPrivate::attachToUnstartedApplicationDialog() { - UnstartedAppWatcherDialog *dlg = new UnstartedAppWatcherDialog(mainWindow()); + UnstartedAppWatcherDialog *dlg = new UnstartedAppWatcherDialog(ICore::dialogParent()); connect(dlg, SIGNAL(finished(int)), dlg, SLOT(deleteLater())); connect(dlg, SIGNAL(processFound()), this, SLOT(attachToFoundProcess())); @@ -1726,7 +1726,7 @@ DebuggerRunControl *DebuggerPluginPrivate::attachToRunningProcess(Kit *kit, IDevice::ConstPtr device = DeviceKitInformation::device(kit); QTC_ASSERT(device, return 0); if (process.pid == 0) { - QMessageBox::warning(ICore::mainWindow(), tr("Warning"), + QMessageBox::warning(ICore::dialogParent(), tr("Warning"), tr("Cannot attach to process with PID 0")); return 0; } |