[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kde-baseapps/frameworks] lib/konq/src: libkonq: remove usage of KonqPopupMenuPlugin and KFileItemAc
From:       David Faure <faure () kde ! org>
Date:       2016-02-21 10:55:55
Message-ID: E1aXRgB-0002Ay-Ar () scm ! kde ! org
[Download RAW message or body]

Git commit 9c45cd3b4196bb194511c22a776b01350293d559 by David Faure.
Committed on 21/02/2016 at 10:55.
Pushed by dfaure into branch 'frameworks'.

libkonq: remove usage of KonqPopupMenuPlugin and KFileItemActionPlugin, both \
deprecated in favour of KAbstractFileItemActionPlugin

M  +0    -9    lib/konq/src/CMakeLists.txt
M  +0    -23   lib/konq/src/konq_popupmenu.cpp
D  +0    -30   lib/konq/src/konq_popupmenuplugin.cpp
D  +0    -68   lib/konq/src/konq_popupmenuplugin.h
D  +0    -89   lib/konq/src/konqpopupmenuplugin.desktop

http://commits.kde.org/kde-baseapps/9c45cd3b4196bb194511c22a776b01350293d559

diff --git a/lib/konq/src/CMakeLists.txt b/lib/konq/src/CMakeLists.txt
index e772ce4..6c73ac7 100644
--- a/lib/konq/src/CMakeLists.txt
+++ b/lib/konq/src/CMakeLists.txt
@@ -5,7 +5,6 @@ remove_definitions(-DQT_NO_CAST_FROM_BYTEARRAY)
 
 set(konq_LIB_SRCS
    konq_popupmenu.cpp       # used by konqueror, kfind, folderview, kickoff
-   konq_popupmenuplugin.cpp # for KonqPopupMenu and its plugins
    konq_dndpopupmenuplugin.cpp # for KonqDndPopupMenu and its plugins
    konq_copytomenu.cpp         # used by dolphin, KonqPopupMenu
    konq_events.cpp
@@ -57,7 +56,6 @@ install(FILES
     konq_historyentry.h
     konq_historyprovider.h
     konq_popupmenu.h
-    konq_popupmenuplugin.h
     ${LibKonq_BINARY_DIR}/src/libkonq_export.h
 
     DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}
@@ -68,12 +66,5 @@ install(FILES konqdndpopupmenuplugin.desktop
     DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}
 )
 
-# TODO: Remove this block and the corresponding file if we depend on a KIO version \
                >= 5.16
-if ("${KF5_VERSION}" VERSION_LESS "5.16")
-    install(FILES konqpopupmenuplugin.desktop
-        DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}
-    )
-endif()
-
 add_subdirectory(pics)
 add_subdirectory(Templates)
diff --git a/lib/konq/src/konq_popupmenu.cpp b/lib/konq/src/konq_popupmenu.cpp
index be34b8e..2cc1eb0 100644
--- a/lib/konq/src/konq_popupmenu.cpp
+++ b/lib/konq/src/konq_popupmenu.cpp
@@ -20,10 +20,8 @@
 
 #include "konq_popupmenu.h"
 #include <kfileitemlistproperties.h>
-#include "konq_popupmenuplugin.h"
 #include "konq_copytomenu.h"
 #include "kfileitemactions.h"
-#include "kfileitemactionplugin.h"
 #include "kabstractfileitemactionplugin.h"
 #include "kpropertiesdialog.h"
 
@@ -587,20 +585,6 @@ void KonqPopupMenuPrivate::addPlugins()
     if (commonMimeType.isEmpty()) {
         commonMimeType = QLatin1String("application/octet-stream");
     }
-    const KService::List konqPlugins = \
KMimeTypeTrader::self()->query(commonMimeType, "KonqPopupMenu/Plugin", "exist \
                Library");
-
-    if (!konqPlugins.isEmpty()) {
-        KService::List::ConstIterator iterator = konqPlugins.begin();
-        const KService::List::ConstIterator end = konqPlugins.end();
-        for(; iterator != end; ++iterator) {
-            //kDebug() << (*iterator)->name() << (*iterator)->library();
-            KonqPopupMenuPlugin *plugin = \
                (*iterator)->createInstance<KonqPopupMenuPlugin>(q);
-            if (!plugin)
-                continue;
-            plugin->setParent(q);
-            plugin->setup(&m_ownActionCollection, m_popupItemProperties, q);
-        }
-    }
 
     const KService::List fileItemPlugins = \
KMimeTypeTrader::self()->query(commonMimeType, "KFileItemAction/Plugin", "exist \
Library");  if (!fileItemPlugins.isEmpty()) {
@@ -613,13 +597,6 @@ void KonqPopupMenuPrivate::addPlugins()
                 continue;
             }
 
-            // Old API (kdelibs-4.6.0 only)
-            KFileItemActionPlugin* plugin = \
                service->createInstance<KFileItemActionPlugin>();
-            if (plugin) {
-                plugin->setParent(q);
-                q->addActions(plugin->actions(m_popupItemProperties, \
                m_parentWidget));
-            }
-            // New API (kdelibs >= 4.6.1)
             KAbstractFileItemActionPlugin* abstractPlugin = \
service->createInstance<KAbstractFileItemActionPlugin>();  if (abstractPlugin) {
                 abstractPlugin->setParent(q);
diff --git a/lib/konq/src/konq_popupmenuplugin.cpp \
b/lib/konq/src/konq_popupmenuplugin.cpp deleted file mode 100644
index 71d2273..0000000
--- a/lib/konq/src/konq_popupmenuplugin.cpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/* This file is part of the KDE project
-   Copyright 2008 David Faure <faure@kde.org>
-
-   This library is free software; you can redistribute it and/or modify
-   it under the terms of the GNU Library General Public License as published
-   by the Free Software Foundation; either version 2 of the License or
-   ( at your option ) version 3 or, at the discretion of KDE e.V.
-   ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "konq_popupmenuplugin.h"
-
-KonqPopupMenuPlugin::KonqPopupMenuPlugin(QObject* parent)
-    : QObject(parent)
-{
-}
-
-KonqPopupMenuPlugin::~KonqPopupMenuPlugin()
-{
-}
diff --git a/lib/konq/src/konq_popupmenuplugin.h \
b/lib/konq/src/konq_popupmenuplugin.h deleted file mode 100644
index 2969d58..0000000
--- a/lib/konq/src/konq_popupmenuplugin.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* This file is part of the KDE project
-   Copyright 2008 David Faure <faure@kde.org>
-
-   This library is free software; you can redistribute it and/or modify
-   it under the terms of the GNU Library General Public License as published
-   by the Free Software Foundation; either version 2 of the License or
-   ( at your option ) version 3 or, at the discretion of KDE e.V.
-   ( which shall act as a proxy as in section 14 of the GPLv3 ), any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef KONQ_POPUPMENUPLUGIN_H
-#define KONQ_POPUPMENUPLUGIN_H
-
-#include "libkonq_export.h"
-#include <QObject>
-
-class QMenu;
-class KActionCollection;
-class KFileItemListProperties;
-
-/**
- * Base class for KonqPopupMenu plugins.
- *
- * Please try to use servicemenus first, if you simply need to add
- * actions to the popup menu for one or more mimetypes.
- *
- * However if you need some dynamic logic, like "only show this item if
- * two files are selected", or "show a submenu with a variable number of actions",
- * then you have to implement a KonqPopupMenuPlugin subclass.
- *
- * @deprecated Use KFileItemActionPlugin instead.
- */
-class LIBKONQ_EXPORT KonqPopupMenuPlugin : public QObject
-{
-    Q_OBJECT
-public:
-
-    /**
-     * Constructor.
-     */
-    KonqPopupMenuPlugin(QObject* parent);
-    virtual ~KonqPopupMenuPlugin();
-
-    /**
-     * Implement the setup method in the plugin in order to create actions
-     * in the given actionCollection and add it to the menu using menu->addAction().
-     *
-     * @param actionCollection the parent for the actions
-     * @param popupMenuInfo all the information about the popupmenu being shown
-     * (which file items, their common mimetype, etc.)
-     * @param menu the menu where the plugin can add its own actions
-     */
-    virtual void setup(KActionCollection* actionCollection,
-                       const KFileItemListProperties& popupMenuInfo,
-                       QMenu *menu) = 0;
-};
-
-#endif /* KONQ_POPUPMENUPLUGIN_H */
diff --git a/lib/konq/src/konqpopupmenuplugin.desktop \
b/lib/konq/src/konqpopupmenuplugin.desktop deleted file mode 100644
index be79174..0000000
--- a/lib/konq/src/konqpopupmenuplugin.desktop
+++ /dev/null
@@ -1,89 +0,0 @@
-[Desktop Entry]
-Type=ServiceType
-X-KDE-ServiceType=KonqPopupMenu/Plugin
-Comment=Plugin for the Konqueror Popup Menu
-Comment[af]=Inplak vir die Konqueror Opspring Kieslys
-Comment[ar]=ملحق لقائمة كونكيورر المنبثقة
-Comment[as]=Konqueror প'প-আপ তালিকাৰ কাৰণে \
                প্লাগ-ইন
-Comment[ast]=Complementu pal menú emerxente de Konqueror
-Comment[be]=Утулка для выплыўнага меню Konqueror
-Comment[be@latin]=Plugin dla vypłyŭnoha menu prahramy „Konqueror"
-Comment[bg]=Приставка за контекстното меню на \
                браузъра
-Comment[bn]=কনকরার পপ-আপ মেনুর জন্য \
                প্লাগ-ইন
-Comment[bn_IN]=Konqueror পপ-আপ মেনুর প্লাগ-ইন
-Comment[bs]=Priključak za K‑osvajačev iskačući meni
-Comment[ca]=Connector per al menú emergent del Konqueror
-Comment[ca@valencia]=Connector per al menú emergent del Konqueror
-Comment[cs]=Modul pro kontextovou nabídku Konqueroru
-Comment[csb]=Wtëkôcz do menu (òtmëkô knąpą mëszë) Konquerora
-Comment[cy]=Ategyn i Naidlen Konqueror
-Comment[da]=Plugin for Konquerors popop-menu
-Comment[de]=Erweiterung für das Aufklapp-Menü von Konqueror
-Comment[el]= ρόσθετο για το αναδυόμενο μενού του \
                Konqueror
-Comment[en_GB]=Plugin for the Konqueror Popup Menu
-Comment[eo]=Kromprogrameto por la spruĉmenuo de Konkeranto
-Comment[es]=Complemento para el menú emergente de Konqueror
-Comment[et]=Konquerori hüpikmenüü plugin
-Comment[eu]=Konquerorren laster-menuetarako plugina
-Comment[fa]=وصله برای گزینگان بالاپر Konqueror
-Comment[fi]=Konquerorin ponnahdusvalikkoliitännäinen
-Comment[fr]=Module externe pour le menu contextuel de Konqueror
-Comment[fy]=Plugin foar Konqueror's fluesmenu
-Comment[ga]=Breiseán le haghaidh Roghchláir Aníos Konqueror
-Comment[gl]=Complemento para o menú contextual de Konqueror
-Comment[gu]=કોન્કરર પોપઅપ મેનુ માટે \
                પ્લગઇન
-Comment[he]=תוסף לתפריט המוקפץ של Konqueror
-Comment[hi]=कॉन्करर पॉपअप मेन्यू के \
                लिए प्लगइन
-Comment[hne]=कान्करर पापअप मेन्यू बर \
                प्लगइन
-Comment[hr]=Dodatak za Konqueror pop-up izbornik
-Comment[hsb]=zašćěpka za popup-meni w konqueroru
-Comment[hu]=Bővítőmodul a Konqueror felbukkanó menühöz
-Comment[ia]=Plugin pro le Menu de Popup de Konqueror
-Comment[id]=Plugin untuk Menu Popup Konqueror
-Comment[is]=Íforrit fyrir sprettvalmynd Konqueror Popup Menu
-Comment[it]=Estensione per il menu a comparsa di Konqueror
-Comment[ja]=Konqueror ポップアップメニューのプラグイン
-Comment[ka]=Konqueror-ის ჩამოშლადი მენიუს \
                პლაგინი
-Comment[kk]=Konqueror баптау қалқымалы мәзір плагині
-Comment[km]=កម្មវិធី​ជំនួយ​សម្រាប់​ម៉ឺនុយ​លេច​ឡើង​របស់​ \
                Konqueror
-Comment[kn]=ಕಾಂಕರ್ ಪುಟಿಕೆ (ಪಾಪಪ್) \
                ಪರಿವಿಡಿಗೆ ಮಿಳಿತಾನ್ವಯ \
                (ಪ್ಲಗಿನ್)
-Comment[ko]=Konqueror 팝업 메뉴 플러그인
-Comment[ku]=Pêveka ji bo Pêşeka Hilpekîn a Konquerorê
-Comment[lt]=Priedas pasirodančiam Konqueror meniu
-Comment[lv]=Konqueror izlecošās izvēlnes spraudnis
-Comment[mai]=कान्करर पापअप मेनू क' लेल \
                प्लगइन
-Comment[mk]=Приклучок за контекстното мени на Konqueror
-Comment[ml]=കോണ്‍ക്വററിന്റെ \
പൊങ്ങിവരുന്ന മെനുവിനുള്ള \
                സംയോജകം
-Comment[mr]=कॉन्करर पॉपअप मेन्यू करिता \
                प्लगइन
-Comment[ms]=Plugin untuk Menu Popuo Konqueror
-Comment[nds]=Plugin för dat Konqueror-Opdukmenü
-Comment[ne]=कन्क्वेरर पपअप मेनुका लागि \
                प्लगइन
-Comment[nl]=Plugin voor Konqueror's contextmenu
-Comment[or]=Konqueror ପପଅପ ତାଲିକା ପାଇଁ \
                ପ୍ଲଗଇନ
-Comment[pa]=ਕੋਨਕਿਉਰੋਰ ਪਾਪਅੱਪ ਮੇਨੂ ਲਈ \
                ਪਲੱਗਇਨ
-Comment[pl]=Wtyczka do menu (otwieranego przyciskiem myszy) Konquerora
-Comment[pt]='Plugin' para o Menu do Konqueror
-Comment[pt_BR]=Plugin do Konqueror para menus de contexto
-Comment[ro]=Extensie pentru meniul popup Konqueror
-Comment[ru]= асширение контекстного меню Konqueror
-Comment[si]=Konqueror පොප් අප් මෙනුව සඳහා \
                ප්ලගිනය
-Comment[sk]=Modul pre kontextové menu Konquerora
-Comment[sl]=Vstavek za Konquerorjev pojavni meni
-Comment[sr]=Прикључак за К‑освајачев искачући \
                мени
-Comment[sr@ijekavian]=Прикључак за К‑освајачев \
                искачући мени
-Comment[sr@ijekavianlatin]=Priključak za K‑osvajačev iskačući meni
-Comment[sr@latin]=Priključak za K‑osvajačev iskačući meni
-Comment[sv]=Insticksprogram för Konquerors popupmeny
-Comment[ta]=கான்கொரர் தோன்றும் \
                பட்டிக்கான செருகல்கள்
-Comment[te]=Konqueror పాప్అప్ మెనూకొరకు \
                ప్లగ్ఇన్
-Comment[tg]=Плагин барои менюи пайдошавии Konqueror
-Comment[th]=ส่วนเสริมการทำงานสำหรับเมนูผุดของคอนเควอร์เรอร์
                
-Comment[tr]=Konqueror Açılabilir Menüsü İçin Eklenti
-Comment[ug]=Konqueror قاڭقىش تىزىملىكىنىڭ قىستۇرمىسى
-Comment[uk]=Додаток контекстного меню Konqueror
-Comment[vi]=Trình bổ sung cho Trình đơn Bật lên của Konqueror
-Comment[wa]=Tchôke-divins po l'  aspitant menu di Konqueror
-Comment[xh]=Iplagi efakiweyo ye Konqueror ye Popup Menu
-Comment[x-test]=xxPlugin for the Konqueror Popup Menuxx
-Comment[zh_CN]=Konqueror 弹出菜单插件
-Comment[zh_TW]=Konqueror 彈出式選單的外掛程式


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic