forked from qt-creator/qt-creator
Debugger: Exclude already-running processes on Unstarted App Debug
Change-Id: I694c627b8da6a8bf7484bf05106b486078201ddd Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
2bcdc1ee7e
commit
be3a781581
@@ -240,6 +240,8 @@ void UnstartedAppWatcherDialog::findProcess()
|
|||||||
ProcessInfo fallback;
|
ProcessInfo fallback;
|
||||||
const QList<ProcessInfo> processInfoList = ProcessInfo::processInfoList();
|
const QList<ProcessInfo> processInfoList = ProcessInfo::processInfoList();
|
||||||
for (const ProcessInfo &processInfo : processInfoList) {
|
for (const ProcessInfo &processInfo : processInfoList) {
|
||||||
|
if (m_excluded.contains(processInfo.processId))
|
||||||
|
continue;
|
||||||
if (Utils::FileUtils::normalizedPathName(processInfo.executable) == appName) {
|
if (Utils::FileUtils::normalizedPathName(processInfo.executable) == appName) {
|
||||||
pidFound(processInfo);
|
pidFound(processInfo);
|
||||||
return;
|
return;
|
||||||
@@ -318,13 +320,18 @@ void UnstartedAppWatcherDialog::setWaitingState(UnstartedAppWacherState state)
|
|||||||
m_kitChooser->setEnabled(true);
|
m_kitChooser->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WatchingState:
|
case WatchingState: {
|
||||||
m_waitingLabel->setText(Tr::tr("Waiting for process to start..."));
|
m_waitingLabel->setText(Tr::tr("Waiting for process to start..."));
|
||||||
m_watchingPushButton->setEnabled(true);
|
m_watchingPushButton->setEnabled(true);
|
||||||
m_watchingPushButton->setChecked(true);
|
m_watchingPushButton->setChecked(true);
|
||||||
m_pathChooser->setEnabled(false);
|
m_pathChooser->setEnabled(false);
|
||||||
m_kitChooser->setEnabled(false);
|
m_kitChooser->setEnabled(false);
|
||||||
|
m_excluded.clear();
|
||||||
|
const QList<ProcessInfo> processInfoList = ProcessInfo::processInfoList();
|
||||||
|
for (const ProcessInfo &processInfo : processInfoList)
|
||||||
|
m_excluded.insert(processInfo.processId);
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case FoundState:
|
case FoundState:
|
||||||
m_waitingLabel->setText(Tr::tr("Attach"));
|
m_waitingLabel->setText(Tr::tr("Attach"));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QSet>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#include <utils/processinfo.h>
|
#include <utils/processinfo.h>
|
||||||
@@ -67,6 +68,7 @@ private:
|
|||||||
QCheckBox *m_continueOnAttachCheckBox;
|
QCheckBox *m_continueOnAttachCheckBox;
|
||||||
QPushButton *m_watchingPushButton;
|
QPushButton *m_watchingPushButton;
|
||||||
Utils::ProcessInfo m_process;
|
Utils::ProcessInfo m_process;
|
||||||
|
QSet<int> m_excluded;
|
||||||
QTimer m_timer;
|
QTimer m_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user