Commit 0f92b707 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Make MainWindow::wasWindowGeometrySaved() more efficient


(cherry picked from commit d54475b1)
parent cc9073ab
Pipeline #268217 passed with stage
in 2 minutes and 40 seconds
......@@ -160,16 +160,8 @@ bool MainWindow::wasWindowGeometrySaved() const
return false;
}
const QMap<QString, QString> entries = cg.entryMap();
for (auto it = entries.cbegin(), itEnd = entries.cend(); it != itEnd; ++it) {
const QString configKey = it.key();
if (configKey == configFileString(screen(), QStringLiteral("Width")) || configKey == configFileString(screen(), QStringLiteral("Height"))
|| configKey == configFileString(screen(), QStringLiteral("XPosition")) || configKey == configFileString(screen(), QStringLiteral("YPosition"))) {
return true;
}
}
return false;
return cg.hasKey(configFileString(screen(), QStringLiteral("Width"))) || cg.hasKey(configFileString(screen(), QStringLiteral("Height")))
|| cg.hasKey(configFileString(screen(), QStringLiteral("XPosition"))) || cg.hasKey(configFileString(screen(), QStringLiteral("YPosition")));
}
void MainWindow::updateUseTransparency()
......
Supports Markdown
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