summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-12 15:13:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-23 14:57:55 +0100
commit69e478480a782a663b8dd176ca4d917a09c91341 (patch)
tree233859fde779977b4ac268bcdd75fd0736fdfb13
parent3b049fd6db80b0bdfdfc5d2ab4cbf6be56c358b0 (diff)
QTestlib: Disambiguate static functions
They cause clashes in CMake Unity (Jumbo) builds. Task-number: QTBUG-109394 Pick-to: 6.5 Change-Id: I2920cc3f36ad60be1ee618c16653df5bc259019a Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
-rw-r--r--src/testlib/qplaintestlogger.cpp10
-rw-r--r--src/testlib/qteamcitylogger.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/src/testlib/qplaintestlogger.cpp b/src/testlib/qplaintestlogger.cpp
index 428673d5f8..748bd00643 100644
--- a/src/testlib/qplaintestlogger.cpp
+++ b/src/testlib/qplaintestlogger.cpp
@@ -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
diff --git a/src/testlib/qteamcitylogger.cpp b/src/testlib/qteamcitylogger.cpp
index a3e68ff31c..fbb2b2f051 100644
--- a/src/testlib/qteamcitylogger.cpp
+++ b/src/testlib/qteamcitylogger.cpp
@@ -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