vcl/CustomTarget_kf5_moc.mk | 2 +- vcl/Library_vclplug_kf5.mk | 4 ++-- vcl/unx/kf5/KFFilePicker.cxx | 40 ++++++++++++++++++++-------------------- vcl/unx/kf5/KFFilePicker.hxx | 8 ++++---- vcl/unx/kf5/KFSalInstance.cxx | 18 +++++++++--------- vcl/unx/kf5/KFSalInstance.hxx | 4 ++-- 6 files changed, 38 insertions(+), 38 deletions(-)
New commits: commit 6922c2fcfec92292d763c0346b7afdc44c63d1e9 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jun 20 14:27:02 2023 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jun 22 22:15:06 2023 +0200 kf5: Rename sources + headers according to new class names As commit b9cd02937b358ae035ed554a28037237a6c8434c Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Sep 28 15:55:43 2021 +0200 qt5: Rename sources + headers according to new class names did for the qt5 VCL plugin, this renames the source and header files according to the new class names without a "5" in them, as mentioned in Change-Id If785792f8669688de2156b1a990d7956dbe7a401 ("kf5: Remove "5" from class names in kf5 VCL plugin"): > Renaming the headers and source files will be done > in a separate commit to make tracking git history easier. Change-Id: Ieb49cda25b170ac777029f7288a885a0b953e02d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153434 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/CustomTarget_kf5_moc.mk b/vcl/CustomTarget_kf5_moc.mk index 96f84a937560..27e783fad1f8 100644 --- a/vcl/CustomTarget_kf5_moc.mk +++ b/vcl/CustomTarget_kf5_moc.mk @@ -10,7 +10,7 @@ $(eval $(call gb_CustomTarget_CustomTarget,vcl/unx/kf5)) $(call gb_CustomTarget_get_target,vcl/unx/kf5) : \ - $(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/KF5FilePicker.moc + $(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/KFFilePicker.moc $(call gb_CustomTarget_get_workdir,vcl/unx/kf5)/%.moc : \ $(SRCDIR)/vcl/unx/kf5/%.hxx \ diff --git a/vcl/Library_vclplug_kf5.mk b/vcl/Library_vclplug_kf5.mk index fe89ec00ec05..3bc4c17d1811 100644 --- a/vcl/Library_vclplug_kf5.mk +++ b/vcl/Library_vclplug_kf5.mk @@ -63,8 +63,8 @@ $(eval $(call gb_Library_use_externals,vclplug_kf5,\ )) $(eval $(call gb_Library_add_exception_objects,vclplug_kf5,\ - vcl/unx/kf5/KF5FilePicker \ - vcl/unx/kf5/KF5SalInstance \ + vcl/unx/kf5/KFFilePicker \ + vcl/unx/kf5/KFSalInstance \ )) ifeq ($(OS),LINUX) diff --git a/vcl/unx/kf5/KF5FilePicker.cxx b/vcl/unx/kf5/KFFilePicker.cxx similarity index 99% rename from vcl/unx/kf5/KF5FilePicker.cxx rename to vcl/unx/kf5/KFFilePicker.cxx index d7e6128bd35e..b1c6fc91b45b 100644 --- a/vcl/unx/kf5/KF5FilePicker.cxx +++ b/vcl/unx/kf5/KFFilePicker.cxx @@ -17,8 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "KF5FilePicker.hxx" -#include <KF5FilePicker.moc> +#include "KFFilePicker.hxx" +#include <KFFilePicker.moc> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <cppuhelper/supportsservice.hxx> diff --git a/vcl/unx/kf5/KF5FilePicker.hxx b/vcl/unx/kf5/KFFilePicker.hxx similarity index 100% rename from vcl/unx/kf5/KF5FilePicker.hxx rename to vcl/unx/kf5/KFFilePicker.hxx diff --git a/vcl/unx/kf5/KF5SalInstance.cxx b/vcl/unx/kf5/KFSalInstance.cxx similarity index 98% rename from vcl/unx/kf5/KF5SalInstance.cxx rename to vcl/unx/kf5/KFSalInstance.cxx index 88600b01ed5e..7dd7d4a89678 100644 --- a/vcl/unx/kf5/KF5SalInstance.cxx +++ b/vcl/unx/kf5/KFSalInstance.cxx @@ -27,8 +27,8 @@ #include <QtData.hxx> -#include "KF5FilePicker.hxx" -#include "KF5SalInstance.hxx" +#include "KFFilePicker.hxx" +#include "KFSalInstance.hxx" using namespace com::sun::star; diff --git a/vcl/unx/kf5/KF5SalInstance.hxx b/vcl/unx/kf5/KFSalInstance.hxx similarity index 100% rename from vcl/unx/kf5/KF5SalInstance.hxx rename to vcl/unx/kf5/KFSalInstance.hxx commit 0914025d93af5797b662fda82cd954081b2fda39 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jun 20 14:20:42 2023 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Thu Jun 22 22:14:58 2023 +0200 kf5: Remove "5" from class names in kf5 VCL plugin This is the kf5 equivalent of what commit dfd3fdfe664e214ca1bba72b96d19b89ff25e7bc Author: Michael Weghorn <m.wegh...@posteo.de> Date: Tue Sep 28 15:02:47 2021 +0200 qt5: Remove "5" from class names in qt5 VCL plugin did for the qt5 VCL plugin. This is in preparation of an upcomng kf6 VCL plugin. Renaming the headers and source files will be done in a separate commit to make tracking git history easier. Change-Id: If785792f8669688de2156b1a990d7956dbe7a401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153433 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/unx/kf5/KF5FilePicker.cxx b/vcl/unx/kf5/KF5FilePicker.cxx index 491ce7e31eb4..d7e6128bd35e 100644 --- a/vcl/unx/kf5/KF5FilePicker.cxx +++ b/vcl/unx/kf5/KF5FilePicker.cxx @@ -39,15 +39,15 @@ namespace uno::Sequence<OUString> FilePicker_getSupportedServiceNames() { return { "com.sun.star.ui.dialogs.FilePicker", "com.sun.star.ui.dialogs.SystemFilePicker", - "com.sun.star.ui.dialogs.KF5FilePicker", "com.sun.star.ui.dialogs.KF5FolderPicker" }; + "com.sun.star.ui.dialogs.KFFilePicker", "com.sun.star.ui.dialogs.KFFolderPicker" }; } } -// KF5FilePicker +// KFFilePicker -KF5FilePicker::KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, - QFileDialog::FileMode eMode) - // Native kf5 filepicker does not add file extension automatically +KFFilePicker::KFFilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, + QFileDialog::FileMode eMode) + // Native KF5/KF6 filepicker does not add file extension automatically : QtFilePicker(context, eMode, true) , _layout(new QGridLayout(m_pExtraControls)) { @@ -71,8 +71,8 @@ KF5FilePicker::KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> co } // XFilePickerControlAccess -void SAL_CALL KF5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAction, - const uno::Any& value) +void SAL_CALL KFFilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAction, + const uno::Any& value) { if (CHECKBOX_AUTOEXTENSION == controlId) // We ignore this one and rely on QFileDialog to provide the functionality @@ -81,7 +81,7 @@ void SAL_CALL KF5FilePicker::setValue(sal_Int16 controlId, sal_Int16 nControlAct QtFilePicker::setValue(controlId, nControlAction, value); } -uno::Any SAL_CALL KF5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nControlAction) +uno::Any SAL_CALL KFFilePicker::getValue(sal_Int16 controlId, sal_Int16 nControlAction) { SolarMutexGuard g; auto* pSalInst(GetQtInstance()); @@ -106,7 +106,7 @@ uno::Any SAL_CALL KF5FilePicker::getValue(sal_Int16 controlId, sal_Int16 nContro return QtFilePicker::getValue(controlId, nControlAction); } -void SAL_CALL KF5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable) +void SAL_CALL KFFilePicker::enableControl(sal_Int16 controlId, sal_Bool enable) { if (CHECKBOX_AUTOEXTENSION == controlId) // We ignore this one and rely on QFileDialog to provide the functionality @@ -115,7 +115,7 @@ void SAL_CALL KF5FilePicker::enableControl(sal_Int16 controlId, sal_Bool enable) QtFilePicker::enableControl(controlId, enable); } -void SAL_CALL KF5FilePicker::setLabel(sal_Int16 controlId, const OUString& label) +void SAL_CALL KFFilePicker::setLabel(sal_Int16 controlId, const OUString& label) { if (CHECKBOX_AUTOEXTENSION == controlId) // We ignore this one and rely on QFileDialog to provide the functionality @@ -124,7 +124,7 @@ void SAL_CALL KF5FilePicker::setLabel(sal_Int16 controlId, const OUString& label QtFilePicker::setLabel(controlId, label); } -OUString SAL_CALL KF5FilePicker::getLabel(sal_Int16 controlId) +OUString SAL_CALL KFFilePicker::getLabel(sal_Int16 controlId) { // We ignore this one and rely on QFileDialog to provide the functionality if (CHECKBOX_AUTOEXTENSION == controlId) @@ -133,9 +133,9 @@ OUString SAL_CALL KF5FilePicker::getLabel(sal_Int16 controlId) return QtFilePicker::getLabel(controlId); } -void KF5FilePicker::addCustomControl(sal_Int16 controlId) +void KFFilePicker::addCustomControl(sal_Int16 controlId) { - // native kf5 filepicker has its own autoextension checkbox, + // native KF5/KF6 filepicker has its own autoextension checkbox, // therefore avoid adding yet another one if (controlId == CHECKBOX_AUTOEXTENSION) return; @@ -144,22 +144,22 @@ void KF5FilePicker::addCustomControl(sal_Int16 controlId) } // XServiceInfo -OUString SAL_CALL KF5FilePicker::getImplementationName() +OUString SAL_CALL KFFilePicker::getImplementationName() { - return "com.sun.star.ui.dialogs.KF5FilePicker"; + return "com.sun.star.ui.dialogs.KFFilePicker"; } -sal_Bool SAL_CALL KF5FilePicker::supportsService(const OUString& ServiceName) +sal_Bool SAL_CALL KFFilePicker::supportsService(const OUString& ServiceName) { return cppu::supportsService(this, ServiceName); } -uno::Sequence<OUString> SAL_CALL KF5FilePicker::getSupportedServiceNames() +uno::Sequence<OUString> SAL_CALL KFFilePicker::getSupportedServiceNames() { return FilePicker_getSupportedServiceNames(); } -bool KF5FilePicker::eventFilter(QObject* o, QEvent* e) +bool KFFilePicker::eventFilter(QObject* o, QEvent* e) { if (e->type() == QEvent::Show && o->isWidgetType()) { diff --git a/vcl/unx/kf5/KF5FilePicker.hxx b/vcl/unx/kf5/KF5FilePicker.hxx index 29989eb1bbd4..cbbf50792c90 100644 --- a/vcl/unx/kf5/KF5FilePicker.hxx +++ b/vcl/unx/kf5/KF5FilePicker.hxx @@ -24,7 +24,7 @@ class QGridLayout; -class KF5FilePicker final : public QtFilePicker +class KFFilePicker final : public QtFilePicker { Q_OBJECT @@ -33,8 +33,8 @@ private: std::unique_ptr<QGridLayout> _layout; public: - explicit KF5FilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, - QFileDialog::FileMode); + explicit KFFilePicker(css::uno::Reference<css::uno::XComponentContext> const& context, + QFileDialog::FileMode); // XFilePickerControlAccess functions virtual void SAL_CALL setValue(sal_Int16 nControlId, sal_Int16 nControlAction, @@ -56,7 +56,7 @@ private: bool eventFilter(QObject* watched, QEvent* event) override; private Q_SLOTS: - // the KF5 file picker has its own automatic extension handling + // the KF5/KF6 file picker has its own automatic extension handling void updateAutomaticFileExtension() override {} }; diff --git a/vcl/unx/kf5/KF5SalInstance.cxx b/vcl/unx/kf5/KF5SalInstance.cxx index de3e2fe4d6ee..88600b01ed5e 100644 --- a/vcl/unx/kf5/KF5SalInstance.cxx +++ b/vcl/unx/kf5/KF5SalInstance.cxx @@ -32,14 +32,14 @@ using namespace com::sun::star; -KF5SalInstance::KF5SalInstance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo) +KFSalInstance::KFSalInstance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo) : QtInstance(pQApp, bUseCairo) { ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mxToolkitName = constructToolkitID(u"kf5"); } -bool KF5SalInstance::hasNativeFileSelection() const +bool KFSalInstance::hasNativeFileSelection() const { if (Application::GetDesktopEnvironment() == "PLASMA5") return true; @@ -47,8 +47,8 @@ bool KF5SalInstance::hasNativeFileSelection() const } rtl::Reference<QtFilePicker> -KF5SalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, - QFileDialog::FileMode eMode) +KFSalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> const& context, + QFileDialog::FileMode eMode) { if (!IsMainThread()) { @@ -59,11 +59,11 @@ KF5SalInstance::createPicker(css::uno::Reference<css::uno::XComponentContext> co return pPicker; } - // In order to insert custom controls, KF5FilePicker currently relies on KFileWidget + // In order to insert custom controls, KFFilePicker currently relies on KFileWidget // being used in the native file picker, which is only the case for KDE Plasma. // Therefore, return the plain qt5 one in order to not lose custom controls. if (Application::GetDesktopEnvironment() == "PLASMA5") - return new KF5FilePicker(context, eMode); + return new KFFilePicker(context, eMode); return QtInstance::createPicker(context, eMode); } @@ -80,7 +80,7 @@ VCLPLUG_KF5_PUBLIC SalInstance* create_SalInstance() std::unique_ptr<QApplication> pQApp = QtInstance::CreateQApplication(*pFakeArgc, pFakeArgv.get()); - KF5SalInstance* pInstance = new KF5SalInstance(pQApp, bUseCairo); + KFSalInstance* pInstance = new KFSalInstance(pQApp, bUseCairo); pInstance->MoveFakeCmdlineArgs(pFakeArgv, pFakeArgc, aFakeArgvFreeable); new QtData(); diff --git a/vcl/unx/kf5/KF5SalInstance.hxx b/vcl/unx/kf5/KF5SalInstance.hxx index 3fb6a793a5ae..b96046fdb89e 100644 --- a/vcl/unx/kf5/KF5SalInstance.hxx +++ b/vcl/unx/kf5/KF5SalInstance.hxx @@ -21,7 +21,7 @@ #include <QtInstance.hxx> -class KF5SalInstance final : public QtInstance +class KFSalInstance final : public QtInstance { bool hasNativeFileSelection() const override; rtl::Reference<QtFilePicker> @@ -29,7 +29,7 @@ class KF5SalInstance final : public QtInstance QFileDialog::FileMode) override; public: - explicit KF5SalInstance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo); + explicit KFSalInstance(std::unique_ptr<QApplication>& pQApp, bool bUseCairo); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */