Remove manual declarations of qGlobalPostedEventsCount()

... in favor of including qabstracteventdispatcher_p.h, where needed.

Keeps the code DRY.

Change-Id: I5bee2e653cb29ffac2601ff03c952a4b3adbdb9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Marc Mutz 2022-05-17 09:32:49 +02:00
parent de09aefcd6
commit f2fea2325d
4 changed files with 2 additions and 11 deletions

View File

@ -3,6 +3,7 @@
#include "qeventdispatcher_wasm_p.h"
#include <QtCore/private/qabstracteventdispatcher_p.h> // for qGlobalPostedEventsCount()
#include <QtCore/qcoreapplication.h>
#include <QtCore/qthread.h>
#include <QtCore/qsocketnotifier.h>
@ -14,7 +15,6 @@
QT_BEGIN_NAMESPACE
// using namespace emscripten;
extern int qGlobalPostedEventsCount(); // from qapplication.cpp
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher");
Q_LOGGING_CATEGORY(lcEventDispatcherTimers, "qt.eventdispatcher.timers");

View File

@ -18,8 +18,6 @@
QT_BEGIN_NAMESPACE
extern uint qGlobalPostedEventsCount();
#ifndef TIME_KILL_SYNCHRONOUS
# define TIME_KILL_SYNCHRONOUS 0x0100
#endif

View File

@ -7,6 +7,7 @@
#include <QtCore/QtCore>
#include <QTest>
#include <private/qabstracteventdispatcher_p.h> // for qGlobalPostedEventsCount()
#include <private/qcoreapplication_p.h>
#include <private/qeventloop_p.h>
#include <private/qthread_p.h>
@ -513,10 +514,6 @@ void tst_QCoreApplication::applicationPid()
QVERIFY(QCoreApplication::applicationPid() > 0);
}
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT uint qGlobalPostedEventsCount();
QT_END_NAMESPACE
class GlobalPostedEventsCountObject : public QObject
{
Q_OBJECT

View File

@ -1195,10 +1195,6 @@ void tst_QThread::isRunningInFinished()
}
}
QT_BEGIN_NAMESPACE
Q_CORE_EXPORT uint qGlobalPostedEventsCount();
QT_END_NAMESPACE
class DummyEventDispatcher : public QAbstractEventDispatcher {
public:
DummyEventDispatcher() : QAbstractEventDispatcher() {}