QTestlib: Disambiguate static functions
They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Change-Id: I2920cc3f36ad60be1ee618c16653df5bc259019a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> (cherry picked from commit 69e478480a782a663b8dd176ca4d917a09c91341) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
6e436003ae
commit
776dcfd331
@ -110,7 +110,7 @@ template <int N> struct FixedBufString
|
||||
|
||||
namespace QTest {
|
||||
|
||||
static const char *incidentType2String(QAbstractTestLogger::IncidentTypes type)
|
||||
static const char *ptIncidentType2String(QAbstractTestLogger::IncidentTypes type)
|
||||
{
|
||||
switch (type) {
|
||||
case QAbstractTestLogger::Skip:
|
||||
@ -140,7 +140,7 @@ namespace QTest {
|
||||
return "RESULT ";
|
||||
}
|
||||
|
||||
static const char *messageType2String(QAbstractTestLogger::MessageTypes type)
|
||||
static const char *ptMessageType2String(QAbstractTestLogger::MessageTypes type)
|
||||
{
|
||||
switch (type) {
|
||||
case QAbstractTestLogger::QDebug:
|
||||
@ -456,7 +456,7 @@ void QPlainTestLogger::stopLogging()
|
||||
void QPlainTestLogger::enterTestFunction(const char * /*function*/)
|
||||
{
|
||||
if (QTestLog::verboseLevel() >= 1)
|
||||
printMessage(MessageSource::Other, QTest::messageType2String(Info), "entering");
|
||||
printMessage(MessageSource::Other, QTest::ptMessageType2String(Info), "entering");
|
||||
}
|
||||
|
||||
void QPlainTestLogger::leaveTestFunction()
|
||||
@ -471,7 +471,7 @@ void QPlainTestLogger::addIncident(IncidentTypes type, const char *description,
|
||||
&& QTestLog::verboseLevel() < 0)
|
||||
return;
|
||||
|
||||
printMessage(MessageSource::Incident, QTest::incidentType2String(type), description, file, line);
|
||||
printMessage(MessageSource::Incident, QTest::ptIncidentType2String(type), description, file, line);
|
||||
}
|
||||
|
||||
void QPlainTestLogger::addBenchmarkResults(const QList<QBenchmarkResult> &results)
|
||||
@ -496,7 +496,7 @@ void QPlainTestLogger::addMessage(MessageTypes type, const QString &message,
|
||||
if (type != QFatal && QTestLog::verboseLevel() < 0)
|
||||
return;
|
||||
|
||||
printMessage(MessageSource::Other, QTest::messageType2String(type), qPrintable(message), file, line);
|
||||
printMessage(MessageSource::Other, QTest::ptMessageType2String(type), qPrintable(message), file, line);
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -21,7 +21,7 @@ using namespace Qt::StringLiterals;
|
||||
|
||||
namespace QTest {
|
||||
|
||||
static const char *incidentType2String(QAbstractTestLogger::IncidentTypes type)
|
||||
static const char *tcIncidentType2String(QAbstractTestLogger::IncidentTypes type)
|
||||
{
|
||||
switch (type) {
|
||||
case QAbstractTestLogger::Skip:
|
||||
@ -46,7 +46,7 @@ namespace QTest {
|
||||
return "??????";
|
||||
}
|
||||
|
||||
static const char *messageType2String(QAbstractTestLogger::MessageTypes type)
|
||||
static const char *tcMessageType2String(QAbstractTestLogger::MessageTypes type)
|
||||
{
|
||||
switch (type) {
|
||||
case QAbstractTestLogger::QDebug:
|
||||
@ -135,7 +135,7 @@ void QTeamCityLogger::addIncident(IncidentTypes type, const char *description,
|
||||
}
|
||||
|
||||
if (type == QAbstractTestLogger::XFail) {
|
||||
addPendingMessage(QTest::incidentType2String(type), description, file, line);
|
||||
addPendingMessage(QTest::tcIncidentType2String(type), description, file, line);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ void QTeamCityLogger::addMessage(MessageTypes type, const QString &message,
|
||||
|
||||
QTestCharBuffer escapedMessage;
|
||||
tcEscapedString(&escapedMessage, qUtf8Printable(message));
|
||||
addPendingMessage(QTest::messageType2String(type), escapedMessage.constData(), file, line);
|
||||
addPendingMessage(QTest::tcMessageType2String(type), escapedMessage.constData(), file, line);
|
||||
}
|
||||
|
||||
void QTeamCityLogger::tcEscapedString(QTestCharBuffer *buf, const char *str) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user