From 1831abb5bbcb520ffcb329fa67bf4d4405eb2ab4 Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 19 Jan 2012 11:53:09 +0100 Subject: Remove QEventLoop::DeferredDeletion This flag has been deprecated since Qt 4.4, so remove it. tst_QApplication had 2 nearly identical tests, one for testing the QEventLoop::DeferredDeletion flag, and one to test sendPostedEvents() with QEvent::DeferredDelete. The latter is the preferred way, so keep that test, but remove the test for the obsoleted flag. Change-Id: Icdb7483c32b3c920bda31d2bbb4f7414ece6d826 Reviewed-by: Lars Knoll Reviewed-by: Robin Burchell --- src/corelib/kernel/qcoreapplication.cpp | 6 ------ src/corelib/kernel/qeventloop.cpp | 9 --------- src/corelib/kernel/qeventloop.h | 9 +++------ 3 files changed, 3 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 2e56acaeff..79a724cd37 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -952,8 +952,6 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags) QThreadData *data = QThreadData::current(); if (!data->eventDispatcher) return; - if (flags & QEventLoop::DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); data->eventDispatcher->processEvents(flags); } @@ -980,13 +978,9 @@ void QCoreApplication::processEvents(QEventLoop::ProcessEventsFlags flags, int m return; QElapsedTimer start; start.start(); - if (flags & QEventLoop::DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); while (data->eventDispatcher->processEvents(flags & ~QEventLoop::WaitForMoreEvents)) { if (start.elapsed() > maxtime) break; - if (flags & QEventLoop::DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } } diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp index d0d19537c2..0d4a4b427e 100644 --- a/src/corelib/kernel/qeventloop.cpp +++ b/src/corelib/kernel/qeventloop.cpp @@ -96,11 +96,8 @@ public: available. \omitvalue X11ExcludeTimers - \omitvalue ExcludeUserInput - \omitvalue WaitForMore \omitvalue EventLoopExec \omitvalue DialogExec - \value DeferredDeletion deprecated - do not use. \sa processEvents() */ @@ -144,8 +141,6 @@ bool QEventLoop::processEvents(ProcessEventsFlags flags) Q_D(QEventLoop); if (!d->threadData->eventDispatcher) return false; - if (flags & DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); return d->threadData->eventDispatcher->processEvents(flags); } @@ -252,13 +247,9 @@ void QEventLoop::processEvents(ProcessEventsFlags flags, int maxTime) QElapsedTimer start; start.start(); - if (flags & DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); while (processEvents(flags & ~WaitForMoreEvents)) { if (start.elapsed() > maxTime) break; - if (flags & DeferredDeletion) - QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } } diff --git a/src/corelib/kernel/qeventloop.h b/src/corelib/kernel/qeventloop.h index 506a0bc8cc..b501db5937 100644 --- a/src/corelib/kernel/qeventloop.h +++ b/src/corelib/kernel/qeventloop.h @@ -66,12 +66,9 @@ public: ExcludeUserInputEvents = 0x01, ExcludeSocketNotifiers = 0x02, WaitForMoreEvents = 0x04, - X11ExcludeTimers = 0x08 -#ifdef QT_DEPRECATED - , DeferredDeletion = 0x10 -#endif - , EventLoopExec = 0x20 - , DialogExec = 0x40 + X11ExcludeTimers = 0x08, + EventLoopExec = 0x20, + DialogExec = 0x40 }; Q_DECLARE_FLAGS(ProcessEventsFlags, ProcessEventsFlag) -- cgit v1.2.3