Commit 55e45ff3 authored by hjk's avatar hjk Committed by Eike Ziller

RunConfigurations: Avoid some direct QString use with Core::Id

Change-Id: Ic67c34837f01ab478f107dc05c4fe1470dcfa36c
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent bee3cc3d
......@@ -111,7 +111,7 @@ bool ProjectConfiguration::fromMap(const QVariantMap &map)
Core::Id ProjectExplorer::idFromMap(const QVariantMap &map)
{
return Core::Id(map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString());
return Core::Id::fromSetting(map.value(QLatin1String(CONFIGURATION_ID_KEY)));
}
QString ProjectExplorer::displayNameFromMap(const QVariantMap &map)
......
......@@ -894,12 +894,9 @@ bool SessionManager::loadSession(const QString &session)
m_future = QFutureInterface<void>();
// restore the active mode
QString modeIdentifier = value(QLatin1String("ActiveMode")).toString();
Id modeId;
if (modeIdentifier.isEmpty())
Id modeId = Id::fromSetting(value(QLatin1String("ActiveMode")));
if (!modeId.isValid())
modeId = Id(Core::Constants::MODE_EDIT);
else
modeId = Id(modeIdentifier);
ModeManager::activateMode(modeId);
ModeManager::setFocusToCurrentMode();
......
......@@ -69,7 +69,7 @@ QList<Core::Id> BlackBerryRunConfigurationFactory::availableCreationIds(ProjectE
QStringList proFiles = qt4Project->applicationProFilePathes(QLatin1String(Constants::QNX_BB_RUNCONFIGURATION_PREFIX));
foreach (const QString &pf, proFiles)
ids << Core::Id(pf);
ids << Core::Id::fromString(pf);
return ids;
}
......
......@@ -70,7 +70,7 @@ QList<Core::Id> QnxRunConfigurationFactory::availableCreationIds(ProjectExplorer
QStringList proFiles = qt4Project->applicationProFilePathes(QLatin1String(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX));
foreach (const QString &pf, proFiles)
ids << Core::Id(pf);
ids << Core::Id::fromString(pf);
return ids;
}
......
......@@ -112,7 +112,7 @@ ExternalQtEditor::ExternalQtEditor(const QString &id,
QObject *parent) :
Core::IExternalEditor(parent),
m_mimeTypes(mimetype),
m_id(id),
m_id(Core::Id::fromString(id)),
m_displayName(displayName)
{
}
......
......@@ -813,7 +813,7 @@ QList<Core::Id> Qt4RunConfigurationFactory::availableCreationIds(ProjectExplorer
Qt4Project *project = static_cast<Qt4Project *>(parent->project());
QStringList proFiles = project->applicationProFilePathes(QLatin1String(QT4_RC_PREFIX));
foreach (const QString &pf, proFiles)
result << Core::Id(pf);
result << Core::Id::fromString(pf);
return result;
}
......
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