Commit 5bc7c5b1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

EnvironmentId: Use QByteArray to store it



Change-Id: Ia4097e499e88a9630981185229d589035319ccf3
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 17098ced
......@@ -934,7 +934,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
d->m_projectExplorerSettings.maxAppOutputLines =
s->value(QLatin1String("ProjectExplorer/Settings/MaxAppOutputLines"), 100000).toInt();
d->m_projectExplorerSettings.environmentId =
QUuid(s->value(QLatin1String("ProjectExplorer/Settings/EnvironmentId")).toString());
QUuid(s->value(QLatin1String("ProjectExplorer/Settings/EnvironmentId")).toByteArray());
if (d->m_projectExplorerSettings.environmentId.isNull())
d->m_projectExplorerSettings.environmentId = QUuid::createUuid();
......@@ -1303,7 +1303,7 @@ void ProjectExplorerPlugin::savePersistentSettings()
s->setValue(QLatin1String("ProjectExplorer/Settings/AutoRestoreLastSession"), d->m_projectExplorerSettings.autorestoreLastSession);
s->setValue(QLatin1String("ProjectExplorer/Settings/PromptToStopRunControl"), d->m_projectExplorerSettings.prompToStopRunControl);
s->setValue(QLatin1String("ProjectExplorer/Settings/MaxAppOutputLines"), d->m_projectExplorerSettings.maxAppOutputLines);
s->setValue(QLatin1String("ProjectExplorer/Settings/EnvironmentId"), d->m_projectExplorerSettings.environmentId.toString());
s->setValue(QLatin1String("ProjectExplorer/Settings/EnvironmentId"), d->m_projectExplorerSettings.environmentId.toByteArray());
}
}
......
......@@ -689,7 +689,7 @@ QStringList SettingsAccessor::findSettingsFiles(const QString &suffix) const
return result;
}
QByteArray SettingsAccessor::creatorId() const
QByteArray SettingsAccessor::creatorId()
{
return ProjectExplorerPlugin::instance()->projectExplorerSettings().environmentId.toByteArray();
}
......@@ -997,8 +997,7 @@ bool SettingsAccessor::FileAccessor::writeFile(const SettingsData *settings) con
data.insert(QLatin1String(VERSION_KEY), m_accessor->m_lastVersion + 1);
if (m_environmentSpecific)
data.insert(QLatin1String(ENVIRONMENT_ID_KEY),
ProjectExplorerPlugin::instance()->projectExplorerSettings().environmentId.toString());
data.insert(QLatin1String(ENVIRONMENT_ID_KEY), SettingsAccessor::creatorId());
return m_writer->save(data, Core::ICore::mainWindow());
}
......
......@@ -60,7 +60,7 @@ private:
void addVersionHandler(Internal::UserFileVersionHandler *handler);
QStringList findSettingsFiles(const QString &suffix) const;
QByteArray creatorId() const;
static QByteArray creatorId();
QString defaultFileName(const QString &suffix) const;
int currentVersion() const;
void backupUserFile() const;
......
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