From e2eab0e01669b1ca1d59d118349a106f81e9a64a Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Thu, 10 Dec 2020 10:48:03 +0100 Subject: [PATCH] Core: Remove legacy settings reading from 2014 Change-Id: I2833be6d3dae1787fdf29cc5a9daccd68fa0f82e Reviewed-by: Alessandro Portale --- src/plugins/coreplugin/patchtool.cpp | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp index b07739b99a2..be530e6a0af 100644 --- a/src/plugins/coreplugin/patchtool.cpp +++ b/src/plugins/coreplugin/patchtool.cpp @@ -35,37 +35,17 @@ #include static const char settingsGroupC[] = "General"; -static const char legacySettingsGroupC[] = "VCS"; static const char patchCommandKeyC[] = "PatchCommand"; static const char patchCommandDefaultC[] = "patch"; namespace Core { -static QString readLegacyCommand() -{ - QSettings *s = ICore::settings(); - - s->beginGroup(QLatin1String(legacySettingsGroupC)); - const bool legacyExists = s->contains(QLatin1String(patchCommandKeyC)); - const QString legacyCommand = s->value(QLatin1String(patchCommandKeyC), QLatin1String(patchCommandDefaultC)).toString(); - if (legacyExists) - s->remove(QLatin1String(patchCommandKeyC)); - s->endGroup(); - - if (legacyExists && legacyCommand != QLatin1String(patchCommandDefaultC)) - PatchTool::setPatchCommand(legacyCommand); - - return legacyCommand; -} - QString PatchTool::patchCommand() { QSettings *s = ICore::settings(); - const QString defaultCommand = readLegacyCommand(); // replace it with QLatin1String(patchCommandDefaultC) when dropping legacy stuff - - s->beginGroup(QLatin1String(settingsGroupC)); - const QString command = s->value(QLatin1String(patchCommandKeyC), defaultCommand).toString(); + s->beginGroup(settingsGroupC); + const QString command = s->value(patchCommandKeyC, patchCommandDefaultC).toString(); s->endGroup(); return command;