Hello community,
here is the log from the commit of package knewstuff for openSUSE:Factory checked in at 2014-04-02 17:22:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/knewstuff (Old)
and /work/SRC/openSUSE:Factory/.knewstuff.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "knewstuff"
Changes:
--------
--- /work/SRC/openSUSE:Factory/knewstuff/knewstuff.changes 2014-03-10 12:18:11.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.knewstuff.new/knewstuff.changes 2014-04-02 17:22:28.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Mar 29 19:47:46 UTC 2014 - hrvoje.senjan@gmail.com
+
+- Update to 4.98.0
+ * API improvements and cleanups
+ * Buildsystem fixes
+ * For more details please see:
+ http://www.kde.org/announcements/announce-frameworks5-beta1.php
+
+-------------------------------------------------------------------
Old:
----
knewstuff-4.97.0.tar.xz
New:
----
knewstuff-4.98.0.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ knewstuff.spec ++++++
--- /var/tmp/diff_new_pack.heiiJS/_old 2014-04-02 17:22:28.000000000 +0200
+++ /var/tmp/diff_new_pack.heiiJS/_new 2014-04-02 17:22:28.000000000 +0200
@@ -18,11 +18,11 @@
%define lname libKF5NewStuff5
Name: knewstuff
-Version: 4.97.0
+Version: 4.98.0
Release: 0
BuildRequires: attica-qt5-devel >= %{_kf5_version}
BuildRequires: cmake >= 2.8.12
-BuildRequires: extra-cmake-modules >= 0.0.11
+BuildRequires: extra-cmake-modules >= 0.0.12
BuildRequires: fdupes
BuildRequires: karchive-devel >= %{_kf5_version}
BuildRequires: kcompletion-devel >= %{_kf5_version}
++++++ knewstuff-4.97.0.tar.xz -> knewstuff-4.98.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/CMakeLists.txt new/knewstuff-4.98.0/CMakeLists.txt
--- old/knewstuff-4.97.0/CMakeLists.txt 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/CMakeLists.txt 2014-03-28 19:17:16.000000000 +0100
@@ -2,7 +2,7 @@
project(KNewStuff)
-find_package(ECM 0.0.11 REQUIRED NO_MODULE)
+find_package(ECM 0.0.12 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
include(KDEInstallDirs)
@@ -13,7 +13,7 @@
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Widgets Xml)
# Not part of kdelibs
-set(KF5_VERSION "4.97.0")
+set(KF5_VERSION "4.98.0")
find_package(KF5Archive ${KF5_VERSION} REQUIRED)
find_package(KF5Completion ${KF5_VERSION} REQUIRED)
find_package(KF5Config ${KF5_VERSION} REQUIRED)
@@ -46,7 +46,10 @@
add_subdirectory(data)
add_subdirectory(src)
-add_subdirectory(tests)
+if (BUILD_TESTING)
+ add_subdirectory(autotests)
+ add_subdirectory(tests)
+endif()
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5NewStuff")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/autotests/CMakeLists.txt new/knewstuff-4.98.0/autotests/CMakeLists.txt
--- old/knewstuff-4.97.0/autotests/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/knewstuff-4.98.0/autotests/CMakeLists.txt 2014-03-28 19:17:16.000000000 +0100
@@ -0,0 +1,23 @@
+include(ECMMarkAsTest)
+
+find_package(Qt5Test ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED)
+set_package_properties(Qt5Test PROPERTIES
+ TYPE REQUIRED
+ PURPOSE "Required for unit tests")
+
+macro(knewstuff_unit_tests)
+ foreach(_testname ${ARGN})
+ add_executable(${_testname} ${_testname}.cpp)
+ add_test("knewstuff-${_testname}" ${_testname})
+ ecm_mark_as_test(${_testname})
+ target_link_libraries(${_testname} KF5::NewStuff Qt5::Xml Qt5::Test)
+ endforeach()
+endmacro()
+
+# FIXME: port to new API
+#knewstuff_unit_tests(
+# knewstuffauthortest
+# knewstuffentrytest
+# testTranslatable
+#)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/autotests/knewstuffauthortest.cpp new/knewstuff-4.98.0/autotests/knewstuffauthortest.cpp
--- old/knewstuff-4.97.0/autotests/knewstuffauthortest.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/knewstuff-4.98.0/autotests/knewstuffauthortest.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -0,0 +1,85 @@
+/*
+ This file is part of KNewStuff2.
+ Copyright (c) 2008 Jeremy Whiting
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see http://www.gnu.org/licenses/.
+*/
+
+// unit test for author
+
+#include <QtTest>
+#include <QtCore>
+
+#include
+
+#include "../knewstuff2/core/author.h"
+
+const QString name = "Name";
+const QString email = "Email@nowhere.com";
+const QString jabber = "something@kdetalk.net";
+const QString homepage = "http://www.myhomepage.com";
+
+class testAuthor: public QObject
+{
+ Q_OBJECT
+private Q_SLOTS:
+ void testProperties();
+ void testCopy();
+ void testAssignment();
+};
+
+void testAuthor::testProperties()
+{
+ KNS::Author author;
+ author.setName(name);
+ author.setEmail(email);
+ author.setJabber(jabber);
+ author.setHomepage(homepage);
+ QCOMPARE(author.name(), name);
+ QCOMPARE(author.email(), email);
+ QCOMPARE(author.jabber(), jabber);
+ QCOMPARE(author.homepage(), homepage);
+}
+
+void testAuthor::testCopy()
+{
+ KNS::Author author;
+ author.setName(name);
+ author.setEmail(email);
+ author.setJabber(jabber);
+ author.setHomepage(homepage);
+ KNS::Author author2(author);
+ QCOMPARE(author.name(), author2.name());
+ QCOMPARE(author.email(), author2.email());
+ QCOMPARE(author.jabber(), author2.jabber());
+ QCOMPARE(author.homepage(), author2.homepage());
+}
+
+void testAuthor::testAssignment()
+{
+ KNS::Author author;
+ KNS::Author author2;
+ author.setName(name);
+ author.setEmail(email);
+ author.setJabber(jabber);
+ author.setHomepage(homepage);
+ author2 = author;
+ QCOMPARE(author.name(), author2.name());
+ QCOMPARE(author.email(), author2.email());
+ QCOMPARE(author.jabber(), author2.jabber());
+ QCOMPARE(author.homepage(), author2.homepage());
+}
+
+QTEST_KDEMAIN_CORE(testAuthor)
+#include "knewstuffauthortest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/autotests/knewstuffentrytest.cpp new/knewstuff-4.98.0/autotests/knewstuffentrytest.cpp
--- old/knewstuff-4.97.0/autotests/knewstuffentrytest.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/knewstuff-4.98.0/autotests/knewstuffentrytest.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -0,0 +1,149 @@
+/*
+ This file is part of KNewStuff2.
+ Copyright (c) 2008 Jeremy Whiting
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see http://www.gnu.org/licenses/.
+*/
+
+// unit test for entry
+
+#include <QtTest>
+#include <QtCore>
+
+#include
+
+#include "../knewstuff2/core/entry.h"
+#include "../knewstuff2/core/ktranslatable.h"
+
+const QString name = "Name";
+const QString category = "Category";
+const QString license = "GPLv2+";
+const QString summary1 = "Summary of contents";
+const QString summary2lang = "de";
+const QString summary2 = "Translated summary of contents";
+const QString version = "v0.1";
+const int release = 1;
+const QDate releasedate = QDate::currentDate();
+const int rating = 80;
+const int downloads = 5000;
+const QString checksum = "BAADF00D";
+const QString signature = "DEADBEEF";
+
+class testEntry: public QObject
+{
+ Q_OBJECT
+private Q_SLOTS:
+ void testProperties();
+ void testCopy();
+ void testAssignment();
+};
+
+void testEntry::testProperties()
+{
+ KNS::Entry entry;
+ entry.setName(KNS::KTranslatable(name));
+ entry.setCategory(category);
+ entry.setLicense(license);
+ KNS::KTranslatable summary(summary1);
+ summary.addString(summary2lang, summary2);
+ entry.setSummary(summary);
+ entry.setVersion(version);
+ entry.setRelease(release);
+ entry.setReleaseDate(releasedate);
+ entry.setRating(rating);
+ entry.setDownloads(downloads);
+ entry.setChecksum(checksum);
+ entry.setSignature(signature);
+
+ QCOMPARE(entry.name().representation(), name);
+ QCOMPARE(entry.category(), category);
+ QCOMPARE(entry.license(), license);
+ QCOMPARE(entry.summary().representation(), summary1);
+ QCOMPARE(entry.summary().translated(summary2lang), summary2);
+ QCOMPARE(entry.version(), version);
+ QCOMPARE(entry.release(), release);
+ QCOMPARE(entry.releaseDate(), releasedate);
+ QCOMPARE(entry.rating(), rating);
+ QCOMPARE(entry.downloads(), downloads);
+ QCOMPARE(entry.checksum(), checksum);
+ QCOMPARE(entry.signature(), signature);
+}
+
+void testEntry::testCopy()
+{
+ KNS::Entry entry;
+ entry.setName(KNS::KTranslatable(name));
+ entry.setCategory(category);
+ entry.setLicense(license);
+ KNS::KTranslatable summary(summary1);
+ summary.addString(summary2lang, summary2);
+ entry.setSummary(summary);
+ entry.setVersion(version);
+ entry.setRelease(release);
+ entry.setReleaseDate(releasedate);
+ entry.setRating(rating);
+ entry.setDownloads(downloads);
+ entry.setChecksum(checksum);
+ entry.setSignature(signature);
+ KNS::Entry entry2(entry);
+
+ QCOMPARE(entry.name().representation(), entry2.name().representation());
+ QCOMPARE(entry.category(), entry2.category());
+ QCOMPARE(entry.license(), entry2.license());
+ QCOMPARE(entry.summary().representation(), entry2.summary().representation());
+ QCOMPARE(entry.summary().translated(summary2lang), entry2.summary().translated(summary2lang));
+ QCOMPARE(entry.version(), entry2.version());
+ QCOMPARE(entry.release(), entry2.release());
+ QCOMPARE(entry.releaseDate(), entry2.releaseDate());
+ QCOMPARE(entry.rating(), entry2.rating());
+ QCOMPARE(entry.downloads(), entry2.downloads());
+ QCOMPARE(entry.checksum(), entry2.checksum());
+ QCOMPARE(entry.signature(), entry2.signature());
+}
+
+void testEntry::testAssignment()
+{
+ KNS::Entry entry;
+ KNS::Entry entry2;;
+ entry.setName(KNS::KTranslatable(name));
+ entry.setCategory(category);
+ entry.setLicense(license);
+ KNS::KTranslatable summary(summary1);
+ summary.addString(summary2lang, summary2);
+ entry.setSummary(summary);
+ entry.setVersion(version);
+ entry.setRelease(release);
+ entry.setReleaseDate(releasedate);
+ entry.setRating(rating);
+ entry.setDownloads(downloads);
+ entry.setChecksum(checksum);
+ entry.setSignature(signature);
+ entry2 = entry;
+
+ QCOMPARE(entry.name().representation(), entry2.name().representation());
+ QCOMPARE(entry.category(), entry2.category());
+ QCOMPARE(entry.license(), entry2.license());
+ QCOMPARE(entry.summary().representation(), entry2.summary().representation());
+ QCOMPARE(entry.summary().translated(summary2lang), entry2.summary().translated(summary2lang));
+ QCOMPARE(entry.version(), entry2.version());
+ QCOMPARE(entry.release(), entry2.release());
+ QCOMPARE(entry.releaseDate(), entry2.releaseDate());
+ QCOMPARE(entry.rating(), entry2.rating());
+ QCOMPARE(entry.downloads(), entry2.downloads());
+ QCOMPARE(entry.checksum(), entry2.checksum());
+ QCOMPARE(entry.signature(), entry2.signature());
+}
+
+QTEST_KDEMAIN_CORE(testEntry)
+#include "knewstuffentrytest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/autotests/testTranslatable.cpp new/knewstuff-4.98.0/autotests/testTranslatable.cpp
--- old/knewstuff-4.97.0/autotests/testTranslatable.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/knewstuff-4.98.0/autotests/testTranslatable.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -0,0 +1,52 @@
+/*
+ This file is part of KNewStuff2.
+ Copyright (c) 2008 Jeremy Whiting
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library. If not, see http://www.gnu.org/licenses/.
+*/
+
+// unit test for ktranslatable
+
+#include <QtTest>
+#include <QtCore>
+
+#include
+
+#include "../knewstuff2/core/ktranslatable.h"
+
+class testTranslatable: public QObject
+{
+ Q_OBJECT
+private Q_SLOTS:
+ void testAddString();
+ void testRepresentation();
+};
+
+void testTranslatable::testRepresentation()
+{
+ KNS::KTranslatable translatable("testRepresentation");
+ QCOMPARE(translatable.representation(), QString("testRepresentation"));
+}
+
+void testTranslatable::testAddString()
+{
+ KNS::KTranslatable translatable;
+ translatable.addString("", "testRepresentation");
+ translatable.addString("1", "1");
+ QCOMPARE(translatable.representation(), QString("testRepresentation"));
+ QCOMPARE(translatable.translated("1"), QString("1"));
+}
+
+QTEST_KDEMAIN_CORE(testTranslatable)
+#include "testTranslatable.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/docs/README.kdxs new/knewstuff-4.98.0/docs/README.kdxs
--- old/knewstuff-4.97.0/docs/README.kdxs 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/docs/README.kdxs 1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-KNewStuff2: Desktop Exchange Service implementation (KDXS)
-Josef Spillner
-----------------------------------------------------------------------------
-This is a tech demo which will be folded into the KNewStuff library
-for KDE 4.
-It facilitates the access to the DXS webservice which allows for
-better interaction between the service and its users and contributors.
-DXS is like an interactive interface to a GHNS repository.
-
-To use it, you need Hotstuff installed, which as of now is released with
-the version number 0.9, although updates might be available from KStuff CVS.
-You also need dxs-perl installed from ghns.berlios.de until it gets merged
-into Hotstuff (before 1.0). Also, dxs-perl contains 'dxsclient.pl' to test
-the web service functionality in case KDXS doesn't work.
-A public GHNS repository with DXS currently runs on http://new.kstuff.org.
-
-Some class documentation:
--------------------------
-
-Read src/CLASSES and src/knewstuff2/CLASSES.
-
-Todo:
------
-
-- remove all engine stuff from dialog, make dialog API accessible
-- improved error handling in kdxs
-- implementation of categories() and list() web service methods
-- automatic "upgrade" to cDXS, and "downgrade" to SOAP in soap.cpp
-- automatic recognition of web service capabilities (i.e. ro and rw)
-- automatic user authorisation (how to get user info from kded?)
-- finally, port to KDE 4 and merge into trunk/kdelibs/knewstuff
-
-- [ghns.fd.o] finish WSDL file
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/src/Messages.sh new/knewstuff-4.98.0/src/Messages.sh
--- old/knewstuff-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100
+++ new/knewstuff-4.98.0/src/Messages.sh 2014-03-28 19:17:16.000000000 +0100
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources.
+# The results are stored in a pseudo .cpp file to be picked up by xgettext.
+lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg`
+if [ -n "$lst" ] ; then
+ $EXTRACTRC $lst >> rc.cpp
+fi
+
+# If your framework contains tips-of-the-day, call preparetips as well.
+if [ -f "data/tips" ] ; then
+ ( cd data && $PREPARETIPS > ../tips.cpp )
+fi
+
+# Extract strings from all source files.
+# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation
+# system, use $EXTRACT_TR_STRINGS.
+$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/knewstuff5.pot
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/src/core/engine.cpp new/knewstuff-4.98.0/src/core/engine.cpp
--- old/knewstuff-4.97.0/src/core/engine.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/src/core/engine.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -99,10 +99,8 @@
qCritical() << "No knsrc file named '" << configfile << "' was found." << endl;
return false;
}
- // FIXME: accessMode() doesn't return NoAccess for non-existing files
- // - bug in kdecore?
- // - this needs to be looked at again until KConfig backend changes for KDE 4
- // the check below is a workaround
+ // KConfig does not actually tell us whether the config file exists, so
+ // we check ourselves for better error messages.
if (QStandardPaths::locate(QStandardPaths::GenericConfigLocation, configfile).isEmpty()) {
emit signalError(i18n("Configuration file not found: \"%1\"", configfile));
qCritical() << "No knsrc file named '" << configfile << "' was found." << endl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/src/staticxml/staticxmlprovider.cpp new/knewstuff-4.98.0/src/staticxml/staticxmlprovider.cpp
--- old/knewstuff-4.97.0/src/staticxml/staticxmlprovider.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/src/staticxml/staticxmlprovider.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -72,12 +72,10 @@
mDownloadUrls.insert("downloads", QUrl(url));
}
- // FIXME: what exactly is the following condition supposed to do?
- // FIXME: make sure new QUrl in KDE 4 handles this right
// FIXME: this depends on freedesktop.org icon naming... introduce 'desktopicon'?
QUrl iconurl(xmldata.attribute("icon"));
if (!iconurl.isValid()) {
- iconurl.setPath(xmldata.attribute("icon"));
+ iconurl = QUrl::fromLocalFile(xmldata.attribute("icon"));
}
mIcon = iconurl;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/src/uploaddialog.cpp new/knewstuff-4.98.0/src/uploaddialog.cpp
--- old/knewstuff-4.97.0/src/uploaddialog.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/src/uploaddialog.cpp 2014-03-28 19:17:16.000000000 +0100
@@ -82,10 +82,8 @@
qCritical() << "No knsrc file named '" << configfile << "' was found." << endl;
success = false;
}
- // FIXME: accessMode() doesn't return NoAccess for non-existing files
- // - bug in kdecore?
- // - this needs to be looked at again until KConfig backend changes for KDE 4
- // the check below is a workaround
+ // KConfig does not actually tell us whether the config file exists, so
+ // we check ourselves for better error messages.
if (QStandardPaths::locate(QStandardPaths::GenericConfigLocation, configfile).isEmpty()) {
qCritical() << "No knsrc file named '" << configfile << "' was found." << endl;
success = false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/tests/CMakeLists.txt new/knewstuff-4.98.0/tests/CMakeLists.txt
--- old/knewstuff-4.97.0/tests/CMakeLists.txt 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/tests/CMakeLists.txt 2014-03-28 19:17:16.000000000 +0100
@@ -1,61 +1,27 @@
-project(knewstuff2tests)
-set(CMAKE_AUTOMOC TRUE)
+macro(knewstuff_executable_tests)
+ foreach(_testname ${ARGN})
+ add_executable(${_testname} ${_testname}.cpp)
+ target_link_libraries(${_testname} KF5::NewStuff Qt5::Xml Qt5::Test)
+ target_compile_definitions(${_testname} PRIVATE
+ KNSSRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\""
+ KNSBUILDDIR="\\"${CMAKE_CURRENT_BINARY_DIR}\\"")
+ endforeach()
+endmacro()
-include(ECMMarkAsTest)
-
-set(CMAKE_SKIP_RPATH TRUE)
-
-MACRO(KNEWSTUFF_UNIT_TESTS)
- FOREACH(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
- add_test("knewstuff2-${_testname}" ${_testname})
- ecm_mark_as_test(${_testname})
- target_link_libraries(${_testname} knewstuff2 Qt5::Xml Qt5::Test)
- set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DKNSSRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\""\ -DKNSBUILDDIR="\\"${CMAKE_CURRENT_BINARY_DIR}\\"")
- ENDFOREACH(_testname)
-ENDMACRO(KNEWSTUFF_UNIT_TESTS)
-
-MACRO(KNEWSTUFF_EXECUTABLE_TESTS)
- FOREACH(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
- ecm_mark_as_test(${_testname})
- target_link_libraries(${_testname} knewstuff2 Qt5::Xml Qt5::Test)
- set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DKNSSRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\""\ -DKNSBUILDDIR="\\"${CMAKE_CURRENT_BINARY_DIR}\\"")
- ENDFOREACH(_testname)
-ENDMACRO(KNEWSTUFF_EXECUTABLE_TESTS)
-
-##########################
-
-# unit tests
-
-if(NOT KDE_NO_DEPRECATED)
-
-# KNEWSTUFF_UNIT_TESTS(
-# knewstuffauthortest
-# knewstuffentrytest
-# testTranslatable
-# )
-#
-# KNEWSTUFF_EXECUTABLE_TESTS(
+# FIXME: port to new API
+#knewstuff_executable_tests(
# knewstuff2_test
# knewstuff2_download
# knewstuff2_standard
# knewstuff2_cache
-# )
-
-##########################
+#)
#set(kdxspreview_SRCS
# kdxspreview.cpp
# kdxsview.cpp
#)
-
-#add_definitions(-DKNSSRCDIR=\\"${CMAKE_CURRENT_SOURCE_DIR}\\")
-#set(CMAKE_SKIP_RPATH TRUE)
-
-#kde4_add_executable(kdxspreview TEST ${kdxspreview_SRCS})
-
-#target_link_libraries(kdxspreview knewstuff2)
+#add_executable(kdxspreview ${kdxspreview_SRCS})
+#target_link_libraries(kdxspreview KF5::NewStuff)
+# FIXME: test data should not be installed
#install(FILES kdxspreviewrc DESTINATION ${CONFIG_INSTALL_DIR})
-endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/tests/README.tests new/knewstuff-4.98.0/tests/README.tests
--- old/knewstuff-4.97.0/tests/README.tests 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/tests/README.tests 2014-03-28 19:17:16.000000000 +0100
@@ -1,8 +1,6 @@
KNewStuff2 test applications
============================
-If you want the test apps, set -DKDE4_BUILD_TESTS=ON for cmake.
-
In order to understand the test structure, remember the engine class
hierarchy of the library:
KNS::CoreEngine - GHNS provider loading/upload/download
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/tests/knewstuffauthortest.cpp new/knewstuff-4.98.0/tests/knewstuffauthortest.cpp
--- old/knewstuff-4.97.0/tests/knewstuffauthortest.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/tests/knewstuffauthortest.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,85 +0,0 @@
-/*
- This file is part of KNewStuff2.
- Copyright (c) 2008 Jeremy Whiting
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see http://www.gnu.org/licenses/.
-*/
-
-// unit test for author
-
-#include <QtTest>
-#include <QtCore>
-
-#include
-
-#include "../knewstuff2/core/author.h"
-
-const QString name = "Name";
-const QString email = "Email@nowhere.com";
-const QString jabber = "something@kdetalk.net";
-const QString homepage = "http://www.myhomepage.com";
-
-class testAuthor: public QObject
-{
- Q_OBJECT
-private Q_SLOTS:
- void testProperties();
- void testCopy();
- void testAssignment();
-};
-
-void testAuthor::testProperties()
-{
- KNS::Author author;
- author.setName(name);
- author.setEmail(email);
- author.setJabber(jabber);
- author.setHomepage(homepage);
- QCOMPARE(author.name(), name);
- QCOMPARE(author.email(), email);
- QCOMPARE(author.jabber(), jabber);
- QCOMPARE(author.homepage(), homepage);
-}
-
-void testAuthor::testCopy()
-{
- KNS::Author author;
- author.setName(name);
- author.setEmail(email);
- author.setJabber(jabber);
- author.setHomepage(homepage);
- KNS::Author author2(author);
- QCOMPARE(author.name(), author2.name());
- QCOMPARE(author.email(), author2.email());
- QCOMPARE(author.jabber(), author2.jabber());
- QCOMPARE(author.homepage(), author2.homepage());
-}
-
-void testAuthor::testAssignment()
-{
- KNS::Author author;
- KNS::Author author2;
- author.setName(name);
- author.setEmail(email);
- author.setJabber(jabber);
- author.setHomepage(homepage);
- author2 = author;
- QCOMPARE(author.name(), author2.name());
- QCOMPARE(author.email(), author2.email());
- QCOMPARE(author.jabber(), author2.jabber());
- QCOMPARE(author.homepage(), author2.homepage());
-}
-
-QTEST_KDEMAIN_CORE(testAuthor)
-#include "knewstuffauthortest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/tests/knewstuffentrytest.cpp new/knewstuff-4.98.0/tests/knewstuffentrytest.cpp
--- old/knewstuff-4.97.0/tests/knewstuffentrytest.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/tests/knewstuffentrytest.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,149 +0,0 @@
-/*
- This file is part of KNewStuff2.
- Copyright (c) 2008 Jeremy Whiting
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see http://www.gnu.org/licenses/.
-*/
-
-// unit test for entry
-
-#include <QtTest>
-#include <QtCore>
-
-#include
-
-#include "../knewstuff2/core/entry.h"
-#include "../knewstuff2/core/ktranslatable.h"
-
-const QString name = "Name";
-const QString category = "Category";
-const QString license = "GPLv2+";
-const QString summary1 = "Summary of contents";
-const QString summary2lang = "de";
-const QString summary2 = "Translated summary of contents";
-const QString version = "v0.1";
-const int release = 1;
-const QDate releasedate = QDate::currentDate();
-const int rating = 80;
-const int downloads = 5000;
-const QString checksum = "BAADF00D";
-const QString signature = "DEADBEEF";
-
-class testEntry: public QObject
-{
- Q_OBJECT
-private Q_SLOTS:
- void testProperties();
- void testCopy();
- void testAssignment();
-};
-
-void testEntry::testProperties()
-{
- KNS::Entry entry;
- entry.setName(KNS::KTranslatable(name));
- entry.setCategory(category);
- entry.setLicense(license);
- KNS::KTranslatable summary(summary1);
- summary.addString(summary2lang, summary2);
- entry.setSummary(summary);
- entry.setVersion(version);
- entry.setRelease(release);
- entry.setReleaseDate(releasedate);
- entry.setRating(rating);
- entry.setDownloads(downloads);
- entry.setChecksum(checksum);
- entry.setSignature(signature);
-
- QCOMPARE(entry.name().representation(), name);
- QCOMPARE(entry.category(), category);
- QCOMPARE(entry.license(), license);
- QCOMPARE(entry.summary().representation(), summary1);
- QCOMPARE(entry.summary().translated(summary2lang), summary2);
- QCOMPARE(entry.version(), version);
- QCOMPARE(entry.release(), release);
- QCOMPARE(entry.releaseDate(), releasedate);
- QCOMPARE(entry.rating(), rating);
- QCOMPARE(entry.downloads(), downloads);
- QCOMPARE(entry.checksum(), checksum);
- QCOMPARE(entry.signature(), signature);
-}
-
-void testEntry::testCopy()
-{
- KNS::Entry entry;
- entry.setName(KNS::KTranslatable(name));
- entry.setCategory(category);
- entry.setLicense(license);
- KNS::KTranslatable summary(summary1);
- summary.addString(summary2lang, summary2);
- entry.setSummary(summary);
- entry.setVersion(version);
- entry.setRelease(release);
- entry.setReleaseDate(releasedate);
- entry.setRating(rating);
- entry.setDownloads(downloads);
- entry.setChecksum(checksum);
- entry.setSignature(signature);
- KNS::Entry entry2(entry);
-
- QCOMPARE(entry.name().representation(), entry2.name().representation());
- QCOMPARE(entry.category(), entry2.category());
- QCOMPARE(entry.license(), entry2.license());
- QCOMPARE(entry.summary().representation(), entry2.summary().representation());
- QCOMPARE(entry.summary().translated(summary2lang), entry2.summary().translated(summary2lang));
- QCOMPARE(entry.version(), entry2.version());
- QCOMPARE(entry.release(), entry2.release());
- QCOMPARE(entry.releaseDate(), entry2.releaseDate());
- QCOMPARE(entry.rating(), entry2.rating());
- QCOMPARE(entry.downloads(), entry2.downloads());
- QCOMPARE(entry.checksum(), entry2.checksum());
- QCOMPARE(entry.signature(), entry2.signature());
-}
-
-void testEntry::testAssignment()
-{
- KNS::Entry entry;
- KNS::Entry entry2;;
- entry.setName(KNS::KTranslatable(name));
- entry.setCategory(category);
- entry.setLicense(license);
- KNS::KTranslatable summary(summary1);
- summary.addString(summary2lang, summary2);
- entry.setSummary(summary);
- entry.setVersion(version);
- entry.setRelease(release);
- entry.setReleaseDate(releasedate);
- entry.setRating(rating);
- entry.setDownloads(downloads);
- entry.setChecksum(checksum);
- entry.setSignature(signature);
- entry2 = entry;
-
- QCOMPARE(entry.name().representation(), entry2.name().representation());
- QCOMPARE(entry.category(), entry2.category());
- QCOMPARE(entry.license(), entry2.license());
- QCOMPARE(entry.summary().representation(), entry2.summary().representation());
- QCOMPARE(entry.summary().translated(summary2lang), entry2.summary().translated(summary2lang));
- QCOMPARE(entry.version(), entry2.version());
- QCOMPARE(entry.release(), entry2.release());
- QCOMPARE(entry.releaseDate(), entry2.releaseDate());
- QCOMPARE(entry.rating(), entry2.rating());
- QCOMPARE(entry.downloads(), entry2.downloads());
- QCOMPARE(entry.checksum(), entry2.checksum());
- QCOMPARE(entry.signature(), entry2.signature());
-}
-
-QTEST_KDEMAIN_CORE(testEntry)
-#include "knewstuffentrytest.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/knewstuff-4.97.0/tests/testTranslatable.cpp new/knewstuff-4.98.0/tests/testTranslatable.cpp
--- old/knewstuff-4.97.0/tests/testTranslatable.cpp 2014-03-01 12:51:19.000000000 +0100
+++ new/knewstuff-4.98.0/tests/testTranslatable.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,52 +0,0 @@
-/*
- This file is part of KNewStuff2.
- Copyright (c) 2008 Jeremy Whiting
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 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
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library. If not, see http://www.gnu.org/licenses/.
-*/
-
-// unit test for ktranslatable
-
-#include <QtTest>
-#include <QtCore>
-
-#include
-
-#include "../knewstuff2/core/ktranslatable.h"
-
-class testTranslatable: public QObject
-{
- Q_OBJECT
-private Q_SLOTS:
- void testAddString();
- void testRepresentation();
-};
-
-void testTranslatable::testRepresentation()
-{
- KNS::KTranslatable translatable("testRepresentation");
- QCOMPARE(translatable.representation(), QString("testRepresentation"));
-}
-
-void testTranslatable::testAddString()
-{
- KNS::KTranslatable translatable;
- translatable.addString("", "testRepresentation");
- translatable.addString("1", "1");
- QCOMPARE(translatable.representation(), QString("testRepresentation"));
- QCOMPARE(translatable.translated("1"), QString("1"));
-}
-
-QTEST_KDEMAIN_CORE(testTranslatable)
-#include "testTranslatable.moc"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org