[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra] libs/widgets/tests: Fix KoResourceTaggingTest, give patternServer some dummy patterns
From:       Friedrich W. H. Kossebau <kossebau () kde ! org>
Date:       2015-11-01 3:58:39
Message-ID: E1Zsjmx-00016u-SZ () scm ! kde ! org
[Download RAW message or body]

Git commit 509d6f0d4b0be393877f1e9e67ac6ff2e6559a3b by Friedrich W. H. Koss=
ebau.
Committed on 01/11/2015 at 03:58.
Pushed by kossebau into branch 'master'.

Fix KoResourceTaggingTest, give patternServer some dummy patterns

M  +11   -0    libs/widgets/tests/KoResourceTaggingTest.cpp
M  +2    -0    libs/widgets/tests/KoResourceTaggingTest.h

http://commits.kde.org/calligra/509d6f0d4b0be393877f1e9e67ac6ff2e6559a3b

diff --git a/libs/widgets/tests/KoResourceTaggingTest.cpp b/libs/widgets/te=
sts/KoResourceTaggingTest.cpp
index 1354c74..599ed8a 100644
--- a/libs/widgets/tests/KoResourceTaggingTest.cpp
+++ b/libs/widgets/tests/KoResourceTaggingTest.cpp
@@ -20,6 +20,7 @@
 =

 #include <QTest>
 #include <QCoreApplication>
+#include <QFileInfo>
 =

 #include <kactioncollection.h>
 #include <WidgetsDebug.h>
@@ -27,6 +28,16 @@
 #include "KoResource.h"
 #include "KoResourceServerProvider.h"
 =

+
+void KoResourceTaggingTest::initTestCase()
+{
+    // use global png files as dummy pattern dir for now
+    const QFileInfo file(QFINDTESTDATA("../../../pics/hicolor/16-actions-f=
rame_edit.png"));
+    Q_ASSERT(file.exists());
+    KoResourcePaths::addResourceDir("ko_patterns", file.absolutePath());
+    qDebug() << "++++++" << KoResourcePaths::resourceDirs("ko_patterns") <=
< file.absolutePath();
+}
+
 void KoResourceTaggingTest::testInitialization()
 {
     KoResourceTagStore tagStore(KoResourceServerProvider::instance()->patt=
ernServer());
diff --git a/libs/widgets/tests/KoResourceTaggingTest.h b/libs/widgets/test=
s/KoResourceTaggingTest.h
index 748ee63..72dece1 100644
--- a/libs/widgets/tests/KoResourceTaggingTest.h
+++ b/libs/widgets/tests/KoResourceTaggingTest.h
@@ -29,6 +29,8 @@ class KoResourceTaggingTest : public QObject
 =

 private Q_SLOTS:
 =

+    void initTestCase();
+
     // tests
     void testInitialization();
     void testTagging();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic