summaryrefslogtreecommitdiffstats
path: root/qmake/option.cpp
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire@kdab.com>2012-03-06 13:13:09 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-06 17:47:46 +0100
commit11f9d187312f54dce4f5233b7fe696a0d949facc (patch)
tree18923f915f85de17980934e686f64f7550a3537e /qmake/option.cpp
parent3ff7bc086b9ae3d7288e6a4e1f96974b77105ae0 (diff)
Fix finding specs in the unsupported/ directory.
The -spec argument was interpreted as a relative directory as soon as it contained a slash. Fix this by checking if the directory exists before attempting to interpret it. Change-Id: Ide8f0418abc719b0be582d2d72642a141f6c6dea Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake/option.cpp')
-rw-r--r--qmake/option.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 3fc66a8f3d..ef613b90ad 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -149,8 +149,11 @@ static QString detectProjectFile(const QString &path)
static QString cleanSpec(const QString &spec)
{
QString ret = QDir::cleanPath(spec);
- if (ret.contains('/'))
- ret = QDir::cleanPath(QFileInfo(ret).absoluteFilePath());
+ if (ret.contains('/')) {
+ const QFileInfo specDirInfo(ret);
+ if (specDirInfo.exists() && specDirInfo.isDir())
+ ret = QDir::cleanPath(specDirInfo.absoluteFilePath());
+ }
return ret;
}