[Libreoffice-commits] core.git: vcl/unx
Michael Meeks
michael.meeks at collabora.com
Tue Nov 24 01:11:05 PST 2015
vcl/unx/kde4/KDEXLib.cxx | 13 ++++++++-----
vcl/unx/kde4/KDEXLib.hxx | 4 ++--
2 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit e8a2170e1884a85b411259c7240d459965bea235
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Tue Nov 24 09:20:29 2015 +0000
vcl: fix for kde4.
Change-Id: If68e58a5b1d6dfe7d7851513eed73ec20d1cd912
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index b6aa293..8060fb5 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -276,7 +276,7 @@ void KDEXLib::socketNotifierActivated( int fd )
sdata.handle( fd, sdata.data );
}
-bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
+SalYieldResult KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
if( !m_isGlibEventLoopType )
{
@@ -287,7 +287,9 @@ bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// otherwise they can remain unhandled for quite a long while
wasEvent = processYield( false, bHandleAllCurrentEvents );
}
- return SalXLib::Yield(bWait, bHandleAllCurrentEvents) || wasEvent;
+ SalYieldResult aResult = SalXLib::Yield(bWait, bHandleAllCurrentEvents);
+ return (aResult == SalYieldResult::EVENT || wasEvent) ?
+ SalYieldResult::EVENT : SalYieldResult::TIMEOUT;
}
// if we are the main thread (which is where the event processing is done),
// good, just do it
@@ -303,11 +305,11 @@ bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// temporarily do it while checking for new events)
SalYieldMutexReleaser aReleaser;
Q_EMIT processYieldSignal( bWait, bHandleAllCurrentEvents );
- return false;
+ return SalYieldResult::TIMEOUT;
}
}
-bool KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
+SalYieldResult KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
{
blockIdleTimeout = !bWait;
QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread());
@@ -323,7 +325,8 @@ bool KDEXLib::processYield( bool bWait, bool bHandleAllCurrentEvents )
if( bWait && !wasEvent )
dispatcher->processEvents( QEventLoop::WaitForMoreEvents );
blockIdleTimeout = false;
- return wasEvent;
+ return wasEvent ? SalYieldResult::EVENT
+ : SalYieldResult::TIMEOUT;
}
void KDEXLib::StartTimer( sal_uLong nMS )
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 0e9c0dd..60a4cd1 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -67,7 +67,7 @@ class KDEXLib : public QObject, public SalXLib
void userEventActivated();
void startTimeoutTimer();
void startUserEventTimer();
- bool processYield( bool bWait, bool bHandleAllCurrentEvents );
+ SalYieldResult processYield( bool bWait, bool bHandleAllCurrentEvents );
Q_SIGNALS:
void startTimeoutTimerSignal();
void startUserEventTimerSignal();
@@ -81,7 +81,7 @@ class KDEXLib : public QObject, public SalXLib
virtual ~KDEXLib();
virtual void Init() override;
- virtual bool Yield( bool bWait, bool bHandleAllCurrentEvents ) override;
+ virtual SalYieldResult Yield( bool bWait, bool bHandleAllCurrentEvents ) override;
virtual void Insert( int fd, void* data, YieldFunc pending, YieldFunc queued, YieldFunc handle ) override;
virtual void Remove( int fd ) override;
virtual void StartTimer( sal_uLong nMS ) override;
More information about the Libreoffice-commits
mailing list