From 96f17baa46d75d7d1a07e3c5d0d49f2d01696c6b Mon Sep 17 00:00:00 2001 From: David Rosca Date: Sat, 31 Mar 2018 16:55:50 +0200 Subject: [PATCH] Rename KDESupport -> KDEFrameworksIntegration plugin --- CMakeLists.txt | 11 +++++---- src/plugins/CMakeLists.txt | 4 ++-- .../KDEFrameworksIntegration/CMakeLists.txt | 23 +++++++++++++++++++ .../Messages.sh | 2 +- .../data/icon.svg | 0 .../kdeframeworksintegration.qrc} | 2 +- .../kdeframeworksintegrationplugin.cpp} | 16 ++++++------- .../kdeframeworksintegrationplugin.h} | 13 ++++------- .../kioschemehandler.cpp | 2 +- .../kioschemehandler.h | 2 +- .../kwalletpasswordbackend.cpp | 6 ++--- .../kwalletpasswordbackend.h | 2 +- .../metadata.desktop | 14 +++-------- src/plugins/KDESupport/CMakeLists.txt | 23 ------------------- 14 files changed, 56 insertions(+), 64 deletions(-) create mode 100644 src/plugins/KDEFrameworksIntegration/CMakeLists.txt rename src/plugins/{KDESupport => KDEFrameworksIntegration}/Messages.sh (55%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/data/icon.svg (100%) rename src/plugins/{KDESupport/kdesupport.qrc => KDEFrameworksIntegration/kdeframeworksintegration.qrc} (66%) rename src/plugins/{KDESupport/kdesupportplugin.cpp => KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp} (83%) rename src/plugins/{KDESupport/kdesupportplugin.h => KDEFrameworksIntegration/kdeframeworksintegrationplugin.h} (81%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/kioschemehandler.cpp (97%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/kioschemehandler.h (95%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/kwalletpasswordbackend.cpp (96%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/kwalletpasswordbackend.h (96%) rename src/plugins/{KDESupport => KDEFrameworksIntegration}/metadata.desktop (76%) delete mode 100644 src/plugins/KDESupport/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 7408da3d4..2abcbc38d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,13 +105,16 @@ endif() # Optional: KWallet, KIO, KCrash, KCoreAddons set(KF5_MIN_VERSION "5.27.0") find_package(KF5Wallet ${KF5_MIN_VERSION} CONFIG) -set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +set_package_properties(KF5Wallet PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL) find_package(KF5KIO ${KF5_MIN_VERSION} CONFIG) -set_package_properties(KF5KIO PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +set_package_properties(KF5KIO PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL) find_package(KF5Crash ${KF5_MIN_VERSION} CONFIG) -set_package_properties(KF5Crash PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +set_package_properties(KF5Crash PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL) find_package(KF5CoreAddons ${KF5_MIN_VERSION} CONFIG) -set_package_properties(KF5CoreAddons PROPERTIES DESCRIPTION "KDESupport plugin" TYPE OPTIONAL) +set_package_properties(KF5CoreAddons PROPERTIES DESCRIPTION "KDE Frameworks Integration plugin" TYPE OPTIONAL) +if (KF5Wallet_FOUND AND KF5KIO_FOUND AND KF5Crash_FOUND AND KF5CoreAddons_FOUND) + set(ENABLE_KDE_FRAMEWORKS_INTEGRATION_PLUGIN TRUE) +endif() # Optional: PySide2 find_package(PySide2 "2.0.0") diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt index 9069d3326..54b28ba98 100644 --- a/src/plugins/CMakeLists.txt +++ b/src/plugins/CMakeLists.txt @@ -13,8 +13,8 @@ if (GNOME_KEYRING_FOUND) add_subdirectory(GnomeKeyringPasswords) endif() -if (KF5Wallet_FOUND AND KF5KIO_FOUND AND KF5Crash_FOUND AND KF5CoreAddons_FOUND) - add_subdirectory(KDESupport) +if (ENABLE_KDE_FRAMEWORKS_INTEGRATION_PLUGIN) + add_subdirectory(KDEFrameworksIntegration) endif() if (ENABLE_PYTHON_PLUGINS) diff --git a/src/plugins/KDEFrameworksIntegration/CMakeLists.txt b/src/plugins/KDEFrameworksIntegration/CMakeLists.txt new file mode 100644 index 000000000..226d8da76 --- /dev/null +++ b/src/plugins/KDEFrameworksIntegration/CMakeLists.txt @@ -0,0 +1,23 @@ +set(KDEFrameworksIntegration_SRCS + kdeframeworksintegrationplugin.cpp + kwalletpasswordbackend.cpp + kioschemehandler.cpp +) + +ecm_create_qm_loader(KDEFrameworksIntegration_SRCS falkon_kdeframeworksintegration_qt) + +set(KDEFrameworksIntegration_RSCS + kdeframeworksintegration.qrc +) +qt5_add_resources(RSCS ${KDEFrameworksIntegration_RSCS}) + +add_library(KDEFrameworksIntegration MODULE ${KDEFrameworksIntegration_SRCS} ${RSCS}) +install(TARGETS KDEFrameworksIntegration DESTINATION ${FALKON_INSTALL_PLUGINDIR}) +target_link_libraries(KDEFrameworksIntegration + FalkonPrivate + KF5::Wallet + KF5::KIOCore + KF5::KIOWidgets + KF5::Crash + KF5::CoreAddons +) diff --git a/src/plugins/KDESupport/Messages.sh b/src/plugins/KDEFrameworksIntegration/Messages.sh similarity index 55% rename from src/plugins/KDESupport/Messages.sh rename to src/plugins/KDEFrameworksIntegration/Messages.sh index 8f66bdb5d..1c03178cb 100644 --- a/src/plugins/KDESupport/Messages.sh +++ b/src/plugins/KDEFrameworksIntegration/Messages.sh @@ -1,2 +1,2 @@ #! /bin/sh -$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_kdesupport_qt.pot +$EXTRACT_TR_STRINGS `find . -name '*.cpp' -o -name '*.h' -o -name '*.ui'` -o $podir/falkon_kdeframeworksintegration_qt.pot diff --git a/src/plugins/KDESupport/data/icon.svg b/src/plugins/KDEFrameworksIntegration/data/icon.svg similarity index 100% rename from src/plugins/KDESupport/data/icon.svg rename to src/plugins/KDEFrameworksIntegration/data/icon.svg diff --git a/src/plugins/KDESupport/kdesupport.qrc b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegration.qrc similarity index 66% rename from src/plugins/KDESupport/kdesupport.qrc rename to src/plugins/KDEFrameworksIntegration/kdeframeworksintegration.qrc index 05b7a8c44..b021aa217 100644 --- a/src/plugins/KDESupport/kdesupport.qrc +++ b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegration.qrc @@ -1,5 +1,5 @@ - + metadata.desktop data/icon.svg diff --git a/src/plugins/KDESupport/kdesupportplugin.cpp b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp similarity index 83% rename from src/plugins/KDESupport/kdesupportplugin.cpp rename to src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp index 2ae5c8096..117c7f6dd 100644 --- a/src/plugins/KDESupport/kdesupportplugin.cpp +++ b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.cpp @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2013-2018 David Rosca * * This program is free software: you can redistribute it and/or modify @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * ============================================================ */ -#include "kdesupportplugin.h" +#include "kdeframeworksintegrationplugin.h" #include "kwalletpasswordbackend.h" #include "pluginproxy.h" #include "browserwindow.h" @@ -33,18 +33,18 @@ #include -KDESupportPlugin::KDESupportPlugin() +KDEFrameworksIntegrationPlugin::KDEFrameworksIntegrationPlugin() : QObject() , m_backend(0) { } -DesktopFile KDESupportPlugin::metaData() const +DesktopFile KDEFrameworksIntegrationPlugin::metaData() const { - return DesktopFile(QSL(":kdesupport/metadata.desktop")); + return DesktopFile(QSL(":kdeframeworksintegration/metadata.desktop")); } -void KDESupportPlugin::init(InitState state, const QString &settingsPath) +void KDEFrameworksIntegrationPlugin::init(InitState state, const QString &settingsPath) { Q_UNUSED(state); Q_UNUSED(settingsPath); @@ -70,7 +70,7 @@ void KDESupportPlugin::init(InitState state, const QString &settingsPath) KCrash::setFlags(KCrash::KeepFDs); } -void KDESupportPlugin::unload() +void KDEFrameworksIntegrationPlugin::unload() { mApp->autoFill()->passwordManager()->unregisterBackend(m_backend); delete m_backend; @@ -83,7 +83,7 @@ void KDESupportPlugin::unload() m_kioSchemeHandlers.clear(); } -bool KDESupportPlugin::testPlugin() +bool KDEFrameworksIntegrationPlugin::testPlugin() { // Require the version that the plugin was built with return (Qz::VERSION == QLatin1String(FALKON_VERSION)); diff --git a/src/plugins/KDESupport/kdesupportplugin.h b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h similarity index 81% rename from src/plugins/KDESupport/kdesupportplugin.h rename to src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h index c0fdd82e5..c44621aa1 100644 --- a/src/plugins/KDESupport/kdesupportplugin.h +++ b/src/plugins/KDEFrameworksIntegration/kdeframeworksintegrationplugin.h @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2013-2018 David Rosca * * This program is free software: you can redistribute it and/or modify @@ -15,22 +15,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . * ============================================================ */ -#ifndef KDESUPPORTPLUGIN_H -#define KDESUPPORTPLUGIN_H +#pragma once #include "plugininterface.h" class KWalletPasswordBackend; class KIOSchemeHandler; -class KDESupportPlugin : public QObject, public PluginInterface +class KDEFrameworksIntegrationPlugin : public QObject, public PluginInterface { Q_OBJECT Q_INTERFACES(PluginInterface) - Q_PLUGIN_METADATA(IID "Falkon.Browser.plugin.KDESupport") + Q_PLUGIN_METADATA(IID "Falkon.Browser.plugin.KDEFrameworksIntegration") public: - explicit KDESupportPlugin(); + explicit KDEFrameworksIntegrationPlugin(); DesktopFile metaData() const override; void init(InitState state, const QString &settingsPath) override; @@ -41,5 +40,3 @@ private: KWalletPasswordBackend* m_backend; QVector m_kioSchemeHandlers; }; - -#endif // KDESUPPORTPLUGIN_H diff --git a/src/plugins/KDESupport/kioschemehandler.cpp b/src/plugins/KDEFrameworksIntegration/kioschemehandler.cpp similarity index 97% rename from src/plugins/KDESupport/kioschemehandler.cpp rename to src/plugins/KDEFrameworksIntegration/kioschemehandler.cpp index 62564ff5b..ce35f9ffb 100644 --- a/src/plugins/KDESupport/kioschemehandler.cpp +++ b/src/plugins/KDEFrameworksIntegration/kioschemehandler.cpp @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2018 David Rosca * * This program is free software: you can redistribute it and/or modify diff --git a/src/plugins/KDESupport/kioschemehandler.h b/src/plugins/KDEFrameworksIntegration/kioschemehandler.h similarity index 95% rename from src/plugins/KDESupport/kioschemehandler.h rename to src/plugins/KDEFrameworksIntegration/kioschemehandler.h index f4011e479..ff4a04daf 100644 --- a/src/plugins/KDESupport/kioschemehandler.h +++ b/src/plugins/KDEFrameworksIntegration/kioschemehandler.h @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2018 David Rosca * * This program is free software: you can redistribute it and/or modify diff --git a/src/plugins/KDESupport/kwalletpasswordbackend.cpp b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp similarity index 96% rename from src/plugins/KDESupport/kwalletpasswordbackend.cpp rename to src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp index ba903bf21..e37cdc441 100644 --- a/src/plugins/KDESupport/kwalletpasswordbackend.cpp +++ b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.cpp @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2013-2018 David Rosca * * This program is free software: you can redistribute it and/or modify @@ -16,7 +16,7 @@ * along with this program. If not, see . * ============================================================ */ #include "kwalletpasswordbackend.h" -#include "kdesupportplugin.h" +#include "kdeframeworksintegrationplugin.h" #include "mainapplication.h" #include "browserwindow.h" @@ -48,7 +48,7 @@ KWalletPasswordBackend::KWalletPasswordBackend() QString KWalletPasswordBackend::name() const { - return KDESupportPlugin::tr("KWallet"); + return KDEFrameworksIntegrationPlugin::tr("KWallet"); } QVector KWalletPasswordBackend::getEntries(const QUrl &url) diff --git a/src/plugins/KDESupport/kwalletpasswordbackend.h b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.h similarity index 96% rename from src/plugins/KDESupport/kwalletpasswordbackend.h rename to src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.h index a0a58f91f..0c6a769be 100644 --- a/src/plugins/KDESupport/kwalletpasswordbackend.h +++ b/src/plugins/KDEFrameworksIntegration/kwalletpasswordbackend.h @@ -1,5 +1,5 @@ /* ============================================================ -* KDESupport - KDE support plugin for Falkon +* KDEFrameworksIntegration - KDE support plugin for Falkon * Copyright (C) 2013-2014 David Rosca * * This program is free software: you can redistribute it and/or modify diff --git a/src/plugins/KDESupport/metadata.desktop b/src/plugins/KDEFrameworksIntegration/metadata.desktop similarity index 76% rename from src/plugins/KDESupport/metadata.desktop rename to src/plugins/KDEFrameworksIntegration/metadata.desktop index e31e9e6b0..34823f649 100644 --- a/src/plugins/KDESupport/metadata.desktop +++ b/src/plugins/KDEFrameworksIntegration/metadata.desktop @@ -1,13 +1,5 @@ [Desktop Entry] -Name=KDE Support -Name[ca]=Suport pel KDE -Name[ca@valencia]=Suport pel KDE -Name[en_GB]=KDE Support -Name[nl]=KDE ondersteuning -Name[pt]=Suporte ao KDE -Name[sv]=KDE-stöd -Name[uk]=Підтримка KDE -Name[x-test]=xxKDE Supportxx +Name=KDE Frameworks Integration Comment=Provides support for KIO and storing passwords in KWallet Comment[ca]=Proporciona suport pel KIO i per emmagatzemar contrasenyes al KWallet Comment[ca@valencia]=Proporciona suport pel KIO i per emmagatzemar contrasenyes al KWallet @@ -18,10 +10,10 @@ Comment[sv]=Tillhandahåller stöd KIO och för att lagra lösenord i plånboken Comment[uk]=Забезпечує підтримку засобів введення-виведення KIO і зберігання паролів у KWallet Comment[x-test]=xxProvides support for KIO and storing passwords in KWalletxx -Icon=:kdesupport/data/icon.svg +Icon=:kdeframeworksintegration/data/icon.svg Type=Service X-Falkon-Author=David Rosca X-Falkon-Email=nowrep@gmail.com -X-Falkon-Version=0.2.0 +X-Falkon-Version=0.3.0 X-Falkon-Settings=false diff --git a/src/plugins/KDESupport/CMakeLists.txt b/src/plugins/KDESupport/CMakeLists.txt deleted file mode 100644 index eea7e9531..000000000 --- a/src/plugins/KDESupport/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -set(KDESupport_SRCS - kdesupportplugin.cpp - kwalletpasswordbackend.cpp - kioschemehandler.cpp -) - -ecm_create_qm_loader(KDESupport_SRCS falkon_kdesupport_qt) - -set(KDESupport_RSCS - kdesupport.qrc -) -qt5_add_resources(RSCS ${KDESupport_RSCS}) - -add_library(KDESupport MODULE ${KDESupport_SRCS} ${RSCS}) -install(TARGETS KDESupport DESTINATION ${FALKON_INSTALL_PLUGINDIR}) -target_link_libraries(KDESupport - FalkonPrivate - KF5::Wallet - KF5::KIOCore - KF5::KIOWidgets - KF5::Crash - KF5::CoreAddons -)