From 43289ee0fba1a6e5d49c985c984aaff7dee37fbf Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 8 Jan 2016 04:42:26 +0200 Subject: [PATCH] generic: fix some compiler warnings due to 9ff99942 Signed-off-by: Ivailo Monev --- kdecore/util/kpluginfactory.h | 9 --------- kdeui/tests/kxmlguitest.h | 2 +- kdeui/xmlgui/kxmlguiclient.cpp | 2 +- kdeui/xmlgui/kxmlguiclient.h | 2 +- kparts/part.cpp | 2 +- kparts/part.h | 2 +- kparts/plugin.cpp | 4 ++-- kparts/plugin.h | 2 +- 8 files changed, 8 insertions(+), 17 deletions(-) diff --git a/kdecore/util/kpluginfactory.h b/kdecore/util/kpluginfactory.h index c388131a..e40fd144 100644 --- a/kdecore/util/kpluginfactory.h +++ b/kdecore/util/kpluginfactory.h @@ -394,15 +394,6 @@ protected: KPluginFactoryPrivate *const d_ptr; - /** - * @deprecated - */ - - /** - * @deprecated - */ - - /** * This method sets the component data of the plugin. You can access the component data object * later with componentData(). diff --git a/kdeui/tests/kxmlguitest.h b/kdeui/tests/kxmlguitest.h index b7c0ffb8..727622bc 100644 --- a/kdeui/tests/kxmlguitest.h +++ b/kdeui/tests/kxmlguitest.h @@ -11,7 +11,7 @@ public: Client() {} void setXMLFile( const QString &f, bool merge = true, bool setXMLDoc = true ) { KXMLGUIClient::setXMLFile( f, merge, setXMLDoc ); } - void setComponentData(const KComponentData &inst) { KXMLGUIClient::setComponentData(inst); } + void setComponentData(const KComponentData &inst, bool loadPlugins = true) { KXMLGUIClient::setComponentData(inst, loadPlugins); } public Q_SLOTS: void slotSec(); diff --git a/kdeui/xmlgui/kxmlguiclient.cpp b/kdeui/xmlgui/kxmlguiclient.cpp index 5a071533..e7efdc81 100644 --- a/kdeui/xmlgui/kxmlguiclient.cpp +++ b/kdeui/xmlgui/kxmlguiclient.cpp @@ -181,7 +181,7 @@ void KXMLGUIClient::reloadXML() setXMLFile( file ); } -void KXMLGUIClient::setComponentData(const KComponentData &componentData) +void KXMLGUIClient::setComponentData(const KComponentData &componentData, bool loadPlugins) { d->m_componentData = componentData; actionCollection()->setComponentData( componentData ); diff --git a/kdeui/xmlgui/kxmlguiclient.h b/kdeui/xmlgui/kxmlguiclient.h index dec39d57..f6536429 100644 --- a/kdeui/xmlgui/kxmlguiclient.h +++ b/kdeui/xmlgui/kxmlguiclient.h @@ -310,7 +310,7 @@ protected: * Call this first in the inherited class constructor. * (At least before setXMLFile().) */ - virtual void setComponentData(const KComponentData &componentData); + virtual void setComponentData(const KComponentData &componentData, bool loadPlugins = true); /** * Sets the name of the rc file containing the XML for the part. diff --git a/kparts/part.cpp b/kparts/part.cpp index f81e70fd..f6df30da 100644 --- a/kparts/part.cpp +++ b/kparts/part.cpp @@ -138,7 +138,7 @@ void PartBase::setComponentData(const KComponentData &componentData, bool bLoadP { Q_D(PartBase); - KXMLGUIClient::setComponentData(componentData); + KXMLGUIClient::setComponentData(componentData, bLoadPlugins); KGlobal::locale()->insertCatalog(componentData.catalogName()); // install 'instancename'data resource type KGlobal::dirs()->addResourceType(QString(componentData.componentName() + "data").toUtf8(), diff --git a/kparts/part.h b/kparts/part.h index 63200979..dddce105 100644 --- a/kparts/part.h +++ b/kparts/part.h @@ -97,7 +97,7 @@ protected: * KParts::MainWindow, plugins are automatically loaded in createGUI anyway, * so set loadPlugins to false for KParts::MainWindow as well). */ - virtual void setComponentData(const KComponentData &componentData, bool loadPlugins=true); + virtual void setComponentData(const KComponentData &componentData, bool loadPlugins = true); // In the case of KParts MainWindows, plugins are automatically loaded in createGUI anyway, // so setComponentData() should really not load the plugins. diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index 1e41c088..b140b701 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -213,10 +213,10 @@ bool Plugin::hasPlugin( QObject* parent, const QString& library ) return false; } -void Plugin::setComponentData(const KComponentData &componentData) +void Plugin::setComponentData(const KComponentData &componentData, bool loadPlugins) { KGlobal::locale()->insertCatalog(componentData.catalogName()); - KXMLGUIClient::setComponentData(componentData); + KXMLGUIClient::setComponentData(componentData, loadPlugins); } void Plugin::loadPlugins(QObject *parent, KXMLGUIClient* parentGUIClient, diff --git a/kparts/plugin.h b/kparts/plugin.h index 4cdb3b21..4f7e3828 100644 --- a/kparts/plugin.h +++ b/kparts/plugin.h @@ -171,7 +171,7 @@ protected: */ static Plugin* loadPlugin( QObject * parent, const QString &libname, const QString &keyword = QString() ); - virtual void setComponentData(const KComponentData &instance); + virtual void setComponentData(const KComponentData &instance, bool loadPlugins = true); private: static bool hasPlugin( QObject* parent, const QString& library );