diff options
author | Tobias Hunger <tobias.hunger@nokia.com> | 2010-06-08 14:19:05 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@nokia.com> | 2010-06-08 17:01:18 +0200 |
commit | 1d8e176067c48705cdfd746e2c1fb23539f58a8e (patch) | |
tree | 71f43828d4a0d8ac7a27f4638754fae9365f7609 /src/plugins/qt4projectmanager/qt4target.cpp | |
parent | 881d8ef6db0a7512b975d02f3f5eb769ef323a12 (diff) | |
download | qt-creator-1d8e176067c48705cdfd746e2c1fb23539f58a8e.tar.gz |
Fix targetsetuppage's shadowbuild dirs
* Fix displayed shadow build location
* Fix shadow build location used by newly set up shadow builds
Task-number: QTCREATORBUG-1599
Reviewed-by: dt
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4target.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4target.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp index 784897f646..59b8c1bd9b 100644 --- a/src/plugins/qt4projectmanager/qt4target.cpp +++ b/src/plugins/qt4projectmanager/qt4target.cpp @@ -366,23 +366,28 @@ QString Qt4Target::defaultBuildDirectory() const ) return project()->projectDirectory(); + return defaultShadowBuildDirectory(qt4Project()->defaultTopLevelBuildDirectory(), id()); +} + +QString Qt4Target::defaultShadowBuildDirectory(const QString &projectLocation, const QString &id) +{ QString shortName = QLatin1String("unknown"); - if (id() == QLatin1String(Constants::DESKTOP_TARGET_ID)) + if (id == QLatin1String(Constants::DESKTOP_TARGET_ID)) shortName = QLatin1String("desktop"); - else if (id() == QLatin1String(Constants::S60_EMULATOR_TARGET_ID)) + else if (id == QLatin1String(Constants::S60_EMULATOR_TARGET_ID)) shortName = QLatin1String("symbian_emulator"); - else if (id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID)) + else if (id == QLatin1String(Constants::S60_DEVICE_TARGET_ID)) shortName = QLatin1String("symbian"); - else if (id() == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID)) + else if (id == QLatin1String(Constants::MAEMO_DEVICE_TARGET_ID)) shortName = QLatin1String("maemo"); - else if (id() == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) + else if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID)) shortName = QLatin1String("simulator"); // currently we can't have the build directory to be deeper then the source directory // since that is broken in qmake // Once qmake is fixed we can change that to have a top directory and // subdirectories per build. (Replacing "QChar('-')" with "QChar('/') ) - return qt4Project()->defaultTopLevelBuildDirectory() + QChar('-') + shortName; + return projectLocation + QChar('-') + shortName; } bool Qt4Target::fromMap(const QVariantMap &map) |