[Libreoffice-commits] core.git: vcl/unx

Stephan Bergmann sbergman at redhat.com
Mon Nov 21 08:24:40 UTC 2016


 vcl/unx/kde4/KDEXLib.cxx |    8 ++++----
 vcl/unx/kde4/KDEXLib.hxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 64e238bc304e60e685acbf4f52b606fb2e92b686
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Nov 21 09:22:17 2016 +0100

    loplugin:datamembershadow: KDEXLib::blockIdleTimeout shadows SalXLib member
    
    This smells like there's some sort of needless duplicationg among KDEXLib and
    its base calss SalXLib, but this duplication of blockIdleTimeout members had
    been like that ever since those members' introduction in
    06d731428ef6cf93c7333e8228bfb6088853b52f "make idle timers actually activate
    only when idle".
    
    Change-Id: Ic3eec821b2433745e83fc23d65d3c5f8e1fcf663

diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 510c5c9..cdf1489 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -51,7 +51,7 @@ KDEXLib::KDEXLib() :
     SalXLib(),  m_bStartupDone(false),
     m_pFreeCmdLineArgs(nullptr), m_pAppCmdLineArgs(nullptr), m_nFakeCmdLineArgs( 0 ),
     m_frameWidth( -1 ), m_isGlibEventLoopType(false),
-    m_allowKdeDialogs(false), blockIdleTimeout(false)
+    m_allowKdeDialogs(false), m_blockIdleTimeout(false)
 {
     // the timers created here means they belong to the main thread.
     // As the timeoutTimer runs the LO event queue, which may block on a dialog,
@@ -306,7 +306,7 @@ SalYieldResult KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
 
 SalYieldResult KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
 {
-    blockIdleTimeout = !bWait;
+    m_blockIdleTimeout = !bWait;
     QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread());
     bool wasEvent = false;
     for( int cnt = bHandleAllCurrentEvents ? 100 : 1;
@@ -319,7 +319,7 @@ SalYieldResult KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
     }
     if( bWait && !wasEvent )
         dispatcher->processEvents( QEventLoop::WaitForMoreEvents );
-    blockIdleTimeout = false;
+    m_blockIdleTimeout = false;
     return wasEvent ? SalYieldResult::EVENT
                     : SalYieldResult::TIMEOUT;
 }
@@ -362,7 +362,7 @@ void KDEXLib::timeoutActivated()
 
     // QGuiEventDispatcherGlib makes glib watch also X11 fd, but its hasPendingEvents()
     // doesn't check X11, so explicitly check XPending() here.
-    bool idle = QApplication::hasPendingEvents() && !blockIdleTimeout && !XPending( QX11Info::display());
+    bool idle = QApplication::hasPendingEvents() && !m_blockIdleTimeout && !XPending( QX11Info::display());
     X11SalData::Timeout( idle );
     // QTimer is not single shot, so will be restarted immediately
 }
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index c4e18f9..3383ce8 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -56,7 +56,7 @@ class KDEXLib : public QObject, public SalXLib
         int m_frameWidth;
         bool m_isGlibEventLoopType;
         bool m_allowKdeDialogs;
-        bool blockIdleTimeout;
+        bool m_blockIdleTimeout;
 
     private:
         void setupEventLoop();


More information about the Libreoffice-commits mailing list