DiffEditor: drop legacy settings

Change-Id: I94147168c33d7b44a1288b51fe3d9a3ae46c8cdd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Arnold Dumas
2017-01-20 22:27:59 +01:00
parent b1e2d5b693
commit 708185e211

View File

@@ -64,7 +64,6 @@ static const char ignoreWhitespaceKeyC[] = "IgnoreWhitespace";
static const char diffViewKeyC[] = "DiffEditorType";
static const char legacySettingsGroupC[] = "Git";
static const char useDiffEditorKeyC[] = "UseDiffEditor";
using namespace TextEditor;
@@ -574,20 +573,6 @@ IDiffView *DiffEditor::loadSettings()
QTC_ASSERT(currentView(), return 0);
QSettings *s = Core::ICore::settings();
// TODO: Remove in 3.6: Read legacy settings first:
s->beginGroup(QLatin1String(legacySettingsGroupC));
const bool legacyExists = s->contains(QLatin1String(useDiffEditorKeyC));
const bool legacyEditor = s->value(
QLatin1String(useDiffEditorKeyC), true).toBool();
s->remove(QLatin1String(useDiffEditorKeyC));
s->endGroup();
// Save legacy settings to current settings:
if (legacyExists) {
saveSetting(QLatin1String(diffViewKeyC), legacyEditor ? m_views.at(0)->id().toSetting() :
m_views.at(1)->id().toSetting());
}
// Read current settings:
s->beginGroup(QLatin1String(settingsGroupC));
m_showDescription = s->value(QLatin1String(descriptionVisibleKeyC), true).toBool();