From 1515a4f2eb9cf023ed7f9c2e10106b5e93164a08 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:59 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- CMakeLists.txt | 4 +- cervisia/CMakeLists.txt | 4 +- cervisia/Makefile.am | 2 +- cervisia/cervisiapart.h | 8 +- cervisia/cervisiashell.h | 2 +- doc/kbabel/preferences.docbook | 2 +- kapptemplate/ChangeLog | 2 +- kapptemplate/kapp/appview.h | 2 +- kapptemplate/kpartapp/app.h | 2 +- kapptemplate/kpartapp/app_part.cpp | 2 +- kapptemplate/kpartapp/app_part.h | 2 +- kapptemplate/kpartplugin/plugin-Makefile.am | 2 +- kapptemplate/kpartplugin/plugin_app.cpp | 2 +- kapptemplate/kpartplugin/plugin_app.h | 2 +- kbabel/README | 2 +- kbabel/catalogmanager/Makefile.am | 4 +- kbabel/catalogmanager/markpatterndialog.cpp | 2 +- kbabel/common/kbproject.cpp | 2 +- kbabel/common/projectsettings.cpp | 2 +- kbabel/commonui/Makefile.am | 2 +- kbabel/commonui/context.cpp | 8 +- kbabel/commonui/context.h | 4 +- kbabel/commonui/finddialog.cpp | 2 +- kbabel/commonui/projectprefwidgets.cpp | 2 +- kbabel/kbabel/CMakeLists.txt | 2 +- kbabel/kbabel/Makefile.am | 4 +- kbabel/kbabel/kbabel.cpp | 2 +- kbabel/kbabel/kbabel.h | 2 +- kbabel/kbabel/kbabelview.cpp | 60 +-- kbabel/kbabel/kbabelview.h | 4 +- kbabel/kbabel/kbhighlighting.cpp | 6 +- kbabel/kbabeldict/Makefile.am | 8 +- kbugbuster/CMakeLists.txt | 4 +- kbugbuster/Makefile.am | 6 +- kbugbuster/backend/bugdetails.cpp | 2 +- kbugbuster/gui/cwbugdetails.cpp | 4 +- kbugbuster/gui/cwbugdetails.h | 2 +- kbugbuster/kresources/CMakeLists.txt | 43 -- kbugbuster/kresources/ConfigureChecks.cmake | 36 -- kbugbuster/kresources/Makefile.am | 20 - kbugbuster/kresources/bugzilla.desktop | 48 --- kbugbuster/kresources/kcalresource.cpp | 316 --------------- kbugbuster/kresources/kcalresource.h | 124 ------ kbugbuster/kresources/kcalresource_plugin.cpp | 37 -- kbugbuster/kresources/kcalresourceconfig.cpp | 92 ----- kbugbuster/kresources/kcalresourceconfig.h | 54 --- .../kresources/kresources_kcal_bugzilla.kcfg | 20 - kbugbuster/kresources/resourceprefs.kcfgc | 9 - kbugbuster/tderesources/CMakeLists.txt | 43 ++ kbugbuster/tderesources/ConfigureChecks.cmake | 36 ++ kbugbuster/tderesources/Makefile.am | 20 + kbugbuster/tderesources/bugzilla.desktop | 48 +++ kbugbuster/tderesources/kcalresource.cpp | 316 +++++++++++++++ kbugbuster/tderesources/kcalresource.h | 124 ++++++ kbugbuster/tderesources/kcalresource_plugin.cpp | 37 ++ kbugbuster/tderesources/kcalresourceconfig.cpp | 92 +++++ kbugbuster/tderesources/kcalresourceconfig.h | 54 +++ kbugbuster/tderesources/resourceprefs.kcfgc | 9 + .../tderesources/tderesources_kcal_bugzilla.kcfg | 20 + kioslave/svn/ksvnd/Makefile.am | 4 +- kmtrace/Makefile.am | 6 +- kompare/CMakeLists.txt | 2 +- kompare/Makefile.am | 4 +- kompare/kompare_shell.cpp | 8 +- kompare/kompare_shell.h | 2 +- kompare/komparenavtreepart/CMakeLists.txt | 2 +- kompare/komparenavtreepart/komparenavtreepart.h | 4 +- kompare/komparepart/CMakeLists.txt | 2 +- kompare/komparepart/kompare_part.cpp | 2 +- kompare/komparepart/kompare_part.h | 4 +- kompare/libdialogpages/diffpage.cpp | 2 +- kompare/tests/subversion/contextm.diff | 2 +- kompare/tests/subversion/normalm.diff | 2 +- kompare/tests/subversion/unifiedm.diff | 2 +- kuiviewer/CMakeLists.txt | 4 +- kuiviewer/Makefile.am | 2 +- kuiviewer/kuiviewer.h | 2 +- kuiviewer/kuiviewer_part.cpp | 2 +- kuiviewer/kuiviewer_part.h | 2 +- kunittest/CMakeLists.txt | 50 --- kunittest/Makefile.am | 21 - kunittest/dcopinterface.h | 38 -- kunittest/example/Makefile.am | 1 - kunittest/example/module/Makefile.am | 20 - kunittest/example/module/sampleextra.cpp | 37 -- kunittest/example/module/sampleextra.h | 36 -- kunittest/example/module/samplemodule.cpp | 37 -- kunittest/example/module/samplemodule.h | 43 -- kunittest/example/module/samplemodule2.cpp | 61 --- kunittest/example/module/samplemodule2.h | 43 -- kunittest/example/module/sampletests.cpp | 82 ---- kunittest/example/module/sampletests.h | 54 --- kunittest/example/simple/Makefile.am | 22 -- kunittest/example/simple/main.cpp | 32 -- kunittest/example/simple/maingui.cpp | 60 --- kunittest/example/simple/sampletest.cpp | 55 --- kunittest/example/simple/sampletest.h | 42 -- kunittest/guimodrunner.cpp | 72 ---- kunittest/kunittest | 19 - kunittest/kunittest_debughelper | 107 ----- kunittest/kunittestmod | 37 -- kunittest/runnergui.cpp | 433 --------------------- kunittest/runnergui.h | 79 ---- kunittest/testerwidget.ui | 197 ---------- kunittest/testerwidget.ui.h | 46 --- poxml/Makefile.am | 10 +- scripts/kde-spellcheck.pl | 2 +- scripts/tdesvn-build | 2 +- scripts/tdesvn-buildrc-sample | 2 +- tdecachegrind/tdecachegrind/Makefile.am | 2 +- tdeunittest/CMakeLists.txt | 50 +++ tdeunittest/Makefile.am | 21 + tdeunittest/dcopinterface.h | 38 ++ tdeunittest/example/Makefile.am | 1 + tdeunittest/example/module/Makefile.am | 20 + tdeunittest/example/module/sampleextra.cpp | 37 ++ tdeunittest/example/module/sampleextra.h | 36 ++ tdeunittest/example/module/samplemodule.cpp | 37 ++ tdeunittest/example/module/samplemodule.h | 43 ++ tdeunittest/example/module/samplemodule2.cpp | 61 +++ tdeunittest/example/module/samplemodule2.h | 43 ++ tdeunittest/example/module/sampletests.cpp | 82 ++++ tdeunittest/example/module/sampletests.h | 54 +++ tdeunittest/example/simple/Makefile.am | 22 ++ tdeunittest/example/simple/main.cpp | 32 ++ tdeunittest/example/simple/maingui.cpp | 60 +++ tdeunittest/example/simple/sampletest.cpp | 55 +++ tdeunittest/example/simple/sampletest.h | 42 ++ tdeunittest/guimodrunner.cpp | 72 ++++ tdeunittest/runnergui.cpp | 433 +++++++++++++++++++++ tdeunittest/runnergui.h | 79 ++++ tdeunittest/tdeunittest | 19 + tdeunittest/tdeunittest_debughelper | 107 +++++ tdeunittest/tdeunittestmod | 37 ++ tdeunittest/testerwidget.ui | 197 ++++++++++ tdeunittest/testerwidget.ui.h | 46 +++ umbrello/umbrello/docgenerators/Makefile.am | 2 +- 137 files changed, 2650 insertions(+), 2650 deletions(-) delete mode 100644 kbugbuster/kresources/CMakeLists.txt delete mode 100644 kbugbuster/kresources/ConfigureChecks.cmake delete mode 100644 kbugbuster/kresources/Makefile.am delete mode 100644 kbugbuster/kresources/bugzilla.desktop delete mode 100644 kbugbuster/kresources/kcalresource.cpp delete mode 100644 kbugbuster/kresources/kcalresource.h delete mode 100644 kbugbuster/kresources/kcalresource_plugin.cpp delete mode 100644 kbugbuster/kresources/kcalresourceconfig.cpp delete mode 100644 kbugbuster/kresources/kcalresourceconfig.h delete mode 100644 kbugbuster/kresources/kresources_kcal_bugzilla.kcfg delete mode 100644 kbugbuster/kresources/resourceprefs.kcfgc create mode 100644 kbugbuster/tderesources/CMakeLists.txt create mode 100644 kbugbuster/tderesources/ConfigureChecks.cmake create mode 100644 kbugbuster/tderesources/Makefile.am create mode 100644 kbugbuster/tderesources/bugzilla.desktop create mode 100644 kbugbuster/tderesources/kcalresource.cpp create mode 100644 kbugbuster/tderesources/kcalresource.h create mode 100644 kbugbuster/tderesources/kcalresource_plugin.cpp create mode 100644 kbugbuster/tderesources/kcalresourceconfig.cpp create mode 100644 kbugbuster/tderesources/kcalresourceconfig.h create mode 100644 kbugbuster/tderesources/resourceprefs.kcfgc create mode 100644 kbugbuster/tderesources/tderesources_kcal_bugzilla.kcfg delete mode 100644 kunittest/CMakeLists.txt delete mode 100644 kunittest/Makefile.am delete mode 100644 kunittest/dcopinterface.h delete mode 100644 kunittest/example/Makefile.am delete mode 100644 kunittest/example/module/Makefile.am delete mode 100644 kunittest/example/module/sampleextra.cpp delete mode 100644 kunittest/example/module/sampleextra.h delete mode 100644 kunittest/example/module/samplemodule.cpp delete mode 100644 kunittest/example/module/samplemodule.h delete mode 100644 kunittest/example/module/samplemodule2.cpp delete mode 100644 kunittest/example/module/samplemodule2.h delete mode 100644 kunittest/example/module/sampletests.cpp delete mode 100644 kunittest/example/module/sampletests.h delete mode 100644 kunittest/example/simple/Makefile.am delete mode 100644 kunittest/example/simple/main.cpp delete mode 100644 kunittest/example/simple/maingui.cpp delete mode 100644 kunittest/example/simple/sampletest.cpp delete mode 100644 kunittest/example/simple/sampletest.h delete mode 100644 kunittest/guimodrunner.cpp delete mode 100755 kunittest/kunittest delete mode 100755 kunittest/kunittest_debughelper delete mode 100755 kunittest/kunittestmod delete mode 100644 kunittest/runnergui.cpp delete mode 100644 kunittest/runnergui.h delete mode 100644 kunittest/testerwidget.ui delete mode 100644 kunittest/testerwidget.ui.h create mode 100644 tdeunittest/CMakeLists.txt create mode 100644 tdeunittest/Makefile.am create mode 100644 tdeunittest/dcopinterface.h create mode 100644 tdeunittest/example/Makefile.am create mode 100644 tdeunittest/example/module/Makefile.am create mode 100644 tdeunittest/example/module/sampleextra.cpp create mode 100644 tdeunittest/example/module/sampleextra.h create mode 100644 tdeunittest/example/module/samplemodule.cpp create mode 100644 tdeunittest/example/module/samplemodule.h create mode 100644 tdeunittest/example/module/samplemodule2.cpp create mode 100644 tdeunittest/example/module/samplemodule2.h create mode 100644 tdeunittest/example/module/sampletests.cpp create mode 100644 tdeunittest/example/module/sampletests.h create mode 100644 tdeunittest/example/simple/Makefile.am create mode 100644 tdeunittest/example/simple/main.cpp create mode 100644 tdeunittest/example/simple/maingui.cpp create mode 100644 tdeunittest/example/simple/sampletest.cpp create mode 100644 tdeunittest/example/simple/sampletest.h create mode 100644 tdeunittest/guimodrunner.cpp create mode 100644 tdeunittest/runnergui.cpp create mode 100644 tdeunittest/runnergui.h create mode 100755 tdeunittest/tdeunittest create mode 100755 tdeunittest/tdeunittest_debughelper create mode 100755 tdeunittest/tdeunittestmod create mode 100644 tdeunittest/testerwidget.ui create mode 100644 tdeunittest/testerwidget.ui.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c6f7d3de..23f3d9d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -65,7 +65,7 @@ option( BUILD_KPROFILEMETHOD "Build kprofilemethod" ${BUILD_ALL} ) option( BUILD_KSPY "Build kspy" ${BUILD_ALL} ) option( BUILD_KSTARTPERF "Build kstartperf" ${BUILD_ALL} ) option( BUILD_KUIVIEWER "Build kuiviewer" ${BUILD_ALL} ) -option( BUILD_KUNITTEST "Build kunittest" ${BUILD_ALL} ) +option( BUILD_KUNITTEST "Build tdeunittest" ${BUILD_ALL} ) option( BUILD_POXML "Build poxml" ${BUILD_ALL} ) option( BUILD_SCHECK "Build scheck" ${BUILD_ALL} ) option( BUILD_SCRIPTS "Build scripts" ${BUILD_ALL} ) @@ -105,7 +105,7 @@ tde_conditional_add_subdirectory( BUILD_KPROFILEMETHOD kprofilemethod ) tde_conditional_add_subdirectory( BUILD_KSPY kspy ) tde_conditional_add_subdirectory( BUILD_KSTARTPERF kstartperf ) tde_conditional_add_subdirectory( BUILD_KUIVIEWER kuiviewer ) -tde_conditional_add_subdirectory( BUILD_KUNITTEST kunittest ) +tde_conditional_add_subdirectory( BUILD_KUNITTEST tdeunittest ) tde_conditional_add_subdirectory( BUILD_POXML poxml ) tde_conditional_add_subdirectory( BUILD_SCHECK scheck ) tde_conditional_add_subdirectory( BUILD_SCRIPTS scripts ) diff --git a/cervisia/CMakeLists.txt b/cervisia/CMakeLists.txt index b4f6f7c3..2a0b4523 100644 --- a/cervisia/CMakeLists.txt +++ b/cervisia/CMakeLists.txt @@ -102,7 +102,7 @@ tde_add_kpart( libcervisiapart AUTOMOC updateview_visitors.cpp entry.cpp entry_status.cpp stringmatcher.cpp cvsinitdlg.cpp ignorelistbase.cpp dirignorelist.cpp globalignorelist.cpp editwithmenu.cpp logmessageedit.cpp - LINK cervisia-static cvsservice-shared kutils-shared + LINK cervisia-static cvsservice-shared tdeutils-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) @@ -112,7 +112,7 @@ tde_add_kpart( libcervisiapart AUTOMOC tde_add_tdeinit_executable( cervisia AUTOMOC SOURCES main.cpp cervisiashell.cpp - LINK cervisia-static cvsservice-shared kutils-shared + LINK cervisia-static cvsservice-shared tdeutils-shared ) diff --git a/cervisia/Makefile.am b/cervisia/Makefile.am index 4b11e4ef..8d2b87a4 100644 --- a/cervisia/Makefile.am +++ b/cervisia/Makefile.am @@ -61,7 +61,7 @@ messages: rc.cpp $(XGETTEXT) -C *.cpp *.h -o $(podir)/cervisia.pot srcdoc: - $(kde_bindir)/kdoc -a -p -d classdocs -n 'Cervisia' *.h -lqt -ltdecore -ltdeui -lkparts + $(kde_bindir)/kdoc -a -p -d classdocs -n 'Cervisia' *.h -lqt -ltdecore -ltdeui -ltdeparts cervisia.1: $(srcdir)/cervisia.1.in sed -e 's%_KDEHTMLDIR_%'${kde_htmldir}'%g;' \ diff --git a/cervisia/cervisiapart.h b/cervisia/cervisiapart.h index 6d1d097b..84f70585 100644 --- a/cervisia/cervisiapart.h +++ b/cervisia/cervisiapart.h @@ -22,10 +22,10 @@ #ifndef CERVISIAPART_H #define CERVISIAPART_H -#include -#include -#include -#include +#include +#include +#include +#include #include "addremovedlg.h" #include "commitdlg.h" diff --git a/cervisia/cervisiashell.h b/cervisia/cervisiashell.h index 2a676d76..a8591e24 100644 --- a/cervisia/cervisiashell.h +++ b/cervisia/cervisiashell.h @@ -22,7 +22,7 @@ #ifndef CERVISIASHELL_H #define CERVISIASHELL_H -#include +#include class KRecentFilesAction; diff --git a/doc/kbabel/preferences.docbook b/doc/kbabel/preferences.docbook index 7e8291bd..eb0ac5e9 100644 --- a/doc/kbabel/preferences.docbook +++ b/doc/kbabel/preferences.docbook @@ -924,7 +924,7 @@ translating to. Below are the items to consider setting: Here you choose the encoding for your text. This option is passed to the spellchecker, and is used as the encoding for your words dictionary. - See the kspell documentation for + See the tdespell documentation for more details. diff --git a/kapptemplate/ChangeLog b/kapptemplate/ChangeLog index e1cde76a..0e9e42f8 100644 --- a/kapptemplate/ChangeLog +++ b/kapptemplate/ChangeLog @@ -116,7 +116,7 @@ May-30-2000 - Kurt Granroth (v0.6.2) Mar-14-2000 - Kurt Granroth (v0.6.1) o Added toolbar editor - o Changed sample html code to reflect khtml changes + o Changed sample html code to reflect tdehtml changes Feb-26-2000 - Kurt Granroth (v0.6) o Converted to use the new XML UI framework (big change!) diff --git a/kapptemplate/kapp/appview.h b/kapptemplate/kapp/appview.h index d7866b36..19799996 100644 --- a/kapptemplate/kapp/appview.h +++ b/kapptemplate/kapp/appview.h @@ -4,7 +4,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}view.h #define ${APP_NAME_UC}VIEW_H #include -#include +#include #include <${APP_NAME_LC}iface.h> class TQPainter; diff --git a/kapptemplate/kpartapp/app.h b/kapptemplate/kpartapp/app.h index deb38136..b0b571b6 100644 --- a/kapptemplate/kpartapp/app.h +++ b/kapptemplate/kpartapp/app.h @@ -8,7 +8,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/${APP_NAME_LC}.h #endif #include -#include +#include /** * This is the application "Shell". It has a menubar, toolbar, and diff --git a/kapptemplate/kpartapp/app_part.cpp b/kapptemplate/kpartapp/app_part.cpp index a95c0711..07843be0 100644 --- a/kapptemplate/kpartapp/app_part.cpp +++ b/kapptemplate/kpartapp/app_part.cpp @@ -8,7 +8,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.cpp #include #include #include -#include +#include #include #include diff --git a/kapptemplate/kpartapp/app_part.h b/kapptemplate/kpartapp/app_part.h index 1150a21d..2601e8fd 100644 --- a/kapptemplate/kpartapp/app_part.h +++ b/kapptemplate/kpartapp/app_part.h @@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/${APP_NAME_LC}/${APP_NAME_LC}_part.h #ifndef ${APP_NAME_UC}PART_H #define ${APP_NAME_UC}PART_H -#include +#include class TQWidget; class TQPainter; diff --git a/kapptemplate/kpartplugin/plugin-Makefile.am b/kapptemplate/kpartplugin/plugin-Makefile.am index cdb7d510..21b5ccdd 100644 --- a/kapptemplate/kpartplugin/plugin-Makefile.am +++ b/kapptemplate/kpartplugin/plugin-Makefile.am @@ -16,5 +16,5 @@ lib${APP_NAME_LC}plugin_la_LDFLAGS = -module \$(KDE_PLUGIN) \$(all_libraries) # Install the .rc file in the Part's directory (in this case, the part # is KHTMLPart) -pluginsdir = \$(kde_datadir)/khtml/kpartplugins +pluginsdir = \$(kde_datadir)/tdehtml/kpartplugins plugins_DATA = plugin_${APP_NAME_LC}.rc diff --git a/kapptemplate/kpartplugin/plugin_app.cpp b/kapptemplate/kpartplugin/plugin_app.cpp index 0ec7a273..98a44cad 100644 --- a/kapptemplate/kpartplugin/plugin_app.cpp +++ b/kapptemplate/kpartplugin/plugin_app.cpp @@ -2,7 +2,7 @@ echo "Creating $LOCATION_ROOT/$APP_NAME_LC/plugin_${APP_NAME_LC}.cpp..."; cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/plugin_${APP_NAME_LC}.cpp #include "plugin_${APP_NAME_LC}.h" -#include +#include #include #include #include diff --git a/kapptemplate/kpartplugin/plugin_app.h b/kapptemplate/kpartplugin/plugin_app.h index a480a187..5f0e655c 100644 --- a/kapptemplate/kpartplugin/plugin_app.h +++ b/kapptemplate/kpartplugin/plugin_app.h @@ -3,7 +3,7 @@ cat << EOF > $LOCATION_ROOT/$APP_NAME_LC/plugin_${APP_NAME_LC}.h #ifndef PLUGIN_${APP_NAME_UC}_H #define PLUGIN_${APP_NAME_UC}_H -#include +#include class Plugin${APP_NAME} : public KParts::Plugin { diff --git a/kbabel/README b/kbabel/README index adeaac88..b81853af 100644 --- a/kbabel/README +++ b/kbabel/README @@ -49,7 +49,7 @@ Credits: and useful feature requests - Thomas Diehl for many useful hints to the GUI design and the behaviour of KBabel -- Wolfram Diestel for fixing kspell and many useful hints. +- Wolfram Diestel for fixing tdespell and many useful hints. - Stephan Kulow for helping keeping KBabel in sync with the frequently changing KDE api and for often giving me a helping hand. - Andrea Rizzi for writing the dictionary plugin for searching in a database diff --git a/kbabel/catalogmanager/Makefile.am b/kbabel/catalogmanager/Makefile.am index f33f29f9..5f88bf70 100644 --- a/kbabel/catalogmanager/Makefile.am +++ b/kbabel/catalogmanager/Makefile.am @@ -27,14 +27,14 @@ libcatalogmanager_la_SOURCES = catalogmanageriface.skel \ libcatalogmanager_la_LIBADD = ../commonui/libkbabelcommonui.la \ ../kbabeldict/libkbabeldict.la ./libcvs/libcatalogmanagercvs.la \ ./libsvn/libcatalogmanagersvn.la $(LIB_KIO) -libcatalogmanager_la_LDFLAGS = $(all_libraries) -no-undefined $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KPARTS) +libcatalogmanager_la_LDFLAGS = $(all_libraries) -no-undefined $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KPARTS) catalogmanager_SOURCES = main.cpp # the libraries to link against. catalogmanager_LDADD = libcatalogmanager.la -catalogmanager_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KPARTS) +catalogmanager_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KPARTS) # these are the headers for your project noinst_HEADERS = catalogmanageriface.h catalogmanager.h \ diff --git a/kbabel/catalogmanager/markpatterndialog.cpp b/kbabel/catalogmanager/markpatterndialog.cpp index 458611ab..21e5eadc 100644 --- a/kbabel/catalogmanager/markpatterndialog.cpp +++ b/kbabel/catalogmanager/markpatterndialog.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include "markpatterndialog.h" diff --git a/kbabel/common/kbproject.cpp b/kbabel/common/kbproject.cpp index ab9d81cc..f876627f 100644 --- a/kbabel/common/kbproject.cpp +++ b/kbabel/common/kbproject.cpp @@ -42,7 +42,7 @@ #include #include #include -#include +#include namespace KBabel { diff --git a/kbabel/common/projectsettings.cpp b/kbabel/common/projectsettings.cpp index 774d1ede..08204054 100644 --- a/kbabel/common/projectsettings.cpp +++ b/kbabel/common/projectsettings.cpp @@ -40,7 +40,7 @@ #include #include -#include +#include TQString KBabel::Defaults::Spellcheck::ignoreURL() { diff --git a/kbabel/commonui/Makefile.am b/kbabel/commonui/Makefile.am index e0ca94ce..65fd166b 100644 --- a/kbabel/commonui/Makefile.am +++ b/kbabel/commonui/Makefile.am @@ -19,7 +19,7 @@ libkbabelcommonui_la_SOURCES = klisteditor.ui context.cpp kactionselector.cpp \ cmdedit.cpp \ diffpreferences.ui -libkbabelcommonui_la_LIBADD = $(LIB_KIO) -lktexteditor ../common/libkbabelcommon.la ../kbabeldict/libkbabeldict.la +libkbabelcommonui_la_LIBADD = $(LIB_KIO) -ltdetexteditor ../common/libkbabelcommon.la ../kbabeldict/libkbabeldict.la libkbabelcommonui_la_LDFLAGS = $(all_libraries) diff --git a/kbabel/commonui/context.cpp b/kbabel/commonui/context.cpp index 6f4f16a7..cf79f4b1 100644 --- a/kbabel/commonui/context.cpp +++ b/kbabel/commonui/context.cpp @@ -57,10 +57,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include SourceContext::SourceContext(TQWidget *parent, KBabel::Project::Ptr project): TQWidget(parent) , m_parent( parent ) diff --git a/kbabel/commonui/context.h b/kbabel/commonui/context.h index cb641c67..512bd741 100644 --- a/kbabel/commonui/context.h +++ b/kbabel/commonui/context.h @@ -36,8 +36,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/kbabel/commonui/finddialog.cpp b/kbabel/commonui/finddialog.cpp index 02a1b2c3..222fbea1 100644 --- a/kbabel/commonui/finddialog.cpp +++ b/kbabel/commonui/finddialog.cpp @@ -47,7 +47,7 @@ #include #include #include -#include +#include #include using namespace KBabel; diff --git a/kbabel/commonui/projectprefwidgets.cpp b/kbabel/commonui/projectprefwidgets.cpp index d9f7a051..d4785445 100644 --- a/kbabel/commonui/projectprefwidgets.cpp +++ b/kbabel/commonui/projectprefwidgets.cpp @@ -52,7 +52,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kbabel/kbabel/CMakeLists.txt b/kbabel/kbabel/CMakeLists.txt index 6b263b55..34bb4bc5 100644 --- a/kbabel/kbabel/CMakeLists.txt +++ b/kbabel/kbabel/CMakeLists.txt @@ -44,7 +44,7 @@ tde_add_executable( kbabel main.cpp LINK kbabel-static kbabelcommonui-static kbabeldict-static - kbabelcommon-shared kbabeldictplugin-shared ktexteditor-shared + kbabelcommon-shared kbabeldictplugin-shared tdetexteditor-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kbabel/kbabel/Makefile.am b/kbabel/kbabel/Makefile.am index 3f5fffee..fd67a78d 100644 --- a/kbabel/kbabel/Makefile.am +++ b/kbabel/kbabel/Makefile.am @@ -38,14 +38,14 @@ libkbabel_la_SOURCES = kbbookmarkhandler.cpp \ kde_kcfg_DATA=kbabel.kcfg libkbabel_la_LIBADD = ../commonui/libkbabelcommonui.la ../kbabeldict/libkbabeldict.la $(LIB_KIO) $(LIB_KSPELL) -libkbabel_la_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KPARTS) +libkbabel_la_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KPARTS) kbabel_SOURCES = main.cpp # the libraries to link against. kbabel_LDADD = libkbabel.la -kbabel_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KPARTS) +kbabel_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KPARTS) # these are the headers for your project noinst_HEADERS = kbabel.h kbabelview.h \ diff --git a/kbabel/kbabel/kbabel.cpp b/kbabel/kbabel/kbabel.cpp index 26f33911..4935f9dd 100644 --- a/kbabel/kbabel/kbabel.cpp +++ b/kbabel/kbabel/kbabel.cpp @@ -79,7 +79,7 @@ #include #include #include -#include +#include #include #include diff --git a/kbabel/kbabel/kbabel.h b/kbabel/kbabel/kbabel.h index b1b63122..3f8dd42b 100644 --- a/kbabel/kbabel/kbabel.h +++ b/kbabel/kbabel/kbabel.h @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include "kbabelview.h" #include "kbproject.h" diff --git a/kbabel/kbabel/kbabelview.cpp b/kbabel/kbabel/kbabelview.cpp index 1b8795e2..830d17ce 100644 --- a/kbabel/kbabel/kbabelview.cpp +++ b/kbabel/kbabel/kbabelview.cpp @@ -73,7 +73,7 @@ #include #include #include -#include +#include #include #include #include @@ -172,7 +172,7 @@ KBabelView::KBabelView(KBCatalog* catalog,KBabelMW *parent, Project::Ptr project spell.posDict.setAutoDelete(true); spell.active=false; - spell2.kspell = 0; + spell2.tdespell = 0; spell2.config = 0; setAcceptDrops(true); @@ -293,9 +293,9 @@ KBabelView::~KBabelView() delete _argExtractor; delete _tagExtractor; - if( spell2.kspell ) + if( spell2.tdespell ) { - spell2.kspell = 0; + spell2.tdespell = 0; delete spell2.config; spell2.config = 0; } @@ -389,7 +389,7 @@ of the currently displayed entry.

")); if( pf < 1 ) pf = 1; - msgstrEdit = new HidingMsgEdit( pf,this,spell2.kspell,tempWidget,"msgstrEdit"); + msgstrEdit = new HidingMsgEdit( pf,this,spell2.tdespell,tempWidget,"msgstrEdit"); msgstrEdit->installEventFilter(this); KCursor::setAutoHideCursor(msgstrEdit,true); @@ -751,16 +751,16 @@ void KBabelView::readProject(Project::Ptr project) { // if there is a spellchecker already, free it - if( spell2.kspell ) + if( spell2.tdespell ) { // ensure the spellchecker is not used anymore msgstrEdit->setSpellChecker(0L); // free it - spell2.kspell->cleanUp(); + spell2.tdespell->cleanUp(); - delete spell2.kspell; - spell2.kspell = 0; + delete spell2.tdespell; + spell2.tdespell = 0; } spell2.config = new KSpellConfig(0L, "tempSpellConfig"); @@ -770,18 +770,18 @@ void KBabelView::readProject(Project::Ptr project) spell2.config->setEncoding(_spellcheckSettings.spellEncoding); spell2.config->setDictionary(_spellcheckSettings.spellDict); - spell2.kspell= new KSpell(this, "", TQT_TQOBJECT(this), TQT_SLOT(dummy(KSpell *)), + spell2.tdespell= new KSpell(this, "", TQT_TQOBJECT(this), TQT_SLOT(dummy(KSpell *)), spell2.config, false, false); - if(spell2.kspell->status() == KSpell::Error) + if(spell2.tdespell->status() == KSpell::Error) kdWarning(KBABEL) << "Something's wrong with KSpell, can't start on-the-fly checking" << endl; else { kdDebug() << "On the fly spellchecker: " - << spell2.kspell << endl; - msgstrEdit->setSpellChecker(spell2.kspell); + << spell2.tdespell << endl; + msgstrEdit->setSpellChecker(spell2.tdespell); } - // spell2.kspell->setAutoDelete(true); // let KSpell handle delete + // spell2.tdespell->setAutoDelete(true); // let KSpell handle delete //on-the-fly spellcheck end } else @@ -3942,31 +3942,31 @@ void KBabelView::spellcheck() spell.active=true; _dontBeep=true; - spell.kspell= new KSpell (this, i18n("Spellcheck"), + spell.tdespell= new KSpell (this, i18n("Spellcheck"), TQT_TQOBJECT(this), TQT_SLOT(spellStart(KSpell *)), spell.config, true, true); - if( spell.kspell->status() == KSpell::Error ) + if( spell.tdespell->status() == KSpell::Error ) { KMessageBox::error( this, i18n("KBabel cannot start spell checker. " "Please check your TDE installation.") ); return; } - connect(spell.kspell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone())); + connect(spell.tdespell, TQT_SIGNAL(death()),this, TQT_SLOT(spellCleanDone())); - connect(spell.kspell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList & + connect(spell.tdespell, TQT_SIGNAL(misspelling(const TQString &, const TQStringList & , unsigned int)), this , TQT_SLOT(spellMisspelled(const TQString &, const TQStringList &, unsigned int))); - connect(spell.kspell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)) + connect(spell.tdespell, TQT_SIGNAL(corrected(const TQString &, const TQString &, unsigned int)) , this, TQT_SLOT(spellCorrected(const TQString &, const TQString &, unsigned int))); - connect(spell.kspell,TQT_SIGNAL(ignoreall(const TQString &)) + connect(spell.tdespell,TQT_SIGNAL(ignoreall(const TQString &)) , this, TQT_SLOT(spellAddIgnore(const TQString &))); - connect(spell.kspell, TQT_SIGNAL(done(bool)) + connect(spell.tdespell, TQT_SIGNAL(done(bool)) , this, TQT_SLOT(spellResult(bool))); - spell.kspell->setAutoDelete(true); // let KSpell handle delete + spell.tdespell->setAutoDelete(true); // let KSpell handle delete } else { @@ -4034,14 +4034,14 @@ void KBabelView::spellStart(KSpell *) kapp->processEvents(100); } - spell.kspell->ignore(*it); + spell.tdespell->ignore(*it); } emit signalClearProgressBar(); } } - spell.kspell->checkList(&spell.wordList); + spell.tdespell->checkList(&spell.wordList); } @@ -4364,8 +4364,8 @@ void KBabelView::spellResult(bool flag) undo(); } - int s=spell.kspell->dlgResult(); - spell.kspell->cleanUp(); + int s=spell.tdespell->dlgResult(); + spell.tdespell->cleanUp(); emit signalSpellcheckDone(s); TQTimer::singleShot(0,this,TQT_SLOT(cleanUpSpellStruct())); @@ -4377,9 +4377,9 @@ void KBabelView::spellCleanDone() kdDebug(KBABEL) << "spellCleanDone" << endl; // if the pointer is cleared, you have finished correcly - if( !spell.kspell ) return; + if( !spell.tdespell ) return; - KSpell::spellStatus status = spell.kspell->status(); + KSpell::spellStatus status = spell.tdespell->status(); if(status == KSpell::Error || status == KSpell::Crashed) { @@ -4401,8 +4401,8 @@ void KBabelView::spellCleanDone() void KBabelView::cleanUpSpellStruct() { kdDebug(KBABEL) << "Cleaning structure" << endl; - // spell.kspell is set to be autodeleted - spell.kspell = 0; + // spell.tdespell is set to be autodeleted + spell.tdespell = 0; delete spell.config; spell.config=0; spell.wordList.clear(); diff --git a/kbabel/kbabel/kbabelview.h b/kbabel/kbabel/kbabelview.h index 5e9c280a..6af2da00 100644 --- a/kbabel/kbabel/kbabelview.h +++ b/kbabel/kbabel/kbabelview.h @@ -623,7 +623,7 @@ private: struct { - KSpell *kspell; + KSpell *tdespell; KSpellConfig* config; TQStringList wordList; bool active; @@ -648,7 +648,7 @@ private: } spell; struct { - KSpell *kspell; + KSpell *tdespell; KSpellConfig* config; } spell2; // on-the-fly spellchecking diff --git a/kbabel/kbabel/kbhighlighting.cpp b/kbabel/kbabel/kbhighlighting.cpp index deaaf704..0240153d 100644 --- a/kbabel/kbabel/kbhighlighting.cpp +++ b/kbabel/kbabel/kbhighlighting.cpp @@ -44,7 +44,7 @@ #include #include #include -#include +#include #include "kbhighlighting.h" #include "resources.h" @@ -255,7 +255,7 @@ bool KBabelHighlighter::isMisspelled(const TQString& wordRaw) kdDebug(KBABEL) << "isMisspelled: checking: " << word << endl; // Normally isMisspelled would look up a dictionary and return - // true or false, but kspell is asynchronous and slow so things + // true or false, but tdespell is asynchronous and slow so things // get tricky... // "dict" is used as a cache to store the results of KSpell @@ -277,7 +277,7 @@ void KBabelHighlighter::slotMisspelling(const TQString & originalword, kdDebug(KBABEL) << "Misspelled " << originalword << ", " << suggestions << endl; dict.replace( originalword, NotOkay ); - // this is slow but since kspell is async this will have to do for now + // this is slow but since tdespell is async this will have to do for now highlight(); } diff --git a/kbabel/kbabeldict/Makefile.am b/kbabel/kbabeldict/Makefile.am index 0503b819..afcf95b9 100644 --- a/kbabel/kbabeldict/Makefile.am +++ b/kbabel/kbabeldict/Makefile.am @@ -19,20 +19,20 @@ INCLUDES = -I$(srcdir)/../common -I$(top_builddir)/kbabel/common $(all_i lib_LTLIBRARIES = libkbabeldictplugin.la libkbabeldictplugin_la_SOURCES = searchengine.cpp libkbabeldictplugin_la_LIBADD = $(LIB_TDECORE) -libkbabeldictplugin_la_LDFLAGS = -version-info 3:0:2 $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +libkbabeldictplugin_la_LDFLAGS = -version-info 3:0:2 $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor libkbabeldict_la_SOURCES = kbabeldictbox.cpp \ kbabeldictiface.skel dictionarymenu.cpp dictchooser.cpp \ aboutmoduledlg.cpp libkbabeldict_la_LIBADD = ../common/libkbabelcommon.la libkbabeldictplugin.la $(LIB_TDEUI) -libkbabeldict_la_LDFLAGS = $(all_libraries) -no-undefined $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +libkbabeldict_la_LDFLAGS = $(all_libraries) -no-undefined $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kbabeldict_SOURCES = main.cpp kbabeldictview.cpp kbabeldict.cpp kbabelsplash.cpp # the libraries to link against. -kbabeldict_LDADD = libkbabeldict.la $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -kbabeldict_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kbabeldict_LDADD = libkbabeldict.la $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +kbabeldict_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor # these are the headers for your project noinst_HEADERS = kbabeldict.h kbabeldictview.h kbabelsplash.h aboutmoduledlg.h diff --git a/kbugbuster/CMakeLists.txt b/kbugbuster/CMakeLists.txt index 67e702b1..6cac4696 100644 --- a/kbugbuster/CMakeLists.txt +++ b/kbugbuster/CMakeLists.txt @@ -12,7 +12,7 @@ add_subdirectory( backend ) add_subdirectory( gui ) add_subdirectory( pics ) -tde_conditional_add_subdirectory( WITH_KCAL kresources ) +tde_conditional_add_subdirectory( WITH_KCAL tderesources ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} @@ -39,6 +39,6 @@ tde_add_executable( kbugbuster SOURCES main.cpp LINK kbbmainwindow-static kbbbackend_nopic-static - kutils-shared kio-shared khtml-shared + tdeutils-shared kio-shared tdehtml-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kbugbuster/Makefile.am b/kbugbuster/Makefile.am index 8aa545ed..727c0b69 100644 --- a/kbugbuster/Makefile.am +++ b/kbugbuster/Makefile.am @@ -1,5 +1,5 @@ if include_kcalresource -KRESOURCES_SUBDIR = kresources +KRESOURCES_SUBDIR = tderesources LIBKCAL_INCLUDES= $(KDE_INCLUDES)/libkcal endif @@ -10,9 +10,9 @@ SUBDIRS = backend gui pics $(KRESOURCES_SUBDIR) bin_PROGRAMS = kbugbuster kbugbuster_SOURCES = main.cpp -kbugbuster_LDADD = -lkutils gui/libkbbmainwindow.la \ +kbugbuster_LDADD = -ltdeutils gui/libkbbmainwindow.la \ backend/libkbbbackend.la $(LIB_KHTML) $(LIB_KIO) -ltdefx $(LIB_KUTILS) -kbugbuster_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor $(LIB_KUTILS) +kbugbuster_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor $(LIB_KUTILS) xdg_apps_DATA = kbugbuster.desktop diff --git a/kbugbuster/backend/bugdetails.cpp b/kbugbuster/backend/bugdetails.cpp index 6b0ded58..0cc7fb7d 100644 --- a/kbugbuster/backend/bugdetails.cpp +++ b/kbugbuster/backend/bugdetails.cpp @@ -131,7 +131,7 @@ TQValueList BugDetails::extractAttachments( const TQStri #ifdef DEBUG_EXTRACT kdDebug() << "Line: " << *it << endl; #endif - if ( (*it).startsWith( " Content-Type" ) ) // ## leading space comes from khtml + if ( (*it).startsWith( " Content-Type" ) ) // ## leading space comes from tdehtml { #ifdef DEBUG_EXTRACT //kdDebug() << "BugDetails::extractAttachments going back, looking for empty or boundary=" << boundary << endl; diff --git a/kbugbuster/gui/cwbugdetails.cpp b/kbugbuster/gui/cwbugdetails.cpp index 2eccbbce..0ab78ff2 100644 --- a/kbugbuster/gui/cwbugdetails.cpp +++ b/kbugbuster/gui/cwbugdetails.cpp @@ -24,8 +24,8 @@ #include "bugsystem.h" #include "bugserver.h" -#include -#include +#include +#include #include #include #include diff --git a/kbugbuster/gui/cwbugdetails.h b/kbugbuster/gui/cwbugdetails.h index 88712210..5067b953 100644 --- a/kbugbuster/gui/cwbugdetails.h +++ b/kbugbuster/gui/cwbugdetails.h @@ -22,7 +22,7 @@ #include -#include +#include class KHTMLPart; diff --git a/kbugbuster/kresources/CMakeLists.txt b/kbugbuster/kresources/CMakeLists.txt deleted file mode 100644 index b100a022..00000000 --- a/kbugbuster/kresources/CMakeLists.txt +++ /dev/null @@ -1,43 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include( ConfigureChecks.cmake ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/../backend - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} - ${LIBKCAL_INCLUDE_DIR} -) - -link_directories( - ${TQT_LIBRARY_DIRS} - ${LIBKCAL_LIBRARY_DIR} -) - - -##### other data ################################ - -install( FILES - bugzilla.desktop - DESTINATION ${SERVICES_INSTALL_DIR}/kresources/kcal ) - - -##### kcal_bugzilla (module) #################### - -tde_add_kpart( kcal_bugzilla AUTOMOC - SOURCES - kcalresource.cpp kcalresourceconfig.cpp - kcalresource_plugin.cpp resourceprefs.kcfgc - LINK kbbbackend_pic-static tdecore-shared kio-shared kabc kcal kresources - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/kbugbuster/kresources/ConfigureChecks.cmake b/kbugbuster/kresources/ConfigureChecks.cmake deleted file mode 100644 index b12337a1..00000000 --- a/kbugbuster/kresources/ConfigureChecks.cmake +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2012 Slavek Banko -# slavek (DOT) banko (AT) axis.cz -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -message( "-- checking for 'libkcal'" ) - -find_path( - LIBKCAL_INCLUDE_DIR - kcalversion.h - PATHS - ${TDE_INCLUDE_DIR}/libkcal - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -find_library( - LIBKCAL_LIBRARY - kcal - PATHS - ${TDE_LIB_DIR} - ${TQT_LIBRARY_DIRS} -) -if( LIBKCAL_LIBRARY ) - get_filename_component( LIBKCAL_LIBRARY_DIR ${LIBKCAL_LIBRARY} PATH CACHE ) -endif( ) - -if( NOT LIBKCAL_INCLUDE_DIR OR NOT LIBKCAL_LIBRARY_DIR ) - tde_message_fatal( "libkcal required, but was not found on your system" ) -endif( ) diff --git a/kbugbuster/kresources/Makefile.am b/kbugbuster/kresources/Makefile.am deleted file mode 100644 index b411e3c8..00000000 --- a/kbugbuster/kresources/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -if include_kcalresource -LIBKCAL_INCLUDES= $(KDE_INCLUDES)/libkcal -endif - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/kbugbuster/backend $(all_includes) $(KDE_INCLUDES) $(LIBKCAL_INCLUDES) - -kde_module_LTLIBRARIES = kcal_bugzilla.la - -kcal_bugzilla_la_SOURCES = kcalresource.cpp kcalresourceconfig.cpp \ - kcalresource_plugin.cpp resourceprefs.kcfgc -kcal_bugzilla_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) -kcal_bugzilla_la_LIBADD = ../backend/libkbbbackend.la -lkcal - -servicedir = $(kde_servicesdir)/kresources/kcal -service_DATA = bugzilla.desktop - -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kres_bugzilla.pot diff --git a/kbugbuster/kresources/bugzilla.desktop b/kbugbuster/kresources/bugzilla.desktop deleted file mode 100644 index 767b06cd..00000000 --- a/kbugbuster/kresources/bugzilla.desktop +++ /dev/null @@ -1,48 +0,0 @@ -[Desktop Entry] -Name=Bugzilla To-do List -Name[bg]=Задачи (Bugzilla) -Name[ca]=Llista de pendents de Bugzilla -Name[cs]=Seznam úkolů (Bugzilla) -Name[da]=Bugzilla gøremålsliste -Name[de]=Bugzilla Todo-Liste -Name[el]=Προς υλοποίηση λίστα του Bugzilla -Name[es]=Listado de tareas pendientes de BugZilla -Name[et]=Bugzilla ülesannete nimekiri -Name[eu]=Bugzilla-ren egiteke zerrenda -Name[fa]=فهرست کار انجامی Bugzilla -Name[fi]=Bugzilla-tehtäväluettelo -Name[fr]=Liste de tâches de Bugzilla -Name[ga]=Tascliosta Bugzilla -Name[gl]=Lista de itens por facer de Bugzilla -Name[he]=רשימת מטלות של Bugzilla -Name[hu]=Bugzilla feladatlista -Name[is]=Bugzilla verklisti -Name[it]=Lista delle cosa da fare di Bugzilla -Name[ja]=BugzillaToDo リスト -Name[ka]=Bugzilla-ს დავალებათა სია -Name[kk]=Bugzilla To-do тізімі -Name[lt]=Bugzilla darbų sąrašas -Name[nb]=Bugzilla-huskeliste -Name[nds]=Bugzilla-Opgavenlist -Name[ne]=बगजिला गर्नुपर्ने कार्य सूची -Name[nl]=Bugzilla Todo-lijst -Name[nn]=Bugzilla-hugseliste -Name[pa]=ਬੱਗਜੀਲਾ ਕਰਨ ਸੂਚੀ -Name[pl]=Lista rzeczy do zrobienia w Bugzilli -Name[pt]=Lista de Itens Por-Fazer do Bugzilla -Name[pt_BR]=Lista de Itens Por-Fazer do Bugzilla -Name[ru]=Список TODO Bugzilla -Name[sk]=Zoznam úloh v Bugzille -Name[sl]=Seznam »za-narediti« v Bugzilli -Name[sr]=Листа послова Bugzilla-е -Name[sr@Latn]=Lista poslova Bugzilla-e -Name[sv]=Bugzilla uppgiftslista -Name[tr]=Bugzilla To-do Listesi -Name[uk]=Список завдань Bugzilla -Name[zh_CN]=Bugzilla 待办列表 -Name[zh_TW]=Bugzilla 待辦清單 -X-TDE-Library=kcal_bugzilla -Type=Service -ServiceTypes=KResources/Plugin -X-TDE-ResourceFamily=calendar -X-TDE-ResourceType=bugzilla diff --git a/kbugbuster/kresources/kcalresource.cpp b/kbugbuster/kresources/kcalresource.cpp deleted file mode 100644 index bdad0381..00000000 --- a/kbugbuster/kresources/kcalresource.cpp +++ /dev/null @@ -1,316 +0,0 @@ -/* - This file is part of KBugBuster. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include "bugsystem.h" -#include "bugserver.h" - -#include "kcalresourceconfig.h" -#include "resourceprefs.h" - -#include "kcalresource.h" - -KCalResource::KCalResource( const TDEConfig* config ) - : ResourceCached( config ), mLock( 0 ) -{ - mPrefs = new KBB::ResourcePrefs; - - TDEConfigSkeletonItem::List items = mPrefs->items(); - TDEConfigSkeletonItem::List::Iterator it; - for( it = items.begin(); it != items.end(); ++it ) { - (*it)->setGroup( identifier() ); - } - - if ( config ) { - readConfig( config ); - } - - init(); -} - -KCalResource::~KCalResource() -{ - close(); - - if ( mDownloadJob ) mDownloadJob->kill(); - if ( mUploadJob ) mUploadJob->kill(); - - delete mLock; -} - -void KCalResource::init() -{ - mDownloadJob = 0; - mUploadJob = 0; - - setType( "remote" ); - - mOpen = false; - - mLock = new KABC::LockNull( true ); - - TDEConfig config( "kbugbusterrc" ); - - BugSystem::self()->readConfig( &config ); -} - -KBB::ResourcePrefs *KCalResource::prefs() -{ - return mPrefs; -} - -void KCalResource::readConfig( const TDEConfig * ) -{ - mPrefs->readConfig(); -} - -void KCalResource::writeConfig( TDEConfig *config ) -{ - kdDebug() << "KCalResource::writeConfig()" << endl; - - ResourceCalendar::writeConfig( config ); - - mPrefs->writeConfig(); -} - -TQString KCalResource::cacheFile() -{ - TQString file = locateLocal( "cache", "kcal/kresources/" + identifier() ); - kdDebug() << "KCalResource::cacheFile(): " << file << endl; - return file; -} - -bool KCalResource::doOpen() -{ - kdDebug(5800) << "KCalResource::doOpen()" << endl; - - mOpen = true; - - return true; -} - -bool KCalResource::doLoad() -{ - kdDebug() << "KCalResource::doLoad()" << endl; - - if ( !mOpen ) return true; - - if ( mDownloadJob ) { - kdWarning() << "KCalResource::doLoad(): download still in progress." - << endl; - return false; - } - if ( mUploadJob ) { - kdWarning() << "KCalResource::doLoad(): upload still in progress." - << endl; - return false; - } - - mCalendar.close(); - - mCalendar.load( cacheFile() ); - - BugSystem *kbb = BugSystem::self(); - - kdDebug() << "KNOWN SERVERS:" << endl; - TQValueList servers = kbb->serverList(); - TQValueList::ConstIterator it; - for( it = servers.begin(); it != servers.end(); ++it ) { - kdDebug() << " " << (*it)->identifier() << endl; - } - - kbb->setCurrentServer( mPrefs->server() ); - if ( !kbb->server() ) { - kdError() << "Server not found." << endl; - return false; - } else { - kdDebug() << "CURRENT SERVER: " << kbb->server()->identifier() << endl; - } - - kbb->retrievePackageList(); - - Package package = kbb->package( mPrefs->product() ); - - connect( kbb, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, - const Bug::List & ) ), - TQT_SLOT( slotBugListAvailable( const Package &, const TQString &, - const Bug::List & ) ) ); - - kbb->retrieveBugList( package, mPrefs->component() ); - - return true; -} - -void KCalResource::slotBugListAvailable( const Package &, const TQString &, - const Bug::List &bugs ) -{ - kdDebug() << "KCalResource::slotBugListAvailable()" << endl; - - if ( bugs.isEmpty() ) return; - - TQString masterUid = "kbb_" + BugSystem::self()->server()->identifier(); - KCal::Todo *masterTodo = mCalendar.todo( masterUid ); - if ( !masterTodo ) { - masterTodo = new KCal::Todo; - masterTodo->setUid( masterUid ); - masterTodo->setSummary( resourceName() ); - mCalendar.addTodo( masterTodo ); - } - - Bug::List::ConstIterator it; - for( it = bugs.begin(); it != bugs.end(); ++it ) { - Bug bug = *it; - kdDebug() << " Bug " << bug.number() << ": " << bug.title() << endl; - TQString uid = "KBugBuster_" + bug.number(); - KCal::Todo *newTodo = 0; - KCal::Todo *todo = mCalendar.todo( uid ); - if ( !todo ) { - newTodo = new KCal::Todo; - newTodo->setUid( uid ); - TQString uri = "http://bugs.trinitydesktop.org/show_bug.cgi?id=%1"; - newTodo->addAttachment( new KCal::Attachment( uri.arg( bug.number() ) ) ); - todo = newTodo; - } - - todo->setSummary( bug.number() + ": " + bug.title() ); - todo->setRelatedTo( masterTodo ); - - if ( newTodo ) mCalendar.addTodo( newTodo ); - } - - emit resourceChanged( this ); -} - -void KCalResource::slotLoadJobResult( TDEIO::Job *job ) -{ - if ( job->error() ) { - job->showErrorDialog( 0 ); - } else { - kdDebug() << "KCalResource::slotLoadJobResult() success" << endl; - - mCalendar.close(); - mCalendar.load( cacheFile() ); - - emit resourceChanged( this ); - } - - mDownloadJob = 0; - - emit resourceLoaded( this ); -} - -bool KCalResource::doSave() -{ - kdDebug() << "KCalResource::doSave()" << endl; - - if ( !mOpen ) return true; - - if ( readOnly() ) { - emit resourceSaved( this ); - return true; - } - - if ( mDownloadJob ) { - kdWarning() << "KCalResource::save(): download still in progress." - << endl; - return false; - } - if ( mUploadJob ) { - kdWarning() << "KCalResource::save(): upload still in progress." - << endl; - return false; - } - - mCalendar.save( cacheFile() ); - - mUploadJob = TDEIO::file_copy( KURL( cacheFile() ), mUploadUrl, -1, true ); - connect( mUploadJob, TQT_SIGNAL( result( TDEIO::Job * ) ), - TQT_SLOT( slotSaveJobResult( TDEIO::Job * ) ) ); - - return true; -} - -bool KCalResource::isSaving() -{ - return mUploadJob; -} - -void KCalResource::slotSaveJobResult( TDEIO::Job *job ) -{ - if ( job->error() ) { - job->showErrorDialog( 0 ); - } else { - kdDebug() << "KCalResource::slotSaveJobResult() success" << endl; - } - - mUploadJob = 0; - - emit resourceSaved( this ); -} - -void KCalResource::doClose() -{ - if ( !mOpen ) return; - - mCalendar.close(); - mOpen = false; -} - -KABC::Lock *KCalResource::lock() -{ - return mLock; -} - -void KCalResource::dump() const -{ - ResourceCalendar::dump(); - kdDebug(5800) << " DownloadUrl: " << mDownloadUrl.url() << endl; - kdDebug(5800) << " UploadUrl: " << mUploadUrl.url() << endl; - kdDebug(5800) << " ReloadPolicy: " << mReloadPolicy << endl; -} - -#include "kcalresource.moc" diff --git a/kbugbuster/kresources/kcalresource.h b/kbugbuster/kresources/kcalresource.h deleted file mode 100644 index cfa4e2a6..00000000 --- a/kbugbuster/kresources/kcalresource.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - This file is part of KBugBuster. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KCALRESOURCE_H -#define KCALRESOURCE_H - -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include - -#include - -namespace TDEIO { -class FileCopyJob; -class Job; -} - -namespace KBB { -class ResourcePrefs; -} - -/** - This class provides a calendar stored as a remote file. -*/ -class KCalResource : public KCal::ResourceCached -{ - Q_OBJECT - - - friend class KCalResourceConfig; - - public: - /** - Reload policy. - - @see setReloadPolicy(), reloadPolicy() - */ - enum { ReloadNever, ReloadOnStartup, ReloadOnceADay, ReloadAlways }; - - /** - Create resource from configuration information stored in TDEConfig object. - */ - KCalResource( const TDEConfig * ); - ~KCalResource(); - - void readConfig( const TDEConfig *config ); - void writeConfig( TDEConfig *config ); - - KBB::ResourcePrefs *prefs(); - - /** - Return name of file used as cache for remote file. - */ - TQString cacheFile(); - - KABC::Lock *lock(); - - bool isSaving(); - - void dump() const; - - protected slots: - void slotBugListAvailable( const Package &, const TQString &, - const Bug::List &bugs ); - - void slotLoadJobResult( TDEIO::Job * ); - void slotSaveJobResult( TDEIO::Job * ); - - protected: - bool doOpen(); - void doClose(); - bool doLoad(); - bool doSave(); - - private: - void init(); - - KBB::ResourcePrefs *mPrefs; - - KURL mDownloadUrl; - KURL mUploadUrl; - - int mReloadPolicy; - - KCal::ICalFormat mFormat; - - bool mOpen; - - TDEIO::FileCopyJob *mDownloadJob; - TDEIO::FileCopyJob *mUploadJob; - - KABC::Lock *mLock; - - class Private; - Private *d; -}; - -#endif diff --git a/kbugbuster/kresources/kcalresource_plugin.cpp b/kbugbuster/kresources/kcalresource_plugin.cpp deleted file mode 100644 index 7cf81289..00000000 --- a/kbugbuster/kresources/kcalresource_plugin.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - This file is part of KBugBuster. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include "kcalresourceconfig.h" -#include "kcalresource.h" - -#include -#include - -using namespace KCal; - -extern "C" -{ - KDE_EXPORT void *init_kcal_bugzilla() - { - TDEGlobal::locale()->insertCatalogue( "kres_bugzilla" ); - return new KRES::PluginFactory(); - } -} diff --git a/kbugbuster/kresources/kcalresourceconfig.cpp b/kbugbuster/kresources/kcalresourceconfig.cpp deleted file mode 100644 index 58466642..00000000 --- a/kbugbuster/kresources/kcalresourceconfig.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* - This file is part of KBugBuster. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "kcalresource.h" -#include "resourceprefs.h" -#include "kcalresourceconfig.h" - -KCalResourceConfig::KCalResourceConfig( TQWidget* parent, const char* name ) - : KRES::ConfigWidget( parent, name ) -{ - resize( 245, 115 ); - - TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 ); - mainLayout->setSpacing( KDialog::spacingHint() ); - - TQLabel *label = new TQLabel( i18n("Server:"), this ); - mainLayout->addWidget( label, 0, 0 ); - - mServerEdit = new KLineEdit( this ); - mainLayout->addWidget( mServerEdit, 0, 1 ); - - - label = new TQLabel( i18n("Product:"), this ); - mainLayout->addWidget( label, 1, 0 ); - - mProductEdit = new KLineEdit( this ); - mainLayout->addWidget( mProductEdit, 1, 1 ); - - - label = new TQLabel( i18n("Component:"), this ); - mainLayout->addWidget( label, 2, 0 ); - - mComponentEdit = new KLineEdit( this ); - mainLayout->addWidget( mComponentEdit, 2, 1 ); -} - -void KCalResourceConfig::loadSettings( KRES::Resource *resource ) -{ - KCalResource *res = static_cast( resource ); - if ( res ) { - KBB::ResourcePrefs *p = res->prefs(); - mServerEdit->setText( p->server() ); - mProductEdit->setText( p->product() ); - mComponentEdit->setText( p->component() ); - } else { - kdError(5700) << "KCalResourceConfig::loadSettings(): no KCalResource, cast failed" << endl; - } -} - -void KCalResourceConfig::saveSettings( KRES::Resource *resource ) -{ - KCalResource *res = static_cast( resource ); - if ( res ) { - KBB::ResourcePrefs *p = res->prefs(); - p->setServer( mServerEdit->text() ); - p->setProduct( mProductEdit->text() ); - p->setComponent( mComponentEdit->text() ); - } else { - kdError(5700) << "KCalResourceConfig::saveSettings(): no KCalResource, cast failed" << endl; - } -} - -#include "kcalresourceconfig.moc" diff --git a/kbugbuster/kresources/kcalresourceconfig.h b/kbugbuster/kresources/kcalresourceconfig.h deleted file mode 100644 index d28deb1f..00000000 --- a/kbugbuster/kresources/kcalresourceconfig.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - This file is part of KBugBuster. - - Copyright (c) 2003 Cornelius Schumacher - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef KCALRESOURCECONFIG_H -#define KCALRESOURCECONFIG_H - -#include -#include - -class KLineEdit; - -/** - Configuration widget for remote resource. - - @see KCalResource -*/ -class KCalResourceConfig : public KRES::ConfigWidget -{ - Q_OBJECT - - public: - KCalResourceConfig( TQWidget *parent = 0, const char *name = 0 ); - - public slots: - virtual void loadSettings( KRES::Resource *resource ); - virtual void saveSettings( KRES::Resource *resource ); - - private: - KLineEdit *mServerEdit; - KLineEdit *mComponentEdit; - KLineEdit *mProductEdit; - - class Private; - Private *d; -}; - -#endif diff --git a/kbugbuster/kresources/kresources_kcal_bugzilla.kcfg b/kbugbuster/kresources/kresources_kcal_bugzilla.kcfg deleted file mode 100644 index ce23c969..00000000 --- a/kbugbuster/kresources/kresources_kcal_bugzilla.kcfg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/kbugbuster/kresources/resourceprefs.kcfgc b/kbugbuster/kresources/resourceprefs.kcfgc deleted file mode 100644 index 0f41bdb1..00000000 --- a/kbugbuster/kresources/resourceprefs.kcfgc +++ /dev/null @@ -1,9 +0,0 @@ -# Code generation options for kconfig_compiler -File=kresources_kcal_bugzilla.kcfg -ClassName=ResourcePrefs -NameSpace=KBB -Singleton=false -Mutators=true -GlobalEnums=true -#ItemAccessors=true -#SetUserTexts=true diff --git a/kbugbuster/tderesources/CMakeLists.txt b/kbugbuster/tderesources/CMakeLists.txt new file mode 100644 index 00000000..ec5956a3 --- /dev/null +++ b/kbugbuster/tderesources/CMakeLists.txt @@ -0,0 +1,43 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include( ConfigureChecks.cmake ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../backend + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} + ${LIBKCAL_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} + ${LIBKCAL_LIBRARY_DIR} +) + + +##### other data ################################ + +install( FILES + bugzilla.desktop + DESTINATION ${SERVICES_INSTALL_DIR}/tderesources/kcal ) + + +##### kcal_bugzilla (module) #################### + +tde_add_kpart( kcal_bugzilla AUTOMOC + SOURCES + kcalresource.cpp kcalresourceconfig.cpp + kcalresource_plugin.cpp resourceprefs.kcfgc + LINK kbbbackend_pic-static tdecore-shared kio-shared kabc kcal tderesources + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/kbugbuster/tderesources/ConfigureChecks.cmake b/kbugbuster/tderesources/ConfigureChecks.cmake new file mode 100644 index 00000000..b12337a1 --- /dev/null +++ b/kbugbuster/tderesources/ConfigureChecks.cmake @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2012 Slavek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +message( "-- checking for 'libkcal'" ) + +find_path( + LIBKCAL_INCLUDE_DIR + kcalversion.h + PATHS + ${TDE_INCLUDE_DIR}/libkcal + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +find_library( + LIBKCAL_LIBRARY + kcal + PATHS + ${TDE_LIB_DIR} + ${TQT_LIBRARY_DIRS} +) +if( LIBKCAL_LIBRARY ) + get_filename_component( LIBKCAL_LIBRARY_DIR ${LIBKCAL_LIBRARY} PATH CACHE ) +endif( ) + +if( NOT LIBKCAL_INCLUDE_DIR OR NOT LIBKCAL_LIBRARY_DIR ) + tde_message_fatal( "libkcal required, but was not found on your system" ) +endif( ) diff --git a/kbugbuster/tderesources/Makefile.am b/kbugbuster/tderesources/Makefile.am new file mode 100644 index 00000000..ebd63550 --- /dev/null +++ b/kbugbuster/tderesources/Makefile.am @@ -0,0 +1,20 @@ +if include_kcalresource +LIBKCAL_INCLUDES= $(KDE_INCLUDES)/libkcal +endif + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/kbugbuster/backend $(all_includes) $(KDE_INCLUDES) $(LIBKCAL_INCLUDES) + +kde_module_LTLIBRARIES = kcal_bugzilla.la + +kcal_bugzilla_la_SOURCES = kcalresource.cpp kcalresourceconfig.cpp \ + kcalresource_plugin.cpp resourceprefs.kcfgc +kcal_bugzilla_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) +kcal_bugzilla_la_LIBADD = ../backend/libkbbbackend.la -lkcal + +servicedir = $(kde_servicesdir)/tderesources/kcal +service_DATA = bugzilla.desktop + +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kres_bugzilla.pot diff --git a/kbugbuster/tderesources/bugzilla.desktop b/kbugbuster/tderesources/bugzilla.desktop new file mode 100644 index 00000000..767b06cd --- /dev/null +++ b/kbugbuster/tderesources/bugzilla.desktop @@ -0,0 +1,48 @@ +[Desktop Entry] +Name=Bugzilla To-do List +Name[bg]=Задачи (Bugzilla) +Name[ca]=Llista de pendents de Bugzilla +Name[cs]=Seznam úkolů (Bugzilla) +Name[da]=Bugzilla gøremålsliste +Name[de]=Bugzilla Todo-Liste +Name[el]=Προς υλοποίηση λίστα του Bugzilla +Name[es]=Listado de tareas pendientes de BugZilla +Name[et]=Bugzilla ülesannete nimekiri +Name[eu]=Bugzilla-ren egiteke zerrenda +Name[fa]=فهرست کار انجامی Bugzilla +Name[fi]=Bugzilla-tehtäväluettelo +Name[fr]=Liste de tâches de Bugzilla +Name[ga]=Tascliosta Bugzilla +Name[gl]=Lista de itens por facer de Bugzilla +Name[he]=רשימת מטלות של Bugzilla +Name[hu]=Bugzilla feladatlista +Name[is]=Bugzilla verklisti +Name[it]=Lista delle cosa da fare di Bugzilla +Name[ja]=BugzillaToDo リスト +Name[ka]=Bugzilla-ს დავალებათა სია +Name[kk]=Bugzilla To-do тізімі +Name[lt]=Bugzilla darbų sąrašas +Name[nb]=Bugzilla-huskeliste +Name[nds]=Bugzilla-Opgavenlist +Name[ne]=बगजिला गर्नुपर्ने कार्य सूची +Name[nl]=Bugzilla Todo-lijst +Name[nn]=Bugzilla-hugseliste +Name[pa]=ਬੱਗਜੀਲਾ ਕਰਨ ਸੂਚੀ +Name[pl]=Lista rzeczy do zrobienia w Bugzilli +Name[pt]=Lista de Itens Por-Fazer do Bugzilla +Name[pt_BR]=Lista de Itens Por-Fazer do Bugzilla +Name[ru]=Список TODO Bugzilla +Name[sk]=Zoznam úloh v Bugzille +Name[sl]=Seznam »za-narediti« v Bugzilli +Name[sr]=Листа послова Bugzilla-е +Name[sr@Latn]=Lista poslova Bugzilla-e +Name[sv]=Bugzilla uppgiftslista +Name[tr]=Bugzilla To-do Listesi +Name[uk]=Список завдань Bugzilla +Name[zh_CN]=Bugzilla 待办列表 +Name[zh_TW]=Bugzilla 待辦清單 +X-TDE-Library=kcal_bugzilla +Type=Service +ServiceTypes=KResources/Plugin +X-TDE-ResourceFamily=calendar +X-TDE-ResourceType=bugzilla diff --git a/kbugbuster/tderesources/kcalresource.cpp b/kbugbuster/tderesources/kcalresource.cpp new file mode 100644 index 00000000..62051bc5 --- /dev/null +++ b/kbugbuster/tderesources/kcalresource.cpp @@ -0,0 +1,316 @@ +/* + This file is part of KBugBuster. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include "bugsystem.h" +#include "bugserver.h" + +#include "kcalresourceconfig.h" +#include "resourceprefs.h" + +#include "kcalresource.h" + +KCalResource::KCalResource( const TDEConfig* config ) + : ResourceCached( config ), mLock( 0 ) +{ + mPrefs = new KBB::ResourcePrefs; + + TDEConfigSkeletonItem::List items = mPrefs->items(); + TDEConfigSkeletonItem::List::Iterator it; + for( it = items.begin(); it != items.end(); ++it ) { + (*it)->setGroup( identifier() ); + } + + if ( config ) { + readConfig( config ); + } + + init(); +} + +KCalResource::~KCalResource() +{ + close(); + + if ( mDownloadJob ) mDownloadJob->kill(); + if ( mUploadJob ) mUploadJob->kill(); + + delete mLock; +} + +void KCalResource::init() +{ + mDownloadJob = 0; + mUploadJob = 0; + + setType( "remote" ); + + mOpen = false; + + mLock = new KABC::LockNull( true ); + + TDEConfig config( "kbugbusterrc" ); + + BugSystem::self()->readConfig( &config ); +} + +KBB::ResourcePrefs *KCalResource::prefs() +{ + return mPrefs; +} + +void KCalResource::readConfig( const TDEConfig * ) +{ + mPrefs->readConfig(); +} + +void KCalResource::writeConfig( TDEConfig *config ) +{ + kdDebug() << "KCalResource::writeConfig()" << endl; + + ResourceCalendar::writeConfig( config ); + + mPrefs->writeConfig(); +} + +TQString KCalResource::cacheFile() +{ + TQString file = locateLocal( "cache", "kcal/tderesources/" + identifier() ); + kdDebug() << "KCalResource::cacheFile(): " << file << endl; + return file; +} + +bool KCalResource::doOpen() +{ + kdDebug(5800) << "KCalResource::doOpen()" << endl; + + mOpen = true; + + return true; +} + +bool KCalResource::doLoad() +{ + kdDebug() << "KCalResource::doLoad()" << endl; + + if ( !mOpen ) return true; + + if ( mDownloadJob ) { + kdWarning() << "KCalResource::doLoad(): download still in progress." + << endl; + return false; + } + if ( mUploadJob ) { + kdWarning() << "KCalResource::doLoad(): upload still in progress." + << endl; + return false; + } + + mCalendar.close(); + + mCalendar.load( cacheFile() ); + + BugSystem *kbb = BugSystem::self(); + + kdDebug() << "KNOWN SERVERS:" << endl; + TQValueList servers = kbb->serverList(); + TQValueList::ConstIterator it; + for( it = servers.begin(); it != servers.end(); ++it ) { + kdDebug() << " " << (*it)->identifier() << endl; + } + + kbb->setCurrentServer( mPrefs->server() ); + if ( !kbb->server() ) { + kdError() << "Server not found." << endl; + return false; + } else { + kdDebug() << "CURRENT SERVER: " << kbb->server()->identifier() << endl; + } + + kbb->retrievePackageList(); + + Package package = kbb->package( mPrefs->product() ); + + connect( kbb, TQT_SIGNAL( bugListAvailable( const Package &, const TQString &, + const Bug::List & ) ), + TQT_SLOT( slotBugListAvailable( const Package &, const TQString &, + const Bug::List & ) ) ); + + kbb->retrieveBugList( package, mPrefs->component() ); + + return true; +} + +void KCalResource::slotBugListAvailable( const Package &, const TQString &, + const Bug::List &bugs ) +{ + kdDebug() << "KCalResource::slotBugListAvailable()" << endl; + + if ( bugs.isEmpty() ) return; + + TQString masterUid = "kbb_" + BugSystem::self()->server()->identifier(); + KCal::Todo *masterTodo = mCalendar.todo( masterUid ); + if ( !masterTodo ) { + masterTodo = new KCal::Todo; + masterTodo->setUid( masterUid ); + masterTodo->setSummary( resourceName() ); + mCalendar.addTodo( masterTodo ); + } + + Bug::List::ConstIterator it; + for( it = bugs.begin(); it != bugs.end(); ++it ) { + Bug bug = *it; + kdDebug() << " Bug " << bug.number() << ": " << bug.title() << endl; + TQString uid = "KBugBuster_" + bug.number(); + KCal::Todo *newTodo = 0; + KCal::Todo *todo = mCalendar.todo( uid ); + if ( !todo ) { + newTodo = new KCal::Todo; + newTodo->setUid( uid ); + TQString uri = "http://bugs.trinitydesktop.org/show_bug.cgi?id=%1"; + newTodo->addAttachment( new KCal::Attachment( uri.arg( bug.number() ) ) ); + todo = newTodo; + } + + todo->setSummary( bug.number() + ": " + bug.title() ); + todo->setRelatedTo( masterTodo ); + + if ( newTodo ) mCalendar.addTodo( newTodo ); + } + + emit resourceChanged( this ); +} + +void KCalResource::slotLoadJobResult( TDEIO::Job *job ) +{ + if ( job->error() ) { + job->showErrorDialog( 0 ); + } else { + kdDebug() << "KCalResource::slotLoadJobResult() success" << endl; + + mCalendar.close(); + mCalendar.load( cacheFile() ); + + emit resourceChanged( this ); + } + + mDownloadJob = 0; + + emit resourceLoaded( this ); +} + +bool KCalResource::doSave() +{ + kdDebug() << "KCalResource::doSave()" << endl; + + if ( !mOpen ) return true; + + if ( readOnly() ) { + emit resourceSaved( this ); + return true; + } + + if ( mDownloadJob ) { + kdWarning() << "KCalResource::save(): download still in progress." + << endl; + return false; + } + if ( mUploadJob ) { + kdWarning() << "KCalResource::save(): upload still in progress." + << endl; + return false; + } + + mCalendar.save( cacheFile() ); + + mUploadJob = TDEIO::file_copy( KURL( cacheFile() ), mUploadUrl, -1, true ); + connect( mUploadJob, TQT_SIGNAL( result( TDEIO::Job * ) ), + TQT_SLOT( slotSaveJobResult( TDEIO::Job * ) ) ); + + return true; +} + +bool KCalResource::isSaving() +{ + return mUploadJob; +} + +void KCalResource::slotSaveJobResult( TDEIO::Job *job ) +{ + if ( job->error() ) { + job->showErrorDialog( 0 ); + } else { + kdDebug() << "KCalResource::slotSaveJobResult() success" << endl; + } + + mUploadJob = 0; + + emit resourceSaved( this ); +} + +void KCalResource::doClose() +{ + if ( !mOpen ) return; + + mCalendar.close(); + mOpen = false; +} + +KABC::Lock *KCalResource::lock() +{ + return mLock; +} + +void KCalResource::dump() const +{ + ResourceCalendar::dump(); + kdDebug(5800) << " DownloadUrl: " << mDownloadUrl.url() << endl; + kdDebug(5800) << " UploadUrl: " << mUploadUrl.url() << endl; + kdDebug(5800) << " ReloadPolicy: " << mReloadPolicy << endl; +} + +#include "kcalresource.moc" diff --git a/kbugbuster/tderesources/kcalresource.h b/kbugbuster/tderesources/kcalresource.h new file mode 100644 index 00000000..cfa4e2a6 --- /dev/null +++ b/kbugbuster/tderesources/kcalresource.h @@ -0,0 +1,124 @@ +/* + This file is part of KBugBuster. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KCALRESOURCE_H +#define KCALRESOURCE_H + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include + +namespace TDEIO { +class FileCopyJob; +class Job; +} + +namespace KBB { +class ResourcePrefs; +} + +/** + This class provides a calendar stored as a remote file. +*/ +class KCalResource : public KCal::ResourceCached +{ + Q_OBJECT + + + friend class KCalResourceConfig; + + public: + /** + Reload policy. + + @see setReloadPolicy(), reloadPolicy() + */ + enum { ReloadNever, ReloadOnStartup, ReloadOnceADay, ReloadAlways }; + + /** + Create resource from configuration information stored in TDEConfig object. + */ + KCalResource( const TDEConfig * ); + ~KCalResource(); + + void readConfig( const TDEConfig *config ); + void writeConfig( TDEConfig *config ); + + KBB::ResourcePrefs *prefs(); + + /** + Return name of file used as cache for remote file. + */ + TQString cacheFile(); + + KABC::Lock *lock(); + + bool isSaving(); + + void dump() const; + + protected slots: + void slotBugListAvailable( const Package &, const TQString &, + const Bug::List &bugs ); + + void slotLoadJobResult( TDEIO::Job * ); + void slotSaveJobResult( TDEIO::Job * ); + + protected: + bool doOpen(); + void doClose(); + bool doLoad(); + bool doSave(); + + private: + void init(); + + KBB::ResourcePrefs *mPrefs; + + KURL mDownloadUrl; + KURL mUploadUrl; + + int mReloadPolicy; + + KCal::ICalFormat mFormat; + + bool mOpen; + + TDEIO::FileCopyJob *mDownloadJob; + TDEIO::FileCopyJob *mUploadJob; + + KABC::Lock *mLock; + + class Private; + Private *d; +}; + +#endif diff --git a/kbugbuster/tderesources/kcalresource_plugin.cpp b/kbugbuster/tderesources/kcalresource_plugin.cpp new file mode 100644 index 00000000..7cf81289 --- /dev/null +++ b/kbugbuster/tderesources/kcalresource_plugin.cpp @@ -0,0 +1,37 @@ +/* + This file is part of KBugBuster. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kcalresourceconfig.h" +#include "kcalresource.h" + +#include +#include + +using namespace KCal; + +extern "C" +{ + KDE_EXPORT void *init_kcal_bugzilla() + { + TDEGlobal::locale()->insertCatalogue( "kres_bugzilla" ); + return new KRES::PluginFactory(); + } +} diff --git a/kbugbuster/tderesources/kcalresourceconfig.cpp b/kbugbuster/tderesources/kcalresourceconfig.cpp new file mode 100644 index 00000000..58466642 --- /dev/null +++ b/kbugbuster/tderesources/kcalresourceconfig.cpp @@ -0,0 +1,92 @@ +/* + This file is part of KBugBuster. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include "kcalresource.h" +#include "resourceprefs.h" +#include "kcalresourceconfig.h" + +KCalResourceConfig::KCalResourceConfig( TQWidget* parent, const char* name ) + : KRES::ConfigWidget( parent, name ) +{ + resize( 245, 115 ); + + TQGridLayout *mainLayout = new TQGridLayout( this, 2, 2 ); + mainLayout->setSpacing( KDialog::spacingHint() ); + + TQLabel *label = new TQLabel( i18n("Server:"), this ); + mainLayout->addWidget( label, 0, 0 ); + + mServerEdit = new KLineEdit( this ); + mainLayout->addWidget( mServerEdit, 0, 1 ); + + + label = new TQLabel( i18n("Product:"), this ); + mainLayout->addWidget( label, 1, 0 ); + + mProductEdit = new KLineEdit( this ); + mainLayout->addWidget( mProductEdit, 1, 1 ); + + + label = new TQLabel( i18n("Component:"), this ); + mainLayout->addWidget( label, 2, 0 ); + + mComponentEdit = new KLineEdit( this ); + mainLayout->addWidget( mComponentEdit, 2, 1 ); +} + +void KCalResourceConfig::loadSettings( KRES::Resource *resource ) +{ + KCalResource *res = static_cast( resource ); + if ( res ) { + KBB::ResourcePrefs *p = res->prefs(); + mServerEdit->setText( p->server() ); + mProductEdit->setText( p->product() ); + mComponentEdit->setText( p->component() ); + } else { + kdError(5700) << "KCalResourceConfig::loadSettings(): no KCalResource, cast failed" << endl; + } +} + +void KCalResourceConfig::saveSettings( KRES::Resource *resource ) +{ + KCalResource *res = static_cast( resource ); + if ( res ) { + KBB::ResourcePrefs *p = res->prefs(); + p->setServer( mServerEdit->text() ); + p->setProduct( mProductEdit->text() ); + p->setComponent( mComponentEdit->text() ); + } else { + kdError(5700) << "KCalResourceConfig::saveSettings(): no KCalResource, cast failed" << endl; + } +} + +#include "kcalresourceconfig.moc" diff --git a/kbugbuster/tderesources/kcalresourceconfig.h b/kbugbuster/tderesources/kcalresourceconfig.h new file mode 100644 index 00000000..f0eae40e --- /dev/null +++ b/kbugbuster/tderesources/kcalresourceconfig.h @@ -0,0 +1,54 @@ +/* + This file is part of KBugBuster. + + Copyright (c) 2003 Cornelius Schumacher + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KCALRESOURCECONFIG_H +#define KCALRESOURCECONFIG_H + +#include +#include + +class KLineEdit; + +/** + Configuration widget for remote resource. + + @see KCalResource +*/ +class KCalResourceConfig : public KRES::ConfigWidget +{ + Q_OBJECT + + public: + KCalResourceConfig( TQWidget *parent = 0, const char *name = 0 ); + + public slots: + virtual void loadSettings( KRES::Resource *resource ); + virtual void saveSettings( KRES::Resource *resource ); + + private: + KLineEdit *mServerEdit; + KLineEdit *mComponentEdit; + KLineEdit *mProductEdit; + + class Private; + Private *d; +}; + +#endif diff --git a/kbugbuster/tderesources/resourceprefs.kcfgc b/kbugbuster/tderesources/resourceprefs.kcfgc new file mode 100644 index 00000000..88125829 --- /dev/null +++ b/kbugbuster/tderesources/resourceprefs.kcfgc @@ -0,0 +1,9 @@ +# Code generation options for kconfig_compiler +File=tderesources_kcal_bugzilla.kcfg +ClassName=ResourcePrefs +NameSpace=KBB +Singleton=false +Mutators=true +GlobalEnums=true +#ItemAccessors=true +#SetUserTexts=true diff --git a/kbugbuster/tderesources/tderesources_kcal_bugzilla.kcfg b/kbugbuster/tderesources/tderesources_kcal_bugzilla.kcfg new file mode 100644 index 00000000..360a2144 --- /dev/null +++ b/kbugbuster/tderesources/tderesources_kcal_bugzilla.kcfg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + diff --git a/kioslave/svn/ksvnd/Makefile.am b/kioslave/svn/ksvnd/Makefile.am index a466be08..54eb2bee 100644 --- a/kioslave/svn/ksvnd/Makefile.am +++ b/kioslave/svn/ksvnd/Makefile.am @@ -1,4 +1,4 @@ -#INCLUDES= -I$(top_srcdir)/kwallet/client $(all_includes) +#INCLUDES= -I$(top_srcdir)/tdewallet/client $(all_includes) INCLUDES= $(all_includes) kde_module_LTLIBRARIES = kded_ksvnd.la @@ -6,7 +6,7 @@ kde_module_LTLIBRARIES = kded_ksvnd.la kded_ksvnd_la_SOURCES = commitdlg.ui ksvnd.cpp ksvnd.skel kded_ksvnd_la_METASOURCES = AUTO kded_ksvnd_la_LDFLAGS = $(all_libraries) -module -avoid-version -#kded_ksvnd_la_LIBADD = $(top_builddir)/kwallet/client/libkwalletclient.la $(LIB_KIO) +#kded_ksvnd_la_LIBADD = $(top_builddir)/tdewallet/client/libtdewalletclient.la $(LIB_KIO) kded_ksvnd_la_LIBADD = $(LIB_KIO) kded_DATA = ksvnd.desktop diff --git a/kmtrace/Makefile.am b/kmtrace/Makefile.am index b749ac29..f0718598 100644 --- a/kmtrace/Makefile.am +++ b/kmtrace/Makefile.am @@ -23,13 +23,13 @@ INCLUDES = $(all_includes) bin_PROGRAMS = kmtrace demangle kmmatch kmtrace_SOURCES = kmtrace.cpp -kmtrace_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kmtrace_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor demangle_SOURCES = demangle.cpp -demangle_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +demangle_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kmmatch_SOURCES = match.cpp -kmmatch_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kmmatch_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor bin_SCRIPTS = kminspector diff --git a/kompare/CMakeLists.txt b/kompare/CMakeLists.txt index 42d5d457..2f35d2a6 100644 --- a/kompare/CMakeLists.txt +++ b/kompare/CMakeLists.txt @@ -50,6 +50,6 @@ tde_add_executable( kompare AUTOMOC main.cpp kompare_shell.cpp kompareurldialog.cpp LINK dialogpages-static kompareinterface-shared kio-shared - kparts-shared ktexteditor-shared + tdeparts-shared tdetexteditor-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kompare/Makefile.am b/kompare/Makefile.am index 883cdf8b..6413c160 100644 --- a/kompare/Makefile.am +++ b/kompare/Makefile.am @@ -26,11 +26,11 @@ bin_PROGRAMS = kompare # the application source, library search path, and link libraries kompare_SOURCES = main.cpp kompare_shell.cpp kompareurldialog.cpp -kompare_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kompare_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kompare_LDADD = $(LIB_KPARTS) \ $(top_builddir)/kompare/interfaces/libkompareinterface.la \ $(top_builddir)/kompare/libdialogpages/libdialogpages.la \ - -lktexteditor + -ltdetexteditor # this is where the desktop file will go xdg_apps_DATA = kompare.desktop diff --git a/kompare/kompare_shell.cpp b/kompare/kompare_shell.cpp index 94e9747d..5e6522cf 100644 --- a/kompare/kompare_shell.cpp +++ b/kompare/kompare_shell.cpp @@ -17,9 +17,9 @@ ** ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kompare/kompare_shell.h b/kompare/kompare_shell.h index 6e51c0eb..5b7a5abe 100644 --- a/kompare/kompare_shell.h +++ b/kompare/kompare_shell.h @@ -21,7 +21,7 @@ #define KOMPARESHELL_H #include -#include +#include #include "kompare.h" diff --git a/kompare/komparenavtreepart/CMakeLists.txt b/kompare/komparenavtreepart/CMakeLists.txt index 32af4732..732d27d5 100644 --- a/kompare/komparenavtreepart/CMakeLists.txt +++ b/kompare/komparenavtreepart/CMakeLists.txt @@ -31,6 +31,6 @@ install( FILES komparenavtreepart.desktop tde_add_kpart( libkomparenavtreepart AUTOMOC SOURCES komparenavtreepart.cpp - LINK diff2-static kparts-shared + LINK diff2-static tdeparts-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kompare/komparenavtreepart/komparenavtreepart.h b/kompare/komparenavtreepart/komparenavtreepart.h index 0f670295..f535f676 100644 --- a/kompare/komparenavtreepart/komparenavtreepart.h +++ b/kompare/komparenavtreepart/komparenavtreepart.h @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include "kompare.h" #include "diffmodellist.h" diff --git a/kompare/komparepart/CMakeLists.txt b/kompare/komparepart/CMakeLists.txt index 00fe0e04..10083566 100644 --- a/kompare/komparepart/CMakeLists.txt +++ b/kompare/komparepart/CMakeLists.txt @@ -41,6 +41,6 @@ tde_add_kpart( libkomparepart AUTOMOC komparesaveoptionswidget.cpp LINK dialogpages-static diff2-static kompareinterface-shared - kparts-shared + tdeparts-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kompare/komparepart/kompare_part.cpp b/kompare/komparepart/kompare_part.cpp index c9e1f19b..52de1f5f 100644 --- a/kompare/komparepart/kompare_part.cpp +++ b/kompare/komparepart/kompare_part.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include //#include #include diff --git a/kompare/komparepart/kompare_part.h b/kompare/komparepart/kompare_part.h index 721d7afc..f853fa36 100644 --- a/kompare/komparepart/kompare_part.h +++ b/kompare/komparepart/kompare_part.h @@ -22,8 +22,8 @@ #ifndef KOMPAREPART_H #define KOMPAREPART_H -#include -#include +#include +#include #include "kompare.h" diff --git a/kompare/libdialogpages/diffpage.cpp b/kompare/libdialogpages/diffpage.cpp index 705f32b0..a70e3f44 100644 --- a/kompare/libdialogpages/diffpage.cpp +++ b/kompare/libdialogpages/diffpage.cpp @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include "diffsettings.h" diff --git a/kompare/tests/subversion/contextm.diff b/kompare/tests/subversion/contextm.diff index 5d331bcc..6d63c9fe 100644 --- a/kompare/tests/subversion/contextm.diff +++ b/kompare/tests/subversion/contextm.diff @@ -93,7 +93,7 @@ Index: README ! turns out that it is not necessary to have a native Vim. ! ! -! I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and ktexteditor. +! I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and tdetexteditor. ! ! As far as I can tell, the part is race-condition free. If you issue many sendNormalCmd and many evalExpr, they are guaranted to be executed sequentially. This has caused me enough problems when it wasn't the case! ! diff --git a/kompare/tests/subversion/normalm.diff b/kompare/tests/subversion/normalm.diff index c3249ccc..6ea65004 100644 --- a/kompare/tests/subversion/normalm.diff +++ b/kompare/tests/subversion/normalm.diff @@ -87,7 +87,7 @@ Index: README < turns out that it is not necessary to have a native Vim. < < -< I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and ktexteditor. +< I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and tdetexteditor. < < As far as I can tell, the part is race-condition free. If you issue many sendNormalCmd and many evalExpr, they are guaranted to be executed sequentially. This has caused me enough problems when it wasn't the case! < diff --git a/kompare/tests/subversion/unifiedm.diff b/kompare/tests/subversion/unifiedm.diff index 4ac8f769..1c5c873c 100644 --- a/kompare/tests/subversion/unifiedm.diff +++ b/kompare/tests/subversion/unifiedm.diff @@ -90,7 +90,7 @@ Index: README -turns out that it is not necessary to have a native Vim. - - --I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and ktexteditor. +-I use QXembed, a widget which can embed any X application if it knows its X Window Id, using some X feature. The patch I provide will make vim displays its window id on stdout when the window is mapped. GVim 6.0 then provides a way to send commands to a Vim window from another process. If you look at the VimWidget source, you will see that 70% of the code is there to handle the communication process. The rest uses the communication channel to send the vim commands needed by kpart and tdetexteditor. - -As far as I can tell, the part is race-condition free. If you issue many sendNormalCmd and many evalExpr, they are guaranted to be executed sequentially. This has caused me enough problems when it wasn't the case! - diff --git a/kuiviewer/CMakeLists.txt b/kuiviewer/CMakeLists.txt index 5c0fcaa0..c38517d3 100644 --- a/kuiviewer/CMakeLists.txt +++ b/kuiviewer/CMakeLists.txt @@ -46,7 +46,7 @@ install( FILES tde_add_kpart( libkuiviewerpart AUTOMOC SOURCES kuiviewer_part.cpp - LINK ktexteditor-shared ${TQTQUI_LIBRARIES} + LINK tdetexteditor-shared ${TQTQUI_LIBRARIES} DESTINATION ${PLUGIN_INSTALL_DIR} ) @@ -64,6 +64,6 @@ tde_add_kpart( quithumbnail tde_add_executable( kuiviewer AUTOMOC SOURCES main.cpp kuiviewer.cpp - LINK ktexteditor-shared + LINK tdetexteditor-shared DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/kuiviewer/Makefile.am b/kuiviewer/Makefile.am index 7f31a16d..d3ba9a11 100644 --- a/kuiviewer/Makefile.am +++ b/kuiviewer/Makefile.am @@ -25,7 +25,7 @@ bin_PROGRAMS = kuiviewer # the application source, library search path, and link libraries kuiviewer_SOURCES = main.cpp kuiviewer.cpp -kuiviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +kuiviewer_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor kuiviewer_LDADD = $(LIB_KPARTS) xdg_apps_DATA =kuiviewer.desktop diff --git a/kuiviewer/kuiviewer.h b/kuiviewer/kuiviewer.h index 7ac3ed9a..e404b66a 100644 --- a/kuiviewer/kuiviewer.h +++ b/kuiviewer/kuiviewer.h @@ -28,7 +28,7 @@ #endif #include -#include +#include class KToggleAction; class KListView; diff --git a/kuiviewer/kuiviewer_part.cpp b/kuiviewer/kuiviewer_part.cpp index b14d2412..dcd33c30 100644 --- a/kuiviewer/kuiviewer_part.cpp +++ b/kuiviewer/kuiviewer_part.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/kuiviewer/kuiviewer_part.h b/kuiviewer/kuiviewer_part.h index 779a51cd..a0dd6d8b 100644 --- a/kuiviewer/kuiviewer_part.h +++ b/kuiviewer/kuiviewer_part.h @@ -23,7 +23,7 @@ #define KUIVIEWERPART_H #include -#include +#include class TQWidget; class KURL; diff --git a/kunittest/CMakeLists.txt b/kunittest/CMakeLists.txt deleted file mode 100644 index 8eb4cae0..00000000 --- a/kunittest/CMakeLists.txt +++ /dev/null @@ -1,50 +0,0 @@ -################################################# -# -# (C) 2012 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### headers ################################### - -install( FILES - runnergui.h - DESTINATION ${INCLUDE_INSTALL_DIR}/kunittest ) - -install( PROGRAMS - kunittest kunittestmod kunittest_debughelper - DESTINATION ${BIN_INSTALL_DIR} ) - - -##### kunittestgui (shared) ##################### - -tde_add_library( kunittestgui SHARED AUTOMOC - SOURCES testerwidget.ui runnergui.cpp dcopinterface.skel - VERSION 0.0.0 - LINK kunittest-shared - DESTINATION ${LIB_INSTALL_DIR} -) - - -##### kunittestguimodrunner (executable) ######## - -tde_add_executable( kunittestguimodrunner - SOURCES guimodrunner.cpp - LINK kunittestgui-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/kunittest/Makefile.am b/kunittest/Makefile.am deleted file mode 100644 index 5af6f67a..00000000 --- a/kunittest/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -SUBDIRS = example -INCLUDES = $(all_includes) -METASOURCES = AUTO - -lib_LTLIBRARIES = libkunittestgui.la -libkunittestgui_la_SOURCES = testerwidget.ui runnergui.cpp dcopinterface.skel -libkunittestgui_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -lkunittest -libkunittestgui_la_LIBADD = -lkunittest $(LIB_TDECORE) - -runnergui.lo : testerwidget.h - -bin_PROGRAMS = kunittestguimodrunner -kunittestguimodrunner_SOURCES = guimodrunner.cpp -kunittestguimodrunner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -lkunittest -kunittestguimodrunner_LDADD = libkunittestgui.la $(LIB_TDECORE) $(LIB_KIO) - -noinst_HEADERS = dcopinterface.h -libkunittestinclude_HEADERS = runnergui.h -libkunittestincludedir = $(includedir)/kunittest - -bin_SCRIPTS = kunittest kunittestmod kunittest_debughelper diff --git a/kunittest/dcopinterface.h b/kunittest/dcopinterface.h deleted file mode 100644 index 50f15d3d..00000000 --- a/kunittest/dcopinterface.h +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2005 by Jeroen Wijnhout * - * Jeroen.Wijnhout@kdemail.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef KUNITTEST_DCOPINTERFACE_H -#define KUNITTEST_DCOPINTERFACE_H - -#include -#include - -namespace KUnitTest -{ - class DCOPInterface : public DCOPObject - { - K_DCOP - - k_dcop: - virtual bool addDebugInfo(const TQString &name, const TQString &info) = 0; - virtual bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info) = 0; - }; -} - -#endif diff --git a/kunittest/example/Makefile.am b/kunittest/example/Makefile.am deleted file mode 100644 index d008ca22..00000000 --- a/kunittest/example/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = simple module diff --git a/kunittest/example/module/Makefile.am b/kunittest/example/module/Makefile.am deleted file mode 100644 index 17404d06..00000000 --- a/kunittest/example/module/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I$(top_srcdir)/include $(all_includes) -METASOURCES = AUTO - -noinst_HEADERS = samplemodule.h sampleextra.h sampletests.h - -check_LTLIBRARIES = kunittest_samplemodule.la kunittest_samplemodule2.la - -kunittest_samplemodule_la_SOURCES = samplemodule.cpp sampletests.cpp sampleextra.cpp -kunittest_samplemodule_la_LIBADD = -lkunittest -kunittest_samplemodule_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) $(all_libraries) - -kunittest_samplemodule2_la_SOURCES = samplemodule2.cpp -kunittest_samplemodule2_la_LIBADD = -lkunittest -kunittest_samplemodule2_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) $(all_libraries) - -check-local: - kunittestmodrunner - -guicheck: - $(srcdir)/../../kunittestmod $(PWD) diff --git a/kunittest/example/module/sampleextra.cpp b/kunittest/example/module/sampleextra.cpp deleted file mode 100644 index fa17aa6c..00000000 --- a/kunittest/example/module/sampleextra.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include "sampleextra.h" - - -void SomeExtraTester::allTests() -{ - kdDebug() << "Debug output belonging to SomeExtraTester." << endl; - - CHECK( TQString("Extra") , TQString("Extra") ); -} diff --git a/kunittest/example/module/sampleextra.h b/kunittest/example/module/sampleextra.h deleted file mode 100644 index f27a6bd9..00000000 --- a/kunittest/example/module/sampleextra.h +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SAMPLEEXTRA_H_ -#define _SAMPLEEXTRA_H_ - -#include - -class SomeExtraTester : public KUnitTest::Tester -{ - void allTests(); -}; - -#endif diff --git a/kunittest/example/module/samplemodule.cpp b/kunittest/example/module/samplemodule.cpp deleted file mode 100644 index 3b6665fd..00000000 --- a/kunittest/example/module/samplemodule.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include - -#include "sampletests.h" -#include "sampleextra.h" - -using namespace KUnitTest; - -KUNITTEST_MODULE( kunittest_samplemodule, "Suite1" ) -KUNITTEST_MODULE_REGISTER_TESTER( SlotSampleTester ) -KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ) -KUNITTEST_MODULE_REGISTER_TESTER( SomeExtraTester ) diff --git a/kunittest/example/module/samplemodule.h b/kunittest/example/module/samplemodule.h deleted file mode 100644 index b09002c6..00000000 --- a/kunittest/example/module/samplemodule.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SAMPLETESTMODULE_H -#define SAMPLETESTMODULE_H - -#include - -class SimpleSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -class SomeSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -#endif diff --git a/kunittest/example/module/samplemodule2.cpp b/kunittest/example/module/samplemodule2.cpp deleted file mode 100644 index 672ec08a..00000000 --- a/kunittest/example/module/samplemodule2.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#include -#include -#include - -#include "samplemodule.h" - -using namespace KUnitTest; - -KUNITTEST_MODULE( kunittest_samplemodule2, "Suite2::Sub" ) -KUNITTEST_MODULE_REGISTER_TESTER( SimpleSampleTester ) -KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ) - -void SimpleSampleTester::allTests() -{ - kdDebug() << "Debug output belonging to SimpleSampleTester." << endl; - CHECK( TQString("SimpleSample") , TQString("SimpleSample") ); - - // operator == is used, so this can't work... - //XFAIL( "SimpleSample" , "SampleSimple" ); - - kdDebug() << "Do some math." << endl; - //XFAIL( 2*2 , 4 ); // to test unexpected passes - SKIP("Just curious how this 'skipping' works."); -} - -void SomeSampleTester::allTests() -{ - kdDebug() << "Checking operator precedences." << endl; - CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); - - TQStringList testList; - testList << "one" << "two"; - CHECK( testList.count() , (TQStringList::size_type) 2 ); -} diff --git a/kunittest/example/module/samplemodule2.h b/kunittest/example/module/samplemodule2.h deleted file mode 100644 index b09002c6..00000000 --- a/kunittest/example/module/samplemodule2.h +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SAMPLETESTMODULE_H -#define SAMPLETESTMODULE_H - -#include - -class SimpleSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -class SomeSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -#endif diff --git a/kunittest/example/module/sampletests.cpp b/kunittest/example/module/sampletests.cpp deleted file mode 100644 index 89e7516a..00000000 --- a/kunittest/example/module/sampletests.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#include -#include -#include - -#include "sampletests.h" -#include "sampleextra.h" - -void SlotSampleTester::setUp() -{ - kdDebug() << "setUp" << endl; - m_str = new TQString("setUp str"); -} - -void SlotSampleTester::tearDown() -{ - kdDebug() << "tearDown" << endl; - delete m_str; -} - -bool SlotSampleTester::test() -{ - kdDebug() << "SlotSampleTester::test()" << endl; - return true; -} - -void SlotSampleTester::testSlot() -{ - kdDebug() << "Debug output belonging to SlotSampleTester slot 1." << endl; - CHECK( test() , true); - CHECK( "test" , "test"); - kdDebug() << "Checking if m_str is initialized correctly." << endl; - CHECK( *m_str , TQString("setUp str") ); -} - -void SlotSampleTester::testSlot2() -{ - kdDebug() << "Debug output belonging to SlotSampleTester slot 2." << endl; - CHECK("testSlot2","testSlot2"); - CHECK(1,1); - CHECK(2,2); -} - -void SomeSampleTester::allTests() -{ - kdDebug() << "Checking operator precedences." << endl; - CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); - - TQStringList testList; - testList << "one" << "two"; - CHECK( testList.count() , (TQStringList::size_type) 2 ); - CHECK( testList.count()*2 , (TQStringList::size_type) 4 ); -} - -#include "sampletests.moc" - diff --git a/kunittest/example/module/sampletests.h b/kunittest/example/module/sampletests.h deleted file mode 100644 index 08cc1ec0..00000000 --- a/kunittest/example/module/sampletests.h +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SAMPLETESTMODULE_H -#define SAMPLETESTMODULE_H - -#include - -class SlotSampleTester : public KUnitTest::SlotTester -{ - Q_OBJECT - - -public slots: - void setUp(); - void tearDown(); - void testSlot(); - void testSlot2(); - -private: - bool test(); - - TQString *m_str; -}; - -class SomeSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -#endif diff --git a/kunittest/example/simple/Makefile.am b/kunittest/example/simple/Makefile.am deleted file mode 100644 index 5d7e3d57..00000000 --- a/kunittest/example/simple/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -INCLUDES = -I$(top_srcdir) $(all_includes) -METASOURCES = AUTO - -check_PROGRAMS = sampletests sampletestsgui - -sampletests_SOURCES = main.cpp sampletest.cpp -sampletests_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -sampletests_LDADD = -lkunittest - -sampletestsgui_SOURCES = maingui.cpp sampletest.cpp -sampletestsgui_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor -# Normally you would write -lkunittestgui here, but since the examples -# are bundled with the library source code itself we don't want to -# have you install the libraries before you can compile the examples. -sampletestsgui_LDADD = ../../libkunittestgui.la - -noinst_HEADERS = sampletest.h - -TESTS = sampletests - -guicheck: sampletestsgui - kunittest ./sampletestsgui SampleTests diff --git a/kunittest/example/simple/main.cpp b/kunittest/example/simple/main.cpp deleted file mode 100644 index a750587c..00000000 --- a/kunittest/example/simple/main.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "kunittest/runner.h" - -int main( int /*argc*/, char** /*argv*/ ) -{ - KUnitTest::Runner::self()->runTests(); - return KUnitTest::Runner::self()->numberOfFailedTests(); -} diff --git a/kunittest/example/simple/maingui.cpp b/kunittest/example/simple/maingui.cpp deleted file mode 100644 index b292d780..00000000 --- a/kunittest/example/simple/maingui.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include - -#include "kunittest/runnergui.h" - -static const char description[] = - I18N_NOOP("A simple sample."); - -static const char version[] = "0.1"; - -static KCmdLineOptions options[] = -{ -// { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, - KCmdLineLastOption -}; - -int main( int argc, char** argv ) -{ - TDEAboutData about("SampleTests", I18N_NOOP("SampleTests"), version, description, - TDEAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0, - "Jeroen.Wijnhout@kdemail.net"); - - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions( options ); - - TDEApplication app; - - KUnitTest::RunnerGUI runner(0); - runner.show(); - app.setMainWidget(&runner); - - return app.exec(); -} diff --git a/kunittest/example/simple/sampletest.cpp b/kunittest/example/simple/sampletest.cpp deleted file mode 100644 index 846d514f..00000000 --- a/kunittest/example/simple/sampletest.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include - -#include -#include - -#include "sampletest.h" - -using namespace KUnitTest; - -KUNITTEST_SUITE("SampleSuite"); -KUNITTEST_REGISTER_TESTER(SimpleSampleTester); -KUNITTEST_REGISTER_TESTER(SomeSampleTester); - -void SimpleSampleTester::allTests() -{ - kdDebug() << "Debug output belonging to SimpleSampleTester." << endl; - CHECK( TQString("SimpleSample") , TQString("SimpleSample") ); - - SKIP("Just curious how this 'skipping' works."); -} - -void SomeSampleTester::allTests() -{ - kdDebug() << "Checking operator precedences." << endl; - CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); - - TQStringList testList; - testList << "one" << "two"; - CHECK( testList.count() , (TQStringList::size_type) 2 ); -} diff --git a/kunittest/example/simple/sampletest.h b/kunittest/example/simple/sampletest.h deleted file mode 100644 index a4d85266..00000000 --- a/kunittest/example/simple/sampletest.h +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef SAMPLETEST_H -#define SAMPLETEST_H - -#include - -class SimpleSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; - -class SomeSampleTester : public KUnitTest::Tester -{ -public: - void allTests(); -}; -#endif diff --git a/kunittest/guimodrunner.cpp b/kunittest/guimodrunner.cpp deleted file mode 100644 index 11a3532b..00000000 --- a/kunittest/guimodrunner.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "runnergui.h" - -static const char description[] = - I18N_NOOP("A command-line application that can be used to run KUnitTest modules."); - -static const char version[] = "0.1"; - -static KCmdLineOptions options[] = -{ - {"query [regexp]", I18N_NOOP("Only run modules which filename match the regexp."), "^kunittest_.*\\.la$"}, - {"folder [folder]", I18N_NOOP("Only run tests modules which are found in the folder. Use the query option to select modules."), "."}, - { "enable-dbgcap", I18N_NOOP("Enables debug capturing. You typically use this option when you use the GUI."), 0}, - KCmdLineLastOption -}; - - -int main( int argc, char **argv ) -{ - TDEInstance instance("modrunner"); - - TDEAboutData about("KUnitTestModRunner", I18N_NOOP("KUnitTestModRunner"), version, description, - TDEAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0, - "Jeroen.Wijnhout@kdemail.net"); - - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions( options ); - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query")); - KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap")); - - TDEApplication app; - - KUnitTest::RunnerGUI runner(0); - runner.show(); - app.setMainWidget(&runner); - - return app.exec(); -} diff --git a/kunittest/kunittest b/kunittest/kunittest deleted file mode 100755 index fbb8424f..00000000 --- a/kunittest/kunittest +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -export APP=$1 -export DCOPNAME=$2 - -if [ ! -x $APP ] -then - kdialog --error "Sorry, $APP is not a valid executable file." - exit 1; -fi - -DEBUGHELPER=`which kunittest_debughelper` -if [ -z $DEBUGHELPER ] -then - kdialog --error "Sorry, couldn't find the kunittest_debughelper script." - exit 3 -fi - -$APP 2>&1 | perl $DEBUGHELPER "$DCOPNAME-*" diff --git a/kunittest/kunittest_debughelper b/kunittest/kunittest_debughelper deleted file mode 100755 index 66dfacf2..00000000 --- a/kunittest/kunittest_debughelper +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/perl -# Copyright (C) 2005 Jeroen Wijnhout -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -use DCOP; - -my $app = $ARGV[0]; shift @ARGV; -my $dcopid = ""; -my $testername = ""; -my $reading_debug = 0; -my $debug=""; -my $runnergui; - -my $client = new DCOP; -$client->attach(); - -while (<>) -{ - $runnergui = getDCOPObject(); - my $line = $_; - - print $_; - - if ( $line =~ /KUnitTest_Debug_End\[.*\]/ ) - { - $ret = $runnergui->addDebugInfo($testername, $debug); - - $debug = ""; - - # stop reading - $reading_debug = 0; - } - elsif ( $line =~ /KUnitTest_Debug_EndSlot\[.*\]/ ) - { - $ret = $runnergui->addSlotDebugInfo($testername, $slotname, $debug); - - $line = ""; - $debug = ""; - $slotname = ""; - } - elsif ( $line =~ /KUnitTest_Debug_BeginSlot\[(.*)\]/ ) - { - $slotname = $1; - $line = ""; - } - - if ( $reading_debug ) - { - if ( $line =~ /^check:(.*\[[0-9]+\])/ ) - { - $line = $1.":\n"; - } - - $debug = $debug.$line; - } - - if ( $line =~ /KUnitTest_Debug_Start\[(.*)\]/ ) - { - $testername = $1; - $reading_debug = 1; - $debug=""; - } -} - -sub getDCOPObject -{ - if ( $dcopid eq "" ) - { - $allapps = $client->registeredApplications(); - my $i = 0; - while ( ! ($allapps->[$i] eq "") ) - { - if ( $allapps->[$i] =~ /$app/ ) - { - print "found: ".$allapps->[$i]."\n"; - $dcopid = $allapps->[$i]; - break; - } - - $i = $i + 1; - } - - $object = $client->createObject($dcopid, "Runner"); - } - - return $object; -} \ No newline at end of file diff --git a/kunittest/kunittestmod b/kunittest/kunittestmod deleted file mode 100755 index ba039844..00000000 --- a/kunittest/kunittestmod +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -FOLDER="--folder $PWD" -QUERY="" - -while [ "$#" -gt 0 ] -do - case $1 in - -f|--folder) - FOLDER="--folder $2" - shift - ;; - -q|--query) - QUERY="--query $2" - shift - ;; - esac - # to process the next parameter - shift -done - -APP=`which kunittestguimodrunner` -if [ ! -x $APP ] -then - kdialog --error "Sorry, $APP is not a valid executable file." - exit 1; -fi - -DEBUGHELPER=`which kunittest_debughelper` -if [ -z $DEBUGHELPER ] -then - kdialog --error "Sorry, couldn't find the kunittest_debughelper script." - exit 3 -fi - -DCOPNAME="KUnitTestModRunner" -$APP --enable-dbgcap $FOLDER $QUERY 2>&1 | perl $DEBUGHELPER "$DCOPNAME-*" diff --git a/kunittest/runnergui.cpp b/kunittest/runnergui.cpp deleted file mode 100644 index 7dc67e09..00000000 --- a/kunittest/runnergui.cpp +++ /dev/null @@ -1,433 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include "dcopinterface.h" -#include "runnergui.h" -#include "testerwidget.h" - -namespace KUnitTest -{ - const int g_nameColumn = 0; - const int g_finishedColumn = 1; - const int g_skippedColumn = 2; - const int g_failedColumn = 3; - const int g_xfailedColumn = 4; - const int g_passedColumn = 5; - const int g_xpassedColumn = 6; - - /*! The DCOP implementation for the RunnerGUI. - */ - class RunnerGUIDCOPImpl : virtual public DCOPInterface - { - public: - RunnerGUIDCOPImpl(RunnerGUI *rg) : m_rg(rg) - { - // set the DCOP object id - setObjId("Runner"); - } - - /*! This DCOP method adds debug info to a given test case. - * @param name The name of the test. - * @param info The debug info. - */ - bool addDebugInfo(const TQString &name, const TQString &info) - { - Tester *tester = Runner::self()->registry().find(name.local8Bit()); - if ( tester == 0L ) return false; - - tester->results()->addDebugInfo(info); - - return true; - } - - bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info) - { - Tester *tester = Runner::self()->registry().find(name.local8Bit()); - - if ( tester == 0L ) return false; - if ( ! tester->inherits("KUnitTest::SlotTester") ) return false; - - SlotTester *sltester = static_cast(tester); - sltester->results(slt.local8Bit())->addDebugInfo(info); - - return true; - } - - private: - RunnerGUI *m_rg; - }; - - RunnerGUI::RunnerGUI(TQWidget *parent) : TQHBox(parent) - { - m_dcop = new RunnerGUIDCOPImpl(this); - - m_testerWidget = new TesterWidget(this); - setGeometry(0, 0, 700, 500); - - // file the combo box - m_testerWidget->selectCombo()->insertItem("All suites/modules . . ."); - m_testerWidget->selectCombo()->insertItem("Selected tests . . ."); - - RegistryIteratorType it(Runner::self()->registry()); - TQStringList suites; - for ( ; it.current(); ++it ) - { - addTester(it.currentKey(), it.current()); - - TQString test = it.currentKey(); - int index = test.find("::"); - if ( index != -1 ) test = test.left(index); - - if ( suites.contains(test) == 0 ) - suites.append(test); - } - - for ( uint i = 0; i < suites.count(); ++i ) - m_testerWidget->selectCombo()->insertItem(suites[i]); - - // configure the resultslist - m_testerWidget->resultList()->setAllColumnsShowFocus(true); - m_testerWidget->resultList()->setSelectionMode(TQListView::Extended); - m_testerWidget->resultList()->setRootIsDecorated(true); - m_testerWidget->resultList()->setColumnAlignment(g_finishedColumn, TQt::AlignHCenter); - m_testerWidget->resultList()->setColumnAlignment(g_skippedColumn, TQt::AlignHCenter); - m_testerWidget->resultList()->setColumnAlignment(g_failedColumn, TQt::AlignHCenter); - m_testerWidget->resultList()->setColumnAlignment(g_xfailedColumn, TQt::AlignHCenter); - m_testerWidget->resultList()->setColumnAlignment(g_passedColumn, TQt::AlignHCenter); - m_testerWidget->resultList()->setColumnAlignment(g_xpassedColumn, TQt::AlignHCenter); - - // set the text in the results label - fillResultsLabel(); - - // init the progress bar - configureProgressBar(Runner::self()->numberOfTestCases(), 0); - - connect(Runner::self(), TQT_SIGNAL(finished(const char *, Tester *)), this, TQT_SLOT(addTestResult(const char *, Tester *))); - connect(m_testerWidget->resultList(), TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(showDetails(TQListViewItem *))); - connect(m_testerWidget, TQT_SIGNAL(run()), this, TQT_SLOT(runSuite())); - connect(m_testerWidget->details(), TQT_SIGNAL(doubleClicked(int, int)), this, TQT_SLOT(doubleClickedOnDetails(int, int))); - } - - RunnerGUI::~RunnerGUI() - { - delete m_dcop; - } - - void RunnerGUI::configureProgressBar(int steps, int progress) - { - m_testerWidget->progressBar()->setTotalSteps(steps); - m_testerWidget->progressBar()->setProgress(progress); - } - - void RunnerGUI::fillResultsLabel() - { - if ( Runner::self()->numberOfTests() > 0 ) - m_testerWidget->resultsLabel()->setText( - TQString("Test cases: %1 | Tests performed: %5, Skipped: %4 | Passed: %2, Failed: %3") - .arg(Runner::self()->numberOfTestCases()) - .arg(Runner::self()->numberOfPassedTests()) - .arg(Runner::self()->numberOfFailedTests()) - .arg(Runner::self()->numberOfSkippedTests()) - .arg(Runner::self()->numberOfTests()) ); - else - m_testerWidget->resultsLabel()->setText(TQString("Test cases: %1").arg(Runner::self()->numberOfTestCases())); - } - - void RunnerGUI::addTestResult(const char *name, Tester *test) - { - TQStringList scopes = TQStringList::split("::", name); - TQString suite = scopes[0]; - - // find the suite item - TQListViewItem *item = 0L; - for ( uint i = 0; i < scopes.count(); ++i ) - item = getItem(scopes[i], item); - - if ( test->inherits("KUnitTest::SlotTester") ) - { - SlotTester *sltest = static_cast(test); - TestResultsListIteratorType it(sltest->resultsList()); - TQListViewItem *slotItem = 0L; - for ( ; it.current(); ++it) - { - slotItem = getItem(it.currentKey(), item); - setSummary(slotItem, it.current()); - } - } - else - setSummary(item, test->results()); - - fillResultsLabel(); - m_testerWidget->progressBar()->setProgress(m_testerWidget->progressBar()->progress() + 1); - } - - void RunnerGUI::addTester(const char *name, Tester *test) - { - TQStringList scopes = TQStringList::split("::", name); - TQString suite = scopes[0]; - - // find the suite item - TQListViewItem *item = 0L; - for ( uint i = 0; i < scopes.count(); ++i ) - item = getItem(scopes[i], item); - - if ( test->inherits("KUnitTest::SlotTester") ) - { - TQStrList allSlots = test->metaObject()->slotNames(); - for ( char *sl = allSlots.first(); sl; sl = allSlots.next() ) - { - if ( TQString(sl).startsWith("test") ) - getItem(sl, item); - } - } - } - - TQListViewItem *RunnerGUI::getItem(const TQString &name, TQListViewItem *item /*= 0L*/) - { - TQListViewItem *parent = item; - - if ( item == 0L ) item = m_testerWidget->resultList()->firstChild(); - else item = item->firstChild(); - - while ( item && (item->text(g_nameColumn) != name) ) - item = item->nextSibling(); - - // item not found, create it - if ( item == 0L ) - { - if ( parent == 0L ) - item = new TQListViewItem(m_testerWidget->resultList()); - else - item = new TQListViewItem(parent); - - item->setText(g_nameColumn, name); - } - - return item; - } - - void RunnerGUI::reset() - { - TQListViewItemIterator it( m_testerWidget->resultList() ); - while ( it.current() ) - { - TQListViewItem *item = it.current(); - item->setText(g_finishedColumn, "0"); - item->setText(g_skippedColumn, "0"); - item->setText(g_failedColumn, "0"); - item->setText(g_xfailedColumn, "0"); - item->setText(g_passedColumn, "0"); - item->setText(g_xpassedColumn, "0"); - item->setPixmap(g_nameColumn, TQPixmap()); - ++it; - } - } - - void RunnerGUI::setSummary(TQListViewItem *item, TestResults *res) - { - if ( item == 0L ) return; - - bool ok; - - int val = item->text(g_finishedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_finishedColumn, TQString::number(val + res->testsFinished())); - - val = item->text(g_skippedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_skippedColumn, TQString::number(val + res->skipped())); - - val = item->text(g_passedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_passedColumn, TQString::number(val + res->passed())); - - val = item->text(g_failedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_failedColumn, TQString::number(val + res->errors())); - - val = item->text(g_xfailedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_xfailedColumn, TQString::number(val + res->xfails())); - - val = item->text(g_xpassedColumn).toInt(&ok); if (!ok) val = 0; - item->setText(g_xpassedColumn, TQString::number(val + res->xpasses())); - - bool passed = (item->text(g_failedColumn).toInt(&ok) + item->text(g_xfailedColumn).toInt(&ok)) == 0; - item->setPixmap(g_nameColumn, passed ? SmallIcon("button_ok") : SmallIcon("button_cancel") ); - - setSummary(item->parent(), res); - } - - TQString RunnerGUI::fullName(TQListViewItem *item) - { - TQString name = item->text(g_nameColumn); - while ( (item = item->parent()) != 0L ) - name = item->text(g_nameColumn) + "::" + name; - - return name; - } - - void RunnerGUI::runSuite() - { - Runner::self()->reset(); - reset(); - - if ( m_testerWidget->selectCombo()->currentItem() == 0 ) - { - configureProgressBar(Runner::self()->numberOfTestCases(), 0); - Runner::self()->runTests(); - } - else if ( m_testerWidget->selectCombo()->currentItem() == 1 ) - { - TQListViewItemIterator it( m_testerWidget->resultList() ); - TQStringList prefixes; - while ( it.current() ) - { - TQListViewItem *item = it.current(); - if ( item->isSelected() ) - { - TQString prefix = fullName(item); - if ( prefix.endsWith("()") ) - { - int index = prefix.findRev("::"); - prefix = prefix.left(index); - } - prefixes << prefix; - } - - ++it; - } - - configureProgressBar(prefixes.count(), 0); - for ( uint i = 0; i < prefixes.count(); ++i ) - Runner::self()->runMatchingTests(prefixes[i]); - } - else - { - TQString suite = m_testerWidget->selectCombo()->currentText(); - TQStringList tests; - RegistryIteratorType it(Runner::self()->registry()); - for ( ; it.current(); ++it ) - if ( TQString(it.currentKey()).startsWith(suite) ) - tests.append(it.currentKey()); - - configureProgressBar(tests.count(), 0); - - for ( uint i = 0; i < tests.count(); ++i ) - Runner::self()->runTest(tests[i].local8Bit()); - } - - showDetails(m_testerWidget->resultList()->currentItem()); - } - - void RunnerGUI::showDetails(TQListViewItem *item) - { - if ( item == 0L ) return; - - TQString name = fullName(item); - if ( name.endsWith("()") ) name = fullName(item->parent()); - - Tester *tester = Runner::self()->registry().find(name.local8Bit()); - - if ( tester == 0L ) return; - - TestResults *res = 0L; - if ( tester->inherits("KUnitTest::SlotTester") ) - res = static_cast(tester)->results(item->text(g_nameColumn).local8Bit()); - else - res = tester->results(); - - if ( tester == 0L ) - m_testerWidget->details()->setText("No test found with name: " + fullName(item)); - else - { - TQTextEdit *te = m_testerWidget->details(); - - te->clear(); - - te->append("Errors:
"); - appendList(te, res->errorList()); - - te->append("

Expected to fail:
"); - appendList(te, res->xfailList()); - - te->append("

Unexpected Success:
"); - appendList(te, res->xpassList()); - - te->append("

Success:
"); - appendList(te, res->successList()); - - te->append("

Skipped:
"); - appendList(te, res->skipList()); - - te->append("

Debug:
"); - - te->append(res->debugInfo()); - - te->scrollToAnchor("errors"); - } - } - - void RunnerGUI::appendList(TQTextEdit *te, const TQStringList &list) - { - for ( uint i = 0; i < list.count(); ++i ) - te->append(list[i]); - } - - void RunnerGUI::doubleClickedOnDetails(int para, int /*pos*/) - { - static TQRegExp reFileAndLine("^(.*)\\[([0-9]+)\\]:"); - - TQString line = m_testerWidget->details()->text(para); - m_testerWidget->details()->setSelection(para, 0, para, line.length()-1); - - if ( reFileAndLine.search(line) != -1 ) - { - DCOPClient client; - client.attach(); - TQByteArray data; - TQDataStream arg(data, IO_WriteOnly); - bool ok; - arg << TQString(reFileAndLine.cap(1)) << (reFileAndLine.cap(2).toInt(&ok) - 1); - client.send("tdevelop-*", "KDevPartController", "editDocument(TQString,int)", data); - client.send("tdevelop-*", "MainWindow", "raise()", TQString("")); - - client.detach(); - } - } -} - -#include "runnergui.moc" diff --git a/kunittest/runnergui.h b/kunittest/runnergui.h deleted file mode 100644 index dc1e5f2a..00000000 --- a/kunittest/runnergui.h +++ /dev/null @@ -1,79 +0,0 @@ -/** - * Copyright (C) 2005 Jeroen Wijnhout - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _KUNITTEST_TESTER_H_ -#define _KUNITTEST_TESTER_H_ - -#include -#include - -#include -#include - -#include - -class TesterWidget; -class TQTextEdit; - -namespace KUnitTest -{ - class RunnerGUIDCOPImpl; - - class KDE_EXPORT RunnerGUI : public TQHBox - { - Q_OBJECT - - - public: - RunnerGUI(TQWidget *parent); - ~RunnerGUI(); - - private slots: - void addTestResult(const char *name, Tester *test); - void addTester(const char *name, Tester *test); - void showDetails(TQListViewItem *item); - void runSuite(); - void doubleClickedOnDetails(int para, int pos); - - private: - void reset(); - void configureProgressBar(int steps, int progress); - void fillResultsLabel(); - void appendList(TQTextEdit *te, const TQStringList &list); - - TQListViewItem *getItem(const TQString &name, TQListViewItem *item = 0L); - void setItem(TQListViewItem *item, const TestResults *res); - TQString fullName(TQListViewItem *item); - - void setSummary(TQListViewItem *item, TestResults *res); - - TesterWidget *m_testerWidget; - - friend class RunnerGUIDCOPImpl; - RunnerGUIDCOPImpl *m_dcop; - }; -} - -#endif diff --git a/kunittest/testerwidget.ui b/kunittest/testerwidget.ui deleted file mode 100644 index e6e92e1c..00000000 --- a/kunittest/testerwidget.ui +++ /dev/null @@ -1,197 +0,0 @@ - -TesterWidget - - - TesterWidget - - - - 0 - 0 - 622 - 773 - - - - - 500 - 500 - - - - KUnitTester - - - - unnamed - - - - m_pshRun - - - Run - - - - - m_pbProgress - - - - - m_cbSelect - - - - 7 - 0 - 0 - 0 - - - - - - m_lbSelect - - - Select a suite or module: - - - - - m_lbResults - - - - - - - - - Test - - - true - - - true - - - - - Finished - - - true - - - true - - - - - Skipped - - - true - - - true - - - - - Failed - - - true - - - true - - - - - xFailed - - - true - - - true - - - - - Passed - - - true - - - true - - - - - xPassed - - - true - - - true - - - - m_lvResults - - - - 7 - 1 - 0 - 0 - - - - - 0 - 200 - - - - - - m_teDetails - - - - 600 - 200 - - - - true - - - - - - testerwidget.ui.h - - - run() - - - init() - resultList() - details() - progressBar() - resultsLabel() - selectCombo() - - - diff --git a/kunittest/testerwidget.ui.h b/kunittest/testerwidget.ui.h deleted file mode 100644 index f80a248d..00000000 --- a/kunittest/testerwidget.ui.h +++ /dev/null @@ -1,46 +0,0 @@ -/**************************************************************************** -** ui.h extension file, included from the uic-generated form implementation. -** -** If you want to add, delete, or rename functions or slots, use -** TQt Designer to update this file, preserving your code. -** -** You should not define a constructor or destructor in this file. -** Instead, write your code in functions called init() and destroy(). -** These will automatically be called by the form's constructor and -** destructor. -*****************************************************************************/ - - -void TesterWidget::init() -{ - connect(m_pshRun, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(run())); -} - -TQListView * TesterWidget::resultList() -{ - return m_lvResults; -} - - -TQTextEdit * TesterWidget::details() -{ - return m_teDetails; -} - - -TQProgressBar * TesterWidget::progressBar() -{ - return m_pbProgress; -} - - -TQLabel * TesterWidget::resultsLabel() -{ - return m_lbResults; -} - - -TQComboBox * TesterWidget::selectCombo() -{ - return m_cbSelect; -} diff --git a/poxml/Makefile.am b/poxml/Makefile.am index bd73dfb4..a17a445c 100644 --- a/poxml/Makefile.am +++ b/poxml/Makefile.am @@ -7,23 +7,23 @@ KDE_CXXFLAGS = $(USE_EXCEPTIONS) SUBDIRS = antlr split2po_SOURCES = split.cpp parser.cpp -split2po_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +split2po_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor split2po_LDADD = $(LIB_QT) xml2pot_SOURCES = xml2pot.cpp parser.cpp -xml2pot_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +xml2pot_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor xml2pot_LDADD = $(LIB_QT) po2xml_SOURCES = GettextLexer.cpp GettextParser.cpp po2xml.cpp parser.cpp -po2xml_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +po2xml_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor po2xml_LDADD = antlr/src/libantlr.la $(LIB_QT) swappo_SOURCES = GettextLexer.cpp GettextParser.cpp swappo.cpp parser.cpp -swappo_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +swappo_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor swappo_LDADD = antlr/src/libantlr.la $(LIB_QT) transxx_SOURCES = GettextLexer.cpp GettextParser.cpp transxx.cpp parser.cpp -transxx_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +transxx_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor transxx_LDADD = antlr/src/libantlr.la $(LIB_QT) parser: diff --git a/scripts/kde-spellcheck.pl b/scripts/kde-spellcheck.pl index f49c6df2..e1f28e4e 100755 --- a/scripts/kde-spellcheck.pl +++ b/scripts/kde-spellcheck.pl @@ -954,7 +954,7 @@ klicking clicking knowlege knowledge Konquerer Konqueror konstants constants -kscreensave kscreensaver +kscreensave tdescreensaver labelling labeling Labelling Labeling lauching launching diff --git a/scripts/tdesvn-build b/scripts/tdesvn-build index 17efa128..05c1b655 100755 --- a/scripts/tdesvn-build +++ b/scripts/tdesvn-build @@ -4242,7 +4242,7 @@ eval # Do some necessary adjusting. Right now this is used for supporting # the command-line option shortcut to where you can enter e.g. - # tdelibs/khtml, and the script will only try to update that part of + # tdelibs/tdehtml, and the script will only try to update that part of # the module. munge_lists(); diff --git a/scripts/tdesvn-buildrc-sample b/scripts/tdesvn-buildrc-sample index d62c8b56..460e0b5d 100644 --- a/scripts/tdesvn-buildrc-sample +++ b/scripts/tdesvn-buildrc-sample @@ -71,7 +71,7 @@ global # the per-module "prefix" option. Note that when doing this you need to # set TDEDIRS, PATH and LD_LIBRARY_PATH to point to both directories, # and that you should use separate test users or TDEHOME values to separate -# the ksycoca databases. Only set prefix if you know what you're doing. +# the tdesycoca databases. Only set prefix if you know what you're doing. # If you would like install TDE to the system (DO NOT INSTALL *over* a prior # installation!), then you'll probably need to use sudo to install everything. diff --git a/tdecachegrind/tdecachegrind/Makefile.am b/tdecachegrind/tdecachegrind/Makefile.am index 53cd35d8..f7c1bf8c 100644 --- a/tdecachegrind/tdecachegrind/Makefile.am +++ b/tdecachegrind/tdecachegrind/Makefile.am @@ -44,7 +44,7 @@ INCLUDES= $(all_includes) METASOURCES = AUTO # the library search path. -tdecachegrind_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +tdecachegrind_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor rcdir = $(kde_datadir)/tdecachegrind rc_DATA = tdecachegrindui.rc diff --git a/tdeunittest/CMakeLists.txt b/tdeunittest/CMakeLists.txt new file mode 100644 index 00000000..2a4e1f5a --- /dev/null +++ b/tdeunittest/CMakeLists.txt @@ -0,0 +1,50 @@ +################################################# +# +# (C) 2012 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### headers ################################### + +install( FILES + runnergui.h + DESTINATION ${INCLUDE_INSTALL_DIR}/tdeunittest ) + +install( PROGRAMS + tdeunittest tdeunittestmod tdeunittest_debughelper + DESTINATION ${BIN_INSTALL_DIR} ) + + +##### tdeunittestgui (shared) ##################### + +tde_add_library( tdeunittestgui SHARED AUTOMOC + SOURCES testerwidget.ui runnergui.cpp dcopinterface.skel + VERSION 0.0.0 + LINK tdeunittest-shared + DESTINATION ${LIB_INSTALL_DIR} +) + + +##### tdeunittestguimodrunner (executable) ######## + +tde_add_executable( tdeunittestguimodrunner + SOURCES guimodrunner.cpp + LINK tdeunittestgui-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/tdeunittest/Makefile.am b/tdeunittest/Makefile.am new file mode 100644 index 00000000..5393f517 --- /dev/null +++ b/tdeunittest/Makefile.am @@ -0,0 +1,21 @@ +SUBDIRS = example +INCLUDES = $(all_includes) +METASOURCES = AUTO + +lib_LTLIBRARIES = libtdeunittestgui.la +libtdeunittestgui_la_SOURCES = testerwidget.ui runnergui.cpp dcopinterface.skel +libtdeunittestgui_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -ltdeunittest +libtdeunittestgui_la_LIBADD = -ltdeunittest $(LIB_TDECORE) + +runnergui.lo : testerwidget.h + +bin_PROGRAMS = tdeunittestguimodrunner +tdeunittestguimodrunner_SOURCES = guimodrunner.cpp +tdeunittestguimodrunner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor -ltdeunittest +tdeunittestguimodrunner_LDADD = libtdeunittestgui.la $(LIB_TDECORE) $(LIB_KIO) + +noinst_HEADERS = dcopinterface.h +libtdeunittestinclude_HEADERS = runnergui.h +libtdeunittestincludedir = $(includedir)/tdeunittest + +bin_SCRIPTS = tdeunittest tdeunittestmod tdeunittest_debughelper diff --git a/tdeunittest/dcopinterface.h b/tdeunittest/dcopinterface.h new file mode 100644 index 00000000..50f15d3d --- /dev/null +++ b/tdeunittest/dcopinterface.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2005 by Jeroen Wijnhout * + * Jeroen.Wijnhout@kdemail.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef KUNITTEST_DCOPINTERFACE_H +#define KUNITTEST_DCOPINTERFACE_H + +#include +#include + +namespace KUnitTest +{ + class DCOPInterface : public DCOPObject + { + K_DCOP + + k_dcop: + virtual bool addDebugInfo(const TQString &name, const TQString &info) = 0; + virtual bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info) = 0; + }; +} + +#endif diff --git a/tdeunittest/example/Makefile.am b/tdeunittest/example/Makefile.am new file mode 100644 index 00000000..d008ca22 --- /dev/null +++ b/tdeunittest/example/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = simple module diff --git a/tdeunittest/example/module/Makefile.am b/tdeunittest/example/module/Makefile.am new file mode 100644 index 00000000..6d1b7961 --- /dev/null +++ b/tdeunittest/example/module/Makefile.am @@ -0,0 +1,20 @@ +INCLUDES = -I$(top_srcdir)/include $(all_includes) +METASOURCES = AUTO + +noinst_HEADERS = samplemodule.h sampleextra.h sampletests.h + +check_LTLIBRARIES = tdeunittest_samplemodule.la tdeunittest_samplemodule2.la + +tdeunittest_samplemodule_la_SOURCES = samplemodule.cpp sampletests.cpp sampleextra.cpp +tdeunittest_samplemodule_la_LIBADD = -ltdeunittest +tdeunittest_samplemodule_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) $(all_libraries) + +tdeunittest_samplemodule2_la_SOURCES = samplemodule2.cpp +tdeunittest_samplemodule2_la_LIBADD = -ltdeunittest +tdeunittest_samplemodule2_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN) $(all_libraries) + +check-local: + tdeunittestmodrunner + +guicheck: + $(srcdir)/../../tdeunittestmod $(PWD) diff --git a/tdeunittest/example/module/sampleextra.cpp b/tdeunittest/example/module/sampleextra.cpp new file mode 100644 index 00000000..e4574c09 --- /dev/null +++ b/tdeunittest/example/module/sampleextra.cpp @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include "sampleextra.h" + + +void SomeExtraTester::allTests() +{ + kdDebug() << "Debug output belonging to SomeExtraTester." << endl; + + CHECK( TQString("Extra") , TQString("Extra") ); +} diff --git a/tdeunittest/example/module/sampleextra.h b/tdeunittest/example/module/sampleextra.h new file mode 100644 index 00000000..dbd19dc8 --- /dev/null +++ b/tdeunittest/example/module/sampleextra.h @@ -0,0 +1,36 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _SAMPLEEXTRA_H_ +#define _SAMPLEEXTRA_H_ + +#include + +class SomeExtraTester : public KUnitTest::Tester +{ + void allTests(); +}; + +#endif diff --git a/tdeunittest/example/module/samplemodule.cpp b/tdeunittest/example/module/samplemodule.cpp new file mode 100644 index 00000000..4ffadb6c --- /dev/null +++ b/tdeunittest/example/module/samplemodule.cpp @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include + +#include "sampletests.h" +#include "sampleextra.h" + +using namespace KUnitTest; + +KUNITTEST_MODULE( tdeunittest_samplemodule, "Suite1" ) +KUNITTEST_MODULE_REGISTER_TESTER( SlotSampleTester ) +KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ) +KUNITTEST_MODULE_REGISTER_TESTER( SomeExtraTester ) diff --git a/tdeunittest/example/module/samplemodule.h b/tdeunittest/example/module/samplemodule.h new file mode 100644 index 00000000..953c0816 --- /dev/null +++ b/tdeunittest/example/module/samplemodule.h @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SAMPLETESTMODULE_H +#define SAMPLETESTMODULE_H + +#include + +class SimpleSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +class SomeSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +#endif diff --git a/tdeunittest/example/module/samplemodule2.cpp b/tdeunittest/example/module/samplemodule2.cpp new file mode 100644 index 00000000..1e08f102 --- /dev/null +++ b/tdeunittest/example/module/samplemodule2.cpp @@ -0,0 +1,61 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include "samplemodule.h" + +using namespace KUnitTest; + +KUNITTEST_MODULE( tdeunittest_samplemodule2, "Suite2::Sub" ) +KUNITTEST_MODULE_REGISTER_TESTER( SimpleSampleTester ) +KUNITTEST_MODULE_REGISTER_TESTER( SomeSampleTester ) + +void SimpleSampleTester::allTests() +{ + kdDebug() << "Debug output belonging to SimpleSampleTester." << endl; + CHECK( TQString("SimpleSample") , TQString("SimpleSample") ); + + // operator == is used, so this can't work... + //XFAIL( "SimpleSample" , "SampleSimple" ); + + kdDebug() << "Do some math." << endl; + //XFAIL( 2*2 , 4 ); // to test unexpected passes + SKIP("Just curious how this 'skipping' works."); +} + +void SomeSampleTester::allTests() +{ + kdDebug() << "Checking operator precedences." << endl; + CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); + + TQStringList testList; + testList << "one" << "two"; + CHECK( testList.count() , (TQStringList::size_type) 2 ); +} diff --git a/tdeunittest/example/module/samplemodule2.h b/tdeunittest/example/module/samplemodule2.h new file mode 100644 index 00000000..953c0816 --- /dev/null +++ b/tdeunittest/example/module/samplemodule2.h @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SAMPLETESTMODULE_H +#define SAMPLETESTMODULE_H + +#include + +class SimpleSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +class SomeSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +#endif diff --git a/tdeunittest/example/module/sampletests.cpp b/tdeunittest/example/module/sampletests.cpp new file mode 100644 index 00000000..4a38642d --- /dev/null +++ b/tdeunittest/example/module/sampletests.cpp @@ -0,0 +1,82 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include +#include +#include + +#include "sampletests.h" +#include "sampleextra.h" + +void SlotSampleTester::setUp() +{ + kdDebug() << "setUp" << endl; + m_str = new TQString("setUp str"); +} + +void SlotSampleTester::tearDown() +{ + kdDebug() << "tearDown" << endl; + delete m_str; +} + +bool SlotSampleTester::test() +{ + kdDebug() << "SlotSampleTester::test()" << endl; + return true; +} + +void SlotSampleTester::testSlot() +{ + kdDebug() << "Debug output belonging to SlotSampleTester slot 1." << endl; + CHECK( test() , true); + CHECK( "test" , "test"); + kdDebug() << "Checking if m_str is initialized correctly." << endl; + CHECK( *m_str , TQString("setUp str") ); +} + +void SlotSampleTester::testSlot2() +{ + kdDebug() << "Debug output belonging to SlotSampleTester slot 2." << endl; + CHECK("testSlot2","testSlot2"); + CHECK(1,1); + CHECK(2,2); +} + +void SomeSampleTester::allTests() +{ + kdDebug() << "Checking operator precedences." << endl; + CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); + + TQStringList testList; + testList << "one" << "two"; + CHECK( testList.count() , (TQStringList::size_type) 2 ); + CHECK( testList.count()*2 , (TQStringList::size_type) 4 ); +} + +#include "sampletests.moc" + diff --git a/tdeunittest/example/module/sampletests.h b/tdeunittest/example/module/sampletests.h new file mode 100644 index 00000000..1f032f92 --- /dev/null +++ b/tdeunittest/example/module/sampletests.h @@ -0,0 +1,54 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SAMPLETESTMODULE_H +#define SAMPLETESTMODULE_H + +#include + +class SlotSampleTester : public KUnitTest::SlotTester +{ + Q_OBJECT + + +public slots: + void setUp(); + void tearDown(); + void testSlot(); + void testSlot2(); + +private: + bool test(); + + TQString *m_str; +}; + +class SomeSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +#endif diff --git a/tdeunittest/example/simple/Makefile.am b/tdeunittest/example/simple/Makefile.am new file mode 100644 index 00000000..0ee63452 --- /dev/null +++ b/tdeunittest/example/simple/Makefile.am @@ -0,0 +1,22 @@ +INCLUDES = -I$(top_srcdir) $(all_includes) +METASOURCES = AUTO + +check_PROGRAMS = sampletests sampletestsgui + +sampletests_SOURCES = main.cpp sampletest.cpp +sampletests_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +sampletests_LDADD = -ltdeunittest + +sampletestsgui_SOURCES = maingui.cpp sampletest.cpp +sampletestsgui_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor +# Normally you would write -ltdeunittestgui here, but since the examples +# are bundled with the library source code itself we don't want to +# have you install the libraries before you can compile the examples. +sampletestsgui_LDADD = ../../libtdeunittestgui.la + +noinst_HEADERS = sampletest.h + +TESTS = sampletests + +guicheck: sampletestsgui + tdeunittest ./sampletestsgui SampleTests diff --git a/tdeunittest/example/simple/main.cpp b/tdeunittest/example/simple/main.cpp new file mode 100644 index 00000000..7f6edb1e --- /dev/null +++ b/tdeunittest/example/simple/main.cpp @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "tdeunittest/runner.h" + +int main( int /*argc*/, char** /*argv*/ ) +{ + KUnitTest::Runner::self()->runTests(); + return KUnitTest::Runner::self()->numberOfFailedTests(); +} diff --git a/tdeunittest/example/simple/maingui.cpp b/tdeunittest/example/simple/maingui.cpp new file mode 100644 index 00000000..419aacd9 --- /dev/null +++ b/tdeunittest/example/simple/maingui.cpp @@ -0,0 +1,60 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include + +#include "tdeunittest/runnergui.h" + +static const char description[] = + I18N_NOOP("A simple sample."); + +static const char version[] = "0.1"; + +static KCmdLineOptions options[] = +{ +// { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + KCmdLineLastOption +}; + +int main( int argc, char** argv ) +{ + TDEAboutData about("SampleTests", I18N_NOOP("SampleTests"), version, description, + TDEAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0, + "Jeroen.Wijnhout@kdemail.net"); + + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + + TDEApplication app; + + KUnitTest::RunnerGUI runner(0); + runner.show(); + app.setMainWidget(&runner); + + return app.exec(); +} diff --git a/tdeunittest/example/simple/sampletest.cpp b/tdeunittest/example/simple/sampletest.cpp new file mode 100644 index 00000000..04be74de --- /dev/null +++ b/tdeunittest/example/simple/sampletest.cpp @@ -0,0 +1,55 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include +#include + +#include "sampletest.h" + +using namespace KUnitTest; + +KUNITTEST_SUITE("SampleSuite"); +KUNITTEST_REGISTER_TESTER(SimpleSampleTester); +KUNITTEST_REGISTER_TESTER(SomeSampleTester); + +void SimpleSampleTester::allTests() +{ + kdDebug() << "Debug output belonging to SimpleSampleTester." << endl; + CHECK( TQString("SimpleSample") , TQString("SimpleSample") ); + + SKIP("Just curious how this 'skipping' works."); +} + +void SomeSampleTester::allTests() +{ + kdDebug() << "Checking operator precedences." << endl; + CHECK( 2.0 * 3.0 / 2.0 * 4.0 / 2.0 , 6.0 ); + + TQStringList testList; + testList << "one" << "two"; + CHECK( testList.count() , (TQStringList::size_type) 2 ); +} diff --git a/tdeunittest/example/simple/sampletest.h b/tdeunittest/example/simple/sampletest.h new file mode 100644 index 00000000..b5c50b43 --- /dev/null +++ b/tdeunittest/example/simple/sampletest.h @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef SAMPLETEST_H +#define SAMPLETEST_H + +#include + +class SimpleSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; + +class SomeSampleTester : public KUnitTest::Tester +{ +public: + void allTests(); +}; +#endif diff --git a/tdeunittest/guimodrunner.cpp b/tdeunittest/guimodrunner.cpp new file mode 100644 index 00000000..91757a5e --- /dev/null +++ b/tdeunittest/guimodrunner.cpp @@ -0,0 +1,72 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "runnergui.h" + +static const char description[] = + I18N_NOOP("A command-line application that can be used to run KUnitTest modules."); + +static const char version[] = "0.1"; + +static KCmdLineOptions options[] = +{ + {"query [regexp]", I18N_NOOP("Only run modules which filename match the regexp."), "^tdeunittest_.*\\.la$"}, + {"folder [folder]", I18N_NOOP("Only run tests modules which are found in the folder. Use the query option to select modules."), "."}, + { "enable-dbgcap", I18N_NOOP("Enables debug capturing. You typically use this option when you use the GUI."), 0}, + KCmdLineLastOption +}; + + +int main( int argc, char **argv ) +{ + TDEInstance instance("modrunner"); + + TDEAboutData about("KUnitTestModRunner", I18N_NOOP("KUnitTestModRunner"), version, description, + TDEAboutData::License_BSD, "(C) 2005 Jeroen Wijnhout", 0, 0, + "Jeroen.Wijnhout@kdemail.net"); + + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + KUnitTest::Runner::loadModules(args->getOption("folder"), args->getOption("query")); + KUnitTest::Runner::setDebugCapturingEnabled(args->isSet("enable-dbgcap")); + + TDEApplication app; + + KUnitTest::RunnerGUI runner(0); + runner.show(); + app.setMainWidget(&runner); + + return app.exec(); +} diff --git a/tdeunittest/runnergui.cpp b/tdeunittest/runnergui.cpp new file mode 100644 index 00000000..8e31dac2 --- /dev/null +++ b/tdeunittest/runnergui.cpp @@ -0,0 +1,433 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "dcopinterface.h" +#include "runnergui.h" +#include "testerwidget.h" + +namespace KUnitTest +{ + const int g_nameColumn = 0; + const int g_finishedColumn = 1; + const int g_skippedColumn = 2; + const int g_failedColumn = 3; + const int g_xfailedColumn = 4; + const int g_passedColumn = 5; + const int g_xpassedColumn = 6; + + /*! The DCOP implementation for the RunnerGUI. + */ + class RunnerGUIDCOPImpl : virtual public DCOPInterface + { + public: + RunnerGUIDCOPImpl(RunnerGUI *rg) : m_rg(rg) + { + // set the DCOP object id + setObjId("Runner"); + } + + /*! This DCOP method adds debug info to a given test case. + * @param name The name of the test. + * @param info The debug info. + */ + bool addDebugInfo(const TQString &name, const TQString &info) + { + Tester *tester = Runner::self()->registry().find(name.local8Bit()); + if ( tester == 0L ) return false; + + tester->results()->addDebugInfo(info); + + return true; + } + + bool addSlotDebugInfo(const TQString &name, const TQString &slt, const TQString &info) + { + Tester *tester = Runner::self()->registry().find(name.local8Bit()); + + if ( tester == 0L ) return false; + if ( ! tester->inherits("KUnitTest::SlotTester") ) return false; + + SlotTester *sltester = static_cast(tester); + sltester->results(slt.local8Bit())->addDebugInfo(info); + + return true; + } + + private: + RunnerGUI *m_rg; + }; + + RunnerGUI::RunnerGUI(TQWidget *parent) : TQHBox(parent) + { + m_dcop = new RunnerGUIDCOPImpl(this); + + m_testerWidget = new TesterWidget(this); + setGeometry(0, 0, 700, 500); + + // file the combo box + m_testerWidget->selectCombo()->insertItem("All suites/modules . . ."); + m_testerWidget->selectCombo()->insertItem("Selected tests . . ."); + + RegistryIteratorType it(Runner::self()->registry()); + TQStringList suites; + for ( ; it.current(); ++it ) + { + addTester(it.currentKey(), it.current()); + + TQString test = it.currentKey(); + int index = test.find("::"); + if ( index != -1 ) test = test.left(index); + + if ( suites.contains(test) == 0 ) + suites.append(test); + } + + for ( uint i = 0; i < suites.count(); ++i ) + m_testerWidget->selectCombo()->insertItem(suites[i]); + + // configure the resultslist + m_testerWidget->resultList()->setAllColumnsShowFocus(true); + m_testerWidget->resultList()->setSelectionMode(TQListView::Extended); + m_testerWidget->resultList()->setRootIsDecorated(true); + m_testerWidget->resultList()->setColumnAlignment(g_finishedColumn, TQt::AlignHCenter); + m_testerWidget->resultList()->setColumnAlignment(g_skippedColumn, TQt::AlignHCenter); + m_testerWidget->resultList()->setColumnAlignment(g_failedColumn, TQt::AlignHCenter); + m_testerWidget->resultList()->setColumnAlignment(g_xfailedColumn, TQt::AlignHCenter); + m_testerWidget->resultList()->setColumnAlignment(g_passedColumn, TQt::AlignHCenter); + m_testerWidget->resultList()->setColumnAlignment(g_xpassedColumn, TQt::AlignHCenter); + + // set the text in the results label + fillResultsLabel(); + + // init the progress bar + configureProgressBar(Runner::self()->numberOfTestCases(), 0); + + connect(Runner::self(), TQT_SIGNAL(finished(const char *, Tester *)), this, TQT_SLOT(addTestResult(const char *, Tester *))); + connect(m_testerWidget->resultList(), TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(showDetails(TQListViewItem *))); + connect(m_testerWidget, TQT_SIGNAL(run()), this, TQT_SLOT(runSuite())); + connect(m_testerWidget->details(), TQT_SIGNAL(doubleClicked(int, int)), this, TQT_SLOT(doubleClickedOnDetails(int, int))); + } + + RunnerGUI::~RunnerGUI() + { + delete m_dcop; + } + + void RunnerGUI::configureProgressBar(int steps, int progress) + { + m_testerWidget->progressBar()->setTotalSteps(steps); + m_testerWidget->progressBar()->setProgress(progress); + } + + void RunnerGUI::fillResultsLabel() + { + if ( Runner::self()->numberOfTests() > 0 ) + m_testerWidget->resultsLabel()->setText( + TQString("Test cases: %1 | Tests performed: %5, Skipped: %4 | Passed: %2, Failed: %3") + .arg(Runner::self()->numberOfTestCases()) + .arg(Runner::self()->numberOfPassedTests()) + .arg(Runner::self()->numberOfFailedTests()) + .arg(Runner::self()->numberOfSkippedTests()) + .arg(Runner::self()->numberOfTests()) ); + else + m_testerWidget->resultsLabel()->setText(TQString("Test cases: %1").arg(Runner::self()->numberOfTestCases())); + } + + void RunnerGUI::addTestResult(const char *name, Tester *test) + { + TQStringList scopes = TQStringList::split("::", name); + TQString suite = scopes[0]; + + // find the suite item + TQListViewItem *item = 0L; + for ( uint i = 0; i < scopes.count(); ++i ) + item = getItem(scopes[i], item); + + if ( test->inherits("KUnitTest::SlotTester") ) + { + SlotTester *sltest = static_cast(test); + TestResultsListIteratorType it(sltest->resultsList()); + TQListViewItem *slotItem = 0L; + for ( ; it.current(); ++it) + { + slotItem = getItem(it.currentKey(), item); + setSummary(slotItem, it.current()); + } + } + else + setSummary(item, test->results()); + + fillResultsLabel(); + m_testerWidget->progressBar()->setProgress(m_testerWidget->progressBar()->progress() + 1); + } + + void RunnerGUI::addTester(const char *name, Tester *test) + { + TQStringList scopes = TQStringList::split("::", name); + TQString suite = scopes[0]; + + // find the suite item + TQListViewItem *item = 0L; + for ( uint i = 0; i < scopes.count(); ++i ) + item = getItem(scopes[i], item); + + if ( test->inherits("KUnitTest::SlotTester") ) + { + TQStrList allSlots = test->metaObject()->slotNames(); + for ( char *sl = allSlots.first(); sl; sl = allSlots.next() ) + { + if ( TQString(sl).startsWith("test") ) + getItem(sl, item); + } + } + } + + TQListViewItem *RunnerGUI::getItem(const TQString &name, TQListViewItem *item /*= 0L*/) + { + TQListViewItem *parent = item; + + if ( item == 0L ) item = m_testerWidget->resultList()->firstChild(); + else item = item->firstChild(); + + while ( item && (item->text(g_nameColumn) != name) ) + item = item->nextSibling(); + + // item not found, create it + if ( item == 0L ) + { + if ( parent == 0L ) + item = new TQListViewItem(m_testerWidget->resultList()); + else + item = new TQListViewItem(parent); + + item->setText(g_nameColumn, name); + } + + return item; + } + + void RunnerGUI::reset() + { + TQListViewItemIterator it( m_testerWidget->resultList() ); + while ( it.current() ) + { + TQListViewItem *item = it.current(); + item->setText(g_finishedColumn, "0"); + item->setText(g_skippedColumn, "0"); + item->setText(g_failedColumn, "0"); + item->setText(g_xfailedColumn, "0"); + item->setText(g_passedColumn, "0"); + item->setText(g_xpassedColumn, "0"); + item->setPixmap(g_nameColumn, TQPixmap()); + ++it; + } + } + + void RunnerGUI::setSummary(TQListViewItem *item, TestResults *res) + { + if ( item == 0L ) return; + + bool ok; + + int val = item->text(g_finishedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_finishedColumn, TQString::number(val + res->testsFinished())); + + val = item->text(g_skippedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_skippedColumn, TQString::number(val + res->skipped())); + + val = item->text(g_passedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_passedColumn, TQString::number(val + res->passed())); + + val = item->text(g_failedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_failedColumn, TQString::number(val + res->errors())); + + val = item->text(g_xfailedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_xfailedColumn, TQString::number(val + res->xfails())); + + val = item->text(g_xpassedColumn).toInt(&ok); if (!ok) val = 0; + item->setText(g_xpassedColumn, TQString::number(val + res->xpasses())); + + bool passed = (item->text(g_failedColumn).toInt(&ok) + item->text(g_xfailedColumn).toInt(&ok)) == 0; + item->setPixmap(g_nameColumn, passed ? SmallIcon("button_ok") : SmallIcon("button_cancel") ); + + setSummary(item->parent(), res); + } + + TQString RunnerGUI::fullName(TQListViewItem *item) + { + TQString name = item->text(g_nameColumn); + while ( (item = item->parent()) != 0L ) + name = item->text(g_nameColumn) + "::" + name; + + return name; + } + + void RunnerGUI::runSuite() + { + Runner::self()->reset(); + reset(); + + if ( m_testerWidget->selectCombo()->currentItem() == 0 ) + { + configureProgressBar(Runner::self()->numberOfTestCases(), 0); + Runner::self()->runTests(); + } + else if ( m_testerWidget->selectCombo()->currentItem() == 1 ) + { + TQListViewItemIterator it( m_testerWidget->resultList() ); + TQStringList prefixes; + while ( it.current() ) + { + TQListViewItem *item = it.current(); + if ( item->isSelected() ) + { + TQString prefix = fullName(item); + if ( prefix.endsWith("()") ) + { + int index = prefix.findRev("::"); + prefix = prefix.left(index); + } + prefixes << prefix; + } + + ++it; + } + + configureProgressBar(prefixes.count(), 0); + for ( uint i = 0; i < prefixes.count(); ++i ) + Runner::self()->runMatchingTests(prefixes[i]); + } + else + { + TQString suite = m_testerWidget->selectCombo()->currentText(); + TQStringList tests; + RegistryIteratorType it(Runner::self()->registry()); + for ( ; it.current(); ++it ) + if ( TQString(it.currentKey()).startsWith(suite) ) + tests.append(it.currentKey()); + + configureProgressBar(tests.count(), 0); + + for ( uint i = 0; i < tests.count(); ++i ) + Runner::self()->runTest(tests[i].local8Bit()); + } + + showDetails(m_testerWidget->resultList()->currentItem()); + } + + void RunnerGUI::showDetails(TQListViewItem *item) + { + if ( item == 0L ) return; + + TQString name = fullName(item); + if ( name.endsWith("()") ) name = fullName(item->parent()); + + Tester *tester = Runner::self()->registry().find(name.local8Bit()); + + if ( tester == 0L ) return; + + TestResults *res = 0L; + if ( tester->inherits("KUnitTest::SlotTester") ) + res = static_cast(tester)->results(item->text(g_nameColumn).local8Bit()); + else + res = tester->results(); + + if ( tester == 0L ) + m_testerWidget->details()->setText("No test found with name: " + fullName(item)); + else + { + TQTextEdit *te = m_testerWidget->details(); + + te->clear(); + + te->append("Errors:
"); + appendList(te, res->errorList()); + + te->append("

Expected to fail:
"); + appendList(te, res->xfailList()); + + te->append("

Unexpected Success:
"); + appendList(te, res->xpassList()); + + te->append("

Success:
"); + appendList(te, res->successList()); + + te->append("

Skipped:
"); + appendList(te, res->skipList()); + + te->append("

Debug:
"); + + te->append(res->debugInfo()); + + te->scrollToAnchor("errors"); + } + } + + void RunnerGUI::appendList(TQTextEdit *te, const TQStringList &list) + { + for ( uint i = 0; i < list.count(); ++i ) + te->append(list[i]); + } + + void RunnerGUI::doubleClickedOnDetails(int para, int /*pos*/) + { + static TQRegExp reFileAndLine("^(.*)\\[([0-9]+)\\]:"); + + TQString line = m_testerWidget->details()->text(para); + m_testerWidget->details()->setSelection(para, 0, para, line.length()-1); + + if ( reFileAndLine.search(line) != -1 ) + { + DCOPClient client; + client.attach(); + TQByteArray data; + TQDataStream arg(data, IO_WriteOnly); + bool ok; + arg << TQString(reFileAndLine.cap(1)) << (reFileAndLine.cap(2).toInt(&ok) - 1); + client.send("tdevelop-*", "KDevPartController", "editDocument(TQString,int)", data); + client.send("tdevelop-*", "MainWindow", "raise()", TQString("")); + + client.detach(); + } + } +} + +#include "runnergui.moc" diff --git a/tdeunittest/runnergui.h b/tdeunittest/runnergui.h new file mode 100644 index 00000000..73d8863c --- /dev/null +++ b/tdeunittest/runnergui.h @@ -0,0 +1,79 @@ +/** + * Copyright (C) 2005 Jeroen Wijnhout + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _KUNITTEST_TESTER_H_ +#define _KUNITTEST_TESTER_H_ + +#include +#include + +#include +#include + +#include + +class TesterWidget; +class TQTextEdit; + +namespace KUnitTest +{ + class RunnerGUIDCOPImpl; + + class KDE_EXPORT RunnerGUI : public TQHBox + { + Q_OBJECT + + + public: + RunnerGUI(TQWidget *parent); + ~RunnerGUI(); + + private slots: + void addTestResult(const char *name, Tester *test); + void addTester(const char *name, Tester *test); + void showDetails(TQListViewItem *item); + void runSuite(); + void doubleClickedOnDetails(int para, int pos); + + private: + void reset(); + void configureProgressBar(int steps, int progress); + void fillResultsLabel(); + void appendList(TQTextEdit *te, const TQStringList &list); + + TQListViewItem *getItem(const TQString &name, TQListViewItem *item = 0L); + void setItem(TQListViewItem *item, const TestResults *res); + TQString fullName(TQListViewItem *item); + + void setSummary(TQListViewItem *item, TestResults *res); + + TesterWidget *m_testerWidget; + + friend class RunnerGUIDCOPImpl; + RunnerGUIDCOPImpl *m_dcop; + }; +} + +#endif diff --git a/tdeunittest/tdeunittest b/tdeunittest/tdeunittest new file mode 100755 index 00000000..c56f6c3a --- /dev/null +++ b/tdeunittest/tdeunittest @@ -0,0 +1,19 @@ +#!/bin/bash + +export APP=$1 +export DCOPNAME=$2 + +if [ ! -x $APP ] +then + kdialog --error "Sorry, $APP is not a valid executable file." + exit 1; +fi + +DEBUGHELPER=`which tdeunittest_debughelper` +if [ -z $DEBUGHELPER ] +then + kdialog --error "Sorry, couldn't find the tdeunittest_debughelper script." + exit 3 +fi + +$APP 2>&1 | perl $DEBUGHELPER "$DCOPNAME-*" diff --git a/tdeunittest/tdeunittest_debughelper b/tdeunittest/tdeunittest_debughelper new file mode 100755 index 00000000..66dfacf2 --- /dev/null +++ b/tdeunittest/tdeunittest_debughelper @@ -0,0 +1,107 @@ +#!/usr/bin/perl +# Copyright (C) 2005 Jeroen Wijnhout +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +use DCOP; + +my $app = $ARGV[0]; shift @ARGV; +my $dcopid = ""; +my $testername = ""; +my $reading_debug = 0; +my $debug=""; +my $runnergui; + +my $client = new DCOP; +$client->attach(); + +while (<>) +{ + $runnergui = getDCOPObject(); + my $line = $_; + + print $_; + + if ( $line =~ /KUnitTest_Debug_End\[.*\]/ ) + { + $ret = $runnergui->addDebugInfo($testername, $debug); + + $debug = ""; + + # stop reading + $reading_debug = 0; + } + elsif ( $line =~ /KUnitTest_Debug_EndSlot\[.*\]/ ) + { + $ret = $runnergui->addSlotDebugInfo($testername, $slotname, $debug); + + $line = ""; + $debug = ""; + $slotname = ""; + } + elsif ( $line =~ /KUnitTest_Debug_BeginSlot\[(.*)\]/ ) + { + $slotname = $1; + $line = ""; + } + + if ( $reading_debug ) + { + if ( $line =~ /^check:(.*\[[0-9]+\])/ ) + { + $line = $1.":\n"; + } + + $debug = $debug.$line; + } + + if ( $line =~ /KUnitTest_Debug_Start\[(.*)\]/ ) + { + $testername = $1; + $reading_debug = 1; + $debug=""; + } +} + +sub getDCOPObject +{ + if ( $dcopid eq "" ) + { + $allapps = $client->registeredApplications(); + my $i = 0; + while ( ! ($allapps->[$i] eq "") ) + { + if ( $allapps->[$i] =~ /$app/ ) + { + print "found: ".$allapps->[$i]."\n"; + $dcopid = $allapps->[$i]; + break; + } + + $i = $i + 1; + } + + $object = $client->createObject($dcopid, "Runner"); + } + + return $object; +} \ No newline at end of file diff --git a/tdeunittest/tdeunittestmod b/tdeunittest/tdeunittestmod new file mode 100755 index 00000000..f5872692 --- /dev/null +++ b/tdeunittest/tdeunittestmod @@ -0,0 +1,37 @@ +#!/bin/bash + +FOLDER="--folder $PWD" +QUERY="" + +while [ "$#" -gt 0 ] +do + case $1 in + -f|--folder) + FOLDER="--folder $2" + shift + ;; + -q|--query) + QUERY="--query $2" + shift + ;; + esac + # to process the next parameter + shift +done + +APP=`which tdeunittestguimodrunner` +if [ ! -x $APP ] +then + kdialog --error "Sorry, $APP is not a valid executable file." + exit 1; +fi + +DEBUGHELPER=`which tdeunittest_debughelper` +if [ -z $DEBUGHELPER ] +then + kdialog --error "Sorry, couldn't find the tdeunittest_debughelper script." + exit 3 +fi + +DCOPNAME="KUnitTestModRunner" +$APP --enable-dbgcap $FOLDER $QUERY 2>&1 | perl $DEBUGHELPER "$DCOPNAME-*" diff --git a/tdeunittest/testerwidget.ui b/tdeunittest/testerwidget.ui new file mode 100644 index 00000000..e6e92e1c --- /dev/null +++ b/tdeunittest/testerwidget.ui @@ -0,0 +1,197 @@ + +TesterWidget + + + TesterWidget + + + + 0 + 0 + 622 + 773 + + + + + 500 + 500 + + + + KUnitTester + + + + unnamed + + + + m_pshRun + + + Run + + + + + m_pbProgress + + + + + m_cbSelect + + + + 7 + 0 + 0 + 0 + + + + + + m_lbSelect + + + Select a suite or module: + + + + + m_lbResults + + + + + + + + + Test + + + true + + + true + + + + + Finished + + + true + + + true + + + + + Skipped + + + true + + + true + + + + + Failed + + + true + + + true + + + + + xFailed + + + true + + + true + + + + + Passed + + + true + + + true + + + + + xPassed + + + true + + + true + + + + m_lvResults + + + + 7 + 1 + 0 + 0 + + + + + 0 + 200 + + + + + + m_teDetails + + + + 600 + 200 + + + + true + + + + + + testerwidget.ui.h + + + run() + + + init() + resultList() + details() + progressBar() + resultsLabel() + selectCombo() + + + diff --git a/tdeunittest/testerwidget.ui.h b/tdeunittest/testerwidget.ui.h new file mode 100644 index 00000000..f80a248d --- /dev/null +++ b/tdeunittest/testerwidget.ui.h @@ -0,0 +1,46 @@ +/**************************************************************************** +** ui.h extension file, included from the uic-generated form implementation. +** +** If you want to add, delete, or rename functions or slots, use +** TQt Designer to update this file, preserving your code. +** +** You should not define a constructor or destructor in this file. +** Instead, write your code in functions called init() and destroy(). +** These will automatically be called by the form's constructor and +** destructor. +*****************************************************************************/ + + +void TesterWidget::init() +{ + connect(m_pshRun, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(run())); +} + +TQListView * TesterWidget::resultList() +{ + return m_lvResults; +} + + +TQTextEdit * TesterWidget::details() +{ + return m_teDetails; +} + + +TQProgressBar * TesterWidget::progressBar() +{ + return m_pbProgress; +} + + +TQLabel * TesterWidget::resultsLabel() +{ + return m_lbResults; +} + + +TQComboBox * TesterWidget::selectCombo() +{ + return m_cbSelect; +} diff --git a/umbrello/umbrello/docgenerators/Makefile.am b/umbrello/umbrello/docgenerators/Makefile.am index 3d2b7aec..f702ca72 100644 --- a/umbrello/umbrello/docgenerators/Makefile.am +++ b/umbrello/umbrello/docgenerators/Makefile.am @@ -2,7 +2,7 @@ INCLUDES = -I$(srcdir)/.. -I$(top_srcdir)/umbrello/docgenerators -I../../../umbr METASOURCES = AUTO bin_PROGRAMS = umbodoc -AM_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -lktexteditor +AM_LDFLAGS = $(all_libraries) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_KIO) -ltdetexteditor umbodoc_COMPILE_FIRST = version.h umbodoc_SOURCES = main.cpp umbodoc_LDADD = $(LIB_TDECORE) $(LIBXSLT_LIBS) $(LIBXML_LIBS) -- cgit v1.2.1