CommandLine: implement debug streaming operator

Change-Id: I09a47d70d5bea315efa1af505f7afc69c8075310
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2021-11-17 11:16:10 +01:00
parent 1b772dcb27
commit 5967dd52ed
2 changed files with 10 additions and 0 deletions

View File

@@ -34,6 +34,12 @@
#include <QRegularExpression>
#include <QStack>
QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const Utils::CommandLine &cmd)
{
return dbg << cmd.toUserOutput();
}
QT_END_NAMESPACE
// The main state of the Unix shell parser
enum MxQuoting { MxBasic, MxSingleQuote, MxDoubleQuote, MxParen, MxSubst, MxGroup, MxMath };

View File

@@ -171,4 +171,8 @@ private:
} // namespace Utils
QT_BEGIN_NAMESPACE
QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug dbg, const Utils::CommandLine &cmd);
QT_END_NAMESPACE
Q_DECLARE_METATYPE(Utils::CommandLine)