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 84547f2a authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix tests. Thanks David! Also add kstore as a dependency of flake.

svn path=/trunk/koffice/; revision=664202
parent e17919e7
......@@ -102,7 +102,7 @@ kde4_automoc(${flake_SRCS})
kde4_add_library(flake SHARED ${flake_SRCS})
target_link_libraries(flake ${KDE4_KDEUI_LIBS} komain pigment)
target_link_libraries(flake ${KDE4_KDEUI_LIBS} komain kstore pigment)
if(HAVE_OPENGL)
target_link_libraries(flake ${OPENGL_LIBRARIES} ${QT_QTOPENGL_LIBRARY})
......
......@@ -32,7 +32,6 @@ KoPathShapeFactory::KoPathShapeFactory(QObject *parent, const QStringList&)
setIcon("pathshape");
setOdfElementName(KoXmlNS::draw, "path");
setLoadingPriority( 0 );
}
KoShape * KoPathShapeFactory::createDefaultShape() const {
......@@ -42,7 +41,6 @@ KoShape * KoPathShapeFactory::createDefaultShape() const {
path->curveTo( QPointF( 50, -20 ), QPointF( 100, -20 ), QPointF( 100, 50 ) );
path->normalize();
path->setBorder( new KoLineBorder( 1.0 ) );
path->setShapeId(id());
return path;
}
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
#include "TestKoShapeFactory.h"
#include <qtest_kde.h>
#include <QBuffer>
#include <QFile>
#include <QDateTime>
......@@ -58,7 +58,6 @@ void TestKoShapeFactory::testCreateDefaultShape()
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShape * shape = factory->createDefaultShape();
QVERIFY( shape != 0 );
QVERIFY( shape->shapeId() == KoPathShapeId );
}
void TestKoShapeFactory::testCreateShape()
......@@ -66,7 +65,6 @@ void TestKoShapeFactory::testCreateShape()
KoShapeFactory * factory = new KoPathShapeFactory(0, QStringList());
KoShape * shape = factory->createShape( 0 );
QVERIFY( shape != 0 );
QVERIFY( shape->shapeId() == KoPathShapeId );
}
void TestKoShapeFactory::testOdfElement()
......@@ -119,7 +117,11 @@ void TestKoShapeFactory::testOdfElement()
KoXmlElement pathElement = bodyElement.firstChild().nextSibling().toElement();
QCOMPARE( factory->supports( pathElement ), true );
KoShape * shape = factory->createDefaultShape( );
QVERIFY( shape );
//XXX: test loading
}
QTEST_MAIN(TestKoShapeFactory)
QTEST_KDEMAIN(TestKoShapeFactory, NoGUI)
#include "TestKoShapeFactory.moc"
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
#include "TestKoShapeRegistry.h"
#include <qtest_kde.h>
#include <QBuffer>
#include <QFile>
#include <QDateTime>
......@@ -87,5 +87,5 @@ void TestKoShapeRegistry::testCreateEmptyShape()
}
QTEST_MAIN(TestKoShapeRegistry)
QTEST_KDEMAIN(TestKoShapeRegistry, NoGUI)
#include "TestKoShapeRegistry.moc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment