kde5: rename classes and other relevant data: KDE[4]->KDE5

add log area too

Change-Id: I187c04c8646ec9c9264d84938e1ccf3a1cbd62f1
This commit is contained in:
Katarina Behrens
2017-09-07 16:18:31 +02:00
committed by Thorsten Behrens
parent dd7a3147f1
commit 8b52adcad3
14 changed files with 81 additions and 79 deletions

View File

@@ -454,6 +454,7 @@ certain functionality.
@li @c vcl.icontest @li @c vcl.icontest
@li @c vcl.kde - KDE @li @c vcl.kde - KDE
@li @c vcl.kde4 - KDE4 @li @c vcl.kde4 - KDE4
@li @c vcl.kde5 - KDE5
@li @c vcl.layout - Widget layout @li @c vcl.layout - Widget layout
@li @c vcl.lazydelete @li @c vcl.lazydelete
@li @c vcl.opengl @li @c vcl.opengl

View File

@@ -20,7 +20,8 @@ class SalGenericDisplay;
namespace psp { class PrintFontManager; } namespace psp { class PrintFontManager; }
enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3, enum GenericUnixSalDataType { SAL_DATA_GTK, SAL_DATA_GTK3,
SAL_DATA_TDE3, SAL_DATA_KDE3, SAL_DATA_KDE4, SAL_DATA_TDE3,
SAL_DATA_KDE3,SAL_DATA_KDE4, SAL_DATA_KDE5,
SAL_DATA_UNX, SAL_DATA_SVP, SAL_DATA_UNX, SAL_DATA_SVP,
SAL_DATA_ANDROID, SAL_DATA_IOS, SAL_DATA_ANDROID, SAL_DATA_IOS,
SAL_DATA_HEADLESS }; SAL_DATA_HEADLESS };

View File

@@ -27,18 +27,18 @@
#include "KDE5XLib.hxx" #include "KDE5XLib.hxx"
#include "KDE5SalDisplay.hxx" #include "KDE5SalDisplay.hxx"
KDEData::~KDEData() KDE5Data::~KDE5Data()
{ {
} }
void KDEData::Init() void KDE5Data::Init()
{ {
pXLib_ = new KDEXLib(); pXLib_ = new KDE5XLib();
pXLib_->Init(); pXLib_->Init();
SetDisplay( SalKDEDisplay::self() ); SetDisplay( SalKDE5Display::self() );
} }
void KDEData::initNWF() void KDE5Data::initNWF()
{ {
ImplSVData *pSVData = ImplGetSVData(); ImplSVData *pSVData = ImplGetSVData();
@@ -61,7 +61,7 @@ void KDEData::initNWF()
style->pixelMetric( QStyle::PM_MenuVMargin ); style->pixelMetric( QStyle::PM_MenuVMargin );
} }
void KDEData::deInitNWF() void KDE5Data::deInitNWF()
{ {
} }

View File

@@ -22,12 +22,12 @@
#include <unx/saldisp.hxx> #include <unx/saldisp.hxx>
#include <unx/saldata.hxx> #include <unx/saldata.hxx>
class KDEData : public X11SalData class KDE5Data : public X11SalData
{ {
public: public:
explicit KDEData( SalInstance *pInstance ) explicit KDE5Data( SalInstance *pInstance )
: X11SalData( SAL_DATA_KDE4, pInstance ) {} : X11SalData( SAL_DATA_KDE5, pInstance ) {}
virtual ~KDEData() override; virtual ~KDE5Data() override;
virtual void Init() override; virtual void Init() override;
virtual void initNWF() override; virtual void initNWF() override;

View File

@@ -28,9 +28,9 @@
#include <assert.h> #include <assert.h>
SalKDEDisplay* SalKDEDisplay::selfptr = nullptr; SalKDE5Display* SalKDE5Display::selfptr = nullptr;
SalKDEDisplay::SalKDEDisplay( Display* pDisp ) SalKDE5Display::SalKDE5Display( Display* pDisp )
: SalX11Display( pDisp ) : SalX11Display( pDisp )
{ {
assert( selfptr == nullptr ); assert( selfptr == nullptr );
@@ -38,10 +38,10 @@ SalKDEDisplay::SalKDEDisplay( Display* pDisp )
xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False ); xim_protocol = XInternAtom( pDisp_, "_XIM_PROTOCOL", False );
} }
SalKDEDisplay::~SalKDEDisplay() SalKDE5Display::~SalKDE5Display()
{ {
// in case never a frame opened // in case never a frame opened
static_cast<KDEXLib*>(GetXLib())->doStartup(); static_cast<KDE5XLib*>(GetXLib())->doStartup();
// clean up own members // clean up own members
doDestruct(); doDestruct();
selfptr = nullptr; selfptr = nullptr;
@@ -49,7 +49,7 @@ SalKDEDisplay::~SalKDEDisplay()
pDisp_ = nullptr; pDisp_ = nullptr;
} }
void SalKDEDisplay::Yield() void SalKDE5Display::Yield()
{ {
if( DispatchInternalEvent() ) if( DispatchInternalEvent() )
return; return;
@@ -60,7 +60,7 @@ void SalKDEDisplay::Yield()
DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() == DBG_ASSERT( static_cast<SalYieldMutex*>(GetSalData()->m_pInstance->GetYieldMutex())->GetThreadId() ==
osl::Thread::getCurrentIdentifier(), osl::Thread::getCurrentIdentifier(),
"will crash soon since solar mutex not locked in SalKDEDisplay::Yield" ); "will crash soon since solar mutex not locked in SalKDE5Display::Yield" );
/*XEvent event; /*XEvent event;
XNextEvent( pDisp_, &event ); XNextEvent( pDisp_, &event );
@@ -77,7 +77,7 @@ void SalKDEDisplay::Yield()
// completely. Skipped events are KeyPress, KeyRelease and also _XIM_PROTOCOL client message // completely. Skipped events are KeyPress, KeyRelease and also _XIM_PROTOCOL client message
// (seems to be necessary too, hopefully there are not other internal XIM messages that // (seems to be necessary too, hopefully there are not other internal XIM messages that
// would need this handling). // would need this handling).
bool SalKDEDisplay::checkDirectInputEvent( xcb_generic_event_t* ev ) bool SalKDE5Display::checkDirectInputEvent( xcb_generic_event_t* ev )
{ {
switch (ev->response_type & ~0x80) switch (ev->response_type & ~0x80)
{ {

View File

@@ -26,20 +26,20 @@
#undef CursorShape #undef CursorShape
#endif #endif
class SalKDEDisplay : public SalX11Display class SalKDE5Display : public SalX11Display
{ {
public: public:
explicit SalKDEDisplay( Display* pDisp ); explicit SalKDE5Display( Display* pDisp );
virtual ~SalKDEDisplay() override; virtual ~SalKDE5Display() override;
static SalKDEDisplay* self(); static SalKDE5Display* self();
virtual void Yield() override; virtual void Yield() override;
bool checkDirectInputEvent( xcb_generic_event_t* ev ); bool checkDirectInputEvent( xcb_generic_event_t* ev );
private: private:
Atom xim_protocol; Atom xim_protocol;
static SalKDEDisplay* selfptr; static SalKDE5Display* selfptr;
}; };
inline SalKDEDisplay* SalKDEDisplay::self() inline SalKDE5Display* SalKDE5Display::self()
{ {
return selfptr; return selfptr;
} }

View File

@@ -47,16 +47,16 @@
#include <boost/optional.hpp> #include <boost/optional.hpp>
KDESalFrame::KDESalFrame( SalFrame* pParent, SalFrameStyleFlags nState ) : KDE5SalFrame::KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nState ) :
X11SalFrame( pParent, nState ) X11SalFrame( pParent, nState )
{ {
} }
void KDESalFrame::Show( bool bVisible, bool bNoActivate ) void KDE5SalFrame::Show( bool bVisible, bool bNoActivate )
{ {
if ( !GetParent() && ! (GetStyle() & SalFrameStyleFlags::INTRO) ) if ( !GetParent() && ! (GetStyle() & SalFrameStyleFlags::INTRO) )
{ {
KDEXLib* pXLib = static_cast<KDEXLib*>(GetDisplay()->GetXLib()); KDE5XLib* pXLib = static_cast<KDE5XLib*>(GetDisplay()->GetXLib());
pXLib->doStartup(); pXLib->doStartup();
} }
@@ -120,12 +120,12 @@ static vcl::Font toFont( const QFont &rQFont, const css::lang::Locale& rLocale )
else else
aInfo.m_eWidth = WIDTH_ULTRA_EXPANDED; aInfo.m_eWidth = WIDTH_ULTRA_EXPANDED;
SAL_INFO( "vcl.kde4", "font name BEFORE system match: \"" << aInfo.m_aFamilyName << "\"" ); SAL_INFO( "vcl.kde5", "font name BEFORE system match: \"" << aInfo.m_aFamilyName << "\"" );
// match font to e.g. resolve "Sans" // match font to e.g. resolve "Sans"
psp::PrintFontManager::get().matchFont( aInfo, rLocale ); psp::PrintFontManager::get().matchFont( aInfo, rLocale );
SAL_INFO( "vcl.kde4", "font match " << SAL_INFO( "vcl.kde5", "font match " <<
(aInfo.m_nID != 0 ? "succeeded" : "failed") << (aInfo.m_nID != 0 ? "succeeded" : "failed") <<
", name AFTER: \"" << aInfo.m_aFamilyName << "\"" ); ", name AFTER: \"" << aInfo.m_aFamilyName << "\"" );
@@ -150,7 +150,7 @@ static vcl::Font toFont( const QFont &rQFont, const css::lang::Locale& rLocale )
/** Implementation of KDE integration's main method. /** Implementation of KDE integration's main method.
*/ */
void KDESalFrame::UpdateSettings( AllSettings& rSettings ) void KDE5SalFrame::UpdateSettings( AllSettings& rSettings )
{ {
StyleSettings style( rSettings.GetStyleSettings() ); StyleSettings style( rSettings.GetStyleSettings() );
bool bSetTitleFont = false; bool bSetTitleFont = false;
@@ -334,7 +334,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings )
rSettings.SetStyleSettings( style ); rSettings.SetStyleSettings( style );
} }
void KDESalFrame::ReleaseGraphics( SalGraphics *pGraphics ) void KDE5SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
{ {
for( int i = 0; i < nMaxGraphics; i++ ) for( int i = 0; i < nMaxGraphics; i++ )
{ {
@@ -346,7 +346,7 @@ void KDESalFrame::ReleaseGraphics( SalGraphics *pGraphics )
} }
} }
void KDESalFrame::updateGraphics( bool bClear ) void KDE5SalFrame::updateGraphics( bool bClear )
{ {
Drawable aDrawable = bClear ? None : GetWindow(); Drawable aDrawable = bClear ? None : GetWindow();
for( int i = 0; i < nMaxGraphics; i++ ) for( int i = 0; i < nMaxGraphics; i++ )
@@ -356,7 +356,7 @@ void KDESalFrame::updateGraphics( bool bClear )
} }
} }
SalGraphics* KDESalFrame::AcquireGraphics() SalGraphics* KDE5SalFrame::AcquireGraphics()
{ {
if( GetWindow() ) if( GetWindow() )
{ {

View File

@@ -25,7 +25,7 @@
#include <unx/salframe.h> #include <unx/salframe.h>
#include <unx/salgdi.h> #include <unx/salgdi.h>
class KDESalFrame : public X11SalFrame class KDE5SalFrame : public X11SalFrame
{ {
private: private:
static const int nMaxGraphics = 2; static const int nMaxGraphics = 2;
@@ -41,7 +41,7 @@ class KDESalFrame : public X11SalFrame
GraphicsHolder m_aGraphics[ nMaxGraphics ]; GraphicsHolder m_aGraphics[ nMaxGraphics ];
public: public:
KDESalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ); KDE5SalFrame( SalFrame* pParent, SalFrameStyleFlags nStyle );
virtual SalGraphics* AcquireGraphics() override; virtual SalGraphics* AcquireGraphics() override;
virtual void ReleaseGraphics( SalGraphics *pGraphics ) override; virtual void ReleaseGraphics( SalGraphics *pGraphics ) override;

View File

@@ -33,20 +33,20 @@
using namespace com::sun::star; using namespace com::sun::star;
KDESalInstance::KDESalInstance(SalYieldMutex* pMutex) KDE5SalInstance::KDE5SalInstance(SalYieldMutex* pMutex)
: X11SalInstance(pMutex) : X11SalInstance(pMutex)
{ {
ImplSVData* pSVData = ImplGetSVData(); ImplSVData* pSVData = ImplGetSVData();
delete pSVData->maAppData.mpToolkitName; delete pSVData->maAppData.mpToolkitName;
pSVData->maAppData.mpToolkitName = new OUString("kde4"); pSVData->maAppData.mpToolkitName = new OUString("kde5");
} }
SalFrame* KDESalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nState ) SalFrame* KDE5SalInstance::CreateFrame( SalFrame *pParent, SalFrameStyleFlags nState )
{ {
return new KDESalFrame( pParent, nState ); return new KDE5SalFrame( pParent, nState );
} }
uno::Reference< ui::dialogs::XFilePicker2 > KDESalInstance::createFilePicker( uno::Reference< ui::dialogs::XFilePicker2 > KDE5SalInstance::createFilePicker(
const uno::Reference< uno::XComponentContext >& xMSF ) const uno::Reference< uno::XComponentContext >& xMSF )
{ {
/*KDEXLib* kdeXLib = static_cast<KDEXLib*>( mpXLib ); /*KDEXLib* kdeXLib = static_cast<KDEXLib*>( mpXLib );
@@ -57,12 +57,12 @@ uno::Reference< ui::dialogs::XFilePicker2 > KDESalInstance::createFilePicker(
return X11SalInstance::createFilePicker( xMSF ); return X11SalInstance::createFilePicker( xMSF );
} }
SalX11Display* KDESalInstance::CreateDisplay() const SalX11Display* KDE5SalInstance::CreateDisplay() const
{ {
return new SalKDEDisplay( QX11Info::display() ); return new SalKDE5Display( QX11Info::display() );
} }
bool KDESalInstance::IsMainThread() const bool KDE5SalInstance::IsMainThread() const
{ {
return qApp->thread() == QThread::currentThread(); return qApp->thread() == QThread::currentThread();
} }

View File

@@ -24,13 +24,13 @@
class SalYieldMutex; class SalYieldMutex;
class SalFrame; class SalFrame;
class KDESalInstance : public X11SalInstance class KDE5SalInstance : public X11SalInstance
{ {
protected: protected:
virtual SalX11Display* CreateDisplay() const override; virtual SalX11Display* CreateDisplay() const override;
public: public:
explicit KDESalInstance(SalYieldMutex* pMutex); explicit KDE5SalInstance(SalYieldMutex* pMutex);
virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override; virtual SalFrame* CreateFrame( SalFrame* pParent, SalFrameStyleFlags nStyle ) override;
virtual bool hasNativeFileSelection() const override { return true; } virtual bool hasNativeFileSelection() const override { return true; }

View File

@@ -51,7 +51,7 @@
#include "tst_exclude_posted_events.moc" #include "tst_exclude_posted_events.moc"
#endif #endif
KDEXLib::KDEXLib() : KDE5XLib::KDE5XLib() :
SalXLib(), m_bStartupDone(false), SalXLib(), m_bStartupDone(false),
m_nFakeCmdLineArgs( 0 ), m_nFakeCmdLineArgs( 0 ),
m_isGlibEventLoopType(false), m_allowKdeDialogs(false), m_isGlibEventLoopType(false), m_allowKdeDialogs(false),
@@ -84,7 +84,7 @@ KDEXLib::KDEXLib() :
Qt::BlockingQueuedConnection ); Qt::BlockingQueuedConnection );
} }
KDEXLib::~KDEXLib() KDE5XLib::~KDE5XLib()
{ {
// free the faked cmdline arguments no longer needed by KApplication // free the faked cmdline arguments no longer needed by KApplication
@@ -94,7 +94,7 @@ KDEXLib::~KDEXLib()
} }
} }
void KDEXLib::Init() void KDE5XLib::Init()
{ {
m_pInputMethod = new SalI18N_InputMethod; m_pInputMethod = new SalI18N_InputMethod;
m_pInputMethod->SetLocale(); m_pInputMethod->SetLocale();
@@ -218,22 +218,22 @@ static bool qt_event_filter( void* m )
{ {
if( old_qt_event_filter != nullptr && old_qt_event_filter( m )) if( old_qt_event_filter != nullptr && old_qt_event_filter( m ))
return true; return true;
if( SalKDEDisplay::self() && SalKDEDisplay::self()->checkDirectInputEvent( static_cast< XEvent* >( m ))) if( SalKDE5Display::self() && SalKDE5Display::self()->checkDirectInputEvent( static_cast< XEvent* >( m )))
return true; return true;
return false; return false;
}*/ }*/
bool KDEXLib::nativeEventFilter(const QByteArray &eventType, void *message, long *) bool KDE5XLib::nativeEventFilter(const QByteArray &eventType, void *message, long *)
{ {
if (eventType == "xcb_generic_event_t") { if (eventType == "xcb_generic_event_t") {
xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message); xcb_generic_event_t* ev = static_cast<xcb_generic_event_t *>(message);
if( SalKDEDisplay::self() && SalKDEDisplay::self()->checkDirectInputEvent( ev )) if( SalKDE5Display::self() && SalKDE5Display::self()->checkDirectInputEvent( ev ))
return true; return true;
} }
return false; return false;
} }
void KDEXLib::setupEventLoop() void KDE5XLib::setupEventLoop()
{ {
QAbstractEventDispatcher::instance()->installNativeEventFilter( this ); QAbstractEventDispatcher::instance()->installNativeEventFilter( this );
#if KF5_HAVE_GLIB #if KF5_HAVE_GLIB
@@ -248,7 +248,7 @@ void KDEXLib::setupEventLoop()
#endif #endif
} }
void KDEXLib::Insert( int fd, void* data, YieldFunc pending, YieldFunc queued, YieldFunc handle ) void KDE5XLib::Insert( int fd, void* data, YieldFunc pending, YieldFunc queued, YieldFunc handle )
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::Insert( fd, data, pending, queued, handle ); return SalXLib::Insert( fd, data, pending, queued, handle );
@@ -263,7 +263,7 @@ void KDEXLib::Insert( int fd, void* data, YieldFunc pending, YieldFunc queued, Y
socketData[ fd ] = sdata; socketData[ fd ] = sdata;
} }
void KDEXLib::Remove( int fd ) void KDE5XLib::Remove( int fd )
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::Remove( fd ); return SalXLib::Remove( fd );
@@ -271,13 +271,13 @@ void KDEXLib::Remove( int fd )
delete sdata.notifier; delete sdata.notifier;
} }
void KDEXLib::socketNotifierActivated( int fd ) void KDE5XLib::socketNotifierActivated( int fd )
{ {
const SocketData& sdata = socketData[ fd ]; const SocketData& sdata = socketData[ fd ];
sdata.handle( fd, sdata.data ); sdata.handle( fd, sdata.data );
} }
bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents ) bool KDE5XLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
{ {
@@ -312,7 +312,7 @@ bool KDEXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
* Quoting the Qt docs: [QAbstractEventDispatcher::processEvents] processes * Quoting the Qt docs: [QAbstractEventDispatcher::processEvents] processes
* pending events that match flags until there are no more events to process. * pending events that match flags until there are no more events to process.
*/ */
bool KDEXLib::processYield( bool bWait, bool ) bool KDE5XLib::processYield( bool bWait, bool )
{ {
QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread()); QAbstractEventDispatcher* dispatcher = QAbstractEventDispatcher::instance( qApp->thread());
bool wasEvent = false; bool wasEvent = false;
@@ -323,7 +323,7 @@ bool KDEXLib::processYield( bool bWait, bool )
return wasEvent; return wasEvent;
} }
void KDEXLib::StartTimer( sal_uLong nMS ) void KDE5XLib::StartTimer( sal_uLong nMS )
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::StartTimer( nMS ); return SalXLib::StartTimer( nMS );
@@ -335,47 +335,47 @@ void KDEXLib::StartTimer( sal_uLong nMS )
Q_EMIT startTimeoutTimerSignal(); Q_EMIT startTimeoutTimerSignal();
} }
void KDEXLib::startTimeoutTimer() void KDE5XLib::startTimeoutTimer()
{ {
timeoutTimer.start(); timeoutTimer.start();
} }
void KDEXLib::StopTimer() void KDE5XLib::StopTimer()
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::StopTimer(); return SalXLib::StopTimer();
timeoutTimer.stop(); timeoutTimer.stop();
} }
void KDEXLib::timeoutActivated() void KDE5XLib::timeoutActivated()
{ {
// don't potentially wait in timeout, as QTimer is non-recursive // don't potentially wait in timeout, as QTimer is non-recursive
QApplication::postEvent(this, new QEvent(QEvent::Type( m_timerEventId ))); QApplication::postEvent(this, new QEvent(QEvent::Type( m_timerEventId )));
} }
void KDEXLib::customEvent(QEvent* e) void KDE5XLib::customEvent(QEvent* e)
{ {
if( e->type() == m_timerEventId ) if( e->type() == m_timerEventId )
X11SalData::Timeout(); X11SalData::Timeout();
else if( e->type() == m_postUserEventId ) else if( e->type() == m_postUserEventId )
SalKDEDisplay::self()->DispatchInternalEvent(); SalKDE5Display::self()->DispatchInternalEvent();
} }
void KDEXLib::Wakeup() void KDE5XLib::Wakeup()
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::Wakeup(); return SalXLib::Wakeup();
QAbstractEventDispatcher::instance( qApp->thread())->wakeUp(); // main thread event loop QAbstractEventDispatcher::instance( qApp->thread())->wakeUp(); // main thread event loop
} }
void KDEXLib::PostUserEvent() void KDE5XLib::PostUserEvent()
{ {
if( !m_isGlibEventLoopType ) if( !m_isGlibEventLoopType )
return SalXLib::PostUserEvent(); return SalXLib::PostUserEvent();
QApplication::postEvent(this, new QEvent(QEvent::Type( m_postUserEventId ))); QApplication::postEvent(this, new QEvent(QEvent::Type( m_postUserEventId )));
} }
void KDEXLib::doStartup() void KDE5XLib::doStartup()
{ {
if( ! m_bStartupDone ) if( ! m_bStartupDone )
{ {
@@ -387,7 +387,7 @@ void KDEXLib::doStartup()
using namespace com::sun::star; using namespace com::sun::star;
uno::Reference< ui::dialogs::XFilePicker2 > KDEXLib::createFilePicker( uno::Reference< ui::dialogs::XFilePicker2 > KDE5XLib::createFilePicker(
const uno::Reference< uno::XComponentContext >& xMSF ) const uno::Reference< uno::XComponentContext >& xMSF )
{ {
#if KF5_HAVE_GLIB #if KF5_HAVE_GLIB

View File

@@ -35,7 +35,7 @@
class VCLKDEApplication; class VCLKDEApplication;
class KDEXLib : public QObject, public QAbstractNativeEventFilter, public SalXLib class KDE5XLib : public QObject, public QAbstractNativeEventFilter, public SalXLib
{ {
Q_OBJECT Q_OBJECT
private: private:
@@ -75,8 +75,8 @@ class KDEXLib : public QObject, public QAbstractNativeEventFilter, public SalXLi
createFilePickerSignal( const css::uno::Reference< css::uno::XComponentContext >& ); createFilePickerSignal( const css::uno::Reference< css::uno::XComponentContext >& );
public: public:
KDEXLib(); KDE5XLib();
virtual ~KDEXLib() override; virtual ~KDE5XLib() override;
virtual void Init() override; virtual void Init() override;
virtual bool Yield( bool bWait, bool bHandleAllCurrentEvents ) override; virtual bool Yield( bool bWait, bool bHandleAllCurrentEvents ) override;

View File

@@ -24,14 +24,14 @@
#include "KDE5SalDisplay.hxx" #include "KDE5SalDisplay.hxx"
VCLKDEApplication::VCLKDEApplication() : VCLKDE5Application::VCLKDE5Application() :
KApplication() QApplication()
{ {
} }
// various hacks to be performed before re-entering Qt's event loop // various hacks to be performed before re-entering Qt's event loop
// because of showing a Qt dialog // because of showing a Qt dialog
void VCLKDEApplication::preDialogSetup() void VCLKDE5Application::preDialogSetup()
{ {
// KFileDialog integration requires using event loop with QClipboard. // KFileDialog integration requires using event loop with QClipboard.
// Opening the KDE file dialog here can lead to QClipboard // Opening the KDE file dialog here can lead to QClipboard
@@ -47,7 +47,7 @@ void VCLKDEApplication::preDialogSetup()
} }
// various hacks to be performed after a Qt dialog has been closed // various hacks to be performed after a Qt dialog has been closed
void VCLKDEApplication::postDialogCleanup() void VCLKDE5Application::postDialogCleanup()
{ {
// HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings // HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings
// (such as the auto-extension flag), but that doesn't update KGlobal::config() // (such as the auto-extension flag), but that doesn't update KGlobal::config()

View File

@@ -54,7 +54,7 @@ extern "C" {
#if QT_VERSION < 0x050000 #if QT_VERSION < 0x050000
// Qt 4.x support needs >= 4.1.0 // Qt 4.x support needs >= 4.1.0
OString aVersion( qVersion() ); OString aVersion( qVersion() );
SAL_INFO( "vcl.kde4", "qt version string is " << aVersion ); SAL_INFO( "vcl.kde5", "qt version string is " << aVersion );
sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0; sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0;
nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32(); nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32();
@@ -66,17 +66,17 @@ extern "C" {
sal_Int32 nMicro = 0; sal_Int32 nMicro = 0;
if( nIndex > 0 ) if( nIndex > 0 )
nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32(); nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
SAL_INFO( "vcl.kde4", "unsuitable qt version " << nMajor << "." << nMinor << "." << nMicro ); SAL_INFO( "vcl.kde5", "unsuitable qt version " << nMajor << "." << nMinor << "." << nMicro );
#endif #endif
return nullptr; return nullptr;
} }
#endif #endif
KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() ); KDE5SalInstance* pInstance = new KDE5SalInstance( new SalYieldMutex() );
SAL_INFO( "vcl.kde4", "created KDESalInstance " << &pInstance ); SAL_INFO( "vcl.kde5", "created KDE5SalInstance " << &pInstance );
// initialize SalData // initialize SalData
KDEData *salData = new KDEData( pInstance ); KDE5Data *salData = new KDE5Data( pInstance );
salData->Init(); salData->Init();
salData->initNWF(); salData->initNWF();
pInstance->SetLib(salData->GetLib()); pInstance->SetLib(salData->GetLib());