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 -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// 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(o); - if (!w->parentWidget() && w->isModal()) - { - if (auto* fileWidget = w->findChild({}, Qt::FindDirectChildrenOnly)) - fileWidget->setCustomWidget(_extraControls); - } - } - return QObject::eventFilter(o, e); -} - -#include - -/* 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 #include #include +#include #include #include @@ -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& 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(o); + if (!w->parentWidget() && w->isModal()) + { + if (auto* fileWidget = w->findChild({}, Qt::FindDirectChildrenOnly)) + fileWidget->setCustomWidget(_extraControls); + } + } + return QObject::eventFilter(o, e); +} + +#include + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */