diff options
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/makefiledeps.cpp | 11 | ||||
-rw-r--r-- | qmake/generators/makefiledeps.h | 8 |
2 files changed, 7 insertions, 12 deletions
diff --git a/qmake/generators/makefiledeps.cpp b/qmake/generators/makefiledeps.cpp index d68539814e..7c4be64aa8 100644 --- a/qmake/generators/makefiledeps.cpp +++ b/qmake/generators/makefiledeps.cpp @@ -60,19 +60,14 @@ QT_BEGIN_NAMESPACE inline bool qmake_endOfLine(const char &c) { return (c == '\r' || c == '\n'); } #endif -QMakeLocalFileName::QMakeLocalFileName(const QString &name) : is_null(name.isNull()) +QMakeLocalFileName::QMakeLocalFileName(const QString &name) + : real_name(name) { - if(!name.isEmpty()) { - if(name.at(0) == QLatin1Char('"') && name.at(name.length()-2) == QLatin1Char('"')) - real_name = name.mid(1, name.length()-2); - else - real_name = name; - } } const QString &QMakeLocalFileName::local() const { - if(!is_null && local_name.isNull()) + if (!isNull() && local_name.isNull()) local_name = Option::normalizePath(real_name); return local_name; } diff --git a/qmake/generators/makefiledeps.h b/qmake/generators/makefiledeps.h index 66b87bf470..7e39396754 100644 --- a/qmake/generators/makefiledeps.h +++ b/qmake/generators/makefiledeps.h @@ -41,14 +41,14 @@ struct SourceFile; struct SourceDependChildren; class SourceFiles; -class QMakeLocalFileName { - bool is_null; +class QMakeLocalFileName +{ QString real_name; mutable QString local_name; public: - QMakeLocalFileName() : is_null(true) {} + QMakeLocalFileName() = default; QMakeLocalFileName(const QString &); - bool isNull() const { return is_null; } + bool isNull() const { return real_name.isNull(); } inline const QString &real() const { return real_name; } const QString &local() const; |