Commit 70225abc authored by Thomas Zander's avatar Thomas Zander

Rename KoShapeFactory => KoShapeFactoryBase

svn path=/trunk/koffice/; revision=1081943
parent 61e4be2a
......@@ -2390,7 +2390,7 @@ by KisSelection to update it's projection.
</UML:Operation>
</UML:Classifier.feature>
</UML:Class>
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="C2g8muGQV3iq" isRoot="false" isAbstract="false" name="KoShapeFactory" />
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="C2g8muGQV3iq" isRoot="false" isAbstract="false" name="KoShapeFactoryBase" />
<UML:Generalization isSpecification="false" child="X35qhkisJS2i" visibility="public" namespace="Logical View" xmi.id="aFHb6BndCsRu" parent="C2g8muGQV3iq" discriminator="" name="" />
<UML:Class isSpecification="false" isLeaf="false" visibility="public" namespace="Logical View" xmi.id="3oHiUfJ80Tv2" isRoot="false" isAbstract="false" name="KoShape" />
<UML:Generalization isSpecification="false" child="AseGHQAA0TFB" visibility="public" namespace="Logical View" xmi.id="lYmf8ikGY0v2" parent="Aa7JHUMqlF0g" discriminator="" name="" />
......
......@@ -33,7 +33,7 @@
#include <KoShapeController.h>
#include <KoPathShape.h>
#include <KoShapeRegistry.h>
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
#include <KoColorSpace.h>
#include <KoCompositeOp.h>
......
......@@ -96,7 +96,7 @@ void KisToolSelectRectangular::LokalTool::finishRect(const QRectF& rect)
QRectF documentRect = convertToPt(rect);
KoShape* shape;
KoShapeFactory *rectFactory = KoShapeRegistry::instance()->value("RectangleShape");
KoShapeFactoryBase *rectFactory = KoShapeRegistry::instance()->value("RectangleShape");
if (rectFactory) {
shape = rectFactory->createDefaultShape();
shape->setSize(documentRect.size());
......
......@@ -41,7 +41,7 @@ KritaShapePlugin::KritaShapePlugin(QObject * parent, const QVariantList &)
KritaShapeFactory::KritaShapeFactory(QObject* parent)
: KoShapeFactory(parent, KritaShapeId, i18n("KritaShape Shape"))
: KoShapeFactoryBase(parent, KritaShapeId, i18n("KritaShape Shape"))
{
setToolTip(i18n("A color managed, multi-layer raster image"));
setIcon("kritashape");
......
......@@ -21,7 +21,7 @@
#include <QVariant>
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
class KoShape;
......@@ -36,7 +36,7 @@ public:
};
class KritaShapeFactory : public KoShapeFactory
class KritaShapeFactory : public KoShapeFactoryBase
{
Q_OBJECT
public:
......
......@@ -370,7 +370,7 @@ KoShapeManager* KisShapeSelection::shapeManager() const
}
KisShapeSelectionFactory::KisShapeSelectionFactory(QObject* parent)
: KoShapeFactory(parent, "KisShapeSelection", "selection shape container")
: KoShapeFactoryBase(parent, "KisShapeSelection", "selection shape container")
{
setHidden(true);
}
......
......@@ -19,7 +19,7 @@
#define KIS_SHAPE_SELECTION_H
#include <KoShapeLayer.h>
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
#include <kis_selection_component.h>
#include <kis_types.h>
......@@ -82,7 +82,7 @@ private:
};
class KRITAUI_EXPORT KisShapeSelectionFactory : public KoShapeFactory
class KRITAUI_EXPORT KisShapeSelectionFactory : public KoShapeFactoryBase
{
Q_OBJECT
public:
......
......@@ -25,7 +25,7 @@
KoShape* KisShapeToolHelper::createRectangleShape(const QRectF& rect)
{
KoShape* shape;
KoShapeFactory *rectFactory = KoShapeRegistry::instance()->value("RectangleShape");
KoShapeFactoryBase *rectFactory = KoShapeRegistry::instance()->value("RectangleShape");
if (rectFactory) {
shape = rectFactory->createDefaultShape();
shape->setSize(rect.size());
......@@ -48,7 +48,7 @@ KoShape* KisShapeToolHelper::createRectangleShape(const QRectF& rect)
KoShape* KisShapeToolHelper::createEllipseShape(const QRectF& rect)
{
KoShape* shape;
KoShapeFactory *rectFactory = KoShapeRegistry::instance()->value("EllipseShape");
KoShapeFactoryBase *rectFactory = KoShapeRegistry::instance()->value("EllipseShape");
if (rectFactory) {
shape = rectFactory->createDefaultShape();
shape->setSize(rect.size());
......
......@@ -44,7 +44,7 @@ set(flake_SRCS
KoShapeRegistry.cpp
KoToolFactory.cpp
KoPathShapeFactory.cpp
KoShapeFactory.cpp
KoShapeFactoryBase.cpp
KoShapeUserData.cpp
KoPointGroup.cpp
KoParameterShape.cpp
......@@ -239,7 +239,7 @@ install(
KoChildrenData.h
KoShapeController.h
KoShapeControllerBase.h
KoShapeFactory.h
KoShapeFactoryBase.h
KoShapeGroup.h
KoShapeLayer.h
KoShapePainter.h
......
......@@ -23,7 +23,7 @@
#include "KoCanvasController_p.h"
#include "KoShape.h"
#include "KoShape_p.h"
#include "KoShapeFactory.h" // for the SHAPE mimetypes
#include "KoShapeFactoryBase.h" // for the SHAPE mimetypes
#include "KoShapeRegistry.h"
#include "KoShapeController.h"
#include "KoShapeManager.h"
......@@ -132,7 +132,7 @@ void Viewport::handleDragEnterEvent(QDragEnterEvent *event)
// The rest of this method is mostly a copy paste from the KoCreateShapeStrategy
// So, lets remove this again when Zagge adds his new class that does this kind of thing. (KoLoadSave)
KoShapeFactory *factory = KoShapeRegistry::instance()->value(id);
KoShapeFactoryBase *factory = KoShapeRegistry::instance()->value(id);
if (! factory) {
kWarning(30006) << "Application requested a shape that is not registered '" <<
id << "', Ignoring";
......
......@@ -30,7 +30,7 @@
#include <KoLineBorder.h>
KoConnectionShapeFactory::KoConnectionShapeFactory(QObject* parent)
: KoShapeFactory(parent, KOCONNECTIONSHAPEID, i18n("Tie"))
: KoShapeFactoryBase(parent, KOCONNECTIONSHAPEID, i18n("Tie"))
{
setToolTip(i18n("A connection between two other shapes"));
setIcon("x-shape-connection");
......
......@@ -22,11 +22,11 @@
#ifndef CONNECTIONSHAPEFACTORY_H
#define CONNECTIONSHAPEFACTORY_H
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
class KoShape;
class KoConnectionShapeFactory : public KoShapeFactory
class KoConnectionShapeFactory : public KoShapeFactoryBase
{
public:
KoConnectionShapeFactory(QObject *parent);
......
......@@ -28,7 +28,7 @@
#include <KoXmlNS.h>
KoPathShapeFactory::KoPathShapeFactory(QObject *parent, const QStringList&)
: KoShapeFactory(parent, KoPathShapeId, i18n("Simple path shape"))
: KoShapeFactoryBase(parent, KoPathShapeId, i18n("Simple path shape"))
{
setToolTip(i18n("A simple path shape"));
setIcon("pathshape");
......
......@@ -22,12 +22,12 @@
#define KOPATHSHAPEFACTORY_H
#include "KoShape.h"
#include "KoShapeFactory.h"
#include "KoShapeFactoryBase.h"
#include "KoXmlReader.h"
/// Factory for path shapes.
class FLAKE_TEST_EXPORT KoPathShapeFactory : public KoShapeFactory
class FLAKE_TEST_EXPORT KoPathShapeFactory : public KoShapeFactoryBase
{
public:
/// constructor
......
......@@ -603,7 +603,7 @@ public:
/**
* Return the Id of this shape, identifying the type of shape by the id of the factory.
* @see KoShapeFactory::shapeId()
* @see KoShapeFactoryBase::shapeId()
* @return the id of the shape-type
*/
QString shapeId() const;
......@@ -611,7 +611,7 @@ public:
/**
* Set the Id of this shape. A shapeFactory is expected to set the Id at creation
* so applications can find out what kind of shape this is.
* @see KoShapeFactory::shapeId()
* @see KoShapeFactoryBase::shapeId()
* @param id the ID from the factory that created this shape
*/
void setShapeId(const QString &id);
......
......@@ -32,7 +32,7 @@ class KoShapeConfigWidgetBase;
* The KoCreateShapesTool is able to show a number of configuration panels after
* it created a shape via user interaction. Each shape configuration panel type
* has its own factory, which will inherit from this class.
* @see KoShapeFactory::panelFactories()
* @see KoShapeFactoryBase::panelFactories()
* @see KoShapeConfigWidgetBase
*/
class FLAKE_EXPORT KoShapeConfigFactoryBase
......@@ -63,7 +63,7 @@ public:
/**
* Return true if the createConfigWidget() should be called at all for a shape of
* the specified type.
* @param id an ID like the KoShapeFactory::shapeId()
* @param id an ID like the KoShapeFactoryBase::shapeId()
*/
virtual bool showForShapeId(const QString &id) const {
Q_UNUSED(id); return true;
......
......@@ -35,9 +35,9 @@ class QUndoCommand;
/**
* Base widget for shape-configuration panels.
* This is an interface type class used by classes that intend to provide
* a GUI for configuring newly created shapes as created by a KoShapeFactory.
* a GUI for configuring newly created shapes as created by a KoShapeFactoryBase.
*
* Every time after a shape is created the KoShapeFactory for that shape-type
* Every time after a shape is created the KoShapeFactoryBase for that shape-type
* will be queried for all the config widgets; both factory specific as well as
* those set by the hosting application.
* A dialog will be shown with all those panels, each extending this class.
......
......@@ -30,7 +30,7 @@
#include "KoCanvasBase.h"
#include "KoShapeConfigWidgetBase.h"
#include "KoShapeConfigFactoryBase.h"
#include "KoShapeFactory.h"
#include "KoShapeFactoryBase.h"
#include "KoShape.h"
#include <kpagedialog.h>
......@@ -52,7 +52,7 @@ public:
Q_ASSERT(canvas->shapeManager());
if (showDialog) {
KoShapeFactory *factory = KoShapeRegistry::instance()->value(shape->shapeId());
KoShapeFactoryBase *factory = KoShapeRegistry::instance()->value(shape->shapeId());
Q_ASSERT(factory);
int z = 0;
foreach(KoShape *sh, canvas->shapeManager()->shapes())
......
......@@ -30,7 +30,7 @@ public:
{
KoShapeRegistry *registry = KoShapeRegistry::instance();
foreach (const QString &id, registry->keys()) {
KoShapeFactory *shapeFactory = registry->value(id);
KoShapeFactoryBase *shapeFactory = registry->value(id);
shapeFactory->newDocumentResourceManager(resourceManager);
}
}
......
......@@ -20,13 +20,13 @@
* Boston, MA 02110-1301, USA.
*/
#include "KoShapeFactory.h"
#include "KoShapeFactoryBase.h"
#include "KoShape.h"
#include <KoProperties.h>
#include <kdebug.h>
class KoShapeFactory::Private
class KoShapeFactoryBase::Private
{
public:
Private(const QString &i, const QString &n)
......@@ -57,53 +57,53 @@ public:
};
KoShapeFactory::KoShapeFactory(QObject *parent, const QString &id, const QString &name)
KoShapeFactoryBase::KoShapeFactoryBase(QObject *parent, const QString &id, const QString &name)
: QObject(parent),
d(new Private(id, name))
{
}
KoShapeFactory::~KoShapeFactory()
KoShapeFactoryBase::~KoShapeFactoryBase()
{
delete d;
}
QString KoShapeFactory::toolTip() const
QString KoShapeFactoryBase::toolTip() const
{
return d->tooltip;
}
QString KoShapeFactory::icon() const
QString KoShapeFactoryBase::icon() const
{
return d->iconName;
}
QString KoShapeFactory::name() const
QString KoShapeFactoryBase::name() const
{
return d->name;
}
QString KoShapeFactory::family() const
QString KoShapeFactoryBase::family() const
{
return d->family;
}
int KoShapeFactory::loadingPriority() const
int KoShapeFactoryBase::loadingPriority() const
{
return d->loadingPriority;
}
QStringList KoShapeFactory::odfElementNames() const
QStringList KoShapeFactoryBase::odfElementNames() const
{
return d->odfElementNames;
}
QString KoShapeFactory::odfNameSpace() const
QString KoShapeFactoryBase::odfNameSpace() const
{
return d->odfNameSpace;
}
bool KoShapeFactory::supports(const KoXmlElement & e) const
bool KoShapeFactoryBase::supports(const KoXmlElement & e) const
{
Q_UNUSED(e);
// XXX: Remove this and replace with a pure virtual once
......@@ -111,77 +111,77 @@ bool KoShapeFactory::supports(const KoXmlElement & e) const
return false;
}
void KoShapeFactory::addTemplate(const KoShapeTemplate &params)
void KoShapeFactoryBase::addTemplate(const KoShapeTemplate &params)
{
KoShapeTemplate tmplate = params;
tmplate.id = d->id;
d->templates.append(tmplate);
}
void KoShapeFactory::setToolTip(const QString & tooltip)
void KoShapeFactoryBase::setToolTip(const QString & tooltip)
{
d->tooltip = tooltip;
}
void KoShapeFactory::setIcon(const QString & iconName)
void KoShapeFactoryBase::setIcon(const QString & iconName)
{
d->iconName = iconName;
}
void KoShapeFactory::setFamily(const QString & family)
void KoShapeFactoryBase::setFamily(const QString & family)
{
d->family = family;
}
QString KoShapeFactory::id() const
QString KoShapeFactoryBase::id() const
{
return d->id;
}
void KoShapeFactory::setOptionPanels(const QList<KoShapeConfigFactoryBase*> &panelFactories)
void KoShapeFactoryBase::setOptionPanels(const QList<KoShapeConfigFactoryBase*> &panelFactories)
{
d->configPanels = panelFactories;
}
QList<KoShapeConfigFactoryBase*> KoShapeFactory::panelFactories()
QList<KoShapeConfigFactoryBase*> KoShapeFactoryBase::panelFactories()
{
return d->configPanels;
}
QList<KoShapeTemplate> KoShapeFactory::templates() const
QList<KoShapeTemplate> KoShapeFactoryBase::templates() const
{
return d->templates;
}
void KoShapeFactory::setLoadingPriority(int priority)
void KoShapeFactoryBase::setLoadingPriority(int priority)
{
d->loadingPriority = priority;
}
void KoShapeFactory::setOdfElementNames(const QString & nameSpace, const QStringList & names)
void KoShapeFactoryBase::setOdfElementNames(const QString & nameSpace, const QStringList & names)
{
d->odfNameSpace = nameSpace;
d->odfElementNames = names;
}
bool KoShapeFactory::hidden() const
bool KoShapeFactoryBase::hidden() const
{
return d->hidden;
}
void KoShapeFactory::setHidden(bool hidden)
void KoShapeFactoryBase::setHidden(bool hidden)
{
d->hidden = hidden;
}
void KoShapeFactory::newDocumentResourceManager(KoResourceManager *manager)
void KoShapeFactoryBase::newDocumentResourceManager(KoResourceManager *manager)
{
Q_UNUSED(manager);
}
KoShape *KoShapeFactory::createShape(const KoProperties*, KoResourceManager *documentResources) const
KoShape *KoShapeFactoryBase::createShape(const KoProperties*, KoResourceManager *documentResources) const
{
return createDefaultShape(documentResources);
}
#include <KoShapeFactory.moc>
#include <KoShapeFactoryBase.moc>
......@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _KO_SHAPE_FACTORY_
#define _KO_SHAPE_FACTORY_
#ifndef KOSHAPEFACTORYBASE_H
#define KOSHAPEFACTORYBASE_H
#include <QStringList>
#include <QString>
......@@ -57,7 +57,7 @@ struct FLAKE_EXPORT KoShapeTemplate {
QString toolTip; ///< The tooltip text for the template
QString icon; ///< Icon name
/**
* The properties which, when passed to the KoShapeFactory::createShape() method
* The properties which, when passed to the KoShapeFactoryBase::createShape() method
* result in the shape this template represents.
*/
KoProperties *properties;
......@@ -71,10 +71,10 @@ struct FLAKE_EXPORT KoShapeTemplate {
*
* An example usage would be:
@code
class MyShapeFactory : public KoShapeFactory {
class MyShapeFactory : public KoShapeFactoryBase {
public:
MyShapeFactory(QObject *parent)
: KoShapeFactory(parent, "MyShape", i18n("My Shape")) {
: KoShapeFactoryBase(parent, "MyShape", i18n("My Shape")) {
setToolTip(i18n("A nice shape"));
}
~MyShapeFactory() {}
......@@ -85,7 +85,7 @@ public:
* After you created the factory you should create a plugin that can announce the factory to the
* KoShapeRegistry. See the KoPluginLoader as well.
*/
class FLAKE_EXPORT KoShapeFactory : public QObject
class FLAKE_EXPORT KoShapeFactoryBase : public QObject
{
Q_OBJECT
public:
......@@ -97,8 +97,8 @@ public:
* example for use by the KoTool::activateTemporary.
* @param name the user visible name of the shape this factory creates.
*/
KoShapeFactory(QObject *parent, const QString &id, const QString &name);
virtual ~KoShapeFactory();
KoShapeFactoryBase(QObject *parent, const QString &id, const QString &name);
virtual ~KoShapeFactoryBase();
/**
* Create a list of option panels to show on creating a new shape.
......@@ -288,4 +288,4 @@ private:
Private * const d;
};
#endif // _KO_SHAPE_FACTORY_
#endif
......@@ -43,14 +43,14 @@
class KoShapeRegistry::Private
{
public:
void insertFactory(KoShapeFactory *factory);
void insertFactory(KoShapeFactoryBase *factory);
void init(KoShapeRegistry *q);
KoShape *createShapeInternal(const KoXmlElement &fullElement, KoShapeLoadingContext &context, const KoXmlElement &element) const;
// Map namespace,tagname to priority:factory
QHash<QPair<QString, QString>, QMultiMap<int, KoShapeFactory*> > factoryMap;
QHash<QPair<QString, QString>, QMultiMap<int, KoShapeFactoryBase*> > factoryMap;
};
KoShapeRegistry::KoShapeRegistry()
......@@ -86,7 +86,7 @@ void KoShapeRegistry::Private::init(KoShapeRegistry *q)
// assocated odf tagname & priority and prepare ourselves for
// loading ODF.
QList<KoShapeFactory*> factories = q->values();
QList<KoShapeFactoryBase*> factories = q->values();
for (int i = 0; i < factories.size(); ++i) {
insertFactory(factories[i]);
}
......@@ -101,13 +101,13 @@ KoShapeRegistry* KoShapeRegistry::instance()
return s_instance;
}
void KoShapeRegistry::addFactory(KoShapeFactory * factory)
void KoShapeRegistry::addFactory(KoShapeFactoryBase * factory)
{
add(factory);
d->insertFactory(factory);
}
void KoShapeRegistry::Private::insertFactory(KoShapeFactory *factory)
void KoShapeRegistry::Private::insertFactory(KoShapeFactoryBase *factory)
{
if (factory->odfNameSpace().isEmpty() || factory->odfElementNames().isEmpty()) {
kDebug(30006) << "Shape factory" << factory->id() << " does not have OdfNamespace defined, ignoring";
......@@ -116,7 +116,7 @@ void KoShapeRegistry::Private::insertFactory(KoShapeFactory *factory)
QPair<QString, QString> p(factory->odfNameSpace(), elementName);
QMultiMap<int, KoShapeFactory*> & priorityMap = factoryMap[p];
QMultiMap<int, KoShapeFactoryBase*> & priorityMap = factoryMap[p];
priorityMap.insert(factory->loadingPriority(), factory);
......@@ -191,19 +191,19 @@ KoShape *KoShapeRegistry::Private::createShapeInternal(const KoXmlElement &fullE
if (!factoryMap.contains(p)) return 0;
QMultiMap<int, KoShapeFactory*> priorityMap = factoryMap.value(p);
QList<KoShapeFactory*> factories = priorityMap.values();
QMultiMap<int, KoShapeFactoryBase*> priorityMap = factoryMap.value(p);
QList<KoShapeFactoryBase*> factories = priorityMap.values();
#ifndef NDEBUG
kDebug(30006) << "Supported factories for=" << p;
foreach (KoShapeFactory *f, factories)
foreach (KoShapeFactoryBase *f, factories)
kDebug(30006) << f->id() << f->name();
#endif
// Higher numbers are more specific, map is sorted by keys
for (int i = factories.size() - 1; i >= 0; --i) {
KoShapeFactory * factory = factories[i];
KoShapeFactoryBase * factory = factories[i];
if (factory->supports(element)) {
KoShape *shape = factory->createDefaultShape(context.documentResourceManager());
......
......@@ -25,12 +25,12 @@
#include <KoGenericRegistry.h>
#include <KoXmlReader.h>
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
#include "flake_export.h"
class KoShape;
class KoShapeFactory;
class KoShapeFactoryBase;
class KoShapeLoadingContext;
......@@ -39,7 +39,7 @@ class KoShapeLoadingContext;
* or rather, of the factories that applications can use to create flake
* shape objects.
*/
class FLAKE_EXPORT KoShapeRegistry : public QObject, public KoGenericRegistry<KoShapeFactory*>
class FLAKE_EXPORT KoShapeRegistry : public QObject, public KoGenericRegistry<KoShapeFactoryBase*>
{
Q_OBJECT
public:
......@@ -57,7 +57,7 @@ public:
*
* @param factory The factory of the shape
*/
void addFactory(KoShapeFactory *factory);
void addFactory(KoShapeFactoryBase *factory);
/**
* Use the element to find out which flake plugin can load it, and
......
......@@ -147,7 +147,7 @@ public:
<td>/always</td>
<td>An activation shape id ending with '/always' will make the tool always visible and enabled.</td></tr>
</table>
* @see KoShapeFactory::shapeId()
* @see KoShapeFactoryBase::shapeId()
* @see setActivationShapeId()
* @return the id of a shape, or an empty string for all shapes.
*/
......@@ -222,7 +222,7 @@ protected:
void setPriority(int newPriority);
/**
* Set the id of the shape we can process.
* This is the Id, as passed to the constructor of a KoShapeFactory, that the tool
* This is the Id, as passed to the constructor of a KoShapeFactoryBase, that the tool
* we create is associated with. This means that if a KoTextShape is selected, then
* all tools that have its id set here will be added to the dynamic part of the toolbox.
* @param activationShapeId the Id of the shape
......
......@@ -52,7 +52,7 @@
* to allow themselves to be manipulated by the KoTool s. The content of such an
* object is independent and based on the model of the data this object represents.
*
* If you want to be a supplier of shape objects; create a library with a KoShapeFactory
* If you want to be a supplier of shape objects; create a library with a KoShapeFactoryBase
* class and install a .desktop service file with the following content:
*
@verbatim
......
......@@ -24,13 +24,13 @@
#include <KoShapeLoadingContext.h>
#include <KoPathShapeFactory.h>
#include <KoShape.h>
#include <KoShapeFactory.h>
#include <KoShapeFactoryBase.h>
#include <KoXmlNS.h>
#include <kdebug.h>
void TestKoShapeFactory::testCreateFactory()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShapeFactoryBase * factory = new KoPathShapeFactory(0, QStringList());
QVERIFY(factory != 0);
delete factory;
}
......@@ -41,14 +41,14 @@ void TestKoShapeFactory::testSupportsKoXmlElement()
void TestKoShapeFactory::testPriority()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShapeFactoryBase * factory = new KoPathShapeFactory(0, QStringList());
QVERIFY(factory->loadingPriority() == 0);
delete factory;
}
void TestKoShapeFactory::testCreateDefaultShape()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShapeFactoryBase * factory = new KoPathShapeFactory(0, QStringList());
KoShape *shape = factory->createDefaultShape();
QVERIFY(shape != 0);
delete shape;
......@@ -57,7 +57,7 @@ void TestKoShapeFactory::testCreateDefaultShape()
void TestKoShapeFactory::testCreateShape()
{
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShapeFactoryBase * factory = new KoPathShapeFactory(0, QStringList());
KoShape *shape = factory->createShape(