forked from qt-creator/qt-creator
Fix warnings about id being construct from 0 or empty string.
Change-Id: I7776b9035a2decc5e840e0d534d05b42c821e9f9 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -914,7 +914,7 @@ bool operator!=(const StartRemoteParameters &p1, const StartRemoteParameters &p2
|
|||||||
}
|
}
|
||||||
|
|
||||||
StartRemoteParameters::StartRemoteParameters() :
|
StartRemoteParameters::StartRemoteParameters() :
|
||||||
useServerStartScript(false), profileId(0)
|
useServerStartScript(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -945,7 +945,12 @@ void StartRemoteParameters::fromSettings(const QSettings *settings)
|
|||||||
{
|
{
|
||||||
remoteChannel = settings->value(_("LastRemoteChannel")).toString();
|
remoteChannel = settings->value(_("LastRemoteChannel")).toString();
|
||||||
localExecutable = settings->value(_("LastLocalExecutable")).toString();
|
localExecutable = settings->value(_("LastLocalExecutable")).toString();
|
||||||
profileId = Core::Id(settings->value(_("LastProfileId")).toString());
|
const QString profileIdString = settings->value(_("LastProfileId")).toString();
|
||||||
|
if (profileIdString.isEmpty()) {
|
||||||
|
profileId = Core::Id();
|
||||||
|
} else {
|
||||||
|
profileId = Core::Id(profileIdString);
|
||||||
|
}
|
||||||
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
|
remoteArchitecture = settings->value(_("LastRemoteArchitecture")).toString();
|
||||||
serverStartScript = settings->value(_("LastServerStartScript")).toString();
|
serverStartScript = settings->value(_("LastServerStartScript")).toString();
|
||||||
useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool();
|
useServerStartScript = settings->value(_("LastUseServerStartScript")).toBool();
|
||||||
|
|||||||
Reference in New Issue
Block a user