diff options
author | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-11 13:37:27 +0300 |
---|---|---|
committer | Anton Kudryavtsev <a.kudryavtsev@netris.ru> | 2016-08-22 08:32:23 +0000 |
commit | 909d6498edbf31fcc21a137b7244c580afdbf749 (patch) | |
tree | 57ba351e4fb03f14e82a8308b2c2ba0901474728 /tools/qmleasing | |
parent | 3ef4fac9ff3f785d3ccbda4b28ec2c0ea2ee1b59 (diff) |
tools: replace 'foreach' with 'range for'
Catch rvalues to prevent detach()'ing.
Change-Id: I7be159a405c994429c0eee10805bfe96fcf4c806
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'tools/qmleasing')
-rw-r--r-- | tools/qmleasing/mainwindow.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/qmleasing/mainwindow.cpp b/tools/qmleasing/mainwindow.cpp index 5a5f651396..d36ab5fd75 100644 --- a/tools/qmleasing/mainwindow.cpp +++ b/tools/qmleasing/mainwindow.cpp @@ -73,7 +73,8 @@ MainWindow::MainWindow(QWidget *parent) : quickView.rootContext()->setContextProperty(QLatin1String("spinBox"), ui_properties.spinBox); - foreach (const QString &name, splineEditor->presetNames()) + const auto presetNames = splineEditor->presetNames(); + for (const QString &name : presetNames) ui_properties.comboBox->addItem(name); connect(ui_properties.comboBox, SIGNAL(currentIndexChanged(QString)), splineEditor, SLOT(setPreset(QString))); |