Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thomas Schöps
kdevelop
Commits
62c85cb1
Commit
62c85cb1
authored
Jun 26, 2019
by
Friedrich W. H. Kossebau
Browse files
gdb: port foreach -> range-based for
parent
a4e6c0aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
plugins/gdb/debugsession.cpp
View file @
62c85cb1
...
...
@@ -146,7 +146,8 @@ void DebugSession::configInferior(ILaunchConfiguration *cfg, IExecutePlugin *iex
if
(
breakOnStart
)
{
BreakpointModel
*
m
=
ICore
::
self
()
->
debugController
()
->
breakpointModel
();
bool
found
=
false
;
foreach
(
Breakpoint
*
b
,
m
->
breakpoints
())
{
const
auto
breakpoints
=
m
->
breakpoints
();
for
(
Breakpoint
*
b
:
breakpoints
)
{
if
(
b
->
location
()
==
QLatin1String
(
"main"
))
{
found
=
true
;
break
;
...
...
plugins/gdb/memviewdlg.cpp
View file @
62c85cb1
...
...
@@ -299,8 +299,8 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
hex
->
setShortcut
(
Qt
::
Key_H
);
formatMenu
->
addAction
(
hex
);
foreach
(
QAction
*
act
,
formatGroup
->
actions
()
)
{
const
auto
formatActions
=
formatGroup
->
actions
()
;
for
(
QAction
*
act
:
formatActions
)
{
act
->
setCheckable
(
true
);
act
->
setChecked
(
act
->
data
().
toInt
()
==
m_memViewView
->
valueCoding
());
act
->
setShortcutContext
(
Qt
::
WidgetWithChildrenShortcut
);
...
...
@@ -341,8 +341,8 @@ void MemoryView::contextMenuEvent(QContextMenuEvent *e)
group16
->
setShortcut
(
Qt
::
Key_6
);
groupingMenu
->
addAction
(
group16
);
foreach
(
QAction
*
act
,
groupingGroup
->
actions
()
)
{
const
auto
groupingActions
=
groupingGroup
->
actions
()
;
for
(
QAction
*
act
:
groupingActions
)
{
act
->
setCheckable
(
true
);
act
->
setChecked
(
act
->
data
().
toInt
()
==
m_memViewView
->
noOfGroupedBytes
());
act
->
setShortcutContext
(
Qt
::
WidgetWithChildrenShortcut
);
...
...
plugins/gdb/unittests/test_gdb.cpp
View file @
62c85cb1
...
...
@@ -2034,7 +2034,8 @@ void GdbTest::testDebugInExternalTerminal()
{
TestLaunchConfiguration
cfg
;
foreach
(
const
QString
&
console
,
QStringList
()
<<
"konsole"
<<
"xterm"
<<
"xfce4-terminal"
<<
"gnome-terminal"
)
{
const
QStringList
consoles
{
"konsole"
,
"xterm"
,
"xfce4-terminal"
,
"gnome-terminal"
};
for
(
const
QString
&
console
:
consoles
)
{
TestDebugSession
*
session
=
nullptr
;
if
(
QStandardPaths
::
findExecutable
(
console
).
isEmpty
())
{
...
...
plugins/gdb/unittests/test_gdbprinters.cpp
View file @
62c85cb1
...
...
@@ -60,7 +60,7 @@ public:
<<
"from kde import register_kde_printers"
<<
"register_kde_printers (None)"
<<
"end"
;
for
each
(
const
QByteArray
&
i
,
p
)
{
for
(
const
QByteArray
&
i
:
qAsConst
(
p
)
)
{
write
(
i
+
"
\n
"
);
}
waitForPrompt
();
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment