Commit 15ea2953 authored by hjk's avatar hjk

debugger: use DeviceProcessesDialog directly for attaching

Change-Id: I916c42bc141f5bfbf5dd163b3d9dfeed3703ed94
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@nokia.com>
parent 61291e94
......@@ -1670,21 +1670,12 @@ void DebuggerPluginPrivate::attachToRunningApplication()
attachToProcess(false);
}
class DebuggerProcessesDialog : public ProjectExplorer::DeviceProcessesDialog {
public:
DebuggerProcessesDialog(DebuggerKitChooser::Mode m, QWidget *parent) :
ProjectExplorer::DeviceProcessesDialog(new DebuggerKitChooser(m), parent)
{
addAcceptButton(DeviceProcessesDialog::tr("&Attach to Process"));
}
};
void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
{
const DebuggerKitChooser::Mode mode = startServerOnly ?
DebuggerKitChooser::RemoteDebugging : DebuggerKitChooser::LocalDebugging;
DeviceProcessesDialog *dlg = new DebuggerProcessesDialog(mode, mainWindow());
DebuggerKitChooser *kitChooser = new DebuggerKitChooser(mode);
DeviceProcessesDialog *dlg = new DeviceProcessesDialog(kitChooser, mainWindow());
dlg->addAcceptButton(DeviceProcessesDialog::tr("&Attach to Process"));
dlg->showAllDevices();
if (dlg->exec() == QDialog::Rejected) {
......@@ -1693,7 +1684,6 @@ void DebuggerPluginPrivate::attachToProcess(bool startServerOnly)
}
dlg->setAttribute(Qt::WA_DeleteOnClose);
KitChooser *kitChooser = dlg->kitChooser();
Kit *kit = kitChooser->currentKit();
QTC_ASSERT(kit, return);
IDevice::ConstPtr device = DeviceKitInformation::device(kit);
......
......@@ -59,8 +59,6 @@ public:
DeviceProcess currentProcess() const;
KitChooser *kitChooser() const;
void logMessage(const QString &line);
protected:
DeviceProcessesDialog(KitChooser *chooser, QWidget *parent);
private:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment