Commit e5cada60 authored by Boudewijn Rempt's avatar Boudewijn Rempt

De-QObject-ify the factories and registries

There is no reason for the registries and the factories the registries
contain to be QObjects. The only thing it was used for was the
parent-child relation so the factories would be deleted on shutdown.

The objects would thus both be in the hashmap and in the list of
children of the registry, effectively clouding the ownership relation.

To make all registries in KOffice consistent in usage, the destructors
of the registries now delete their contents, there is no parent-child
relationship anymore.

It also saves memory and makes it clear where all these objects are
destroyed

svn path=/branches/work/koffice-essen/; revision=1183433
parent 1f3b92ce
......@@ -29,6 +29,8 @@
/**
* Base class for registry objects.
*
* Registered objects are owned by the registry.
*
* Items are mapped by QString as a unique Id.
*
* Exemple of use:
......@@ -57,11 +59,14 @@ class KoGenericRegistry
{
public:
KoGenericRegistry() { }
virtual ~KoGenericRegistry() { }
virtual ~KoGenericRegistry() { m_hash.clear(); }
public:
/**
* add an object to the registry
* Add an object to the registry. If it is a QObject, make sure it isn't in the
* QObject ownership hierarchy, since the registry itself is responsbile for
* deleting it.
*
* @param item the item to add (NOTE: T must have an QString id() const function)
*/
void add(T item) {
......
......@@ -43,11 +43,11 @@ KisColorTransformationFilter::~KisColorTransformationFilter()
}
void KisColorTransformationFilter::process(KisConstProcessingInformation srcInfo,
KisProcessingInformation dstInfo,
const QSize& size,
const KisFilterConfiguration* config,
KoUpdater* progressUpdater
) const
KisProcessingInformation dstInfo,
const QSize& size,
const KisFilterConfiguration* config,
KoUpdater* progressUpdater
) const
{
const KisPaintDeviceSP src = srcInfo.paintDevice();
KisPaintDeviceSP dst = dstInfo.paintDevice();
......
......@@ -63,8 +63,8 @@ protected:
class KisRulerAssistantToolFactory : public KoToolFactoryBase
{
public:
KisRulerAssistantToolFactory(QObject *parent)
: KoToolFactoryBase(parent, "KisRulerAssistantTool") {
KisRulerAssistantToolFactory()
: KoToolFactoryBase("KisRulerAssistantTool") {
setToolTip(i18n("Ruler assistant editor tool"));
setToolType(TOOL_TYPE_VIEW);
setIcon("krita_tool_ruler_assistant");
......
......@@ -30,7 +30,7 @@ RulerAssistantToolPlugin::RulerAssistantToolPlugin(QObject *parent, const QVaria
: QObject(parent)
{
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisRulerAssistantToolFactory(r));
r->add(new KisRulerAssistantToolFactory());
KisPaintingAssistantFactoryRegistry::instance()->add(new RulerAssistantFactory);
}
......
......@@ -50,17 +50,17 @@ DefaultTools::DefaultTools(QObject *parent, const QVariantList &)
{
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolFillFactory(r, QStringList()));
r->add(new KisToolGradientFactory(r, QStringList()));
r->add(new KisToolBrushFactory(r, QStringList()));
r->add(new KisToolColorPickerFactory(r, QStringList()));
r->add(new KisToolLineFactory(r, QStringList()));
r->add(new KisToolEllipseFactory(r, QStringList()));
r->add(new KisToolRectangleFactory(r, QStringList()));
r->add(new KisToolMeasureFactory(r, QStringList()));
r->add(new KisToolPathFactory(r, QStringList()));
r->add(new KisToolMoveFactory(r, QStringList()));
r->add(new KisToolPanFactory(r, QStringList()));
r->add(new KisToolFillFactory( QStringList()));
r->add(new KisToolGradientFactory(QStringList()));
r->add(new KisToolBrushFactory(QStringList()));
r->add(new KisToolColorPickerFactory(QStringList()));
r->add(new KisToolLineFactory(QStringList()));
r->add(new KisToolEllipseFactory(QStringList()));
r->add(new KisToolRectangleFactory(QStringList()));
r->add(new KisToolMeasureFactory(QStringList()));
r->add(new KisToolPathFactory(QStringList()));
r->add(new KisToolMoveFactory(QStringList()));
r->add(new KisToolPanFactory(QStringList()));
}
DefaultTools::~DefaultTools()
......
......@@ -73,8 +73,8 @@ class KisToolBrushFactory : public KoToolFactoryBase
{
public:
KisToolBrushFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolBrush") {
KisToolBrushFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolBrush") {
setToolTip(i18n("Paint with brushes"));
......
......@@ -91,8 +91,8 @@ class KisToolColorPickerFactory : public KoToolFactoryBase
{
public:
KisToolColorPickerFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaSelected/KisToolColorPicker") {
KisToolColorPickerFactory(const QStringList&)
: KoToolFactoryBase("KritaSelected/KisToolColorPicker") {
setToolTip(i18n("Select a color from the image or current layer"));
setToolType(TOOL_TYPE_FILL);
setPriority(15);
......
......@@ -50,8 +50,8 @@ class KisToolEllipseFactory : public KoToolFactoryBase
{
public:
KisToolEllipseFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolEllipse") {
KisToolEllipseFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolEllipse") {
setToolTip(i18n("Draw an ellipse"));
setToolType(TOOL_TYPE_SHAPE);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -86,8 +86,8 @@ class KisToolFillFactory : public KoToolFactoryBase
{
public:
KisToolFillFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaFill/KisToolFill") {
KisToolFillFactory(const QStringList&)
: KoToolFactoryBase("KritaFill/KisToolFill") {
setToolTip(i18n("Fill a contiguous area of color with a color, or fill a selection."));
setToolType(TOOL_TYPE_FILL);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -118,8 +118,8 @@ class KisToolGradientFactory : public KoToolFactoryBase
{
public:
KisToolGradientFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaFill/KisToolGradient") {
KisToolGradientFactory(const QStringList&)
: KoToolFactoryBase("KritaFill/KisToolGradient") {
setToolTip(i18n("Draw a gradient."));
setToolType(TOOL_TYPE_FILL);
setIcon("krita_tool_gradient");
......
......@@ -74,8 +74,8 @@ class KisToolLineFactory : public KoToolFactoryBase
public:
KisToolLineFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolLine") {
KisToolLineFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolLine") {
setToolTip(i18n("Draw a straight line with the current brush"));
// Temporarily
setToolType(TOOL_TYPE_SHAPE);
......
......@@ -105,8 +105,8 @@ class KisToolMeasureFactory : public KoToolFactoryBase
public:
KisToolMeasureFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolMeasure") {
KisToolMeasureFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolMeasure") {
setToolType(TOOL_TYPE_TRANSFORM);
setToolTip(i18n("Measure the distance between two points"));
setIcon("krita_tool_measure");
......
......@@ -87,8 +87,8 @@ class KisToolMoveFactory : public KoToolFactoryBase
{
public:
KisToolMoveFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaTransform/KisToolMove") {
KisToolMoveFactory(const QStringList&)
: KoToolFactoryBase("KritaTransform/KisToolMove") {
setToolTip(i18n("Move a layer"));
setToolType(TOOL_TYPE_TRANSFORM);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -69,8 +69,8 @@ class KisToolPanFactory : public KoToolFactoryBase
{
public:
KisToolPanFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, KoPanTool_ID) {
KisToolPanFactory(const QStringList&)
: KoToolFactoryBase(KoPanTool_ID) {
setToolTip(i18n("Move and rotate your canvas"));
setToolType(navigationToolType());
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID_ALWAYS_ACTIVE);
......
......@@ -70,8 +70,8 @@ class KisToolPathFactory : public KoToolFactoryBase
{
public:
KisToolPathFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolPath") {
KisToolPathFactory(const QStringList&)
: KoToolFactoryBase("KisToolPath") {
setToolTip(i18n("Draw a path."));
setToolType(TOOL_TYPE_SHAPE);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -56,8 +56,8 @@ class KisToolRectangleFactory : public KoToolFactoryBase
{
public:
KisToolRectangleFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolRectangle") {
KisToolRectangleFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolRectangle") {
setToolTip(i18n("Draw a rectangle"));
setToolType(TOOL_TYPE_SHAPE);
......
......@@ -69,8 +69,8 @@ class KisToolSelectBrushFactory : public KoToolFactoryBase
{
public:
KisToolSelectBrushFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectBrush") {
KisToolSelectBrushFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectBrush") {
setToolTip(i18n("Select by brush"));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -57,8 +57,8 @@ class KisToolSelectContiguousFactory : public KoToolFactoryBase
{
public:
KisToolSelectContiguousFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectContiguous") {
KisToolSelectContiguousFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectContiguous") {
setToolTip(i18n("Select a contiguous area of colors"));
setToolType(TOOL_TYPE_SELECTED);
setIcon("tool_contiguous_selection");
......
......@@ -33,7 +33,6 @@
#include <KoShapeController.h>
#include <KoPathShape.h>
#include <KoShapeRegistry.h>
#include <KoShapeFactoryBase.h>
#include <KoColorSpace.h>
#include <KoCompositeOp.h>
......
......@@ -64,8 +64,8 @@ class KisToolSelectEllipticalFactory : public KoToolFactoryBase
{
public:
KisToolSelectEllipticalFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectElliptical") {
KisToolSelectEllipticalFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectElliptical") {
setToolTip(i18n("Select an elliptical area"));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -121,8 +121,8 @@ class KisToolSelectMagneticFactory : public KoToolFactoryBase
{
public:
KisToolSelectMagneticFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectMagnetic") {
KisToolSelectMagneticFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectMagnetic") {
setToolTip(i18n("Magnetic selection tool"));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -61,8 +61,8 @@ class KisToolSelectOutlineFactory : public KoToolFactoryBase
{
public:
KisToolSelectOutlineFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectOutline") {
KisToolSelectOutlineFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectOutline") {
setToolTip(i18n("Select an area by its outline"));
setToolType(TOOL_TYPE_SELECTED);
setIcon("tool_outline_selection");
......
......@@ -69,8 +69,8 @@ class KisToolSelectPathFactory : public KoToolFactoryBase
{
public:
KisToolSelectPathFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectPath") {
KisToolSelectPathFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectPath") {
setToolTip(i18n("Select an area of the image with path."));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -65,8 +65,8 @@ class KisToolSelectPolygonalFactory : public KoToolFactoryBase
{
public:
KisToolSelectPolygonalFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectPolygonal") {
KisToolSelectPolygonalFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectPolygonal") {
setToolTip(i18n("Select a polygonal region"));
setToolType(TOOL_TYPE_SELECTED);
setIcon("tool_polygonal_selection");
......
......@@ -62,8 +62,8 @@ class KisToolSelectRectangularFactory : public KoToolFactoryBase
{
public:
KisToolSelectRectangularFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectRectangular") {
KisToolSelectRectangularFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectRectangular") {
setToolTip(i18n("Select a rectangular area"));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -57,8 +57,8 @@ class KisToolSelectSimilarFactory : public KoToolFactoryBase
{
public:
KisToolSelectSimilarFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolSelectSimilar") {
KisToolSelectSimilarFactory(const QStringList&)
: KoToolFactoryBase("KisToolSelectSimilar") {
setToolTip(i18n("Select similar colors"));
setToolType(TOOL_TYPE_SELECTED);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -50,15 +50,15 @@ SelectionTools::SelectionTools(QObject *parent, const QVariantList &)
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolSelectOutlineFactory(r, QStringList()));
r->add(new KisToolSelectPolygonalFactory(r, QStringList()));
r->add(new KisToolSelectRectangularFactory(r, QStringList()));
r->add(new KisToolSelectEllipticalFactory(r, QStringList()));
r->add(new KisToolSelectContiguousFactory(r, QStringList()));
r->add(new KisToolSelectPathFactory(r, QStringList()));
r->add(new KisToolSelectSimilarFactory(r, QStringList()));
r->add(new KisToolSelectBrushFactory(r, QStringList()));
// r->add(new KisToolSelectMagneticFactory(r, QStringList()));
r->add(new KisToolSelectOutlineFactory(QStringList()));
r->add(new KisToolSelectPolygonalFactory(QStringList()));
r->add(new KisToolSelectRectangularFactory(QStringList()));
r->add(new KisToolSelectEllipticalFactory(QStringList()));
r->add(new KisToolSelectContiguousFactory(QStringList()));
r->add(new KisToolSelectPathFactory(QStringList()));
r->add(new KisToolSelectSimilarFactory(QStringList()));
r->add(new KisToolSelectBrushFactory(QStringList()));
// r->add(new KisToolSelectMagneticFactory(QStringList()));
}
SelectionTools::~SelectionTools()
......
......@@ -142,8 +142,8 @@ class KisToolCropFactory : public KoToolFactoryBase
{
public:
KisToolCropFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolCrop") {
KisToolCropFactory(const QStringList&)
: KoToolFactoryBase("KisToolCrop") {
setToolTip(i18n("Crop the image to an area"));
setToolType(TOOL_TYPE_TRANSFORM);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -48,7 +48,7 @@ ToolCrop::ToolCrop(QObject *parent, const QVariantList &)
//setComponentData(ToolCropFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolCropFactory(r, QStringList()));
r->add(new KisToolCropFactory(QStringList()));
}
......
......@@ -45,8 +45,8 @@ class KisToolBezierPaintFactory : public KoToolFactoryBase
{
public:
KisToolBezierPaintFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolBezierPaint") {
KisToolBezierPaintFactory, const QStringList&)
: KoToolFactoryBase("KisToolBezierPaint") {
setToolTip(i18n("Draw cubic Beziers. Keep Alt, Control or Shift pressed for options. Return or double-click to finish."));
setToolType(TOOL_TYPE_SHAPE);
setPriority(7);
......
......@@ -54,8 +54,8 @@ class KisToolBezierSelectFactory : public KoToolFactoryBase
{
public:
KisToolBezierSelectFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolBezierSelect") {
KisToolBezierSelectFactory(const QStringList&)
: KoToolFactoryBase("KisToolBezierSelect") {
setToolTip(i18n("Select an area of the image with curves"));
setToolType(TOOL_TYPE_SELECTED);
setPriority(0);
......
......@@ -49,7 +49,7 @@ class KisToolExampleFactory : public KoToolFactoryBase
public:
KisToolExampleFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolExample") {
: KoToolFactoryBase("KisToolExample") {
setToolTip(i18n("Example tool for the curves framework"));
setToolType(TOOL_TYPE_SHAPE);
setIcon("tool-example");
......
......@@ -88,8 +88,8 @@ class KisToolMagneticFactory : public KoToolFactoryBase
{
public:
KisToolMagneticFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolMagnetic") {
KisToolMagneticFactory(const QStringList&)
: KoToolFactoryBase("KisToolMagnetic") {
setToolTip(i18n("Magnetic Selection: move around an edge to select it. Hit Ctrl to enter/quit manual mode, and double click to finish."));
setToolType(TOOL_TYPE_SELECTED);
setIcon("tool_moutline");
......
......@@ -161,8 +161,8 @@ class KisToolDynaFactory : public KoToolFactoryBase
{
public:
KisToolDynaFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KritaShape/KisToolDyna") {
KisToolDynaFactory(const QStringList&)
: KoToolFactoryBase("KritaShape/KisToolDyna") {
setToolTip(i18n("Paint with brushes using dynamic movements"));
......
......@@ -51,7 +51,7 @@ ToolDyna::ToolDyna(QObject *parent, const QVariantList &)
//setComponentData(ToolDynaFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolDynaFactory(r, QStringList()));
r->add(new KisToolDynaFactory(QStringList()));
}
ToolDyna::~ToolDyna()
......
......@@ -62,8 +62,8 @@ class KisToolGridFactory : public KoToolFactoryBase
{
public:
KisToolGridFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolGrid") {
KisToolGridFactory(const QStringList&)
: KoToolFactoryBase("KisToolGrid") {
setToolTip(i18n("Edit the grid"));
setToolType(TOOL_TYPE_VIEW);
setIcon("krita_tool_grid");
......
......@@ -45,7 +45,7 @@ GridPlugin::GridPlugin(QObject *parent, const QVariantList &)
//setComponentData(GridFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolGridFactory(r, QStringList()));
r->add(new KisToolGridFactory(QStringList()));
}
GridPlugin::~GridPlugin()
......
......@@ -89,8 +89,8 @@ class KisToolPerspectiveGridFactory : public KoToolFactoryBase
{
public:
KisToolPerspectiveGridFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolPerspectiveGrid") {
KisToolPerspectiveGridFactory(const QStringList&)
: KoToolFactoryBase("KisToolPerspectiveGrid") {
setToolTip(i18n("Edit the perspective grid"));
setToolType(TOOL_TYPE_VIEW);
setIcon("tool_perspectivegrid");
......
......@@ -48,7 +48,7 @@ ToolPerspectiveGrid::ToolPerspectiveGrid(QObject *parent, const QVariantList &)
//setComponentData(ToolPerspectiveGridFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolPerspectiveGridFactory(r, QStringList()));
r->add(new KisToolPerspectiveGridFactory(QStringList()));
}
ToolPerspectiveGrid::~ToolPerspectiveGrid()
......
......@@ -45,8 +45,8 @@ class KisToolPolygonFactory : public KoToolFactoryBase
{
public:
KisToolPolygonFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolPolygon") {
KisToolPolygonFactory(const QStringList&)
: KoToolFactoryBase("KisToolPolygon") {
setToolTip(i18n("Draw a polygon. Shift-mouseclick ends the polygon."));
setToolType(TOOL_TYPE_SHAPE);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -49,7 +49,7 @@ ToolPolygon::ToolPolygon(QObject *parent, const QVariantList &)
//setComponentData(ToolPolygonFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolPolygonFactory(r, QStringList()));
r->add(new KisToolPolygonFactory(QStringList()));
}
ToolPolygon::~ToolPolygon()
......
......@@ -26,9 +26,6 @@
#include "kis_tool_polyline_base.h"
//#include "flake/kis_node_shape.h"
class KisToolPolyline : public KisToolPolylineBase
{
......@@ -49,8 +46,8 @@ class KisToolPolylineFactory : public KoToolFactoryBase
{
public:
KisToolPolylineFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolPolyline") {
KisToolPolylineFactory(const QStringList&)
: KoToolFactoryBase("KisToolPolyline") {
setToolTip(i18n("Draw a polyline. Shift-mouseclick ends the polyline."));
setToolType(TOOL_TYPE_SHAPE);
setActivationShapeId(KRITA_TOOL_ACTIVATION_ID);
......
......@@ -49,7 +49,7 @@ ToolPolyline::ToolPolyline(QObject *parent, const QVariantList &)
//setComponentData(ToolPolylineFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolPolylineFactory(r, QStringList()));
r->add(new KisToolPolylineFactory(QStringList()));
}
......
......@@ -69,8 +69,8 @@ class KisToolStarFactory : public KoToolFactoryBase
{
public:
KisToolStarFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolStar") {
KisToolStarFactory(const QStringList&)
: KoToolFactoryBase("KisToolStar") {
setToolTip(i18n("Draw a star with the current brush"));
setToolType(TOOL_TYPE_SHAPE);
setPriority(6);
......
......@@ -50,7 +50,7 @@ ToolStar::ToolStar(QObject *parent, const QVariantList &)
//setComponentData(ToolStarFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolStarFactory(r, QStringList()));
r->add(new KisToolStarFactory(QStringList()));
}
......
......@@ -424,8 +424,8 @@ class KisToolTransformFactory : public KoToolFactoryBase
{
public:
KisToolTransformFactory(QObject *parent, const QStringList&)
: KoToolFactoryBase(parent, "KisToolTransform") {
KisToolTransformFactory(const QStringList&)
: KoToolFactoryBase("KisToolTransform") {
setToolTip(i18n("Transform a layer or a selection"));
setToolType(TOOL_TYPE_TRANSFORM);
setIcon("krita_tool_transform");
......
......@@ -47,7 +47,7 @@ ToolTransform::ToolTransform(QObject *parent, const QVariantList &)
//setComponentData(ToolTransformFactory::componentData());
KoToolRegistry * r = KoToolRegistry::instance();
r->add(new KisToolTransformFactory(r, QStringList()));
r->add(new KisToolTransformFactory(QStringList()));
}
......
......@@ -386,8 +386,8 @@ KoShapeManager* KisShapeSelection::shapeManager() const
return m_canvas->shapeManager();
}
KisShapeSelectionFactory::KisShapeSelectionFactory(QObject* parent)
: KoShapeFactoryBase(parent, "KisShapeSelection", "selection shape container")
KisShapeSelectionFactory::KisShapeSelectionFactory()
: KoShapeFactoryBase("KisShapeSelection", "selection shape container")
{
setHidden(true);
}
......@@ -413,4 +413,3 @@ void KisShapeSelection::moveY(qint32 y)
}