summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2019-06-24 17:36:41 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-06-24 17:40:07 +0200
commitf6db25962e820d7709c2f235f02893dd3edde4f4 (patch)
treefa7b9273832449a4a2b04e92fb97c0987b35ef2e /qmake
parent3a806254fe265583f3871ed4629e13b23675ac86 (diff)
Add QDebug streaming operator for ProString
This saves us lots of .toQString() and .toQStringList() typing when qDebug()'ing qmake code. Change-Id: I037e5e1816f2dcb6a20dec4c275f3d886f155ad5 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/library/proitems.cpp5
-rw-r--r--qmake/library/proitems.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/qmake/library/proitems.cpp b/qmake/library/proitems.cpp
index 8bbde9f8c0..41bed69f00 100644
--- a/qmake/library/proitems.cpp
+++ b/qmake/library/proitems.cpp
@@ -517,4 +517,9 @@ ProKey ProFile::getHashStr(const ushort *&tPtr)
return ret;
}
+QDebug operator<<(QDebug debug, const ProString &str)
+{
+ return debug << str.toQString();
+}
+
QT_END_NAMESPACE
diff --git a/qmake/library/proitems.h b/qmake/library/proitems.h
index 71e5e05367..0e0bebddc7 100644
--- a/qmake/library/proitems.h
+++ b/qmake/library/proitems.h
@@ -31,6 +31,7 @@
#include "qmake_global.h"
+#include <qdebug.h>
#include <qstring.h>
#include <qvector.h>
#include <qhash.h>
@@ -468,6 +469,8 @@ struct ProFunctionDefs {
QHash<ProKey, ProFunctionDef> replaceFunctions;
};
+QDebug operator<<(QDebug debug, const ProString &str);
+
QT_END_NAMESPACE
#endif // PROITEMS_H