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>
This commit is contained in:
Joerg Bornemann 2019-06-24 17:36:41 +02:00
parent 3a806254fe
commit f6db25962e
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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