diff options
author | Orgad Shaneh <orgads@gmail.com> | 2011-11-15 10:34:38 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-19 00:17:32 +0100 |
commit | f9b94a7ee13e7b8a1c1482391d935a2d5a754848 (patch) | |
tree | 7449c77074c7bdc09d5e2366438ba054ca479a65 /qmake/option.h | |
parent | 711f367d8f4a1f55c59ff7cdda743b2b3bd5e265 (diff) |
qmake: Normalize paths instead of converting to native separators
Task-number: QTBUG-22738
Change-Id: I40163a883d84beff79f52bff141d61dfe921c129
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'qmake/option.h')
-rw-r--r-- | qmake/option.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qmake/option.h b/qmake/option.h index ffccb8efc5..3899ea84d0 100644 --- a/qmake/option.h +++ b/qmake/option.h @@ -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) { |