Commit 9090176d authored by Christian Kandeler's avatar Christian Kandeler
Browse files

RemoteLinux: Fix run configuration.

Commit 0c3eeab4

 had two brown paper bag issues:
    - The run configuration's fromMap() function still assumed a file
      path instead of a simple string.
    - The BuildTargetInfo's equality operator must of course compare all
      members, as otherwise all kinds of things can break; e.g.
      Target::setApplicationTargets() might erroneously omit to signal
      a change.

Change-Id: Ie55b7edc69f272dedccb903a1cc8ed100fce7460
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 2be7fad9
......@@ -60,7 +60,8 @@ public:
inline bool operator==(const BuildTargetInfo &ti1, const BuildTargetInfo &ti2)
{
return ti1.targetName == ti2.targetName;
return ti1.targetName == ti2.targetName && ti1.targetFilePath == ti2.targetFilePath
&& ti1.projectFilePath == ti2.projectFilePath;
}
inline bool operator!=(const BuildTargetInfo &ti1, const BuildTargetInfo &ti2)
......
......@@ -134,7 +134,6 @@ QVariantMap RemoteLinuxRunConfiguration::toMap() const
{
QVariantMap map(RunConfiguration::toMap());
map.insert(QLatin1String(ArgumentsKey), d->arguments);
const QDir dir = QDir(target()->project()->projectDirectory().toString());
map.insert(QLatin1String(TargetNameKey), d->targetName);
map.insert(QLatin1String(UseAlternateExeKey), d->useAlternateRemoteExecutable);
map.insert(QLatin1String(AlternateExeKey), d->alternateRemoteExecutable);
......@@ -148,9 +147,7 @@ bool RemoteLinuxRunConfiguration::fromMap(const QVariantMap &map)
return false;
d->arguments = map.value(QLatin1String(ArgumentsKey)).toStringList();
const QDir dir = QDir(target()->project()->projectDirectory().toString());
d->targetName
= QDir::cleanPath(dir.filePath(map.value(QLatin1String(TargetNameKey)).toString()));
d->targetName = map.value(QLatin1String(TargetNameKey)).toString();
d->useAlternateRemoteExecutable = map.value(QLatin1String(UseAlternateExeKey), false).toBool();
d->alternateRemoteExecutable = map.value(QLatin1String(AlternateExeKey)).toString();
d->workingDirectory = map.value(QLatin1String(WorkingDirectoryKey)).toString();
......
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