summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Małek <michalm@jabster.pl>2014-08-07 08:46:48 (GMT)
committerMichał Małek <michalm@jabster.pl>2014-08-07 08:46:48 (GMT)
commit1d4f4777318e4c464accb0c33a91fcdc753b5022 (patch)
treec692eac36a71e574f3acea2cd6954a4896f8f117
parent0a0deb48888561290bb29fabb13f8292f06d2a77 (diff)
Removed dependency on KDELibs4Support
-rw-r--r--CMakeLists.txt12
-rw-r--r--kcmcddb/CMakeLists.txt34
-rw-r--r--kcmcddb/cddbconfigwidget.cpp5
-rw-r--r--libkcddb/CMakeLists.txt105
-rw-r--r--libkcddb/asynchttplookup.cpp1
-rw-r--r--libkcddb/cache.cpp2
-rw-r--r--libkcddb/cache.h1
-rw-r--r--libkcddb/categories.cpp2
-rw-r--r--libkcddb/cddb.cpp2
-rw-r--r--libkcddb/cddbplookup.h2
-rw-r--r--libkcddb/cdinfodialog.ui11
-rw-r--r--libkcddb/client.h1
-rw-r--r--libkcddb/genres.cpp2
-rw-r--r--libkcddb/kcddb.cpp2
-rw-r--r--libkcddb/musicbrainz/musicbrainzlookup.cpp6
-rw-r--r--libkcddb/sites.cpp6
-rw-r--r--libkcddb/synchttplookup.cpp10
-rw-r--r--libkcddb/synchttpsubmit.cpp7
-rw-r--r--libkcddb/syncsmtpsubmit.cpp5
-rw-r--r--test/CMakeLists.txt33
-rw-r--r--test/asynccddblookuptest.cpp4
-rw-r--r--test/asynchttplookuptest.cpp4
-rw-r--r--test/asyncmusicbrainztest.cpp4
-rw-r--r--test/cachetest.cpp4
-rw-r--r--test/cdinfotest.cpp2
-rw-r--r--test/musicbrainztest-fulldate.cpp5
-rw-r--r--test/musicbrainztest-severaldiscs.cpp5
-rw-r--r--test/musicbrainztest.cpp5
-rw-r--r--test/synccddblookuptest.cpp4
-rw-r--r--test/synchttplookuptest.cpp4
-rw-r--r--test/utf8test.cpp4
31 files changed, 131 insertions, 163 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 865d943..d923113 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,8 +11,8 @@ include(KDECMakeSettings)
include(FeatureSummary)
include(GenerateExportHeader)
-find_package(Qt5 REQUIRED COMPONENTS Test)
-find_package(KF5 REQUIRED COMPONENTS Config DocTools KDELibs4Support Codecs KIO)
+find_package(Qt5 REQUIRED COMPONENTS Network Widgets Test)
+find_package(KF5 REQUIRED COMPONENTS Config DocTools Codecs I18n KIO WidgetsAddons)
include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
@@ -25,16 +25,8 @@ set_package_properties(MusicBrainz5 PROPERTIES
if(MUSICBRAINZ5_FOUND)
set(HAVE_MUSICBRAINZ5 1)
- include_directories(${MUSICBRAINZ5_INCLUDE_DIR})
-
- set(libmusicbrainz_SRCS ${libmusicbrainz_SRCS}
- musicbrainz/musicbrainzlookup.cpp
- musicbrainz/asyncmusicbrainzlookup.cpp)
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
else()
set(HAVE_MUSICBRAINZ5 0)
- set(libmusicbrainz_SRCS)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-musicbrainz.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-musicbrainz.h )
diff --git a/kcmcddb/CMakeLists.txt b/kcmcddb/CMakeLists.txt
index 5a0d9be..a645049 100644
--- a/kcmcddb/CMakeLists.txt
+++ b/kcmcddb/CMakeLists.txt
@@ -1,27 +1,23 @@
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../libkcddb ${CMAKE_CURRENT_BINARY_DIR}/../libkcddb )
-
add_subdirectory ( doc )
-########### next target ###############
-
-set(kcm_cddb_PART_SRCS cddbconfigwidget.cpp kcmcddb.cpp )
-set_source_files_properties(cddbconfigwidget.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ui_cddbconfigwidget.h)
-
-
-qt5_wrap_ui(kcm_cddb_PART_SRCS cddbconfigwidget.ui )
-
-add_library(kcm_cddb MODULE ${kcm_cddb_PART_SRCS})
+qt5_wrap_ui(ui_sources cddbconfigwidget.ui)
+add_library(kcm_cddb MODULE
+ cddbconfigwidget.cpp
+ kcmcddb.cpp
+ ${ui_sources})
+set_source_files_properties(cddbconfigwidget.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ui_cddbconfigwidget.h)
-target_link_libraries(kcm_cddb KF5::KIOCore kcddb)
-
-install(TARGETS kcm_cddb DESTINATION ${PLUGIN_INSTALL_DIR} )
-
-
-########### install files ###############
-
-install( FILES libkcddb.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
+target_link_libraries(kcm_cddb PRIVATE
+ KF5::ConfigWidgets
+ KF5::I18n
+ KF5::KIOCore
+ KF5::KIOWidgets
+ KF5::WidgetsAddons
+ kcddb)
+install(TARGETS kcm_cddb DESTINATION ${PLUGIN_INSTALL_DIR})
+install(FILES libkcddb.desktop DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/kcmcddb/cddbconfigwidget.cpp b/kcmcddb/cddbconfigwidget.cpp
index 65c283d..1cb2d1c 100644
--- a/kcmcddb/cddbconfigwidget.cpp
+++ b/kcmcddb/cddbconfigwidget.cpp
@@ -22,14 +22,11 @@
#include "config-musicbrainz.h"
-#include <kdemacros.h> // KDE_NO_DEPRECATED
-
#include "libkcddb/sites.h"
#include "libkcddb/lookup.h"
#include <qlist.h>
-#include <kapplication.h>
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
#include <kmessagebox.h>
#include <keditlistwidget.h>
#include <kurlrequester.h>
diff --git a/libkcddb/CMakeLists.txt b/libkcddb/CMakeLists.txt
index e300a75..1ff4029 100644
--- a/libkcddb/CMakeLists.txt
+++ b/libkcddb/CMakeLists.txt
@@ -1,54 +1,73 @@
-include_directories(${CMAKE_CURRENT_BINARY_DIR})
+if(MUSICBRAINZ5_FOUND)
+ set(musicbrainz_sources
+ musicbrainz/musicbrainzlookup.cpp
+ musicbrainz/asyncmusicbrainzlookup.cpp)
-########### next target ###############
+ include_directories(${MUSICBRAINZ5_INCLUDE_DIR})
-set(kcddb_LIB_SRCS ${libmusicbrainz_SRCS}
- cache.cpp
- cdinfo.cpp
- kcddbconfig.cpp
- client.cpp
- kcddb.cpp
- cddb.cpp
- lookup.cpp
- cddbplookup.cpp
- synccddbplookup.cpp
- asynccddbplookup.cpp
- httplookup.cpp
- synchttplookup.cpp
- asynchttplookup.cpp
- smtpsubmit.cpp
- asyncsmtpsubmit.cpp
- syncsmtpsubmit.cpp
- submit.cpp
- sites.cpp
- httpsubmit.cpp
- asynchttpsubmit.cpp
- synchttpsubmit.cpp
- categories.cpp
- genres.cpp
- cdinfodialog.cpp
- cdinfoencodingwidget.cpp
- logging.cpp )
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR (WIN32 AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
+ set(enable_exceptions -EHsc)
+ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+ set(enable_exceptions "-fexceptions -UQT_NO_EXCEPTIONS")
+ elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
+ set(enable_exceptions -fexceptions)
+ endif()
-qt5_wrap_ui(kcddb_LIB_SRCS cdinfodialog.ui cdinfoencodingwidget.ui )
+ set_source_files_properties(${musicbrainz_sources} PROPERTIES COMPILE_FLAGS ${enable_exceptions})
+endif()
-kconfig_add_kcfg_files(kcddb_LIB_SRCS configbase.kcfgc )
+qt5_wrap_ui(ui_sources cdinfodialog.ui cdinfoencodingwidget.ui)
-add_library(kcddb SHARED ${kcddb_LIB_SRCS})
+kconfig_add_kcfg_files(kcfg_sources configbase.kcfgc)
-target_link_libraries(kcddb KF5::Codecs KF5::ConfigGui KF5::KDELibs4Support KF5::KIOCore)
-if(MUSICBRAINZ5_FOUND)
- target_link_libraries(kcddb ${MUSICBRAINZ5_LIBRARIES})
-endif(MUSICBRAINZ5_FOUND)
+add_library(kcddb SHARED
+ cache.cpp
+ cdinfo.cpp
+ kcddbconfig.cpp
+ client.cpp
+ kcddb.cpp
+ cddb.cpp
+ lookup.cpp
+ cddbplookup.cpp
+ synccddbplookup.cpp
+ asynccddbplookup.cpp
+ httplookup.cpp
+ synchttplookup.cpp
+ asynchttplookup.cpp
+ smtpsubmit.cpp
+ asyncsmtpsubmit.cpp
+ syncsmtpsubmit.cpp
+ submit.cpp
+ sites.cpp
+ httpsubmit.cpp
+ asynchttpsubmit.cpp
+ synchttpsubmit.cpp
+ categories.cpp
+ genres.cpp
+ cdinfodialog.cpp
+ cdinfoencodingwidget.cpp
+ logging.cpp
+ ${musicbrainz_sources}
+ ${ui_sources}
+ ${kcfg_sources})
-generate_export_header(kcddb)
+target_link_libraries(kcddb
+ PUBLIC
+ KF5::ConfigGui
+ Qt5::Widgets
+ PRIVATE
+ KF5::Codecs
+ KF5::I18n
+ KF5::KIOCore
+ Qt5::Network
+ ${MUSICBRAINZ5_LIBRARIES})
-set_target_properties(kcddb PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION} )
-install(TARGETS kcddb EXPORT LibkcddbTargets ${INSTALL_TARGETS_DEFAULT_ARGS} )
+generate_export_header(kcddb)
+set_target_properties(kcddb PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
-########### install files ###############
+install(TARGETS kcddb EXPORT LibkcddbTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES
cdinfo.h
@@ -57,8 +76,8 @@ install(FILES
genres.h
kcddbconfig.h
kcddb.h
- kcddb_export.h
+ ${CMAKE_CURRENT_BINARY_DIR}/kcddb_export.h
${CMAKE_CURRENT_BINARY_DIR}/configbase.h
- DESTINATION ${INCLUDE_INSTALL_DIR}/libkcddb COMPONENT Devel )
-install( FILES libkcddb.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
+ DESTINATION ${INCLUDE_INSTALL_DIR}/libkcddb COMPONENT Devel)
+install( FILES libkcddb.kcfg DESTINATION ${KCFG_INSTALL_DIR})
diff --git a/libkcddb/asynchttplookup.cpp b/libkcddb/asynchttplookup.cpp
index 255cc07..d033700 100644
--- a/libkcddb/asynchttplookup.cpp
+++ b/libkcddb/asynchttplookup.cpp
@@ -22,7 +22,6 @@
#include "logging.h"
#include <qstringlist.h>
-#include <qapplication.h>
#include <kio/job.h>
diff --git a/libkcddb/cache.cpp b/libkcddb/cache.cpp
index 1869f3d..73057c4 100644
--- a/libkcddb/cache.cpp
+++ b/libkcddb/cache.cpp
@@ -31,8 +31,6 @@
#include "musicbrainz/musicbrainzlookup.h"
#endif
-#include <kstandarddirs.h>
-
#include <QFile>
#include <QDir>
#include <QTextStream>
diff --git a/libkcddb/cache.h b/libkcddb/cache.h
index 0f67c10..0f4be7a 100644
--- a/libkcddb/cache.h
+++ b/libkcddb/cache.h
@@ -27,7 +27,6 @@
#include "kcddb.h"
#include "cdinfo.h"
-#include <kdemacros.h>
namespace KCDDB
{
diff --git a/libkcddb/categories.cpp b/libkcddb/categories.cpp
index 222df47..5a0569a 100644
--- a/libkcddb/categories.cpp
+++ b/libkcddb/categories.cpp
@@ -8,7 +8,7 @@
#include "categories.h"
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
KCDDB::Categories::Categories()
{
diff --git a/libkcddb/cddb.cpp b/libkcddb/cddb.cpp
index 8e64d12..f1e3a15 100644
--- a/libkcddb/cddb.cpp
+++ b/libkcddb/cddb.cpp
@@ -27,7 +27,7 @@
#include <QtCore/QDebug>
#include <kstringhandler.h>
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
namespace KCDDB
{
diff --git a/libkcddb/cddbplookup.h b/libkcddb/cddbplookup.h
index 6c4244c..4641464 100644
--- a/libkcddb/cddbplookup.h
+++ b/libkcddb/cddbplookup.h
@@ -22,7 +22,7 @@
#ifndef KCDDB_CDDBP_LOOKUP_H
#define KCDDB_CDDBP_LOOKUP_H
-#include <qtcpsocket.h>
+#include <QtNetwork/QTcpSocket>
#include "lookup.h"
diff --git a/libkcddb/cdinfodialog.ui b/libkcddb/cdinfodialog.ui
index eee507c..4d60d62 100644
--- a/libkcddb/cdinfodialog.ui
+++ b/libkcddb/cdinfodialog.ui
@@ -97,7 +97,7 @@
</widget>
</item>
<item row="4" column="1">
- <widget class="KComboBox" name="m_category">
+ <widget class="QComboBox" name="m_category">
<property name="enabled">
<bool>false</bool>
</property>
@@ -144,7 +144,7 @@
</widget>
</item>
<item row="4" column="3">
- <widget class="KComboBox" name="m_genre">
+ <widget class="QComboBox" name="m_genre">
<property name="toolTip">
<string>Avoid custom values, as they will be written to CDDB as-is.</string>
</property>
@@ -243,13 +243,6 @@
</item>
</layout>
</widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- </customwidgets>
<tabstops>
<tabstop>m_artist</tabstop>
<tabstop>m_title</tabstop>
diff --git a/libkcddb/client.h b/libkcddb/client.h
index 136cab7..9a3692d 100644
--- a/libkcddb/client.h
+++ b/libkcddb/client.h
@@ -25,7 +25,6 @@
#include "cdinfo.h"
#include <QtCore/QObject>
#include "kcddb.h"
-#include <kdemacros.h>
namespace KCDDB
{
diff --git a/libkcddb/genres.cpp b/libkcddb/genres.cpp
index 3af2558..bc8f284 100644
--- a/libkcddb/genres.cpp
+++ b/libkcddb/genres.cpp
@@ -8,7 +8,7 @@
#include "genres.h"
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
class KCDDB::Genres::Private
{
diff --git a/libkcddb/kcddb.cpp b/libkcddb/kcddb.cpp
index b90873f..ec236c7 100644
--- a/libkcddb/kcddb.cpp
+++ b/libkcddb/kcddb.cpp
@@ -19,7 +19,7 @@
#include "kcddb.h"
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
namespace KCDDB
{
diff --git a/libkcddb/musicbrainz/musicbrainzlookup.cpp b/libkcddb/musicbrainz/musicbrainzlookup.cpp
index ee03531..776c4ed 100644
--- a/libkcddb/musicbrainz/musicbrainzlookup.cpp
+++ b/libkcddb/musicbrainz/musicbrainzlookup.cpp
@@ -22,7 +22,7 @@
#include <QtCore/QDebug>
#include <kcodecs.h>
-#include <klocale.h>
+#include <KI18n/KLocalizedString>
#include <qcryptographichash.h>
#include <cstdio>
#include <cstring>
@@ -62,7 +62,7 @@ namespace KCDDB
// Code adapted from libmusicbrainz/examples/cdlookup.cc
try {
- MusicBrainz5::CMetadata Metadata=Query.Query("discid",discId.toAscii().constData());
+ MusicBrainz5::CMetadata Metadata=Query.Query("discid",discId.toLatin1().constData());
if (Metadata.Disc() && Metadata.Disc()->ReleaseList())
{
@@ -90,7 +90,7 @@ namespace KCDDB
//However, these releases will include information for all media in the release
//So we need to filter out the only the media we want.
- MusicBrainz5::CMediumList MediaList=FullRelease->MediaMatchingDiscID(discId.toAscii().constData());
+ MusicBrainz5::CMediumList MediaList=FullRelease->MediaMatchingDiscID(discId.toLatin1().constData());
if (MediaList.NumItems() > 0)
{
diff --git a/libkcddb/sites.cpp b/libkcddb/sites.cpp
index c84e482..7b042ff 100644
--- a/libkcddb/sites.cpp
+++ b/libkcddb/sites.cpp
@@ -20,7 +20,6 @@
#include "sites.h"
#include <KIO/Job>
-#include <KIO/NetAccess>
#include <QtCore/QDebug>
#include <QtCore/QRegExp>
#include <QtCore/QTextStream>
@@ -54,9 +53,10 @@ namespace KCDDB
QList<Mirror> result;
- KIO::Job* job = KIO::get( url, KIO::NoReload, KIO::HideProgressInfo );
+ KIO::TransferJob* job = KIO::get( url, KIO::NoReload, KIO::HideProgressInfo );
QByteArray data;
- if( KIO::NetAccess::synchronousRun( job, 0, &data ) )
+ QObject::connect( job, &KIO::TransferJob::data, [&data](KIO::Job *, const QByteArray &d){ data += d; } );
+ if( job->exec() )
{
result = readData( data );
}
diff --git a/libkcddb/synchttplookup.cpp b/libkcddb/synchttplookup.cpp
index f5345fa..bc13303 100644
--- a/libkcddb/synchttplookup.cpp
+++ b/libkcddb/synchttplookup.cpp
@@ -21,11 +21,7 @@
#include "synchttplookup.h"
#include "logging.h"
-#include <qstringlist.h>
-#include <qapplication.h>
-
-#include <kio/job.h>
-#include <kio/netaccess.h>
+#include <KIO/Job>
namespace KCDDB
{
@@ -116,7 +112,9 @@ namespace KCDDB
if ( 0 == job )
return ServerError;
- if (!KIO::NetAccess::synchronousRun(job, 0, &data_))
+ QObject::connect( job, &KIO::TransferJob::data, [&](KIO::Job *, const QByteArray &data){ data_ += data; } );
+
+ if (!job->exec())
return ServerError;
jobFinished();
diff --git a/libkcddb/synchttpsubmit.cpp b/libkcddb/synchttpsubmit.cpp
index 7e13aa7..7bf47ad 100644
--- a/libkcddb/synchttpsubmit.cpp
+++ b/libkcddb/synchttpsubmit.cpp
@@ -19,8 +19,7 @@
#include "synchttpsubmit.h"
-#include <kio/netaccess.h>
-#include <kio/job.h>
+#include <KIO/Job>
namespace KCDDB
{
@@ -37,9 +36,7 @@ namespace KCDDB
Result SyncHTTPSubmit::runJob(KIO::Job* job)
{
- bool success = KIO::NetAccess::synchronousRun(job, 0);
-
- if (success)
+ if (job->exec())
return Success;
else
return UnknownError;
diff --git a/libkcddb/syncsmtpsubmit.cpp b/libkcddb/syncsmtpsubmit.cpp
index 19cc941..8d327c3 100644
--- a/libkcddb/syncsmtpsubmit.cpp
+++ b/libkcddb/syncsmtpsubmit.cpp
@@ -21,8 +21,7 @@
#include "cdinfo.h"
-#include <kio/netaccess.h>
-#include <kio/job.h>
+#include <KIO/Job>
namespace KCDDB
{
@@ -40,7 +39,7 @@ namespace KCDDB
Result SyncSMTPSubmit::runJob(KIO::Job* job)
{
- if ( KIO::NetAccess::synchronousRun(job, 0) )
+ if ( job->exec() )
return Success;
return UnknownError;
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 87851a4..2cb0633 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,24 +1,13 @@
-set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
-include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/../libkcddb )
+function(add_unit_tests)
+ foreach(test ${ARGN})
+ add_executable(${test} ${test}.cpp)
+ add_test( ${test} ${test} )
+ target_link_libraries(${test} Qt5::Test kcddb)
+ endforeach()
+endfunction()
-macro(kcddb_executable_tests)
- foreach(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
- add_test( ${_testname} ${_testname} )
- target_link_libraries(${_testname} Qt5::Test kcddb)
- endforeach()
-endmacro()
-
-macro(kcddb_unit_tests)
- foreach(_testname ${ARGN})
- add_executable(${_testname} ${_testname}.cpp)
- add_test( kcddb-${_testname} ${_testname} )
- target_link_libraries(${_testname} Qt5::Test kcddb)
- endforeach()
-endmacro()
-
-kcddb_unit_tests(
+add_unit_tests(
asynchttplookuptest
asynccddblookuptest
synccddblookuptest
@@ -30,12 +19,8 @@ kcddb_unit_tests(
cachetest
musicbrainztest-severaldiscs
musicbrainztest-fulldate
-)
-
-kcddb_executable_tests(
syncsmtpsubmittest
asyncsmtpsubmittest
asynchttpsubmittest
synchttpsubmittest
- sitestest
-)
+ sitestest)
diff --git a/test/asynccddblookuptest.cpp b/test/asynccddblookuptest.cpp
index f0a8394..9558c56 100644
--- a/test/asynccddblookuptest.cpp
+++ b/test/asynccddblookuptest.cpp
@@ -17,10 +17,10 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "asynccddblookuptest.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
+#include <QtTest/QTest>
void AsyncCDDBLookupTest::testLookup()
{
@@ -114,4 +114,4 @@ AsyncCDDBLookupTest::slotFinished(Result r)
m_eventLoop.quit();
}
-QTEST_KDEMAIN(AsyncCDDBLookupTest, NoGUI)
+QTEST_GUILESS_MAIN(AsyncCDDBLookupTest)
diff --git a/test/asynchttplookuptest.cpp b/test/asynchttplookuptest.cpp
index 5b28ddd..56a3f74 100644
--- a/test/asynchttplookuptest.cpp
+++ b/test/asynchttplookuptest.cpp
@@ -18,10 +18,10 @@
*/
-#include <qtest_kde.h>
#include "asynchttplookuptest.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
+#include <QtTest/QTest>
void AsyncHTTPLookupTest::testLookup()
{
@@ -115,4 +115,4 @@ AsyncHTTPLookupTest::slotFinished(Result r)
m_eventLoop.quit();
}
-QTEST_KDEMAIN(AsyncHTTPLookupTest, NoGUI)
+QTEST_GUILESS_MAIN(AsyncHTTPLookupTest)
diff --git a/test/asyncmusicbrainztest.cpp b/test/asyncmusicbrainztest.cpp
index 7ac3255..a9accba 100644
--- a/test/asyncmusicbrainztest.cpp
+++ b/test/asyncmusicbrainztest.cpp
@@ -18,11 +18,11 @@
*/
-#include <qtest_kde.h>
#include "asyncmusicbrainztest.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "config-musicbrainz.h"
+#include <QtTest/QTest>
void AsyncMusicBrainzTest::testLookup()
{
@@ -153,4 +153,4 @@ AsyncMusicBrainzTest::slotFinished(Result r)
m_eventLoop.quit();
}
-QTEST_KDEMAIN(AsyncMusicBrainzTest, NoGUI)
+QTEST_GUILESS_MAIN(AsyncMusicBrainzTest)
diff --git a/test/cachetest.cpp b/test/cachetest.cpp
index efef3bb..5ba43ca 100644
--- a/test/cachetest.cpp
+++ b/test/cachetest.cpp
@@ -20,10 +20,10 @@
#include "cachetest.h"
#include "libkcddb/cache.h"
-#include <qtest_kde.h>
#include "libkcddb/cdinfo.h"
#include "libkcddb/client.h"
#include "config-musicbrainz.h"
+#include <QtTest/QTest>
using namespace KCDDB;
@@ -129,4 +129,4 @@ void CacheTest::testMusicbrainz()
#endif
}
-QTEST_KDEMAIN(CacheTest, NoGUI)
+QTEST_GUILESS_MAIN(CacheTest)
diff --git a/test/cdinfotest.cpp b/test/cdinfotest.cpp
index cff48ca..b5e510a 100644
--- a/test/cdinfotest.cpp
+++ b/test/cdinfotest.cpp
@@ -88,4 +88,4 @@ void CDInfoTest::testLongLines()
}
}
-QTEST_MAIN(CDInfoTest)
+QTEST_GUILESS_MAIN(CDInfoTest)
diff --git a/test/musicbrainztest-fulldate.cpp b/test/musicbrainztest-fulldate.cpp
index 6e106a2..d5f7677 100644
--- a/test/musicbrainztest-fulldate.cpp
+++ b/test/musicbrainztest-fulldate.cpp
@@ -17,13 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "musicbrainztest-fulldate.h"
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "config-musicbrainz.h"
-
+#include <QtTest/QTest>
void MusicBrainzTestFullDate::testLookup()
{
@@ -152,4 +151,4 @@ void MusicBrainzTestFullDate::testLookup()
}
}
-QTEST_KDEMAIN(MusicBrainzTestFullDate, NoGUI)
+QTEST_GUILESS_MAIN(MusicBrainzTestFullDate)
diff --git a/test/musicbrainztest-severaldiscs.cpp b/test/musicbrainztest-severaldiscs.cpp
index 65b8487..5964c6a 100644
--- a/test/musicbrainztest-severaldiscs.cpp
+++ b/test/musicbrainztest-severaldiscs.cpp
@@ -17,13 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "musicbrainztest-severaldiscs.h"
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "config-musicbrainz.h"
-
+#include <QtTest/QTest>
void MusicBrainzTestSeveralDiscs::testLookup()
{
@@ -136,4 +135,4 @@ void MusicBrainzTestSeveralDiscs::testLookup()
}
}
-QTEST_KDEMAIN(MusicBrainzTestSeveralDiscs, NoGUI)
+QTEST_GUILESS_MAIN(MusicBrainzTestSeveralDiscs)
diff --git a/test/musicbrainztest.cpp b/test/musicbrainztest.cpp
index b0986fd..540de5d 100644
--- a/test/musicbrainztest.cpp
+++ b/test/musicbrainztest.cpp
@@ -17,13 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "musicbrainztest.h"
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "config-musicbrainz.h"
-
+#include <QtTest/QTest>
void MusicBrainzTest::testLookup()
{
@@ -119,4 +118,4 @@ void MusicBrainzTest::testLookup()
}
}
-QTEST_KDEMAIN(MusicBrainzTest, NoGUI)
+QTEST_GUILESS_MAIN(MusicBrainzTest)
diff --git a/test/synccddblookuptest.cpp b/test/synccddblookuptest.cpp
index 25adbb5..2a73929 100644
--- a/test/synccddblookuptest.cpp
+++ b/test/synccddblookuptest.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "synccddblookuptest.h"
+#include <QtTest/QTest>
void SyncCDDBLookupTest::testLookup()
{
@@ -91,4 +91,4 @@ void SyncCDDBLookupTest::testLookup()
QVERIFY(hasRunTest);
}
-QTEST_KDEMAIN(SyncCDDBLookupTest, NoGUI)
+QTEST_GUILESS_MAIN(SyncCDDBLookupTest)
diff --git a/test/synchttplookuptest.cpp b/test/synchttplookuptest.cpp
index 862fdee..f93120c 100644
--- a/test/synchttplookuptest.cpp
+++ b/test/synchttplookuptest.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "synchttplookuptest.h"
+#include <QtTest/QTest>
void SyncHTTPLookupTest::testLookup()
{
@@ -91,4 +91,4 @@ void SyncHTTPLookupTest::testLookup()
QVERIFY(hasRunTest);
}
-QTEST_KDEMAIN(SyncHTTPLookupTest, NoGUI)
+QTEST_GUILESS_MAIN(SyncHTTPLookupTest)
diff --git a/test/utf8test.cpp b/test/utf8test.cpp
index 041a656..2f27146 100644
--- a/test/utf8test.cpp
+++ b/test/utf8test.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qtest_kde.h>
#include "libkcddb/client.h"
#include "libkcddb/cache.h"
#include "libkcddb/lookup.h"
#include "utf8test.h"
+#include <QtTest/QTest>
void Utf8Test::testLookup()
{
@@ -82,4 +82,4 @@ void Utf8Test::testLookup()
QVERIFY(hasRunTest);
}
-QTEST_KDEMAIN(Utf8Test, NoGUI)
+QTEST_GUILESS_MAIN(Utf8Test)