Utils: Make CommandLine related operators hidden friends

Change-Id: Ifb81bb565f7343739883c06817f3e304bdc5b963
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2023-01-06 12:59:42 +01:00
parent bee489f9e2
commit 1874906ce1
2 changed files with 21 additions and 19 deletions

View File

@@ -13,13 +13,6 @@
#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 };
@@ -1531,4 +1524,14 @@ QStringList CommandLine::splitArguments() const
return ProcessArgs::splitArgs(m_arguments, m_executable.osType());
}
} // namespace Utils
QTCREATOR_UTILS_EXPORT bool operator==(const CommandLine &first, const CommandLine &second)
{
return first.m_executable == second.m_executable && first.m_arguments == second.m_arguments;
}
QTCREATOR_UTILS_EXPORT QDebug operator<<(QDebug dbg, const CommandLine &cmd)
{
return dbg << cmd.toUserOutput();
}
} // Utils