Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 936d41e9 authored by Boudewijn Rempt's avatar Boudewijn Rempt

BUG:110303. Fix the open-two-windows-close-the-first-change-a-tool crash.

svn path=/trunk/koffice/; revision=443810
parent ec081da9
......@@ -26,7 +26,6 @@ KisColorSpaceRegistry *KisColorSpaceRegistry::m_singleton = 0;
KisColorSpaceRegistry::KisColorSpaceRegistry()
{
kdDebug(DBG_AREA_REGISTRY) << " creating a KisColorSpaceRegistry" << endl;
Q_ASSERT(KisColorSpaceRegistry::m_singleton == 0);
KisColorSpaceRegistry::m_singleton = this;
}
......
......@@ -113,8 +113,6 @@ void KisFilterManager::setup(KActionCollection * ac)
for ( KisIDList::Iterator it = m_filterList.begin(); it != m_filterList.end(); ++it ) {
f = KisFilterRegistry::instance()->get(*it);
kdDebug() << "filter loaded: " << f->id().name() << ", mapping to: " << f->menuCategory() << ", " << f->menuEntry() << "\n";
if (!f) break;
// Create action
......
......@@ -33,7 +33,6 @@ KisFilterRegistry *KisFilterRegistry::m_singleton = 0;
KisFilterRegistry::KisFilterRegistry()
{
kdDebug(DBG_AREA_REGISTRY) << "Creating KisFilterRegistry" << endl;
Q_ASSERT(KisFilterRegistry::m_singleton == 0);
KisFilterRegistry::m_singleton = this;
}
......
......@@ -31,6 +31,8 @@ KisToolManager::KisToolManager(KisCanvasSubject * parent, KisCanvasControllerInt
: m_subject(parent),
m_controller(controller)
{
kdDebug() << "Toolmanager " << this << "created for canvassubject: " << parent << "\n";
m_toolBox = 0;
m_oldTool = 0;
m_dummyTool = 0;
......@@ -45,29 +47,28 @@ KisToolManager::~KisToolManager()
void KisToolManager::setUp(KisToolBox * toolbox, KoPaletteManager * paletteManager, KActionCollection * actionCollection)
{
kdDebug() << "Toolmanager " << this << " setup. Toolbox: " << toolbox << ", palettemanager: " << paletteManager << ", actioncollection: " << actionCollection << "\n";
m_toolBox = toolbox;
m_paletteManager = paletteManager;
m_actionCollection = actionCollection;
// Dummy tool for when the layer is locked or invisible
if (!m_dummyTool)
m_dummyTool = KisToolDummyFactory(actionCollection).createTool();
m_dummyTool = KisToolDummyFactory().createTool(actionCollection);
m_inputDeviceToolSetMap[INPUT_DEVICE_MOUSE] = KisToolRegistry::instance() -> createTools(m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_STYLUS] = KisToolRegistry::instance() -> createTools(m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_ERASER] = KisToolRegistry::instance() -> createTools(m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_PUCK] = KisToolRegistry::instance() -> createTools(m_subject);
KisIDList keys = KisToolRegistry::instance()->listKeys();
for ( KisIDList::Iterator it = keys.begin(); it != keys.end(); ++it ) {
KisTool * t = KisToolRegistry::instance()->get(*it)->createTool();
m_inputDeviceToolSetMap[INPUT_DEVICE_MOUSE] = KisToolRegistry::instance() -> createTools(actionCollection, m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_STYLUS] = KisToolRegistry::instance() -> createTools(actionCollection, m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_ERASER] = KisToolRegistry::instance() -> createTools(actionCollection, m_subject);
m_inputDeviceToolSetMap[INPUT_DEVICE_PUCK] = KisToolRegistry::instance() -> createTools(actionCollection, m_subject);
vKisTool tools = m_inputDeviceToolSetMap[INPUT_DEVICE_MOUSE];
for (vKisTool_it it = tools.begin(); it != tools.end(); it++) {
KisTool * t = *it;
if (!t) continue;
toolbox->registerTool( t->action(), t->toolType(), t->priority() );
delete(t); // These tools share their action, and the action for this tool has already been created.
}
toolbox->setupTools();
setCurrentTool(findTool("tool_brush"));
......@@ -98,7 +99,7 @@ void KisToolManager::updateGUI()
m_oldTool = currentTool();
// Set the dummy tool
if (!m_dummyTool) {
m_dummyTool = KisToolDummyFactory(m_actionCollection).createTool();
m_dummyTool = KisToolDummyFactory().createTool(m_actionCollection);
}
setCurrentTool(m_dummyTool);
}
......
......@@ -2618,8 +2618,9 @@ void KisView::detach(KisCanvasObserver *observer)
void KisView::notify()
{
for (vKisCanvasObserver_it it = m_observers.begin(); it != m_observers.end(); it++)
for (vKisCanvasObserver_it it = m_observers.begin(); it != m_observers.end(); it++) {
(*it) -> update(this);
}
}
KisImageSP KisView::currentImg() const
......
......@@ -98,6 +98,5 @@ QPixmap KisPaintOpRegistry::getPixmap(const KisID & id) const
QString fname = KisFactory::global()->dirs()->findResource("kis_images", pname);
kdDebug(DBG_AREA_REGISTRY) << "Found pixmap " << fname << " for " << id.id() << "\n";
return QPixmap(fname);
}
......@@ -61,13 +61,13 @@ private:
class KisToolDummyFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolDummyFactory(KActionCollection * ac) : super(ac) {};
virtual ~KisToolDummyFactory(){};
KisToolDummyFactory() : super() {};
virtual ~KisToolDummyFactory() {};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolDummy();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("dummy", i18n("Dummy tool")); }
......
......@@ -29,15 +29,12 @@ class KisToolFactory : public KShared
{
public:
KisToolFactory(KActionCollection * ac) {m_ac = ac;}
KisToolFactory() {}
virtual ~KisToolFactory() {};
virtual KisTool * createTool() = 0;
virtual KisTool * createTool(KActionCollection * ac) = 0;
virtual KisID id() { return KisID("Abstract Tool", i18n("Abstract Tool")); }
protected:
KActionCollection * m_ac;
};
#endif // KIS_TOOL_FACTORY_H_
......
......@@ -49,7 +49,7 @@ KisToolRegistry* KisToolRegistry::instance()
vKisTool KisToolRegistry::createTools(KisCanvasSubject *subject) const
vKisTool KisToolRegistry::createTools(KActionCollection * ac, KisCanvasSubject *subject) const
{
Q_ASSERT(subject);
......@@ -61,7 +61,7 @@ vKisTool KisToolRegistry::createTools(KisCanvasSubject *subject) const
{
KisToolFactorySP f = get(*it);
KisTool * tool = f -> createTool();
KisTool * tool = f -> createTool(ac);
subject -> attach(tool);
tools.push_back(tool);
}
......@@ -71,9 +71,10 @@ vKisTool KisToolRegistry::createTools(KisCanvasSubject *subject) const
return tools;
}
KisTool * KisToolRegistry::createTool(KisCanvasSubject * subject, KisID & id) const
KisTool * KisToolRegistry::createTool(KActionCollection * ac, KisCanvasSubject * subject, KisID & id) const
{
KisToolFactorySP f = get(id);
KisTool * t = f -> createTool();
KisTool * t = f -> createTool(ac);
subject->attach(t);
return t;
}
......@@ -39,8 +39,8 @@ public:
static KisToolRegistry* instance();
vKisTool createTools(KisCanvasSubject *subject) const;
KisTool * createTool(KisCanvasSubject * subject, KisID & id) const;
vKisTool createTools(KActionCollection * ac, KisCanvasSubject *subject) const;
KisTool * createTool(KActionCollection * ac, KisCanvasSubject * subject, KisID & id) const;
private:
KisToolRegistry();
......
......@@ -96,8 +96,6 @@ void KoPaletteManager::addWidget(QWidget * widget,
enumKoPaletteStyle style)
{
kdDebug() << "Adding widget " << name << "\n";
Q_ASSERT(widget);
if (!widget) return;
......@@ -160,7 +158,6 @@ void KoPaletteManager::slotReset()
QWidget * w = m_widgets->find(widgetName);
if (!w) {
kdDebug() << "Not found: " << widgetName << "\n";
continue;
}
QString paletteName = *m_defaultMapping->find(widgetName);
......@@ -198,8 +195,6 @@ void KoPaletteManager::showWidget(const QString & name)
void KoPaletteManager::removeWidget(const QString & name)
{
kdDebug() << "Removing widget: " << name << "\n";
QString palette = *(m_currentMapping->find(name));
if (palette.isNull()) return;
......@@ -217,7 +212,6 @@ void KoPaletteManager::removeWidget(const QString & name)
m_viewActionMenu->remove(a);
m_actionCollection->remove(a);
kdDebug() << "Done removing widget " << name << "\n";
}
......@@ -250,12 +244,13 @@ void KoPaletteManager::save()
int i = p->indexOf(w);
#if 0
kdDebug() << "Saving: " << paletteName
<< " pos: " << p->place() << "," << p->x() << "," << p->y() << "," << p->width() << "," << p->height()
<< ", widgetName " << widgetName
<< ", index " << i
<< ", hidden: " << hidden << "\n";
#endif
palettes.append(widgetName + ","
+ paletteName + ","
+ p->place() + ","
......
......@@ -67,7 +67,7 @@ ColorRange::ColorRange(QObject *parent, const char *name, const QStringList &)
if ( parent->inherits("KisFactory") )
{
KisToolRegistry::instance() -> add(new KisToolSelectSimilarFactory(actionCollection()));
KisToolRegistry::instance() -> add(new KisToolSelectSimilarFactory());
m_view = 0;
} else if (parent -> inherits("KisView")) {
......
......@@ -83,13 +83,13 @@ private slots:
class KisToolSelectSimilarFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectSimilarFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectSimilarFactory() : super() {};
virtual ~KisToolSelectSimilarFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectSimilar();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("selectsimilar", i18n("Select similar")); }
......
......@@ -31,7 +31,7 @@ KisBrushChooser::KisBrushChooser(QWidget *parent, const char *name)
: super(parent, name)
{
m_lbSpacing = new QLabel(i18n("Spacing: "), this);
m_slSpacing = new KisDoubleWidget(0.01, 10, this, "double_widget");
m_slSpacing = new KisDoubleWidget(0.3, 10, this, "double_widget");
m_slSpacing -> setTickmarks(QSlider::Below);
m_slSpacing -> setTickInterval(1);
QObject::connect(m_slSpacing, SIGNAL(valueChanged(double)), this, SLOT(slotSetItemSpacing(double)));
......
......@@ -65,13 +65,13 @@ private:
class KisToolSelectBrushFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectBrushFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectBrushFactory() : super() {};
virtual ~KisToolSelectBrushFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectBrush();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("brushselect", i18n("Brush select tool")); }
......
......@@ -78,13 +78,13 @@ private:
class KisToolSelectContiguousFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectContiguousFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectContiguousFactory() : super() {};
virtual ~KisToolSelectContiguousFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectContiguous();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("contiguousselect", i18n("Contiguous select tool")); }
......
......@@ -78,13 +78,13 @@ private:
class KisToolSelectEllipticalFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectEllipticalFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectEllipticalFactory() : super() {};
virtual ~KisToolSelectEllipticalFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectElliptical();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("ellipticalselect", i18n("Elliptical select tool")); }
......
......@@ -62,13 +62,13 @@ private:
class KisToolSelectEraserFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectEraserFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectEraserFactory() : super() {};
virtual ~KisToolSelectEraserFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectEraser();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("eraserselect", i18n("Eraser select tool")); }
......
......@@ -92,13 +92,13 @@ private:
class KisToolSelectOutlineFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectOutlineFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectOutlineFactory() : super() {};
virtual ~KisToolSelectOutlineFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectOutline();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("selectoutline", i18n("Select Outline tool")); }
......
......@@ -90,13 +90,13 @@ private:
class KisToolSelectPolygonalFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectPolygonalFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectPolygonalFactory() : super() {};
virtual ~KisToolSelectPolygonalFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectPolygonal();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("polygonalselect", i18n("Polygonal select tool")); }
......
......@@ -78,12 +78,12 @@ private:
class KisToolSelectRectangularFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolSelectRectangularFactory(KActionCollection * ac) : super(ac) {};
KisToolSelectRectangularFactory() : super() {};
virtual ~KisToolSelectRectangularFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolSelectRectangular();
t -> setup(m_ac);
t -> setup(ac);
Q_CHECK_PTR(t);
return t;
}
......
......@@ -65,13 +65,13 @@ SelectionTools::SelectionTools(QObject *parent, const char *name, const QStringL
if ( parent->inherits("KisFactory") )
{
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolSelectOutlineFactory( actionCollection() ));
r -> add(new KisToolSelectPolygonalFactory( actionCollection() ));
r -> add(new KisToolSelectRectangularFactory( actionCollection() ));
r -> add(new KisToolSelectBrushFactory( actionCollection() ));
r -> add(new KisToolSelectContiguousFactory( actionCollection() ));
r -> add(new KisToolSelectEllipticalFactory( actionCollection() ));
r -> add(new KisToolSelectEraserFactory( actionCollection() ));
r -> add(new KisToolSelectOutlineFactory());
r -> add(new KisToolSelectPolygonalFactory());
r -> add(new KisToolSelectRectangularFactory());
r -> add(new KisToolSelectBrushFactory());
r -> add(new KisToolSelectContiguousFactory());
r -> add(new KisToolSelectEllipticalFactory());
r -> add(new KisToolSelectEraserFactory());
}
}
......
......@@ -120,13 +120,13 @@ private:
class KisToolCropFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolCropFactory(KActionCollection * ac ) : super(ac) {};
KisToolCropFactory() : super() {};
virtual ~KisToolCropFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolCrop();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("crop", i18n("Crop tool")); }
......
......@@ -59,7 +59,7 @@ ToolCrop::ToolCrop(QObject *parent, const char *name, const QStringList &)
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolCropFactory(actionCollection()));
r -> add(new KisToolCropFactory());
}
}
......
......@@ -64,13 +64,13 @@ private:
class KisToolFilterFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolFilterFactory(KActionCollection * ac) : super( ac ) {};
KisToolFilterFactory() : super() {};
virtual ~KisToolFilterFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolFilter();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("filter", i18n("Filter tool")); }
......
......@@ -63,7 +63,7 @@ ToolFilter::ToolFilter(QObject *parent, const char *name, const QStringList &)
pr -> add( new KisFilterOpFactory );
KisToolRegistry * tr = KisToolRegistry::instance();
tr -> add( new KisToolFilterFactory( actionCollection() ) );
tr -> add( new KisToolFilterFactory());
}
}
......
......@@ -80,13 +80,13 @@ private:
class KisToolPolygonFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolPolygonFactory(KActionCollection * ac) : super(ac) {};
KisToolPolygonFactory() : super() {};
virtual ~KisToolPolygonFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolPolygon();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("polygon", i18n("Polygon tool")); }
......
......@@ -60,7 +60,7 @@ ToolPolygon::ToolPolygon(QObject *parent, const char *name, const QStringList &)
{
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolPolygonFactory(actionCollection()));
r -> add(new KisToolPolygonFactory());
}
}
......
......@@ -83,13 +83,13 @@ private:
class KisToolPolylineFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolPolylineFactory(KActionCollection * ac) : super(ac) {};
KisToolPolylineFactory() : super() {};
virtual ~KisToolPolylineFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolPolyline();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("polyline", i18n("Polyline tool")); }
......
......@@ -59,7 +59,7 @@ ToolPolyline::ToolPolyline(QObject *parent, const char *name, const QStringList
{
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolPolylineFactory(actionCollection()));
r -> add(new KisToolPolylineFactory());
}
}
......
......@@ -86,13 +86,13 @@ private:
class KisToolStarFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolStarFactory(KActionCollection * ac) : super(ac) {};
KisToolStarFactory() : super() {};
virtual ~KisToolStarFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolStar();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("starshape", i18n("Star tool")); }
......
......@@ -58,7 +58,7 @@ ToolStar::ToolStar(QObject *parent, const char *name, const QStringList &)
{
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolStarFactory(actionCollection()));
r -> add(new KisToolStarFactory());
}
}
......
......@@ -114,13 +114,13 @@ private:
class KisToolTransformFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolTransformFactory(KActionCollection * ac ) : super(ac) {};
KisToolTransformFactory() : super() {};
virtual ~KisToolTransformFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolTransform();
Q_CHECK_PTR(t);
t -> setup(m_ac); return t;
t -> setup(ac); return t;
}
virtual KisID id() { return KisID("transform", i18n("Transform tool")); }
};
......
......@@ -60,7 +60,7 @@ ToolTransform::ToolTransform(QObject *parent, const char *name, const QStringLis
KisView * view = dynamic_cast<KisView *>(parent);
KisToolRegistry * r = KisToolRegistry::instance();
KisToolTransformFactory * f = new KisToolTransformFactory(actionCollection());
KisToolTransformFactory * f = new KisToolTransformFactory();
Q_CHECK_PTR(f);
r -> add(f);
}
......
......@@ -72,18 +72,18 @@ DefaultTools::DefaultTools(QObject *parent, const char *name, const QStringList
{
KisToolRegistry * r = KisToolRegistry::instance();
r -> add(new KisToolFillFactory( actionCollection() ));
r -> add(new KisToolGradientFactory( actionCollection() ));
r -> add(new KisToolBrushFactory( actionCollection() ));
r -> add(new KisToolColorPickerFactory( actionCollection() ));
r -> add(new KisToolLineFactory( actionCollection() ));
r -> add(new KisToolTextFactory( actionCollection() ));
r -> add(new KisToolDuplicateFactory( actionCollection() ));
r -> add(new KisToolMoveFactory( actionCollection() ));
r -> add(new KisToolZoomFactory( actionCollection() ));
r -> add(new KisToolEllipseFactory( actionCollection() ));
r -> add(new KisToolRectangleFactory( actionCollection() ));
r -> add(new KisToolPanFactory( actionCollection() ));
r -> add(new KisToolFillFactory());
r -> add(new KisToolGradientFactory());
r -> add(new KisToolBrushFactory());
r -> add(new KisToolColorPickerFactory());
r -> add(new KisToolLineFactory());
r -> add(new KisToolTextFactory());
r -> add(new KisToolDuplicateFactory());
r -> add(new KisToolMoveFactory());
r -> add(new KisToolZoomFactory());
r -> add(new KisToolEllipseFactory());
r -> add(new KisToolRectangleFactory());
r -> add(new KisToolPanFactory());
}
}
......
......@@ -59,13 +59,13 @@ private:
class KisToolBrushFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolBrushFactory(KActionCollection * ac) : super(ac) {};
KisToolBrushFactory() : super() {};
virtual ~KisToolBrushFactory(){};
virtual KisTool * createTool() {
virtual KisTool * createTool(KActionCollection * ac) {
KisTool * t = new KisToolBrush();
Q_CHECK_PTR(t);
t -> setup(m_ac);
t -> setup(ac);
return t;
}
virtual KisID id() { return KisID("brush", i18n("Brush tool")); }
......
......@@ -63,13 +63,13 @@ private:
class KisToolColorPickerFactory : public KisToolFactory {
typedef KisToolFactory super;
public:
KisToolColorPickerFactory(KActionCollection * ac) : super(ac) {};
KisToolColorPickerFactory() : super() {};