forked from qt-creator/qt-creator
ProjectExplorer: Use better FilePath conversion function in builddir
Change-Id: Id7c428390c15c410c3dc12eff18b1888174b1c64 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -92,7 +92,7 @@ void BuildDirectoryAspect::toMap(QVariantMap &map) const
|
|||||||
StringAspect::toMap(map);
|
StringAspect::toMap(map);
|
||||||
if (!d->sourceDir.isEmpty()) {
|
if (!d->sourceDir.isEmpty()) {
|
||||||
const FilePath shadowDir = isChecked() ? filePath() : d->savedShadowBuildDir;
|
const FilePath shadowDir = isChecked() ? filePath() : d->savedShadowBuildDir;
|
||||||
saveToMap(map, shadowDir.toString(), QString(), settingsKey() + ".shadowDir");
|
saveToMap(map, shadowDir.toSettings(), QString(), settingsKey() + ".shadowDir");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,8 +100,7 @@ void BuildDirectoryAspect::fromMap(const QVariantMap &map)
|
|||||||
{
|
{
|
||||||
StringAspect::fromMap(map);
|
StringAspect::fromMap(map);
|
||||||
if (!d->sourceDir.isEmpty()) {
|
if (!d->sourceDir.isEmpty()) {
|
||||||
d->savedShadowBuildDir = FilePath::fromString(map.value(settingsKey() + ".shadowDir")
|
d->savedShadowBuildDir = FilePath::fromSettings(map.value(settingsKey() + ".shadowDir"));
|
||||||
.toString());
|
|
||||||
if (d->savedShadowBuildDir.isEmpty())
|
if (d->savedShadowBuildDir.isEmpty())
|
||||||
setFilePath(d->sourceDir);
|
setFilePath(d->sourceDir);
|
||||||
setChecked(d->sourceDir != filePath());
|
setChecked(d->sourceDir != filePath());
|
||||||
|
Reference in New Issue
Block a user