diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-06-20 14:20:42 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-06-22 22:14:58 +0200 |
commit | 0914025d93af5797b662fda82cd954081b2fda39 (patch) | |
tree | e3ccba5c73a5605f78cbac40941eaf292f95b8b9 | |
parent | 5141834c378fa731cabe0f325c5a95d56034e3f0 (diff) |
kf5: Remove "5" from class names in kf5 VCL plugin
This is the kf5 equivalent of what
commit dfd3fdfe664e214ca1bba72b96d19b89ff25e7bc
Author: Michael Weghorn <m.weghorn@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.weghorn@posteo.de>
-rw-r--r-- | vcl/unx/kf5/KF5FilePicker.cxx | 36 | ||||
-rw-r--r-- | vcl/unx/kf5/KF5FilePicker.hxx | 8 | ||||
-rw-r--r-- | vcl/unx/kf5/KF5SalInstance.cxx | 14 | ||||
-rw-r--r-- | vcl/unx/kf5/KF5SalInstance.hxx | 4 |
4 files changed, 31 insertions, 31 deletions
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: */ |