OSDN Git Service

remove unused and internal QEventLoop::ProcessEventsFlag enums
authorIvailo Monev <xakepa10@laimg.moc>
Tue, 31 Mar 2020 09:08:57 +0000 (09:08 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Tue, 31 Mar 2020 09:08:57 +0000 (09:08 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/kernel/qeventdispatcher_unix.cpp
src/core/kernel/qeventloop.cpp
src/core/kernel/qeventloop.h
src/gui/kernel/qeventdispatcher_x11.cpp

index 1566539..9357cab 100644 (file)
@@ -808,10 +808,8 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
         // return the maximum time we can wait for an event.
         timeval *tm = Q_NULLPTR;
         timeval wait_tm = { 0l, 0l };
-        if (!(flags & QEventLoop::X11ExcludeTimers)) {
-            if (d->timerList.timerWait(wait_tm))
-                tm = &wait_tm;
-        }
+        if (d->timerList.timerWait(wait_tm))
+            tm = &wait_tm;
 
         if (!canWait) {
             if (!tm)
@@ -825,9 +823,8 @@ bool QEventDispatcherUNIX::processEvents(QEventLoop::ProcessEventsFlags flags)
         int nevents = d->doSelect(flags, tm);
 
         // activate timers
-        if (! (flags & QEventLoop::X11ExcludeTimers)) {
-            nevents += activateTimers();
-        }
+        nevents += activateTimers();
+
         return (nevents > 0);
     }
 
index 5453cfb..db8177b 100644 (file)
@@ -85,11 +85,6 @@ public:
     \value WaitForMoreEvents Wait for events if no pending events are
     available.
 
-    \omitvalue X11ExcludeTimers
-    \omitvalue ExcludeUserInput
-    \omitvalue WaitForMore
-    \omitvalue EventLoopExec
-
     \sa processEvents()
 */
 
@@ -187,7 +182,7 @@ int QEventLoop::exec(ProcessEventsFlags flags)
 
     QT_TRY {
         while (!d->exit)
-            processEvents(flags | WaitForMoreEvents | EventLoopExec);
+            processEvents(flags | WaitForMoreEvents);
     } QT_CATCH (...) {
         qWarning("Qt has caught an exception thrown from an event handler. Throwing\n"
                  "exceptions from an event handler is not supported in Qt. You must\n"
index c2b2e9c..16231b0 100644 (file)
@@ -56,9 +56,7 @@ public:
         AllEvents = 0x00,
         ExcludeUserInputEvents = 0x01,
         ExcludeSocketNotifiers = 0x02,
-        WaitForMoreEvents = 0x04,
-        X11ExcludeTimers = 0x08,
-        EventLoopExec = 0x10
+        WaitForMoreEvents = 0x04
     };
     Q_DECLARE_FLAGS(ProcessEventsFlags, ProcessEventsFlag)
 
index 68d1e54..4a2c448 100644 (file)
@@ -134,8 +134,7 @@ bool QEventDispatcherX11::processEvents(QEventLoop::ProcessEventsFlags flags)
 
  out:
     if (!d->interrupt) {
-        const uint exclude_all =
-            QEventLoop::ExcludeSocketNotifiers | QEventLoop::X11ExcludeTimers | QEventLoop::WaitForMoreEvents;
+        const uint exclude_all = QEventLoop::ExcludeSocketNotifiers | QEventLoop::WaitForMoreEvents;
         if (nevents > 0 && ((uint)flags & exclude_all) == exclude_all) {
             QApplication::sendPostedEvents();
             return nevents > 0;