diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-18 11:24:36 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-18 15:28:02 +0200 |
commit | 4bd93b662f5ad0556d573cb67ae7f4da5577ee23 (patch) | |
tree | 83843613c69284d56a9551c9c8330fff45ddd1d8 /vcl | |
parent | a39e55c359b0d4d2a2f3f0766ac47c3aaa96fffd (diff) |
VCLKDE5Application is now unused as well
Change-Id: Ib11274b6039596246aa232b83fa4d85095a93e08
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vclplug_kde5.mk | 1 | ||||
-rw-r--r-- | vcl/unx/kde5/VCLKDE5Application.cxx | 75 | ||||
-rw-r--r-- | vcl/unx/kde5/VCLKDE5Application.hxx | 41 |
3 files changed, 0 insertions, 117 deletions
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk index 11fa740926e4..4d134d0fbf8b 100644 --- a/vcl/Library_vclplug_kde5.mk +++ b/vcl/Library_vclplug_kde5.mk @@ -84,7 +84,6 @@ $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\ vcl/unx/kde5/KDE5SalFrame \ vcl/unx/kde5/KDE5SalGraphics \ vcl/unx/kde5/KDE5SalInstance \ - vcl/unx/kde5/VCLKDE5Application \ )) ifeq ($(OS),LINUX) diff --git a/vcl/unx/kde5/VCLKDE5Application.cxx b/vcl/unx/kde5/VCLKDE5Application.cxx deleted file mode 100644 index 2d9532f1def9..000000000000 --- a/vcl/unx/kde5/VCLKDE5Application.cxx +++ /dev/null @@ -1,75 +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 <QtGui/QClipboard> -#include <QtCore/QEvent> -#include <assert.h> - -VCLKDE5Application::VCLKDE5Application(int argc, char** argv) - : QApplication(argc, argv) -{ -} - -// various hacks to be performed before re-entering Qt's event loop -// because of showing a Qt dialog -void VCLKDE5Application::preDialogSetup() -{ - // KFileDialog integration requires using event loop with QClipboard. - // Opening the KDE file dialog here can lead to QClipboard - // asking for clipboard contents. If LO core is the owner of the clipboard - // content, without event loop use this will block for 5 seconds and timeout, - // since the clipboard thread will not be able to acquire SolarMutex - // and thus won't be able to respond. If the event loops - // are properly integrated and QClipboard can use a nested event loop - // (see the KDE VCL plug), then this won't happen. - // We cannot simply release SolarMutex here, because the event loop started - // by the file dialog would also call back to LO code. - assert(QApplication::clipboard()->property("useEventLoopWhenWaiting").toBool()); -} - -// various hacks to be performed after a Qt dialog has been closed -void VCLKDE5Application::postDialogCleanup() -{ - // HACK: KFileDialog uses KConfig("kdeglobals") for saving some settings - // (such as the auto-extension flag), but that doesn't update KGlobal::config() - // (which is probably a KDE bug), so force reading the new configuration, - // otherwise the next opening of the dialog would use the old settings. - KConfig config; - config.reparseConfiguration(); - // HACK: If Qt owns clipboard or selection, give up on their ownership now. Otherwise - // LO core might ask for the contents, but it would block while doing so (i.e. it - // doesn't seem to have an equivalent of QClipboard's "useEventLoopWhenWaiting"), - // therefore QClipboard wouldn't be able to respond, and whole LO would block until - // a timeout. Given that Klipper is most probably running, giving up clipboard/selection - // ownership will not only avoid the blocking, but even pasting that content in LO - // will in fact work, if Klipper can handle it. - // Technically proper solution would be of course to allow Qt to process QClipboard - // events while LO waits for clipboard contents, or short-circuit to QClipboard somehow - // (it's a mystery why LO's clipboard handling has its own thread when whole LO can - // get blocked by both trying to send and receive clipboard contents anyway). - QClipboard* clipboard = QApplication::clipboard(); - if (clipboard->ownsSelection()) - clipboard->clear(QClipboard::Selection); - if (clipboard->ownsClipboard()) - clipboard->clear(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/VCLKDE5Application.hxx b/vcl/unx/kde5/VCLKDE5Application.hxx deleted file mode 100644 index 5503db32c901..000000000000 --- a/vcl/unx/kde5/VCLKDE5Application.hxx +++ /dev/null @@ -1,41 +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 . - */ - -#ifndef INCLUDED_VCL_UNX_KDE5_VCLKDE5APPLICATION_HXX -#define INCLUDED_VCL_UNX_KDE5_VCLKDE5APPLICATION_HXX - -#pragma once - -#include <QtWidgets/QApplication> -#include <QtCore/QAbstractNativeEventFilter> -#include <KConfigCore/kconfig.h> - -#undef Region - -class VCLKDE5Application : public QApplication, public QAbstractNativeEventFilter -{ -public: - VCLKDE5Application(int argc, char** argv); - static void preDialogSetup(); - static void postDialogCleanup(); -}; - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |