diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-18 10:36:50 +0200 |
---|---|---|
committer | Katarina Behrens <Katarina.Behrens@cib.de> | 2018-06-18 15:28:01 +0200 |
commit | f103d482ebc5611d00f0136d3f55aac34827e18b (patch) | |
tree | 454f124b1f6808c49374c6d0c73166360c186ff8 /vcl | |
parent | 47b0285d7b37b2f646ae32ca1fe8cf6f1875997a (diff) |
Fold all the rest into KDE5FilePicker2
Change-Id: Icbaa56057776ffcb981207ec30e5d94d6901e43c
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/Library_vclplug_kde5.mk | 1 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker.cxx | 59 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5FilePicker2.cxx | 23 |
3 files changed, 23 insertions, 60 deletions
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk index 655ae6b80d96..11fa740926e4 100644 --- a/vcl/Library_vclplug_kde5.mk +++ b/vcl/Library_vclplug_kde5.mk @@ -79,7 +79,6 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\ )) $(eval $(call gb_Library_add_exception_objects,vclplug_kde5,\ - vcl/unx/kde5/KDE5FilePicker \ vcl/unx/kde5/KDE5FilePicker2 \ vcl/unx/kde5/KDE5SalData \ vcl/unx/kde5/KDE5SalFrame \ diff --git a/vcl/unx/kde5/KDE5FilePicker.cxx b/vcl/unx/kde5/KDE5FilePicker.cxx deleted file mode 100644 index 19bea46654a3..000000000000 --- a/vcl/unx/kde5/KDE5FilePicker.cxx +++ /dev/null @@ -1,59 +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 "KDE5FilePicker.hxx" - -#include <KWindowSystem> -#include <KFileWidget> - -#include <QtCore/QDebug> -#include <QtCore/QUrl> -#include <QtGui/QClipboard> -#include <QtGui/QWindow> -#include <QtWidgets/QCheckBox> -#include <QtWidgets/QFileDialog> -#include <QtWidgets/QGridLayout> -#include <QtWidgets/QWidget> -#include <QtWidgets/QApplication> - -// KDE5FilePicker - -KDE5FilePicker::~KDE5FilePicker() -{ - delete _extraControls; - delete _dialog; -} - -bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) -{ - if (e->type() == QEvent::Show && o->isWidgetType()) - { - auto* w = static_cast<QWidget*>(o); - if (!w->parentWidget() && w->isModal()) - { - if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly)) - fileWidget->setCustomWidget(_extraControls); - } - } - return QObject::eventFilter(o, e); -} - -#include <KDE5FilePicker.moc> - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/kde5/KDE5FilePicker2.cxx b/vcl/unx/kde5/KDE5FilePicker2.cxx index b7c3320344bf..778608e1edb9 100644 --- a/vcl/unx/kde5/KDE5FilePicker2.cxx +++ b/vcl/unx/kde5/KDE5FilePicker2.cxx @@ -48,6 +48,7 @@ #include <QtWidgets/QGridLayout> #include <QtWidgets/QWidget> #include <QtWidgets/QApplication> +#include <KFileWidget> #include <fpicker/strings.hrc> #include <strings.hrc> @@ -141,6 +142,12 @@ KDE5FilePicker::KDE5FilePicker(QFileDialog::FileMode eMode) qApp->installEventFilter(this); } +KDE5FilePicker::~KDE5FilePicker() +{ + delete _extraControls; + delete _dialog; +} + void SAL_CALL KDE5FilePicker::addFilePickerListener(const uno::Reference<XFilePickerListener>& xListener) { @@ -687,4 +694,20 @@ void KDE5FilePicker::selectionChanged() m_xListener->fileSelectionChanged(aEvent); } +bool KDE5FilePicker::eventFilter(QObject* o, QEvent* e) +{ + if (e->type() == QEvent::Show && o->isWidgetType()) + { + auto* w = static_cast<QWidget*>(o); + if (!w->parentWidget() && w->isModal()) + { + if (auto* fileWidget = w->findChild<KFileWidget*>({}, Qt::FindDirectChildrenOnly)) + fileWidget->setCustomWidget(_extraControls); + } + } + return QObject::eventFilter(o, e); +} + +#include <KDE5FilePicker.moc> + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |