summaryrefslogtreecommitdiff
path: root/src/testlib
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-12 15:13:23 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-23 19:55:13 +0000
commit776dcfd3311c8aedebaa738300f23cc8c917bd26 (patch)
tree78cceb2e7d5ff800c2ea3735597e8ee03f5f9d69 /src/testlib
parent6e436003ae266532740e4c0a5b89c617952deb54 (diff)
downloadqtbase-776dcfd3311c8aedebaa738300f23cc8c917bd26.tar.gz
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>
Diffstat (limited to 'src/testlib')
-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