[Libreoffice-commits] core.git: Branch 'feature/qt5+kde5' - 2 commits - configure.ac vcl/Library_vclplug_kde5.mk vcl/unx

Katarina Behrens Katarina.Behrens at cib.de
Wed Jun 6 13:36:15 UTC 2018


Rebased ref, commits from common ancestor:
commit f04f227ee3193b604f23c4977a86d17247f64c04
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Wed Jun 6 15:35:00 2018 +0200

    We don't need to link X11 libs either
    
    Change-Id: I01b9f897abda67b12ed6f05844dca05dabb185a2

diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index 5e9559c159f1..655ae6b80d96 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -61,13 +61,6 @@ $(eval $(call gb_Library_use_externals,vclplug_kde5,\
 	epoxy \
 ))
 
-$(eval $(call gb_Library_add_libs,vclplug_kde5,\
-	-lX11 \
-	-lXext \
-	-lSM \
-	-lICE \
-))
-
 ifneq ($(QT5_HAVE_GLIB),)
 $(eval $(call gb_Library_add_defs,vclplug_kde5,\
     $(QT5_GLIB_CFLAGS) \
commit 735595cf8b74e3e7197b6805db204088438f972e
Author: Katarina Behrens <Katarina.Behrens at cib.de>
Date:   Wed Jun 6 13:32:47 2018 +0200

    [Try to] get rid of dependency on X11
    
    also kill KDE5SalDisplay with fire, it is not used anywhere
    anymore
    
    Change-Id: I4fe439b01322a6e3a809cf518e32d844c303daca

diff --git a/configure.ac b/configure.ac
index 09cadec75714..04535026584c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11199,7 +11199,7 @@ then
     PKG_CHECK_MODULES(KF5_XCB,[xcb],,[AC_MSG_ERROR([XCB not installed])])
 
     KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT $KF5_XCB_CFLAGS"
-    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network -lQt5X11Extras $KF5_XCB_LIBS"
+    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network $KF5_XCB_LIBS"
     KF5_CFLAGS=$(printf '%s' "$KF5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
 
     AC_LANG_PUSH([C++])
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index 37a830b068dd..5e9559c159f1 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -34,7 +34,6 @@ $(eval $(call gb_Library_add_defs,vclplug_kde5,\
 $(eval $(call gb_Library_use_sdk_api,vclplug_kde5))
 
 $(eval $(call gb_Library_use_libraries,vclplug_kde5,\
-    vclplug_gen \
     vclplug_qt5 \
     vcl \
     tl \
@@ -90,7 +89,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\
     vcl/unx/kde5/KDE5FilePicker \
     vcl/unx/kde5/KDE5FilePicker2 \
     vcl/unx/kde5/KDE5SalData \
-    vcl/unx/kde5/KDE5SalDisplay \
     vcl/unx/kde5/KDE5SalFrame \
     vcl/unx/kde5/KDE5SalGraphics \
     vcl/unx/kde5/KDE5SalInstance \
diff --git a/vcl/unx/kde5/KDE5SalDisplay.cxx b/vcl/unx/kde5/KDE5SalDisplay.cxx
deleted file mode 100644
index fa5e40f56ff9..000000000000
--- a/vcl/unx/kde5/KDE5SalDisplay.cxx
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "VCLKDE5Application.hxx"
-#include "KDE5SalDisplay.hxx"
-
-#ifdef Bool
-#undef Bool
-#endif
-
-#include <assert.h>
-
-SalKDE5Display* SalKDE5Display::selfptr = nullptr;
-
-SalKDE5Display::SalKDE5Display(Display* pDisp)
-    : SalX11Display(pDisp)
-{
-    assert(selfptr == nullptr);
-    selfptr = this;
-    xim_protocol = XInternAtom(pDisp_, "_XIM_PROTOCOL", False);
-}
-
-SalKDE5Display::~SalKDE5Display()
-{
-    // in case never a frame opened
-    // clean up own members
-    doDestruct();
-    selfptr = nullptr;
-    // prevent SalDisplay from closing KApplication's display
-    pDisp_ = nullptr;
-}
-
-void SalKDE5Display::Yield()
-{
-    if (DispatchInternalEvent())
-        return;
-
-    // Prevent blocking from Drag'n'Drop events, which may have already have processed the event
-    if (XEventsQueued(pDisp_, QueuedAfterReading) == 0)
-        return;
-
-    DBG_ASSERT(GetSalData()->m_pInstance->GetYieldMutex()->IsCurrentThread(),
-               "will crash soon since solar mutex not locked in SalKDE5Display::Yield");
-
-    /*XEvent event;
-    XNextEvent( pDisp_, &event );
-    if( checkDirectInputEvent( &event ))
-        return;
-    qApp->x11ProcessEvent( &event );*/
-}
-
-// HACK: When using Qt event loop, input methods (japanese, etc.) will get broken because
-// of XFilterEvent() getting called twice, once by Qt, once by LO (bnc#665112).
-// This function is therefore called before any XEvent is passed to Qt event handling
-// and if it is a keyboard event and no Qt widget is the active window (i.e. we are
-// processing events for some LO window), then feed the event only to LO directly and skip Qt
-// 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
-// would need this handling).
-bool SalKDE5Display::checkDirectInputEvent(xcb_generic_event_t* ev)
-{
-    switch (ev->response_type & ~0x80)
-    {
-        case XCB_CLIENT_MESSAGE:
-        case XCB_KEY_PRESS:
-        case XCB_KEY_RELEASE:
-            if (QApplication::activeWindow() == nullptr)
-            {
-                //                Dispatch(ev);
-                return true;
-            }
-            break;
-    }
-    return false;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalDisplay.hxx b/vcl/unx/kde5/KDE5SalDisplay.hxx
deleted file mode 100644
index 640efdbc1e03..000000000000
--- a/vcl/unx/kde5/KDE5SalDisplay.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <unx/saldisp.hxx>
-#include <xcb/xcb.h>
-
-#ifdef CursorShape
-#undef CursorShape
-#endif
-
-class SalKDE5Display : public SalX11Display
-{
-public:
-    explicit SalKDE5Display(Display* pDisp);
-    virtual ~SalKDE5Display() override;
-    static SalKDE5Display* self();
-    virtual void Yield() override;
-    bool checkDirectInputEvent(xcb_generic_event_t* ev);
-
-private:
-    Atom xim_protocol;
-    static SalKDE5Display* selfptr;
-};
-
-inline SalKDE5Display* SalKDE5Display::self() { return selfptr; }
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/unx/kde5/KDE5SalFrame.hxx b/vcl/unx/kde5/KDE5SalFrame.hxx
index 11a55b0aae29..58bdcd82f4c0 100644
--- a/vcl/unx/kde5/KDE5SalFrame.hxx
+++ b/vcl/unx/kde5/KDE5SalFrame.hxx
@@ -24,8 +24,6 @@
 #undef Status
 
 #include <qt5/Qt5Frame.hxx>
-#include <unx/saldisp.hxx>
-#include <unx/salgdi.h>
 
 #include "KDE5SalGraphics.hxx"
 
diff --git a/vcl/unx/kde5/KDE5SalGraphics.hxx b/vcl/unx/kde5/KDE5SalGraphics.hxx
index 60870dd9d4af..77121459e8be 100644
--- a/vcl/unx/kde5/KDE5SalGraphics.hxx
+++ b/vcl/unx/kde5/KDE5SalGraphics.hxx
@@ -22,8 +22,6 @@
 #include <memory>
 
 #include <rtl/string.hxx>
-#include <unx/saldisp.hxx>
-#include <unx/salgdi.h>
 #include <headless/svpgdi.hxx>
 
 #include <QtGui/QImage>
diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx
index b4e2b68e8045..ac6173e13550 100644
--- a/vcl/unx/kde5/KDE5SalInstance.cxx
+++ b/vcl/unx/kde5/KDE5SalInstance.cxx
@@ -30,7 +30,6 @@
 #include "KDE5SalData.hxx"
 #include "KDE5SalInstance.hxx"
 #include "KDE5SalFrame.hxx"
-#include "KDE5SalDisplay.hxx"
 
 using namespace com::sun::star;
 
diff --git a/vcl/unx/kde5/VCLKDE5Application.cxx b/vcl/unx/kde5/VCLKDE5Application.cxx
index 7ae9b5a4ee28..2d9532f1def9 100644
--- a/vcl/unx/kde5/VCLKDE5Application.cxx
+++ b/vcl/unx/kde5/VCLKDE5Application.cxx
@@ -21,8 +21,7 @@
 
 #include <QtGui/QClipboard>
 #include <QtCore/QEvent>
-
-#include "KDE5SalDisplay.hxx"
+#include <assert.h>
 
 VCLKDE5Application::VCLKDE5Application(int argc, char** argv)
     : QApplication(argc, argv)


More information about the Libreoffice-commits mailing list