diff options
author | Marc Mutz <marc.mutz@qt.io> | 2024-03-01 16:25:36 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2024-03-01 17:15:02 +0100 |
commit | ef28c9d7c587471df680f777ab3bdcdc6ac03f3d (patch) | |
tree | bcd9eb7281c4b767db11d9652a57dee1c1a8940b /src/webchannel | |
parent | 2c7465b284ea02f42988ec77575723df35e677bb (diff) |
QWebChannel: give friendship to tst_bench_QWebChannel the idiomatic way
Don't put the tst_ class into the QT_NAMESPACE lest it changes the
name in the CI -qt-namespace builds and messes up statistics
(unlikely, being a benchmark, but anyway). This requires
forward-declaring the tst_ class at global scope and using a FQN in
the friend declaration to avoid the friend declaration declaring a
separate class in QT_NAMESPACE.
Amends dccba9bbfdb893fb51c7ef52b7cf0e605eb2d13d, but that just
inherited the issue from the existing code. Created QTBUG-122927 to
track the original issue.
Task-number: QTBUG-122927
Pick-to: 6.7
Change-Id: Ia6d3932f061eee7b6741ac875932a7e15120d830
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/webchannel')
-rw-r--r-- | src/webchannel/qmetaobjectpublisher_p.h | 4 | ||||
-rw-r--r-- | src/webchannel/qwebchannel.h | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h index fe669bc..b06b8c7 100644 --- a/src/webchannel/qmetaobjectpublisher_p.h +++ b/src/webchannel/qmetaobjectpublisher_p.h @@ -29,6 +29,8 @@ #include <unordered_map> +class tst_bench_QWebChannel; + QT_BEGIN_NAMESPACE // NOTE: keep in sync with corresponding maps in qwebchannel.js and WebChannelTest.qml @@ -310,7 +312,7 @@ private: friend class QQmlWebChannelPrivate; friend class QWebChannel; friend class TestWebChannel; - friend class tst_bench_QWebChannel; + friend class ::tst_bench_QWebChannel; QWebChannel *webChannel; std::unordered_map<const QThread*, SignalHandler<QMetaObjectPublisher>> signalHandlers; diff --git a/src/webchannel/qwebchannel.h b/src/webchannel/qwebchannel.h index b3f7119..a7f7b31 100644 --- a/src/webchannel/qwebchannel.h +++ b/src/webchannel/qwebchannel.h @@ -10,6 +10,8 @@ #include <QtWebChannel/qwebchannelglobal.h> +class tst_bench_QWebChannel; + QT_BEGIN_NAMESPACE class QWebChannelPrivate; @@ -55,7 +57,7 @@ private: friend class QMetaObjectPublisher; friend class QQmlWebChannel; friend class TestWebChannel; - friend class tst_bench_QWebChannel; + friend class ::tst_bench_QWebChannel; }; QT_END_NAMESPACE |