summaryrefslogtreecommitdiffstats
path: root/qmake/option.h
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/option.h')
-rw-r--r--qmake/option.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/qmake/option.h b/qmake/option.h
index ffccb8efc5..ee8a1c2403 100644
--- a/qmake/option.h
+++ b/qmake/option.h
@@ -1,8 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
+** Contact: http://www.qt-project.org/
**
** This file is part of the qmake application of the Qt Toolkit.
**
@@ -35,6 +34,7 @@
**
**
**
+**
** $QT_END_LICENSE$
**
****************************************************************************/
@@ -115,7 +115,8 @@ struct Option
FixEnvVars = 0x01,
FixPathCanonicalize = 0x02,
FixPathToLocalSeparators = 0x04,
- FixPathToTargetSeparators = 0x08
+ FixPathToTargetSeparators = 0x08,
+ FixPathToNormalSeparators = 0x10
};
static QString fixString(QString string, uchar flags);
@@ -138,6 +139,15 @@ struct Option
flags |= FixPathCanonicalize;
return fixString(in, flags);
}
+ inline static QString normalizePath(const QString &in, bool fix_env=true, bool canonical=true)
+ {
+ uchar flags = FixPathToNormalSeparators;
+ if (fix_env)
+ flags |= FixEnvVars;
+ if (canonical)
+ flags |= FixPathCanonicalize;
+ return fixString(in, flags);
+ }
inline static bool hasFileExtension(const QString &str, const QStringList &extensions)
{