Some changes in tests
authorMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 3 Sep 2010 05:45:47 +0000 (07:45 +0200)
committerMateusz Półrola <mateusz.polrola@comarch.pl>
Fri, 3 Sep 2010 05:45:47 +0000 (07:45 +0200)
mdictionary.pri
src/desktopWidget/desktopWidget.pro
src/src.pri
tests/GooglePluginTests/test.h
tests/GooglePluginTests/tests.pro
tests/XdxfPluginTests/test.h
tests/XdxfPluginTests/tests.pro
tests/mDictionaryTests/CommonDictInterfaceMock.h
tests/mDictionaryTests/TranslationMock.h
tests/mDictionaryTests/mDictionaryTests.pro
tests/mDictionaryTests/tst_Backbone.cpp

index ca08b49..2be5fbd 100644 (file)
@@ -16,7 +16,7 @@ CONFIG += \
        qt \
        release
 
-isEmpty(ENABLED_SRC):ENABLED_SRC = "mdictionary plugins"
+isEmpty(ENABLED_SRC):ENABLED_SRC = "mdictionary plugins desktopWidget"
 isEmpty(ENABLED_PLUGINS):ENABLED_PLUGINS = "xdxf google"
 
 isEmpty(INSTALL_PREFIX):INSTALL_PREFIX=/usr
index 6ee5d9e..dfa6b78 100644 (file)
@@ -1,36 +1,10 @@
 # -------------------------------------------------
 # Project created by QtCreator 2010-08-03T08:54:27
 # -------------------------------------------------
-QT += core gui dbus
-
 TARGET = mdictionarywidget
-
 TEMPLATE = app
 
-MDICT_BINDIR = $$[MDICT_BINDIR]
-
-isEmpty(MDICT_BINDIR):MDICT_BINDIR = .
-
-DESTDIR = $${MDICT_BINDIR}
-
-
-unix {
-    # VARIABLES
-    isEmpty(PREFIX):PREFIX = /usr
-    BINDIR = $$PREFIX/bin
-    DATADIR = $$PREFIX/share
-    DEFINES += DATADIR=\\\"$$DATADIR\\\" \
-        PKGDATADIR=\\\"$$PKGDATADIR\\\"
-    
-    # MAKE INSTALL
-    INSTALLS += target \
-        desktop
-
-    target.path = /usr/lib/hildon-desktop
-
-    desktop.path = $$DATADIR/applications/hildon-home
-    desktop.files += ../../../data/other/$${TARGET}.desktop
-}
+include(../../mdictionary.pri)
 
 SOURCES += \
     main.cpp \
@@ -40,4 +14,17 @@ HEADERS += \
     MainWidget.h
 
 RESOURCES += \
-    ../../../data/gui.qrc
+    ../../data/gui.qrc
+
+
+unix {
+        target.path = $$INSTALL_PREFIX/lib/hildon-desktop
+
+       desktop.path = $$SHARE_DIR/applications/hildon-home
+       desktop.files += ../../data/other/$${TARGET}.desktop
+       
+       INSTALLS += target \
+                       desktop
+}
+
+
index f683525..0a1eabc 100644 (file)
@@ -1 +1 @@
-ENABLED_SRC = mdictionary plugins
+ENABLED_SRC = mdictionary plugins desktopWidget
index 50e6ee0..b3fe336 100644 (file)
@@ -23,7 +23,7 @@
 #define TEST_H
 
 #include <QtTest/QtTest>
-#include "../src/GooglePlugin.h"
+#include "../../src/plugins/google/GooglePlugin.h"
 
 
  class GoogleTest: public QObject
index 9c7bf3e..9c1092b 100644 (file)
@@ -4,27 +4,27 @@
 
 CONFIG += qtestlib
 QT += core gui network
-TARGET = GooglrPluginTests
+TARGET = GooglePluginTests
 TEMPLATE = app
 INCLUDEPATH += .
 
 # Input
 HEADERS += test.h \
-    ../src/GooglePlugin.h \
-    ../../../includes/translation.h \
-    ../../../includes/settings.h \
-    ../../../includes/DictDialog.h \
-    ../../../includes/CommonDictInterface.h \
-    ../src/TranslationGoogle.h \
-    ../src/GoogleDictDialog.h \
-    ../src/GoogleSettingsDialog.h
+    ../../src/plugins/google/GooglePlugin.h \
+    ../../src/common/translation.h \
+    ../../src/common/settings.h \
+    ../../src/common/DictDialog.h \
+    ../../src/common/CommonDictInterface.h \
+    ../../src/plugins/google/TranslationGoogle.h \
+    ../../src/plugins/google/GoogleDictDialog.h \
+    ../../src/plugins/google/GoogleSettingsDialog.h
 
 SOURCES += test.cpp \
-    ../src/GooglePlugin.cpp \
-    ../src/TranslationGoogle.cpp \
-    ../src/GoogleDictDialog.cpp \
-    ../src/GoogleSettingsDialog.cpp
+    ../../src/plugins/google/GooglePlugin.cpp \
+    ../../src/plugins/google/TranslationGoogle.cpp \
+    ../../src/plugins/google/GoogleDictDialog.cpp \
+    ../../src/plugins/google/GoogleSettingsDialog.cpp
 
-check.target = check
-check.commands = ./GooglePluginTests
-QMAKE_EXTRA_TARGETS += check
+target.path = .
+target.commands = ./GooglePluginTests
+INSTALLS += target
index 1012b93..b713dca 100644 (file)
@@ -28,7 +28,7 @@
 #include <QTimer>
 #include <QtConcurrentRun>
 #include <QFuture>
-#include "../src/xdxfplugin.h"
+#include "../../src/plugins/xdxf/xdxfplugin.h"
 #include <QDate>
 #include <QTextStream>
 #include <QString>
index 0abb298..7ef99cb 100644 (file)
@@ -10,26 +10,26 @@ INCLUDEPATH += .
 
 # Input
 HEADERS += test.h \
-    ../src/xdxfplugin.h \
-    ../src/TranslationXdxf.h \
-    ../../../includes/translation.h \
-    ../../../includes/settings.h \
-    ../../../includes/DictDialog.h \
-    ../../../includes/CommonDictInterface.h \
-    ../src/XdxfDictDialog.h \
-    ../src/XdxfLoadDialog.h \
-    ../src/XdxfSettingsDialog.h \
-    ../src/XdxfCachingDialog.h
+    ../../src/plugins/xdxf/xdxfplugin.h \
+    ../../src/plugins/xdxf/TranslationXdxf.h \
+    ../../src/common/translation.h \
+    ../../src/common/settings.h \
+    ../../src/common/DictDialog.h \
+    ../../src/common/CommonDictInterface.h \
+    ../../src/plugins/xdxf/XdxfDictDialog.h \
+    ../../src/plugins/xdxf/XdxfLoadDialog.h \
+    ../../src/plugins/xdxf/XdxfSettingsDialog.h \
+    ../../src/plugins/xdxf/XdxfCachingDialog.h
 
 
 SOURCES += test.cpp \
-    ../src/xdxfplugin.cpp \
-    ../src/TranslationXdxf.cpp \
-    ../src/XdxfLoadDialog.cpp \
-    ../src/XdxfDictDialog.cpp \
-    ../src/XdxfCachingDialog.cpp \
-    ../src/XdxfSettingsDialog.cpp
+    ../../src/plugins/xdxf/xdxfplugin.cpp \
+    ../../src/plugins/xdxf/TranslationXdxf.cpp \
+    ../../src/plugins/xdxf/XdxfLoadDialog.cpp \
+    ../../src/plugins/xdxf/XdxfDictDialog.cpp \
+    ../../src/plugins/xdxf/XdxfCachingDialog.cpp \
+    ../../src/plugins/xdxf/XdxfSettingsDialog.cpp
 
-check.target = check
-check.commands = ./xdxfPluginTests
-QMAKE_EXTRA_TARGETS += check
+target.path = .
+target.commands = ./xdxfPluginTests
+INSTALLS += target
index 69116ac..326bf54 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef COMMONDICTINTERFACEMOCK_H
 #define COMMONDICTINTERFACEMOCK_H
 
-#include "../../src/includes/CommonDictInterface.h"
+#include "../../src/common/CommonDictInterface.h"
 #include "TranslationMock.h"
 
 /*! CommonDictInterfaceMock simulates dict/plugin behaviour without any
index 992a309..1b4ed4a 100644 (file)
@@ -29,7 +29,7 @@
 #ifndef TRANSLATIONMOCK_H
 #define TRANSLATIONMOCK_H
 
-#include "../../src/includes/translation.h"
+#include "../../src/common/translation.h"
 
 /*! Translation mock is intended to simulate behaviour of real plugins
   translation, but without dependency and any kind of complicated operations*/
index 3d4b3d1..eaca07e 100644 (file)
@@ -4,26 +4,31 @@
 QT += testlib \
     core \
     sql
+
 TARGET = mDictionaryTests
+
 CONFIG += console
+
 CONFIG -= app_bundle
+
 TEMPLATE = app
+
 SOURCES += tst_Backbone.cpp \
-    ../../src/base/backbone/backbone.cpp \
-    ../../src/base/backbone/History.cpp \
-    ../../src/base/backbone/Bookmarks.cpp \
-    ../../src/base/backbone/ConfigGenerator.cpp
+    ../../src/mdictionary/backbone/backbone.cpp \
+    ../../src/mdictionary/backbone/History.cpp \
+    ../../src/mdictionary/backbone/Bookmarks.cpp \
+    ../../src/mdictionary/backbone/ConfigGenerator.cpp
 DEFINES += SRCDIR=\\\"$$PWD/\\\"
 HEADERS += CommonDictInterfaceMock.h \
-    ../../src/base/backbone/backbone.h \
-    ../../src/includes/translation.h \
-    ../../src/includes/settings.h \
-    ../../src/includes/CommonDictInterface.h \
-    ../../src/includes/History.h \
+    ../../src/mdictionary/backbone/backbone.h \
+    ../../src/common/translation.h \
+    ../../src/common/settings.h \
+    ../../src/common/CommonDictInterface.h \
+    ../../src/common/History.h \
     TranslationMock.h \
-    ../../src/base/backbone/BookmarkTranslations.h \
-    ../../src/base/backbone/Bookmarks.h \
-    ../../src/base/backbone/ConfigGenerator.h
-check.target = check
-check.commands += ./mDictionaryTests
-QMAKE_EXTRA_TARGETS += check
+    ../../src/mdictionary/backbone/BookmarkTranslations.h \
+    ../../src/mdictionary/backbone/Bookmarks.h \
+    ../../src/mdictionary/backbone/ConfigGenerator.h
+target.path = .
+target.commands += ./mDictionaryTests
+INSTALLS += target
index 38ef11e..07aec4d 100644 (file)
@@ -30,7 +30,7 @@
 #include <QStringList>
 #include <QList>
 #include <QTime>
-#include "../../src/base/backbone/backbone.h"
+#include "../../src/mdictionary/backbone/backbone.h"
 #include "CommonDictInterfaceMock.h"
 
 class BackboneTest : public QObject