Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Lysenko <lysenkoalexmail@gmail.com>2021-06-16 12:38:18 +0300
committerGitHub <noreply@github.com>2021-06-16 12:38:18 +0300
commit4715f63580f64d7baaba072f6c69632ccaa8a187 (patch)
tree201f42256d996e8aad25a70e929821d85e85011c /src/gui/application.cpp
parent09b538f4887d77685983dcb71d1ef6c1075a1b49 (diff)
Remove possible qt containers detach (#8727)
* Replaced obsolete foreach-loops with for-loops * Added a copy of queries into SqlDatabase::close * Used const reference to avoid unneeded copying * Fixed Qt containers possible detach within for-loop * Removed unneeded copies before for-loops
Diffstat (limited to 'src/gui/application.cpp')
-rw-r--r--src/gui/application.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/application.cpp b/src/gui/application.cpp
index d779c31ca..4fabe4856 100644
--- a/src/gui/application.cpp
+++ b/src/gui/application.cpp
@@ -122,7 +122,7 @@ bool Application::configVersionMigration()
settings->endGroup();
// Wipe confusing keys from the future, ignore the others
- for (const auto &badKey : deleteKeys)
+ for (const auto &badKey : qAsConst(deleteKeys))
settings->remove(badKey);
}
@@ -302,7 +302,7 @@ Application::Application(int &argc, char **argv)
this, &Application::slotAccountStateAdded);
connect(AccountManager::instance(), &AccountManager::accountRemoved,
this, &Application::slotAccountStateRemoved);
- foreach (auto ai, AccountManager::instance()->accounts()) {
+ for (const auto &ai : AccountManager::instance()->accounts()) {
slotAccountStateAdded(ai.data());
}
@@ -403,8 +403,8 @@ void Application::slotSystemOnlineConfigurationChanged(QNetworkConfiguration cnf
void Application::slotCheckConnection()
{
- auto list = AccountManager::instance()->accounts();
- foreach (const auto &accountState, list) {
+ const auto &list = AccountManager::instance()->accounts();
+ for (const auto &accountState : list) {
AccountState::State state = accountState->state();
// Don't check if we're manually signed out or