From 7b736e1faf1fb6ed69a0a4b53b96ec3a9e9941e8 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 17 May 2022 09:40:48 +0200 Subject: Make qGlobalPostedEventsCount() auto-test-exported-only The only in-tree user outside QtCore is tst_QCoreApplication, guard the (single) test function there with QT_BUILD_INTERNAL. Change-Id: Ibc87ba76f2135cd8283acd75318f80a95e4b5c45 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qabstracteventdispatcher_p.h | 2 +- src/corelib/kernel/qcoreapplication.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') diff --git a/src/corelib/kernel/qabstracteventdispatcher_p.h b/src/corelib/kernel/qabstracteventdispatcher_p.h index 6fa77c146e..81ce39ffb8 100644 --- a/src/corelib/kernel/qabstracteventdispatcher_p.h +++ b/src/corelib/kernel/qabstracteventdispatcher_p.h @@ -20,7 +20,7 @@ QT_BEGIN_NAMESPACE -Q_CORE_EXPORT uint qGlobalPostedEventsCount(); +Q_AUTOTEST_EXPORT uint qGlobalPostedEventsCount(); class Q_CORE_EXPORT QAbstractEventDispatcherPrivate : public QObjectPrivate { diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 9f5d91a404..1e8b209ff8 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -321,7 +321,7 @@ Q_CONSTINIT bool QCoreApplicationPrivate::is_app_running = false; // app closing down if true Q_CONSTINIT bool QCoreApplicationPrivate::is_app_closing = false; -Q_CORE_EXPORT uint qGlobalPostedEventsCount() +uint qGlobalPostedEventsCount() { QThreadData *currentThreadData = QThreadData::current(); return currentThreadData->postEventList.size() - currentThreadData->postEventList.startOffset; -- cgit v1.2.3