Commit 81bc37ff authored by Boudewijn Rempt's avatar Boudewijn Rempt

make plugins inherit QObject, not KParts::Plugin

Most Krita plugins still inherited KParts::Plugin where with the
current pluignloader, QObject is sufficient. Only gui plugins with
an rc file as still KParts::Plugin type plugins.

svn path=/trunk/koffice/; revision=1069490
parent aebc8ebc
......@@ -41,9 +41,8 @@ K_EXPORT_COMPONENT_FACTORY(kritarulerassistanttool, RulerAssistantToolFactory("k
RulerAssistantToolPlugin::RulerAssistantToolPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(RulerAssistantToolFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisRulerAssistantToolFactory(r, QStringList()));
}
......
......@@ -22,7 +22,7 @@
class KisView;
class RulerAssistantToolPlugin : public KParts::Plugin
class RulerAssistantToolPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -45,7 +45,7 @@ K_EXPORT_COMPONENT_FACTORY(krita_ctlcs_plugin, CTLCSPluginPluginFactory("krita")
CTLCSPlugin::CTLCSPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
Q_ASSERT(ctlMutex == 0);
ctlMutex = new QMutex;
......
......@@ -25,7 +25,7 @@
/**
* A plugin wrapper around the LMS F32 color space strategy.
*/
class CTLCSPlugin : public KParts::Plugin
class CTLCSPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -36,7 +36,7 @@ K_EXPORT_COMPONENT_FACTORY(krita_lms_f32_plugin, LMSF32PluginFactory("krita"))
LMSF32Plugin::LMSF32Plugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
KoColorSpaceRegistry * f = KoColorSpaceRegistry::instance();
......
......@@ -26,7 +26,7 @@
/**
* A plugin wrapper around the LMS F32 color space strategy.
*/
class LMSF32Plugin : public KParts::Plugin
class LMSF32Plugin : public QObject
{
Q_OBJECT
public:
......
......@@ -33,9 +33,8 @@ typedef KGenericFactory<KritaDefaultDockersPlugin> KritaDefaultDockersPluginFact
K_EXPORT_COMPONENT_FACTORY(kritadefaultdockers, KritaDefaultDockersPluginFactory("krita"))
KritaDefaultDockersPlugin::KritaDefaultDockersPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaDefaultDockersPluginFactory::componentData());
//KoDockRegistry::instance()->add(new KisHistogramDockFactory());
KoDockRegistry::instance()->add(new KisLayerBoxFactory());
KoDockRegistry::instance()->add(new KisBirdEyeBoxFactory());
......
......@@ -25,7 +25,7 @@ class KisView2;
/**
* Template of view plugin
*/
class KritaDefaultDockersPlugin : public KParts::Plugin
class KritaDefaultDockersPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -78,14 +78,14 @@ private:
DigitalMixerPlugin::DigitalMixerPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
dbgPlugins << "DigitalMixerPlugin";
if ( parent->inherits("KisView2") )
{
m_view = (KisView2*) parent;
setComponentData(DigitalMixerPluginFactory::componentData());
//setComponentData(DigitalMixerPluginFactory::componentData());
DigitalMixerDockFactory dockFactory( m_view);
m_view->createDockWidget( &dockFactory );
}
......
......@@ -25,7 +25,7 @@ class KisView2;
/**
* Template of view plugin
*/
class DigitalMixerPlugin : public KParts::Plugin
class DigitalMixerPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -57,9 +57,8 @@ public:
SmallColorSelectorPlugin::SmallColorSelectorPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(SmallColorSelectorPluginFactory::componentData());
KoDockRegistry::instance()->add(new SmallColorSelectorDockFactory());
}
......
......@@ -25,7 +25,7 @@ class KisView2;
/**
* Template of view plugin
*/
class SmallColorSelectorPlugin : public KParts::Plugin
class SmallColorSelectorPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -70,11 +70,11 @@ public:
SpecificColorSelectorPlugin::SpecificColorSelectorPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
dbgPlugins << "SpecificColorSelectorPlugin";
setComponentData(SpecificColorSelectorPluginFactory::componentData());
//setComponentData(SpecificColorSelectorPluginFactory::componentData());
KoDockRegistry::instance()->add(new SpecificColorSelectorDockFactory());
}
......
......@@ -25,7 +25,7 @@ class KisView2;
/**
* Template of view plugin
*/
class SpecificColorSelectorPlugin : public KParts::Plugin
class SpecificColorSelectorPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -58,11 +58,11 @@ public:
TriangleColorSelectorPlugin::TriangleColorSelectorPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
dbgPlugins << "TriangleColorSelectorPlugin";
setComponentData(TriangleColorSelectorPluginFactory::componentData());
//setComponentData(TriangleColorSelectorPluginFactory::componentData());
KoDockRegistry::instance()->add(new KisTriangleColorSelectorDockFactory());
}
......
......@@ -25,7 +25,7 @@ class KisView2;
/**
* Template of view plugin
*/
class TriangleColorSelectorPlugin : public KParts::Plugin
class TriangleColorSelectorPlugin : public QObject
{
Q_OBJECT
public:
......
......@@ -38,9 +38,8 @@ typedef KGenericFactory<ShivaPlugin> ShivaPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritashiva, ShivaPluginFactory("krita"))
ShivaPlugin::ShivaPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(ShivaPluginFactory::componentData());
m_sourceCollection = new OpenShiva::SourcesCollection();
QStringList kernelModulesDirs = KGlobal::mainComponent().dirs()->findDirs("data", "krita/shiva/kernels/");
......
......@@ -27,7 +27,7 @@ namespace OpenShiva
class SourcesCollection;
}
class ShivaPlugin : public KParts::Plugin
class ShivaPlugin : public QObject
{
public:
ShivaPlugin(QObject *parent, const QStringList &);
......
......@@ -29,9 +29,9 @@ typedef KGenericFactory<BlurFilterPlugin> BlurFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritablurfilter, BlurFilterPluginFactory("krita"))
BlurFilterPlugin::BlurFilterPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(BlurFilterPluginFactory::componentData());
//setComponentData(BlurFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisBlurFilter());
KisFilterRegistry::instance()->add(new KisGaussianBlurFilter());
......
......@@ -23,7 +23,7 @@
#include <kparts/plugin.h>
class BlurFilterPlugin : public KParts::Plugin
class BlurFilterPlugin : public QObject
{
public:
BlurFilterPlugin(QObject *parent, const QStringList &);
......
......@@ -75,9 +75,9 @@ typedef KGenericFactory<KritaBumpmap> KritaBumpmapFactory;
K_EXPORT_COMPONENT_FACTORY(kritabumpmap, KritaBumpmapFactory("krita"))
KritaBumpmap::KritaBumpmap(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaBumpmapFactory::componentData());
//setComponentData(KritaBumpmapFactory::componentData());
KisFilterRegistry::instance()->add(new KisFilterBumpmap());
}
......
......@@ -57,7 +57,7 @@ enum enumBumpmapType {
using namespace krita;
class KritaBumpmap : public KParts::Plugin
class KritaBumpmap : public QObject
{
public:
KritaBumpmap(QObject *parent, const QStringList &);
......
......@@ -29,9 +29,9 @@ typedef KGenericFactory<KritaExtensionsColors> KritaExtensionsColorsFactory;
K_EXPORT_COMPONENT_FACTORY(kritaextensioncolorsfilters, KritaExtensionsColorsFactory("krita"))
KritaExtensionsColors::KritaExtensionsColors(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaExtensionsColorsFactory::componentData());
//setComponentData(KritaExtensionsColorsFactory::componentData());
KisFilterRegistry * manager = KisFilterRegistry::instance();
manager->add(new KisFilterMax());
......
......@@ -23,7 +23,7 @@
#include <kparts/plugin.h>
class KritaExtensionsColors : public KParts::Plugin
class KritaExtensionsColors : public QObject
{
public:
KritaExtensionsColors(QObject *parent, const QStringList &);
......
......@@ -66,9 +66,9 @@ typedef KGenericFactory<ColorsFilters> ColorsFiltersFactory;
K_EXPORT_COMPONENT_FACTORY(kritacolorsfilters, ColorsFiltersFactory("krita"))
ColorsFilters::ColorsFilters(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(ColorsFiltersFactory::componentData());
//setComponentData(ColorsFiltersFactory::componentData());
KisFilterRegistry * manager = KisFilterRegistry::instance();
manager->add(new KisBrightnessContrastFilter());
......
......@@ -27,7 +27,7 @@
class KoColorSpace;
class KoColorTransformation;
class ColorsFilters : public KParts::Plugin
class ColorsFilters : public QObject
{
public:
ColorsFilters(QObject *parent, const QStringList &);
......
......@@ -43,9 +43,9 @@ typedef KGenericFactory<KritaConvolutionFilters> KritaConvolutionFiltersFactory;
K_EXPORT_COMPONENT_FACTORY(kritaconvolutionfilters, KritaConvolutionFiltersFactory("krita"))
KritaConvolutionFilters::KritaConvolutionFilters(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaConvolutionFiltersFactory::componentData());
//setComponentData(KritaConvolutionFiltersFactory::componentData());
KisFilterRegistry * manager = KisFilterRegistry::instance();
manager->add(new KisSharpenFilter());
manager->add(new KisMeanRemovalFilter());
......
......@@ -146,7 +146,7 @@ public:
};
class KritaConvolutionFilters : public KParts::Plugin
class KritaConvolutionFilters : public QObject
{
public:
KritaConvolutionFilters(QObject *parent, const QStringList &);
......
......@@ -28,9 +28,9 @@
typedef KGenericFactory<KisCubismFilterPlugin> KisCubismFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritacubismfilter, KisCubismFilterPluginFactory("krita"))
KisCubismFilterPlugin::KisCubismFilterPlugin(QObject *parent, const QStringList &) : KParts::Plugin(parent)
KisCubismFilterPlugin::KisCubismFilterPlugin(QObject *parent, const QStringList &) : QObject(parent)
{
setComponentData(KisCubismFilterPluginFactory::componentData());
//setComponentData(KisCubismFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisCubismFilter());
}
......
......@@ -22,7 +22,7 @@
#include <kparts/plugin.h>
class KisCubismFilterPlugin : public KParts::Plugin
class KisCubismFilterPlugin : public QObject
{
public:
KisCubismFilterPlugin(QObject *parent, const QStringList &);
......
......@@ -20,7 +20,7 @@
#include <kparts/plugin.h>
class DodgeBurnPlugin : public KParts::Plugin
class DodgeBurnPlugin : public QObject
{
public:
DodgeBurnPlugin(QObject *parent, const QStringList &);
......
......@@ -28,9 +28,9 @@
typedef KGenericFactory<KisEmbossFilterPlugin> KisEmbossFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritaembossfilter, KisEmbossFilterPluginFactory("krita"))
KisEmbossFilterPlugin::KisEmbossFilterPlugin(QObject *parent, const QStringList &) : KParts::Plugin(parent)
KisEmbossFilterPlugin::KisEmbossFilterPlugin(QObject *parent, const QStringList &) : QObject(parent)
{
setComponentData(KisEmbossFilterPluginFactory::componentData());
//setComponentData(KisEmbossFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisEmbossFilter());
}
......
......@@ -21,7 +21,7 @@
#include <kparts/plugin.h>
class KisEmbossFilterPlugin : public KParts::Plugin
class KisEmbossFilterPlugin : public QObject
{
public:
KisEmbossFilterPlugin(QObject *parent, const QStringList &);
......
......@@ -44,9 +44,9 @@ typedef KGenericFactory<KritaExample> KritaExampleFactory;
K_EXPORT_COMPONENT_FACTORY(kritaexample, KritaExampleFactory("krita"))
KritaExample::KritaExample(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaExampleFactory::componentData());
//setComponentData(KritaExampleFactory::componentData());
KisFilterRegistry::instance()->add(KisFilterSP(new KisFilterInvert()));
}
......
......@@ -24,7 +24,7 @@
#include <kparts/plugin.h>
#include "filter/kis_color_transformation_filter.h"
class KritaExample : public KParts::Plugin
class KritaExample : public QObject
{
public:
KritaExample(QObject *parent, const QStringList &);
......
......@@ -45,9 +45,9 @@ K_EXPORT_COMPONENT_FACTORY(kritafastcolortransferfilter, KritaFastColorTransferF
FastColorTransferPlugin::FastColorTransferPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaFastColorTransferFactory::componentData());
//setComponentData(KritaFastColorTransferFactory::componentData());
KisFilterRegistry::instance()->add(new KisFilterFastColorTransfer());
}
......
......@@ -24,7 +24,7 @@
#include <kparts/plugin.h>
#include <filter/kis_filter.h>
class FastColorTransferPlugin : public KParts::Plugin
class FastColorTransferPlugin : public QObject
{
public:
FastColorTransferPlugin(QObject *parent, const QStringList &);
......
......@@ -47,9 +47,9 @@ typedef KGenericFactory<KritaImageEnhancement> KritaImageEnhancementFactory;
K_EXPORT_COMPONENT_FACTORY(kritaimageenhancement, KritaImageEnhancementFactory("krita"))
KritaImageEnhancement::KritaImageEnhancement(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaImageEnhancementFactory::componentData());
//setComponentData(KritaImageEnhancementFactory::componentData());
KisFilterRegistry::instance()->add(new KisSimpleNoiseReducer());
KisFilterRegistry::instance()->add(new KisWaveletNoiseReduction());
}
......
......@@ -24,7 +24,7 @@
#include <kparts/plugin.h>
class KritaImageEnhancement : public KParts::Plugin
class KritaImageEnhancement : public QObject
{
public:
KritaImageEnhancement(QObject *parent, const QStringList &);
......
......@@ -58,9 +58,9 @@ typedef KGenericFactory<KritaLensCorrectionFilter> KritaLensCorrectionFilterFact
K_EXPORT_COMPONENT_FACTORY(kritalenscorrectionfilter, KritaLensCorrectionFilterFactory("krita"))
KritaLensCorrectionFilter::KritaLensCorrectionFilter(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaLensCorrectionFilterFactory::componentData());
//setComponentData(KritaLensCorrectionFilterFactory::componentData());
KisFilterRegistry::instance()->add(new KisFilterLensCorrection());
}
......
......@@ -26,7 +26,7 @@
class KisConfigWidget;
class KritaLensCorrectionFilter : public KParts::Plugin
class KritaLensCorrectionFilter : public QObject
{
public:
KritaLensCorrectionFilter(QObject *parent, const QStringList &);
......
......@@ -29,9 +29,9 @@ typedef KGenericFactory<LevelFilter> LevelFilterFactory;
K_EXPORT_COMPONENT_FACTORY(kritalevelfilter, LevelFilterFactory("krita"))
LevelFilter::LevelFilter(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(LevelFilterFactory::componentData());
//setComponentData(LevelFilterFactory::componentData());
KisFilterRegistry::instance()->add(new KisLevelFilter());
}
......
......@@ -25,7 +25,7 @@
class KisColorSpace;
class KisColorAdjustment;
class LevelFilter : public KParts::Plugin
class LevelFilter : public QObject
{
public:
LevelFilter(QObject *parent, const QStringList &);
......
......@@ -55,9 +55,9 @@ typedef KGenericFactory<KritaNoiseFilter> KritaNoiseFilterFactory;
K_EXPORT_COMPONENT_FACTORY(kritanoisefilter, KritaNoiseFilterFactory("krita"))
KritaNoiseFilter::KritaNoiseFilter(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KritaNoiseFilterFactory::componentData());
//setComponentData(KritaNoiseFilterFactory::componentData());
KisFilterRegistry::instance()->add(new KisFilterNoise());
}
......
......@@ -26,7 +26,7 @@
class KisConfigWidget;
class KritaNoiseFilter : public KParts::Plugin
class KritaNoiseFilter : public QObject
{
public:
KritaNoiseFilter(QObject *parent, const QStringList &);
......
......@@ -28,9 +28,9 @@
typedef KGenericFactory<KisOilPaintFilterPlugin> KisOilPaintFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritaoilpaintfilter, KisOilPaintFilterPluginFactory("krita"))
KisOilPaintFilterPlugin::KisOilPaintFilterPlugin(QObject *parent, const QStringList &) : KParts::Plugin(parent)
KisOilPaintFilterPlugin::KisOilPaintFilterPlugin(QObject *parent, const QStringList &) : QObject(parent)
{
setComponentData(KisOilPaintFilterPluginFactory::componentData());
//setComponentData(KisOilPaintFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisOilPaintFilter());
}
......
......@@ -22,7 +22,7 @@
#include <kparts/plugin.h>
class KisOilPaintFilterPlugin : public KParts::Plugin
class KisOilPaintFilterPlugin : public QObject
{
public:
KisOilPaintFilterPlugin(QObject *parent, const QStringList &);
......
......@@ -33,9 +33,9 @@ typedef KGenericFactory<KisPixelizeFilterPlugin> KisPixelizeFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritapixelizefilter, KisPixelizeFilterPluginFactory("krita"))
KisPixelizeFilterPlugin::KisPixelizeFilterPlugin(QObject *parent, const QStringList &)
: KParts::Plugin(parent)
: QObject(parent)
{
setComponentData(KisPixelizeFilterPluginFactory::componentData());
//setComponentData(KisPixelizeFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisPixelizeFilter());
}
......
......@@ -22,7 +22,7 @@
#include <kparts/plugin.h>
class KisPixelizeFilterPlugin : public KParts::Plugin
class KisPixelizeFilterPlugin : public QObject
{
public:
KisPixelizeFilterPlugin(QObject *parent, const QStringList &);
......
......@@ -31,9 +31,9 @@
typedef KGenericFactory<KisRainDropsFilterPlugin> KisRainDropsFilterPluginFactory;
K_EXPORT_COMPONENT_FACTORY(kritaraindropsfilter, KisRainDropsFilterPluginFactory("krita"))
KisRainDropsFilterPlugin::KisRainDropsFilterPlugin(QObject *parent, const QStringList &) : KParts::Plugin(parent)
KisRainDropsFilterPlugin::KisRainDropsFilterPlugin(QObject *parent, const QStringList &) : QObject(parent)
{
setComponentData(KisRainDropsFilterPluginFactory::componentData());
//setComponentData(KisRainDropsFilterPluginFactory::componentData());
KisFilterRegistry::instance()->add(new KisRainDropsFilter());
}
......
......@@ -23,7 +23,7 @@
#include <kparts/plugin.h>
class KisRainDropsFilterPlugin : public KParts::Plugin
class KisRainDropsFilterPlugin : public QObject
{
public:
KisRainDropsFilterPlugin(QObject *parent, const QStringList &);
......