From: Claudio Cambra Date: Mon, 8 May 2023 12:24:41 +0000 (+0800) Subject: Don't ask user whether to import legacy account configs if forcing legacy import X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~10^2~46^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c8f8c9cd2ce6b8fce4f57dc12fc58d404dc70fe9;p=nextcloud-desktop.git Don't ask user whether to import legacy account configs if forcing legacy import Signed-off-by: Claudio Cambra --- diff --git a/src/gui/accountmanager.cpp b/src/gui/accountmanager.cpp index d266bf54d..205a8007c 100644 --- a/src/gui/accountmanager.cpp +++ b/src/gui/accountmanager.cpp @@ -178,13 +178,15 @@ bool AccountManager::restoreFromLegacySettings() if (const QFileInfo configFileInfo(configFile); configFileInfo.exists() && configFileInfo.isReadable()) { qCInfo(lcAccountManager) << "Migrate: checking old config " << configFile; - const auto importQuestion = tr("An existing configuration from a legacy desktop client was detected.\n" - "Should an account import be attempted?"); - const auto messageBoxSelection = QMessageBox::question(nullptr, tr("Legacy import"), importQuestion); - - if (messageBoxSelection == QMessageBox::No) { - // User said don't import, return immediately - return false; + if (!forceLegacyImport()) { + const auto importQuestion = tr("An existing configuration from a legacy desktop client was detected.\n" + "Should an account import be attempted?"); + const auto messageBoxSelection = QMessageBox::question(nullptr, tr("Legacy import"), importQuestion); + + if (messageBoxSelection == QMessageBox::No) { + // User said don't import, return immediately + return false; + } } auto oCSettings = std::make_unique(configFile, QSettings::IniFormat);