Commit 46b9c03c authored by Eike Ziller's avatar Eike Ziller
Browse files

Clean up where the QSettings is retrieved from.



The settings in the plugin manager (local/global) are where the plugin
manager is supposed to look for its settings, which has per se nothing
to do where Qt Creator wants other settings to be written to.
All Qt Creator code should use ICore::settings() for that instead.

Change-Id: I28bd855ae6cbcdf8d19017eb44f178e4624a1a61
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent aff2518b
...@@ -224,13 +224,13 @@ QVariantMap DeviceManager::toMap() const ...@@ -224,13 +224,13 @@ QVariantMap DeviceManager::toMap() const
Utils::FileName DeviceManager::settingsFilePath(const QString &extension) Utils::FileName DeviceManager::settingsFilePath(const QString &extension)
{ {
return Utils::FileName::fromString(QFileInfo(ExtensionSystem::PluginManager::settings()->fileName()).absolutePath() + extension); return Utils::FileName::fromString(QFileInfo(Core::ICore::settings()->fileName()).absolutePath() + extension);
} }
Utils::FileName DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath) Utils::FileName DeviceManager::systemSettingsFilePath(const QString &deviceFileRelativePath)
{ {
return Utils::FileName::fromString( return Utils::FileName::fromString(
QFileInfo(ExtensionSystem::PluginManager::globalSettings()->fileName()).absolutePath() QFileInfo(Core::ICore::settings(QSettings::SystemScope)->fileName()).absolutePath()
+ deviceFileRelativePath); + deviceFileRelativePath);
} }
......
...@@ -55,7 +55,7 @@ using Utils::PersistentSettingsReader; ...@@ -55,7 +55,7 @@ using Utils::PersistentSettingsReader;
static Utils::FileName settingsFileName() static Utils::FileName settingsFileName()
{ {
QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName()); QFileInfo settingsLocation(Core::ICore::settings()->fileName());
return Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String(KIT_FILENAME)); return Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String(KIT_FILENAME));
} }
......
...@@ -2620,7 +2620,7 @@ static QString maddeRoot(const QString &qmakePath) ...@@ -2620,7 +2620,7 @@ static QString maddeRoot(const QString &qmakePath)
void Version11Handler::parseQtversionFile() void Version11Handler::parseQtversionFile()
{ {
QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName()); QFileInfo settingsLocation(Core::ICore::settings()->fileName());
Utils::FileName fileName = Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String("/qtversion.xml")); Utils::FileName fileName = Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String("/qtversion.xml"));
Utils::PersistentSettingsReader reader; Utils::PersistentSettingsReader reader;
if (!reader.load(fileName)) { if (!reader.load(fileName)) {
...@@ -2663,7 +2663,7 @@ void Version11Handler::parseQtversionFile() ...@@ -2663,7 +2663,7 @@ void Version11Handler::parseQtversionFile()
void Version11Handler::parseToolChainFile() void Version11Handler::parseToolChainFile()
{ {
QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName()); QFileInfo settingsLocation(Core::ICore::settings()->fileName());
Utils::FileName fileName = Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String("/toolChains.xml")); Utils::FileName fileName = Utils::FileName::fromString(settingsLocation.absolutePath() + QLatin1String("/toolChains.xml"));
Utils::PersistentSettingsReader reader; Utils::PersistentSettingsReader reader;
if (!reader.load(fileName)) { if (!reader.load(fileName)) {
......
...@@ -58,7 +58,7 @@ using Utils::PersistentSettingsReader; ...@@ -58,7 +58,7 @@ using Utils::PersistentSettingsReader;
static Utils::FileName settingsFileName(const QString &path) static Utils::FileName settingsFileName(const QString &path)
{ {
QFileInfo settingsLocation(ExtensionSystem::PluginManager::settings()->fileName()); QFileInfo settingsLocation(Core::ICore::settings()->fileName());
return Utils::FileName::fromString(settingsLocation.absolutePath() + path); return Utils::FileName::fromString(settingsLocation.absolutePath() + path);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment