Kaydet (Commit) 0e2e5d24 authored tarafından Katarina Behrens's avatar Katarina Behrens Kaydeden (comit) Thorsten Behrens

Band aid fix build --with-kde5

Change-Id: Ifbcfdbb74bffaf88296351ec72536e16a4073b60
Reviewed-on: https://gerrit.libreoffice.org/48102Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst 4d78cf97
......@@ -58,7 +58,7 @@ void SalKDE5Display::Yield()
if (XEventsQueued( pDisp_, QueuedAfterReading ) == 0)
return;
DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
DBG_ASSERT( GetSalData()->m_pInstance->GetYieldMutex()->IsCurrentThread() ==
osl::Thread::getCurrentIdentifier(),
"will crash soon since solar mutex not locked in SalKDE5Display::Yield" );
......
......@@ -22,7 +22,7 @@
#include <QtWidgets/QApplication>
#include <QtWidgets/QFrame>
#include <QtGui/QClipboard>
#include <QtGui/QFrame>
#include <QtWidgets/QFrame>
#include <QtX11Extras/QX11Info>
......@@ -96,7 +96,7 @@ KDE5XLib::~KDE5XLib()
void KDE5XLib::Init()
{
m_pInputMethod = new SalI18N_InputMethod;
m_pInputMethod.reset(new SalI18N_InputMethod);
m_pInputMethod->SetLocale();
XrmInitialize();
......@@ -208,7 +208,7 @@ static GPollFunc old_gpoll = nullptr;
static gint gpoll_wrapper( GPollFD* ufds, guint nfds, gint timeout )
{
SalYieldMutexReleaser release; // release YieldMutex (and re-acquire at block end)
SolarMutexReleaser release; // release YieldMutex (and re-acquire at block end)
return old_gpoll( ufds, nfds, timeout );
}
#endif
......@@ -304,7 +304,7 @@ bool KDE5XLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
// release the yield lock to prevent deadlock with the main thread
// (it's ok to release it here, since even normal processYield() would
// temporarily do it while checking for new events)
SalYieldMutexReleaser aReleaser;
SolarMutexReleaser aReleaser;
Q_EMIT processYieldSignal( bWait, bHandleAllCurrentEvents );
return false;
}
......@@ -370,10 +370,10 @@ void KDE5XLib::Wakeup()
QAbstractEventDispatcher::instance( qApp->thread())->wakeUp(); // main thread event loop
}
void KDE5XLib::PostUserEvent()
void KDE5XLib::TriggerUserEventProcessing()
{
if( !m_isGlibEventLoopType )
return SalXLib::PostUserEvent();
return SalXLib::TriggerUserEventProcessing();
QApplication::postEvent(this, new QEvent(QEvent::Type( m_postUserEventId )));
}
......@@ -394,9 +394,11 @@ uno::Reference< ui::dialogs::XFilePicker2 > KDE5XLib::createFilePicker(
{
#if QT5_HAVE_GLIB
if( qApp->thread() != QThread::currentThread()) {
SalYieldMutexReleaser aReleaser;
SolarMutexReleaser aReleaser;
return Q_EMIT createFilePickerSignal( xMSF );
}
return nullptr;
//return uno::Reference< ui::dialogs::XFilePicker2 >( new KDE4FilePicker( xMSF ) );
#else
(void)xMSF;
......
......@@ -84,7 +84,7 @@ class KDE5XLib : public QObject, public QAbstractNativeEventFilter, public SalXL
virtual void StartTimer( sal_uLong nMS ) override;
virtual void StopTimer() override;
virtual void Wakeup() override;
virtual void PostUserEvent() override;
virtual void TriggerUserEventProcessing();
void doStartup();
bool allowKdeDialogs() { return m_allowKdeDialogs; }
......
......@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <QtGui/QApplication>
#include <QtWidgets/QApplication>
#include "KDE5Data.hxx"
#include "KDE5SalInstance.hxx"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment