Commit 15e9a62c authored by Tomaz Canabrava's avatar Tomaz Canabrava

Correct usage of foreach with QString: const-ref it.

The QString behaves faster if used with const - reference on
a QForeach.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 28cc04f1
......@@ -644,7 +644,7 @@ void MainWindow::_loadVisibleWidgetsSettings(void)
if (!widgets.isEmpty()) {
QStringList nameList = widgets.split(",");
foreach (QString name, nameList) {
foreach (const QString &name, nameList) {
_showDockWidget(name, true);
}
}
......@@ -655,7 +655,7 @@ void MainWindow::_storeVisibleWidgetsSettings(void)
QString widgetNames;
bool firstWidget = true;
foreach (QString name, _mapName2DockWidget.keys()) {
foreach (const QString &name, _mapName2DockWidget.keys()) {
if (_mapName2DockWidget[name]->isVisible()) {
if (!firstWidget) {
widgetNames += ",";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment