mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 08:53:06 +08:00
wxQt: Make wxEventLoop::Pending() return false unconditionally and document that
Because implementing this function reliably in wxQt is difficult, if not possible.
This commit is contained in:
@@ -133,6 +133,8 @@ public:
|
||||
Return true if any events are available.
|
||||
|
||||
If this method returns @true, calling Dispatch() will not block.
|
||||
|
||||
@note This function always returns @false under wxQt since 3.3.0
|
||||
*/
|
||||
virtual bool Pending() const = 0;
|
||||
|
||||
|
||||
+9
-2
@@ -126,8 +126,15 @@ int wxQtEventLoopBase::DoRun()
|
||||
|
||||
bool wxQtEventLoopBase::Pending() const
|
||||
{
|
||||
QAbstractEventDispatcher *instance = QAbstractEventDispatcher::instance();
|
||||
return instance->hasPendingEvents();
|
||||
// Note that we are not using any of the QAbstractEventDispatcher::hasPendingEvents()
|
||||
// or QCoreApplication::hasPendingEvents() functions here to check for pending events,
|
||||
// as the functions were deprecated in Qt5.3 and removed entirely in Qt6 due to their
|
||||
// unreliable way to check for pending events according to the Qt developers.
|
||||
//
|
||||
// So, in the absence of a replacement for these functions, this function is useless
|
||||
// under wxQt as it just returns false.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxQtEventLoopBase::Dispatch()
|
||||
|
||||
Reference in New Issue
Block a user