From fad814088cf050f69b05db134a465e4ca0c1c79c Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 28 Apr 2017 10:03:18 +0200 Subject: [PATCH] do not wrap QAbstractEventDispatcher::flush with QT_DEPRECATED_SINCE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... as this would require us to remove usage of QAbstractEventDispatcher::flush from Qt source code as well. We can not do this already in Qt 5.9 as there are few event dispatchers in Qt that actually do override the ::flush (with non empty bodies). Removing this code could result in behavior changes (not very likely) for some user code. This method will be removed in Qt6. Instead mark it with a well known "### Qt{Version}" comment. This patch amends 41eefd7. The warning was: qcoreapplication.cpp: In static member function ‘static void QCoreApplication::flush()’: qcoreapplication.cpp:733:48: warning: ‘virtual void QAbstractEventDispatcher::flush()’ is deprecated [-Wdeprecated-declarations] self->d_func()->eventDispatcher->flush(); Change-Id: I48a1c68b84ff93268956205e1205e6d4b5d48664 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qabstracteventdispatcher.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/corelib/kernel/qabstracteventdispatcher.h b/src/corelib/kernel/qabstracteventdispatcher.h index a256b03523a..0d3e53e4a7c 100644 --- a/src/corelib/kernel/qabstracteventdispatcher.h +++ b/src/corelib/kernel/qabstracteventdispatcher.h @@ -102,9 +102,7 @@ public: virtual void wakeUp() = 0; virtual void interrupt() = 0; -#if QT_DEPRECATED_SINCE(5, 9) - QT_DEPRECATED virtual void flush() = 0; -#endif + virtual void flush() = 0; // ### Qt6: remove, mark final or make protected virtual void startingUp(); virtual void closingDown();