Commit 22da799c authored by Tobias Hunger's avatar Tobias Hunger Committed by hjk

Debugger: Read legacy settings from both SDK and user locations

This fixes Boot2Qt setting the debugger for its kits.

Change-Id: I3ac3ad70b29b6c852e5e50d3e64258e487455b43
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent b55f60b1
......@@ -243,11 +243,16 @@ void DebuggerItemManager::autoDetectGdbOrLldbDebuggers()
void DebuggerItemManager::readLegacyDebuggers()
{
QFileInfo settingsLocation(Core::ICore::settings()->fileName());
FileName legacyKits = FileName::fromString(settingsLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME));
QFileInfo systemLocation(Core::ICore::settings(QSettings::SystemScope)->fileName());
readLegacyDebuggers(FileName::fromString(systemLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME)));
QFileInfo userLocation(Core::ICore::settings()->fileName());
readLegacyDebuggers(FileName::fromString(userLocation.absolutePath() + QLatin1String(DEBUGGER_LEGACY_FILENAME)));
}
void DebuggerItemManager::readLegacyDebuggers(const FileName &file)
{
PersistentSettingsReader reader;
if (!reader.load(legacyKits))
if (!reader.load(file))
return;
foreach (const QVariant &v, reader.restoreValues()) {
......
......@@ -83,6 +83,7 @@ private:
static void autoDetectGdbOrLldbDebuggers();
static void autoDetectCdbDebuggers();
static void readLegacyDebuggers();
static void readLegacyDebuggers(const Utils::FileName &file);
static Utils::PersistentSettingsWriter *m_writer;
static QList<DebuggerItem> m_debuggers;
......
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