aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/debuggerplugin.cpp
diff options
context:
space:
mode:
authorhjk <[email protected]>2018-05-30 15:42:51 +0200
committerhjk <[email protected]>2018-05-31 07:10:47 +0000
commit4feb2259d93dc666d41582ae63aa4b7499ef86a5 (patch)
treec1e3e2e27033901acf12e915fa04e342524b0f04 /src/plugins/debugger/debuggerplugin.cpp
parent829df213a481f63a54abe303be0c4f7e8f6f791b (diff)
Debugger: Code cosmetics
Sprinkling in const and ranged for. Change-Id: I5d11d57f64140021397c23734c7373544ebebb6f Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/debugger/debuggerplugin.cpp')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index d8319a9f890..5843f98bb88 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -647,7 +647,7 @@ public:
{
QSignalBlocker blocker(m_threadBox);
m_threadBox->clear();
- foreach (const QString &item, list)
+ for (const QString &item : list)
m_threadBox->addItem(item);
m_threadBox->setCurrentIndex(index);
}
@@ -1155,7 +1155,7 @@ bool DebuggerPluginPrivate::parseArgument(QStringList::const_iterator &it,
bool useTerminal = false;
if (!pid) {
- foreach (const QString &arg, args) {
+ for (const QString &arg : args) {
const QString key = arg.section('=', 0, 0);
const QString val = arg.section('=', 1, 1);
if (val.isEmpty()) {
@@ -3065,7 +3065,7 @@ void showModuleSymbols(const QString &moduleName, const Symbols &symbols)
header.append(DebuggerPlugin::tr("Name"));
w->setHeaderLabels(header);
w->setWindowTitle(DebuggerPlugin::tr("Symbols in \"%1\"").arg(moduleName));
- foreach (const Symbol &s, symbols) {
+ for (const Symbol &s : symbols) {
QTreeWidgetItem *it = new QTreeWidgetItem;
it->setData(0, Qt::DisplayRole, s.name);
it->setData(1, Qt::DisplayRole, s.address);
@@ -3094,7 +3094,7 @@ void showModuleSections(const QString &moduleName, const Sections &sections)
header.append(DebuggerPlugin::tr("Flags"));
w->setHeaderLabels(header);
w->setWindowTitle(DebuggerPlugin::tr("Sections in \"%1\"").arg(moduleName));
- foreach (const Section &s, sections) {
+ for (const Section &s : sections) {
QTreeWidgetItem *it = new QTreeWidgetItem;
it->setData(0, Qt::DisplayRole, s.name);
it->setData(1, Qt::DisplayRole, s.from);