Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
406d35ac
Commit
406d35ac
authored
15 years ago
by
hjk
Browse files
Options
Downloads
Patches
Plain Diff
debugger: let 'attach to running process' dialog activate the 'ok' button if
there's only one choice after filtering
parent
d22438e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/debugger/debuggerdialogs.cpp
+15
-4
15 additions, 4 deletions
src/plugins/debugger/debuggerdialogs.cpp
src/plugins/debugger/debuggerdialogs.h
+1
-0
1 addition, 0 deletions
src/plugins/debugger/debuggerdialogs.h
with
16 additions
and
4 deletions
src/plugins/debugger/debuggerdialogs.cpp
+
15
−
4
View file @
406d35ac
...
@@ -259,7 +259,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
...
@@ -259,7 +259,7 @@ AttachExternalDialog::AttachExternalDialog(QWidget *parent)
connect
(
m_ui
->
filterClearToolButton
,
SIGNAL
(
clicked
()),
connect
(
m_ui
->
filterClearToolButton
,
SIGNAL
(
clicked
()),
m_ui
->
filterLineEdit
,
SLOT
(
clear
()));
m_ui
->
filterLineEdit
,
SLOT
(
clear
()));
connect
(
m_ui
->
filterLineEdit
,
SIGNAL
(
textChanged
(
QString
)),
connect
(
m_ui
->
filterLineEdit
,
SIGNAL
(
textChanged
(
QString
)),
m_model
,
SLOT
(
setFilter
Fixed
String
(
QString
)));
this
,
SLOT
(
setFilterString
(
QString
)));
rebuildProcessList
();
rebuildProcessList
();
}
}
...
@@ -269,6 +269,17 @@ AttachExternalDialog::~AttachExternalDialog()
...
@@ -269,6 +269,17 @@ AttachExternalDialog::~AttachExternalDialog()
delete
m_ui
;
delete
m_ui
;
}
}
void
AttachExternalDialog
::
setFilterString
(
const
QString
&
filter
)
{
m_model
->
setFilterFixedString
(
filter
);
// Activate the line edit if there's a unique filtered process.
QString
processId
;
if
(
m_model
->
rowCount
(
QModelIndex
())
==
1
)
processId
=
m_model
->
processIdAt
(
m_model
->
index
(
0
,
0
,
QModelIndex
()));
m_ui
->
pidLineEdit
->
setText
(
processId
);
pidChanged
(
processId
);
}
QPushButton
*
AttachExternalDialog
::
okButton
()
const
QPushButton
*
AttachExternalDialog
::
okButton
()
const
{
{
return
m_ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
return
m_ui
->
buttonBox
->
button
(
QDialogButtonBox
::
Ok
);
...
@@ -284,9 +295,9 @@ void AttachExternalDialog::rebuildProcessList()
...
@@ -284,9 +295,9 @@ void AttachExternalDialog::rebuildProcessList()
void
AttachExternalDialog
::
procSelected
(
const
QModelIndex
&
proxyIndex
)
void
AttachExternalDialog
::
procSelected
(
const
QModelIndex
&
proxyIndex
)
{
{
const
QString
proc
c
essId
=
m_model
->
processIdAt
(
proxyIndex
);
const
QString
processId
=
m_model
->
processIdAt
(
proxyIndex
);
if
(
!
proc
c
essId
.
isEmpty
())
{
if
(
!
processId
.
isEmpty
())
{
m_ui
->
pidLineEdit
->
setText
(
proc
c
essId
);
m_ui
->
pidLineEdit
->
setText
(
processId
);
if
(
okButton
()
->
isEnabled
())
if
(
okButton
()
->
isEnabled
())
okButton
()
->
animateClick
();
okButton
()
->
animateClick
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/plugins/debugger/debuggerdialogs.h
+
1
−
0
View file @
406d35ac
...
@@ -95,6 +95,7 @@ private slots:
...
@@ -95,6 +95,7 @@ private slots:
void
rebuildProcessList
();
void
rebuildProcessList
();
void
procSelected
(
const
QModelIndex
&
);
void
procSelected
(
const
QModelIndex
&
);
void
pidChanged
(
const
QString
&
);
void
pidChanged
(
const
QString
&
);
void
setFilterString
(
const
QString
&
filter
);
private:
private:
inline
QPushButton
*
okButton
()
const
;
inline
QPushButton
*
okButton
()
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment