summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/cppeditor/cpptoolssettings.cpp48
-rw-r--r--src/plugins/qmljstools/qmljstoolssettings.cpp39
2 files changed, 0 insertions, 87 deletions
diff --git a/src/plugins/cppeditor/cpptoolssettings.cpp b/src/plugins/cppeditor/cpptoolssettings.cpp
index 3d5b4658b8..0b5536fdd7 100644
--- a/src/plugins/cppeditor/cpptoolssettings.cpp
+++ b/src/plugins/cppeditor/cpptoolssettings.cpp
@@ -134,54 +134,6 @@ CppToolsSettings::CppToolsSettings()
// load global settings (after built-in settings are added to the pool)
d->m_globalCodeStyle->fromSettings(QLatin1String(Constants::CPP_SETTINGS_ID), s);
- // legacy handling start (Qt Creator Version < 2.4)
- const bool legacyTransformed =
- s->value(QLatin1String("CppCodeStyleSettings/LegacyTransformed"), false).toBool();
-
- if (!legacyTransformed) {
- // creator 2.4 didn't mark yet the transformation (first run of creator 2.4)
-
- // we need to transform the settings only if at least one from
- // below settings was already written - otherwise we use
- // defaults like it would be the first run of creator 2.4 without stored settings
- const QStringList groups = s->childGroups();
- const bool needTransform = groups.contains(QLatin1String("textTabPreferences")) ||
- groups.contains(QLatin1String("CppTabPreferences")) ||
- groups.contains(QLatin1String("CppCodeStyleSettings"));
- if (needTransform) {
- CppCodeStyleSettings legacyCodeStyleSettings;
- if (groups.contains(QLatin1String("CppCodeStyleSettings"))) {
- Utils::fromSettings(QLatin1String("CppCodeStyleSettings"),
- QString(), s, &legacyCodeStyleSettings);
- }
-
- const QString currentFallback = s->value(QLatin1String("CppTabPreferences/CurrentFallback")).toString();
- TabSettings legacyTabSettings;
- if (currentFallback == QLatin1String("CppGlobal")) {
- // no delegate, global overwritten
- Utils::fromSettings(QLatin1String("CppTabPreferences"),
- QString(), s, &legacyTabSettings);
- } else {
- // delegating to global
- legacyTabSettings = TextEditorSettings::codeStyle()->currentTabSettings();
- }
-
- // create custom code style out of old settings
- QVariant v;
- v.setValue(legacyCodeStyleSettings);
- ICodeStylePreferences *oldCreator = pool->createCodeStyle(
- "legacy", legacyTabSettings, v, Tr::tr("Old Creator"));
-
- // change the current delegate and save
- d->m_globalCodeStyle->setCurrentDelegate(oldCreator);
- d->m_globalCodeStyle->toSettings(QLatin1String(Constants::CPP_SETTINGS_ID), s);
- }
- // mark old settings as transformed
- s->setValue(QLatin1String("CppCodeStyleSettings/LegacyTransformed"), true);
- // legacy handling stop
- }
-
-
// mimetypes to be handled
TextEditorSettings::registerMimeTypeForLanguageId(Constants::C_SOURCE_MIMETYPE, Constants::CPP_SETTINGS_ID);
TextEditorSettings::registerMimeTypeForLanguageId(Constants::C_HEADER_MIMETYPE, Constants::CPP_SETTINGS_ID);
diff --git a/src/plugins/qmljstools/qmljstoolssettings.cpp b/src/plugins/qmljstools/qmljstoolssettings.cpp
index 093fb676c2..caeb6dfa26 100644
--- a/src/plugins/qmljstools/qmljstoolssettings.cpp
+++ b/src/plugins/qmljstools/qmljstoolssettings.cpp
@@ -71,45 +71,6 @@ QmlJSToolsSettings::QmlJSToolsSettings()
QSettings *s = Core::ICore::settings();
m_globalCodeStyle->fromSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
- // legacy handling start (Qt Creator Version < 2.4)
- const bool legacyTransformed =
- s->value(QLatin1String("QmlJSTabPreferences/LegacyTransformed"), false).toBool();
-
- if (!legacyTransformed) {
- // creator 2.4 didn't mark yet the transformation (first run of creator 2.4)
-
- // we need to transform the settings only if at least one from
- // below settings was already written - otherwise we use
- // defaults like it would be the first run of creator 2.4 without stored settings
- const QStringList groups = s->childGroups();
- const bool needTransform = groups.contains(QLatin1String("textTabPreferences")) ||
- groups.contains(QLatin1String("QmlJSTabPreferences"));
-
- if (needTransform) {
- const QString currentFallback = s->value(QLatin1String("QmlJSTabPreferences/CurrentFallback")).toString();
- TabSettings legacyTabSettings;
- if (currentFallback == QLatin1String("QmlJSGlobal")) {
- // no delegate, global overwritten
- Utils::fromSettings(QLatin1String("QmlJSTabPreferences"),
- QString(), s, &legacyTabSettings);
- } else {
- // delegating to global
- legacyTabSettings = TextEditorSettings::codeStyle()->currentTabSettings();
- }
-
- // create custom code style out of old settings
- ICodeStylePreferences *oldCreator = pool->createCodeStyle(
- "legacy", legacyTabSettings, QVariant(), Tr::tr("Old Creator"));
-
- // change the current delegate and save
- m_globalCodeStyle->setCurrentDelegate(oldCreator);
- m_globalCodeStyle->toSettings(QLatin1String(QmlJSTools::Constants::QML_JS_SETTINGS_ID), s);
- }
- // mark old settings as transformed
- s->setValue(QLatin1String("QmlJSTabPreferences/LegacyTransformed"), true);
- // legacy handling stop
- }
-
// mimetypes to be handled
TextEditorSettings::registerMimeTypeForLanguageId(Constants::QML_MIMETYPE, Constants::QML_JS_SETTINGS_ID);
TextEditorSettings::registerMimeTypeForLanguageId(Constants::QMLUI_MIMETYPE, Constants::QML_JS_SETTINGS_ID);