diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2012-02-23 19:01:26 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-01 23:12:13 +0100 |
commit | 0bb99c6ff36ac78e29cde445400aa279a5b3d978 (patch) | |
tree | b9af4ebec433ada7cc34c085cac777a686ff9f82 /qmake | |
parent | 8e5eb1bddcfc71f70604c9d9916659e6cbc66845 (diff) |
cosmetics: remove redundant conditional, add a comment & reshuffle code
Change-Id: I71c7e18db63f3581b8c818ad178aeb4f6ccf9446
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/project.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp index 545adced43..6793ed3be6 100644 --- a/qmake/project.cpp +++ b/qmake/project.cpp @@ -530,9 +530,10 @@ static void qmake_error_msg(const QString &msg) */ QStringList qmake_feature_paths(QMakeProperty *prop=0) { + const QString mkspecs_concat = QLatin1String("/mkspecs"); + const QString base_concat = QLatin1String("/features"); QStringList concat; { - const QString base_concat = QLatin1String("/features"); switch(Option::target_mode) { case Option::TARG_MACX_MODE: //also a unix concat << base_concat + QLatin1String("/mac"); @@ -549,7 +550,7 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0) } concat << base_concat; } - const QString mkspecs_concat = QLatin1String("/mkspecs"); + QStringList feature_roots; QByteArray mkspec_path = qgetenv("QMAKEFEATURES"); if(!mkspec_path.isNull()) @@ -574,9 +575,10 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0) feature_roots << ((*it) + mkspecs_concat + (*concat_it)); } } - if(!Option::mkfile::qmakespec.isEmpty()) - feature_roots << Option::mkfile::qmakespec + QLatin1String("/features"); if(!Option::mkfile::qmakespec.isEmpty()) { + // The spec is already platform-dependent, so no subdirs here. + feature_roots << Option::mkfile::qmakespec + base_concat; + QFileInfo specfi(Option::mkfile::qmakespec); if (!specfi.isRoot()) { QDir specdir(specfi.absolutePath()); |