From eeba19d4c45187bb7a4e1e2c82e02d695ed812a7 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 4 Sep 2015 13:06:11 +0000 Subject: [PATCH] generic: misc cleanups --- interfaces/kimproxy/interface/CMakeLists.txt | 1 - kdecore/auth/backends/dbus/DBusBackend.h | 1 - kdecore/auth/backends/dbus/DBusHelperProxy.h | 1 - kdecore/auth/kauthaction.h | 4 +- kdecore/auth/kauthactionreply.h | 6 +- kdecore/auth/kauthactionwatcher.h | 3 - kdecore/auth/kauthhelpersupport.h | 3 +- kdecore/compression/kfilterbase.h | 3 +- kdecore/compression/kfilterdev.cpp | 2 +- kdecore/compression/kfilterdev.h | 3 +- kdecore/compression/kgzipfilter.cpp | 2 +- kdecore/config/bufferfragment_p.h | 10 +- kdecore/config/conversion_check.h | 10 +- kdecore/config/kconfig.h | 5 +- kdecore/config/kconfig_p.h | 5 +- kdecore/config/kconfigbackend.h | 3 - kdecore/config/kconfigbase.h | 2 +- kdecore/config/kconfigbase_p.h | 2 +- kdecore/config/kconfigdata.h | 5 +- kdecore/config/kconfiggroup.h | 3 +- kdecore/config/kconfiggroup_p.h | 1 - kdecore/config/kcoreconfigskeleton.h | 6 +- kdecore/date/kcalendarera_p.h | 2 - kdecore/date/kcalendarsystem.h | 1 - kdecore/date/kdatetime.h | 2 +- kdecore/date/klocalizeddate.h | 3 - kdecore/date/ksystemtimezone.h | 7 +- kdecore/date/ktimezone.h | 7 +- kdecore/date/ktzfiletimezone.h | 2 - kdecore/date/scoop-tzones.py | 15 ++- kdecore/io/karchive.h | 4 +- kdecore/io/kautosavefile.cpp | 4 +- kdecore/io/kautosavefile.h | 4 +- kdecore/io/kdebug.h | 4 +- kdecore/io/kdirwatch.cpp | 14 +-- kdecore/io/kdirwatch.h | 6 +- kdecore/io/kdirwatch_p.h | 19 ++-- kdecore/io/klimitediodevice.cpp | 1 + kdecore/io/klimitediodevice_p.h | 3 +- kdecore/io/kmessage.h | 2 +- kdecore/io/kmountpoint.h | 2 +- kdecore/io/kprocess.h | 2 +- kdecore/io/ksavefile.h | 3 +- kdecore/io/ktempdir.h | 2 +- kdecore/io/ktemporaryfile.h | 2 +- kdecore/io/kurl.h | 5 +- kdecore/jobs/kcompositejob.h | 2 +- kdecore/jobs/kjob.h | 4 +- kdecore/jobs/kjob_p.h | 2 +- kdecore/jobs/kjobtrackerinterface.h | 3 - kdecore/jobs/kjobuidelegate.h | 2 +- kdecore/kconfig_compiler/kconfig_compiler.cpp | 13 ++- kdecore/kernel/kaboutdata.h | 4 - kdecore/kernel/kcmdlineargs.h | 1 - kdecore/kernel/kcomponentdata_p.h | 3 - kdecore/kernel/kdbusconnectionpool.h | 2 +- kdecore/kernel/kglobal.h | 3 +- kdecore/kernel/kglobal_p.h | 1 - kdecore/kernel/kstandarddirs.h | 3 +- kdecore/kernel/ktoolinvocation.cpp | 6 -- kdecore/kernel/ktoolinvocation.h | 4 +- kdecore/kernel/ktoolinvocation_x11.cpp | 8 -- kdecore/network/kssld/kssld.h | 3 +- kdecore/network/kssld/kssld_interface.h | 3 - kded/kbuildprotocolinfofactory.cpp | 6 -- kded/tests/CMakeLists.txt | 3 +- kdewebkit/kwebkitpart/kdelauncher/main.cpp | 2 +- kdewebkit/kwebkitpart/src/CMakeLists.txt | 16 ++-- kinit/tests/CMakeLists.txt | 12 +-- kio/tests/CMakeLists.txt | 94 +++++++++---------- knotify/tests/CMakeLists.txt | 16 +--- kparts/tests/CMakeLists.txt | 43 ++++----- kpty/tests/CMakeLists.txt | 3 +- kross/core/CMakeLists.txt | 40 +++++--- kross/test/CMakeLists.txt | 7 +- kunitconversion/tests/CMakeLists.txt | 5 +- kutils/kemoticons/tests/CMakeLists.txt | 10 +- solid/tests/CMakeLists.txt | 19 ++-- threadweaver/Tests/run-n-tests.py | 8 +- 79 files changed, 216 insertions(+), 332 deletions(-) delete mode 100644 interfaces/kimproxy/interface/CMakeLists.txt diff --git a/interfaces/kimproxy/interface/CMakeLists.txt b/interfaces/kimproxy/interface/CMakeLists.txt deleted file mode 100644 index 8b137891..00000000 --- a/interfaces/kimproxy/interface/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/kdecore/auth/backends/dbus/DBusBackend.h b/kdecore/auth/backends/dbus/DBusBackend.h index 04674dbc..799d7b7f 100644 --- a/kdecore/auth/backends/dbus/DBusBackend.h +++ b/kdecore/auth/backends/dbus/DBusBackend.h @@ -21,7 +21,6 @@ #define FAKE_BACKEND_H #include "AuthBackend.h" -#include class QByteArray; diff --git a/kdecore/auth/backends/dbus/DBusHelperProxy.h b/kdecore/auth/backends/dbus/DBusHelperProxy.h index 455cf511..a416ea5d 100644 --- a/kdecore/auth/backends/dbus/DBusHelperProxy.h +++ b/kdecore/auth/backends/dbus/DBusHelperProxy.h @@ -21,7 +21,6 @@ #ifndef DBUS_HELPER_PROXY_H #define DBUS_HELPER_PROXY_H -#include #include "HelperProxy.h" #include "kauthactionreply.h" diff --git a/kdecore/auth/kauthaction.h b/kdecore/auth/kauthaction.h index 123883b9..05d1c0b7 100644 --- a/kdecore/auth/kauthaction.h +++ b/kdecore/auth/kauthaction.h @@ -21,9 +21,7 @@ #ifndef ACTION_H #define ACTION_H -#include -#include -#include +#include #include diff --git a/kdecore/auth/kauthactionreply.h b/kdecore/auth/kauthactionreply.h index 3584785b..a4b4fd84 100644 --- a/kdecore/auth/kauthactionreply.h +++ b/kdecore/auth/kauthactionreply.h @@ -21,10 +21,8 @@ #ifndef ACTION_REPLY_H #define ACTION_REPLY_H -#include -#include -#include -#include +#include +#include #include /** diff --git a/kdecore/auth/kauthactionwatcher.h b/kdecore/auth/kauthactionwatcher.h index c204fa15..784913d9 100644 --- a/kdecore/auth/kauthactionwatcher.h +++ b/kdecore/auth/kauthactionwatcher.h @@ -20,9 +20,6 @@ #ifndef ACTION_WATCHER_H #define ACTION_WATCHER_H -#include -#include - #include #include "kauthactionreply.h" diff --git a/kdecore/auth/kauthhelpersupport.h b/kdecore/auth/kauthhelpersupport.h index 6697e7dd..036d846d 100644 --- a/kdecore/auth/kauthhelpersupport.h +++ b/kdecore/auth/kauthhelpersupport.h @@ -20,8 +20,7 @@ #ifndef HELPER_SUPPORT_H #define HELPER_SUPPORT_H -#include -#include +#include #include diff --git a/kdecore/compression/kfilterbase.h b/kdecore/compression/kfilterbase.h index 6fad3c7c..9f9cc8fb 100644 --- a/kdecore/compression/kfilterbase.h +++ b/kdecore/compression/kfilterbase.h @@ -22,8 +22,7 @@ #include -#include -#include +#include class QIODevice; diff --git a/kdecore/compression/kfilterdev.cpp b/kdecore/compression/kfilterdev.cpp index 3cabaf11..fa0d95cc 100644 --- a/kdecore/compression/kfilterdev.cpp +++ b/kdecore/compression/kfilterdev.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #define BUFFER_SIZE 8*1024 diff --git a/kdecore/compression/kfilterdev.h b/kdecore/compression/kfilterdev.h index 72e139a5..c147639f 100644 --- a/kdecore/compression/kfilterdev.h +++ b/kdecore/compression/kfilterdev.h @@ -19,8 +19,7 @@ #define KFILTERDEV_H #include -#include -#include +#include class QFile; class KFilterBase; diff --git a/kdecore/compression/kgzipfilter.cpp b/kdecore/compression/kgzipfilter.cpp index 8b0c0f65..5e82f9d2 100644 --- a/kdecore/compression/kgzipfilter.cpp +++ b/kdecore/compression/kgzipfilter.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include /* gzip flag byte */ diff --git a/kdecore/config/bufferfragment_p.h b/kdecore/config/bufferfragment_p.h index f06f236c..17c2acb6 100644 --- a/kdecore/config/bufferfragment_p.h +++ b/kdecore/config/bufferfragment_p.h @@ -32,16 +32,16 @@ // - truncateLeft() provides way to cut off beginning of the buffer // - split() works more like strtok_r than QByteArray.split() // - truncateLeft() and mid() require position argument to be valid - + class KConfigIniBackend::BufferFragment { - + public: BufferFragment() : d(0), len(0) { } - + BufferFragment(char* buf, int size) : d(buf), len(size) { } @@ -122,7 +122,7 @@ public: { return (d == 0); } - + BufferFragment mid(unsigned int pos, int length=-1) const { Q_ASSERT(pos < len); @@ -171,7 +171,7 @@ public: QByteArray toByteArray() const { return QByteArray(d,len); } - + // this is faster than toByteArray, but returned QByteArray becomes invalid // when buffer for this BufferFragment disappears QByteArray toVolatileByteArray() const { diff --git a/kdecore/config/conversion_check.h b/kdecore/config/conversion_check.h index 603a2147..07d95345 100644 --- a/kdecore/config/conversion_check.h +++ b/kdecore/config/conversion_check.h @@ -22,15 +22,11 @@ #ifndef CONVERSION_CHECK_H #define CONVERSION_CHECK_H -#include -#include -#include +#include +#include #include -#include -#include -#include +#include #include -#include namespace ConversionCheck { diff --git a/kdecore/config/kconfig.h b/kdecore/config/kconfig.h index 3272db34..1ba15c1c 100644 --- a/kdecore/config/kconfig.h +++ b/kdecore/config/kconfig.h @@ -28,10 +28,7 @@ #include -#include -#include -#include -#include +#include class KConfigGroup; class KComponentData; diff --git a/kdecore/config/kconfig_p.h b/kdecore/config/kconfig_p.h index 367ae1eb..03e4bb96 100644 --- a/kdecore/config/kconfig_p.h +++ b/kdecore/config/kconfig_p.h @@ -32,10 +32,7 @@ #include "kstandarddirs.h" #include "klocale.h" -#include -#include -#include -#include +#include #include diff --git a/kdecore/config/kconfigbackend.h b/kdecore/config/kconfigbackend.h index 0f9c1200..49ca6933 100644 --- a/kdecore/config/kconfigbackend.h +++ b/kdecore/config/kconfigbackend.h @@ -23,9 +23,6 @@ #ifndef KCONFIGBACKEND_H #define KCONFIGBACKEND_H -#include -#include - #include #include #include diff --git a/kdecore/config/kconfigbase.h b/kdecore/config/kconfigbase.h index d36583bc..2e79f322 100644 --- a/kdecore/config/kconfigbase.h +++ b/kdecore/config/kconfigbase.h @@ -26,7 +26,7 @@ #include -#include +#include class QStringList; class KConfigGroup; diff --git a/kdecore/config/kconfigbase_p.h b/kdecore/config/kconfigbase_p.h index c1066267..2a58b350 100644 --- a/kdecore/config/kconfigbase_p.h +++ b/kdecore/config/kconfigbase_p.h @@ -22,7 +22,7 @@ #ifndef KCONFIGBASE_P_H #define KCONFIGBASE_P_H -#include +#include class KConfigBasePrivate : public QSharedData { diff --git a/kdecore/config/kconfigdata.h b/kdecore/config/kconfigdata.h index f7ad81b9..30606ac8 100644 --- a/kdecore/config/kconfigdata.h +++ b/kdecore/config/kconfigdata.h @@ -23,10 +23,7 @@ #ifndef KCONFIGDATA_H #define KCONFIGDATA_H -#include -#include -#include -#include +#include /** * map/dict/list config node entry. diff --git a/kdecore/config/kconfiggroup.h b/kdecore/config/kconfiggroup.h index 65f79ca9..e26f9310 100644 --- a/kdecore/config/kconfiggroup.h +++ b/kdecore/config/kconfiggroup.h @@ -29,8 +29,7 @@ #include #include -#include -#include +#include class KConfig; class KConfigGroupPrivate; diff --git a/kdecore/config/kconfiggroup_p.h b/kdecore/config/kconfiggroup_p.h index 194cf4da..f8abd7e8 100644 --- a/kdecore/config/kconfiggroup_p.h +++ b/kdecore/config/kconfiggroup_p.h @@ -21,7 +21,6 @@ #ifndef KCONFIGGROUP_P_H #define KCONFIGGROUP_P_H -#include #include "kconfiggroup.h" class KConfigGroup; diff --git a/kdecore/config/kcoreconfigskeleton.h b/kdecore/config/kcoreconfigskeleton.h index 8e254999..b1687b1e 100644 --- a/kdecore/config/kcoreconfigskeleton.h +++ b/kdecore/config/kcoreconfigskeleton.h @@ -29,11 +29,7 @@ #include #include -#include -#include -#include -#include -#include +#include class KConfigSkeletonItemPrivate; /** diff --git a/kdecore/date/kcalendarera_p.h b/kdecore/date/kcalendarera_p.h index 37c6136c..254f9e3b 100644 --- a/kdecore/date/kcalendarera_p.h +++ b/kdecore/date/kcalendarera_p.h @@ -20,9 +20,7 @@ #ifndef KCALENDARERA_H #define KCALENDARERA_H -#include #include - #include "klocale.h" class KCalendarSystemPrivate; diff --git a/kdecore/date/kcalendarsystem.h b/kdecore/date/kcalendarsystem.h index b8b7a6e8..10b45d5a 100644 --- a/kdecore/date/kcalendarsystem.h +++ b/kdecore/date/kcalendarsystem.h @@ -26,7 +26,6 @@ #include "klocale.h" // needed for enums #include "kglobal.h" -#include #include class KCalendarSystemPrivate; diff --git a/kdecore/date/kdatetime.h b/kdecore/date/kdatetime.h index c9eed06f..a59092f4 100644 --- a/kdecore/date/kdatetime.h +++ b/kdecore/date/kdatetime.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include class QDataStream; diff --git a/kdecore/date/klocalizeddate.h b/kdecore/date/klocalizeddate.h index 26fab7f7..d25685af 100644 --- a/kdecore/date/klocalizeddate.h +++ b/kdecore/date/klocalizeddate.h @@ -20,9 +20,6 @@ #ifndef KLOCALIZEDDATE_H #define KLOCALIZEDDATE_H -#include -#include - #include #include "kcalendarsystem.h" #include "klocale.h" diff --git a/kdecore/date/ksystemtimezone.h b/kdecore/date/ksystemtimezone.h index e3e35e88..86b871be 100644 --- a/kdecore/date/ksystemtimezone.h +++ b/kdecore/date/ksystemtimezone.h @@ -30,11 +30,8 @@ #include #include "ktimezone.h" -#include -#include -#include -#include -#include +#include +#include class KSystemTimeZoneSource; class KSystemTimeZonePrivate; diff --git a/kdecore/date/ktimezone.h b/kdecore/date/ktimezone.h index 8069857a..7b6622f8 100644 --- a/kdecore/date/ktimezone.h +++ b/kdecore/date/ktimezone.h @@ -33,11 +33,8 @@ #include #include -#include -#include -#include -#include -#include +#include +#include #include class KTimeZone; diff --git a/kdecore/date/ktzfiletimezone.h b/kdecore/date/ktzfiletimezone.h index 667a0011..e8f0fa46 100644 --- a/kdecore/date/ktzfiletimezone.h +++ b/kdecore/date/ktzfiletimezone.h @@ -29,8 +29,6 @@ #include #include -#include - class KTzfileTimeZoneSource; class KTzfileTimeZonePrivate; class KTzfileTimeZoneDataPrivate; diff --git a/kdecore/date/scoop-tzones.py b/kdecore/date/scoop-tzones.py index 5bb12566..cd30fa71 100755 --- a/kdecore/date/scoop-tzones.py +++ b/kdecore/date/scoop-tzones.py @@ -18,7 +18,7 @@ import re cmdname = os.path.basename(sys.argv[0]) def error (msg): - print >>sys.stderr, "%s: %s" % (cmdname, msg) + sys.stderr.write("%s: %s\n" % (cmdname, msg)) sys.exit(1) system_zonetab_paths = [ @@ -26,19 +26,18 @@ system_zonetab_paths = [ ] if len(sys.argv) not in (2, 3): - print >>sys.stderr, "usage: %s TIMEZONES_PATH [ZONETAB_PATH]" % cmdname - sys.exit(1) + error("usage: %s TIMEZONES_PATH [ZONETAB_PATH]" % cmdname) timezone_path = sys.argv[1] if not os.path.isfile(timezone_path): error("TIMEZONES file '%s' does not exist " - "(create manually an empty file if really starting from scratch") + "(create manually an empty file if starting from scratch" % timezone_path) if len(sys.argv) >= 3: zonetab_path = sys.argv[2] if not os.path.isfile(zonetab_path): error("zone.tab file '%s' does not exist" % zonetab_path) - print "using given zone.tab file at '%s'" % zonetab_path + print("using given zone.tab file at '%s'" % zonetab_path) else: for system_zonetab_path in system_zonetab_paths: if os.path.isfile(system_zonetab_path): @@ -46,7 +45,7 @@ else: break if not zonetab_path: error("cannot fine zone.tab file at any of known system locations") - print "found system zone.tab file at '%s'" % zonetab_path + print("found system zone.tab file at '%s'" % zonetab_path) # Parse current timezones into dictionary zone->[comments]. ifs = codecs.open(timezone_path, "r", "UTF-8") @@ -117,6 +116,6 @@ if num_new_tzones or num_new_tzcomments: ofs.writelines(tzlines) ofs.close() num_new = num_new_tzones + num_new_tzcomments - print "added %d new timezones/comments to '%s'" % (num_new, timezone_path) + print("added %d new timezones/comments to '%s'" % (num_new, timezone_path)) else: - print "no new timezones/comments to add" + print("no new timezones/comments to add") diff --git a/kdecore/io/karchive.h b/kdecore/io/karchive.h index 73fc73ee..096d45ff 100644 --- a/kdecore/io/karchive.h +++ b/kdecore/io/karchive.h @@ -25,9 +25,7 @@ #include #include -#include -#include -#include +#include #include diff --git a/kdecore/io/kautosavefile.cpp b/kdecore/io/kautosavefile.cpp index 7e8189ae..84d22715 100644 --- a/kdecore/io/kautosavefile.cpp +++ b/kdecore/io/kautosavefile.cpp @@ -21,8 +21,8 @@ #include // for FILENAME_MAX -#include -#include +#include +#include #include "klockfile.h" #include "krandom.h" #include "kglobal.h" diff --git a/kdecore/io/kautosavefile.h b/kdecore/io/kautosavefile.h index 9c7a610b..89caa958 100644 --- a/kdecore/io/kautosavefile.h +++ b/kdecore/io/kautosavefile.h @@ -23,8 +23,8 @@ #include #include "kurl.h" -#include -#include +#include +#include class KAutoSaveFilePrivate; /** diff --git a/kdecore/io/kdebug.h b/kdecore/io/kdebug.h index 5b50757e..2698dd53 100644 --- a/kdecore/io/kdebug.h +++ b/kdecore/io/kdebug.h @@ -24,8 +24,8 @@ #include -#include -#include +#include +#include /** * \addtogroup kdebug Debug message generators diff --git a/kdecore/io/kdirwatch.cpp b/kdecore/io/kdirwatch.cpp index 6cd1c30f..3d5917ee 100644 --- a/kdecore/io/kdirwatch.cpp +++ b/kdecore/io/kdirwatch.cpp @@ -235,7 +235,7 @@ KDirWatchPrivate::KDirWatchPrivate() this, SLOT(inotifyEventReceived()) ); } #endif -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER availableMethods << "QFileSystemWatcher"; fsWatcher = 0; #endif @@ -261,7 +261,7 @@ KDirWatchPrivate::~KDirWatchPrivate() if ( supports_inotify ) ::close( m_inotify_fd ); #endif -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER delete fsWatcher; #endif } @@ -706,7 +706,7 @@ bool KDirWatchPrivate::useINotify( Entry* e ) return false; } #endif -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER bool KDirWatchPrivate::useQFSWatch(Entry* e) { e->m_mode = QFSWatchMode; @@ -933,7 +933,7 @@ void KDirWatchPrivate::addWatch(Entry* e) #if defined(HAVE_SYS_INOTIFY_H) case KDirWatch::INotify: entryAdded = useINotify(e); break; #endif -#if defined(HAVE_QFILESYSTEMWATCHER) +#ifndef QT_NO_FILESYSTEMWATCHER case KDirWatch::QFSWatch: entryAdded = useQFSWatch(e); break; #endif case KDirWatch::Stat: entryAdded = useStat(e); break; @@ -948,7 +948,7 @@ void KDirWatchPrivate::addWatch(Entry* e) #if defined(HAVE_FAM) if (useFAM(e)) return; #endif -#if defined(HAVE_QFILESYSTEMWATCHER) +#ifndef QT_NO_FILESYSTEMWATCHER if (useQFSWatch(e)) return; #endif useStat(e); @@ -973,7 +973,7 @@ void KDirWatchPrivate::removeWatch(Entry* e) } } #endif -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER if (e->m_mode == QFSWatchMode && fsWatcher) { if (s_verboseDebug) kDebug(7001) << "fsWatcher->removePath" << e->path; @@ -1684,7 +1684,7 @@ void KDirWatchPrivate::statistics() } } -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER // Slot for QFileSystemWatcher void KDirWatchPrivate::fswEventReceived(const QString &path) { diff --git a/kdecore/io/kdirwatch.h b/kdecore/io/kdirwatch.h index d5a270c3..1d809fc9 100644 --- a/kdecore/io/kdirwatch.h +++ b/kdecore/io/kdirwatch.h @@ -18,9 +18,9 @@ #ifndef KDIRWATCH_H #define KDIRWATCH_H -#include -#include -#include +#include +#include +#include #include diff --git a/kdecore/io/kdirwatch_p.h b/kdecore/io/kdirwatch_p.h index b128e4fa..1499eeff 100644 --- a/kdecore/io/kdirwatch_p.h +++ b/kdecore/io/kdirwatch_p.h @@ -30,16 +30,11 @@ #include #include "kdirwatch.h" -#ifndef QT_NO_FILESYSTEMWATCHER -#define HAVE_QFILESYSTEMWATCHER -#endif +#include +#include +#include +#include -#include -#include -#include -#include -#include -#include class QFileSystemWatcher; class QSocketNotifier; @@ -70,8 +65,8 @@ class QSocketNotifier; #define invalid_ctime ((time_t)-1) -#ifdef HAVE_QFILESYSTEMWATCHER -#include +#ifndef QT_NO_FILESYSTEMWATCHER +#include typedef QFileSystemWatcher KFileSystemWatcher; #endif @@ -226,7 +221,7 @@ public: bool useINotify(Entry*); #endif -#ifdef HAVE_QFILESYSTEMWATCHER +#ifndef QT_NO_FILESYSTEMWATCHER KFileSystemWatcher *fsWatcher; bool useQFSWatch(Entry* e); #endif diff --git a/kdecore/io/klimitediodevice.cpp b/kdecore/io/klimitediodevice.cpp index 9ec59012..b4573506 100644 --- a/kdecore/io/klimitediodevice.cpp +++ b/kdecore/io/klimitediodevice.cpp @@ -16,6 +16,7 @@ Boston, MA 02110-1301, USA. */ +#include #include "klimitediodevice_p.h" KLimitedIODevice::KLimitedIODevice( QIODevice *dev, qint64 start, qint64 length ) diff --git a/kdecore/io/klimitediodevice_p.h b/kdecore/io/klimitediodevice_p.h index c91b9203..853dd5d5 100644 --- a/kdecore/io/klimitediodevice_p.h +++ b/kdecore/io/klimitediodevice_p.h @@ -19,8 +19,7 @@ #ifndef KLIMITEDIODEVICE_P_H #define KLIMITEDIODEVICE_P_H -#include -#include +#include /** * A readonly device that reads from an underlying device * from a given point to another (e.g. to give access to a single diff --git a/kdecore/io/kmessage.h b/kdecore/io/kmessage.h index 96decdea..c7206197 100644 --- a/kdecore/io/kmessage.h +++ b/kdecore/io/kmessage.h @@ -21,7 +21,7 @@ #include -#include +#include class KMessageHandler; /** diff --git a/kdecore/io/kmountpoint.h b/kdecore/io/kmountpoint.h index 1a009ee3..77ba4b0d 100644 --- a/kdecore/io/kmountpoint.h +++ b/kdecore/io/kmountpoint.h @@ -24,7 +24,7 @@ #include #include -#include +#include /** * The KMountPoint class provides information about mounted and unmounted disks. diff --git a/kdecore/io/kprocess.h b/kdecore/io/kprocess.h index cb3e2472..301f1b34 100644 --- a/kdecore/io/kprocess.h +++ b/kdecore/io/kprocess.h @@ -24,7 +24,7 @@ #include -#include +#include class KProcessPrivate; diff --git a/kdecore/io/ksavefile.h b/kdecore/io/ksavefile.h index 636dc28e..5a047e70 100644 --- a/kdecore/io/ksavefile.h +++ b/kdecore/io/ksavefile.h @@ -24,8 +24,7 @@ #include -#include -#include +#include #include /** diff --git a/kdecore/io/ktempdir.h b/kdecore/io/ktempdir.h index 59dda755..9a932e56 100644 --- a/kdecore/io/ktempdir.h +++ b/kdecore/io/ktempdir.h @@ -21,7 +21,7 @@ #define KTEMPDIR_H #include -#include +#include /** * \class KTempDir ktempdir.h diff --git a/kdecore/io/ktemporaryfile.h b/kdecore/io/ktemporaryfile.h index e9554aec..9212ac5c 100644 --- a/kdecore/io/ktemporaryfile.h +++ b/kdecore/io/ktemporaryfile.h @@ -24,7 +24,7 @@ #include #include -#include +#include class KTemporaryFilePrivate; diff --git a/kdecore/io/kurl.h b/kdecore/io/kurl.h index 17df9c2f..07830d70 100644 --- a/kdecore/io/kurl.h +++ b/kdecore/io/kurl.h @@ -24,9 +24,8 @@ #include -#include -#include -#include +#include +#include class QStringList; class QMimeData; diff --git a/kdecore/jobs/kcompositejob.h b/kdecore/jobs/kcompositejob.h index e36b8a07..28093719 100644 --- a/kdecore/jobs/kcompositejob.h +++ b/kdecore/jobs/kcompositejob.h @@ -23,7 +23,7 @@ #include #include -#include +#include class KCompositeJobPrivate; /** diff --git a/kdecore/jobs/kjob.h b/kdecore/jobs/kjob.h index c6b06f08..71358350 100644 --- a/kdecore/jobs/kjob.h +++ b/kdecore/jobs/kjob.h @@ -23,8 +23,8 @@ #define KJOB_H #include -#include -#include +#include +#include class KJobUiDelegate; diff --git a/kdecore/jobs/kjob_p.h b/kdecore/jobs/kjob_p.h index 942ba3b3..62ebb3e2 100644 --- a/kdecore/jobs/kjob_p.h +++ b/kdecore/jobs/kjob_p.h @@ -23,7 +23,7 @@ #define KJOB_P_H #include "kjob.h" -#include +#include class KJobUiDelegate; class QTimer; diff --git a/kdecore/jobs/kjobtrackerinterface.h b/kdecore/jobs/kjobtrackerinterface.h index 77c3fb86..766fecb2 100644 --- a/kdecore/jobs/kjobtrackerinterface.h +++ b/kdecore/jobs/kjobtrackerinterface.h @@ -23,9 +23,6 @@ #include #include -#include -#include - /** * The interface to implement to track the progresses of a job. */ diff --git a/kdecore/jobs/kjobuidelegate.h b/kdecore/jobs/kjobuidelegate.h index 06292c46..5ea4b578 100644 --- a/kdecore/jobs/kjobuidelegate.h +++ b/kdecore/jobs/kjobuidelegate.h @@ -23,7 +23,7 @@ #define KJOBUIDELEGATE_H #include -#include +#include class KJob; diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp index d7e95753..97b430d1 100644 --- a/kdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp @@ -27,14 +27,13 @@ // Compiling this file with this flag is just crazy #undef QT_NO_CAST_FROM_ASCII -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include -#include #include #include diff --git a/kdecore/kernel/kaboutdata.h b/kdecore/kernel/kaboutdata.h index b7b27edf..cc242c03 100644 --- a/kdecore/kernel/kaboutdata.h +++ b/kdecore/kernel/kaboutdata.h @@ -28,10 +28,6 @@ #include #include -// Qt -#include -#include - template class QList; class QVariant; class KAboutData; diff --git a/kdecore/kernel/kcmdlineargs.h b/kdecore/kernel/kcmdlineargs.h index d20fd54c..c486f6f1 100644 --- a/kdecore/kernel/kcmdlineargs.h +++ b/kdecore/kernel/kcmdlineargs.h @@ -20,7 +20,6 @@ #define KCMDLINEARGS_H #include -#include #include diff --git a/kdecore/kernel/kcomponentdata_p.h b/kdecore/kernel/kcomponentdata_p.h index 5ce1eb1c..4c74d1cc 100644 --- a/kdecore/kernel/kcomponentdata_p.h +++ b/kdecore/kernel/kcomponentdata_p.h @@ -21,9 +21,6 @@ #define KERNEL_KCOMPONENTDATA_P_H #include "kcomponentdata.h" -#include -#include -#include #include #include diff --git a/kdecore/kernel/kdbusconnectionpool.h b/kdecore/kernel/kdbusconnectionpool.h index 24efaeb2..4f348daa 100644 --- a/kdecore/kernel/kdbusconnectionpool.h +++ b/kdecore/kernel/kdbusconnectionpool.h @@ -22,7 +22,7 @@ #define KDBUSCONNECTIONPOOL_H #include -#include +#include namespace KDBusConnectionPool { diff --git a/kdecore/kernel/kglobal.h b/kdecore/kernel/kglobal.h index d75a92c2..8be766e7 100644 --- a/kdecore/kernel/kglobal.h +++ b/kdecore/kernel/kglobal.h @@ -21,8 +21,9 @@ #include #include +#include + #include -#include // // WARNING!! diff --git a/kdecore/kernel/kglobal_p.h b/kdecore/kernel/kglobal_p.h index e8d5fb7c..801fe1b3 100644 --- a/kdecore/kernel/kglobal_p.h +++ b/kdecore/kernel/kglobal_p.h @@ -21,7 +21,6 @@ #define KGLOBAL_P_H #include -#include class KComponentData; diff --git a/kdecore/kernel/kstandarddirs.h b/kdecore/kernel/kstandarddirs.h index 1b962328..deaab667 100644 --- a/kdecore/kernel/kstandarddirs.h +++ b/kdecore/kernel/kstandarddirs.h @@ -23,9 +23,8 @@ #ifndef KSTANDARDDIRS_H #define KSTANDARDDIRS_H -#include #include -#include +#include class KConfig; diff --git a/kdecore/kernel/ktoolinvocation.cpp b/kdecore/kernel/ktoolinvocation.cpp index 115abe2f..f954c502 100644 --- a/kdecore/kernel/ktoolinvocation.cpp +++ b/kdecore/kernel/ktoolinvocation.cpp @@ -30,12 +30,6 @@ #include #include -#include -#include -#include -#include -#include - #include diff --git a/kdecore/kernel/ktoolinvocation.h b/kdecore/kernel/ktoolinvocation.h index 60fda6ba..6dfb5f99 100644 --- a/kdecore/kernel/ktoolinvocation.h +++ b/kdecore/kernel/ktoolinvocation.h @@ -27,9 +27,7 @@ #include -#include -#include -#include +#include class OrgKdeKLauncherInterface; class KUrl; diff --git a/kdecore/kernel/ktoolinvocation_x11.cpp b/kdecore/kernel/ktoolinvocation_x11.cpp index 61d18760..c5ea7297 100644 --- a/kdecore/kernel/ktoolinvocation_x11.cpp +++ b/kdecore/kernel/ktoolinvocation_x11.cpp @@ -41,14 +41,6 @@ #include "kmessage.h" #include "kservice.h" -#include -#include -#include -#include -#include -#include -#include - static QStringList splitEmailAddressList( const QString & aStr ) { // This is a copy of KPIM::splitEmailAddrList(). diff --git a/kdecore/network/kssld/kssld.h b/kdecore/network/kssld/kssld.h index 4e921717..04e01339 100644 --- a/kdecore/network/kssld/kssld.h +++ b/kdecore/network/kssld/kssld.h @@ -23,8 +23,7 @@ #define KSSLD_H #include -#include -#include +#include class KSSLDPrivate; diff --git a/kdecore/network/kssld/kssld_interface.h b/kdecore/network/kssld/kssld_interface.h index f4d58149..8de23918 100644 --- a/kdecore/network/kssld/kssld_interface.h +++ b/kdecore/network/kssld/kssld_interface.h @@ -23,9 +23,6 @@ #define KSSLDINTERFACE_H #include -#include -#include -#include #include #include diff --git a/kded/kbuildprotocolinfofactory.cpp b/kded/kbuildprotocolinfofactory.cpp index 9186444b..0fb3d6b3 100644 --- a/kded/kbuildprotocolinfofactory.cpp +++ b/kded/kbuildprotocolinfofactory.cpp @@ -21,12 +21,6 @@ #include "ksycocadict_p.h" #include "ksycocaresourcelist.h" -#include -#include -#include -#include -#include - KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() : KProtocolInfoFactory() { diff --git a/kded/tests/CMakeLists.txt b/kded/tests/CMakeLists.txt index cb1f1b7a..e87cd323 100644 --- a/kded/tests/CMakeLists.txt +++ b/kded/tests/CMakeLists.txt @@ -1,11 +1,10 @@ include_directories( ${KDE4_KIO_INCLUDES} .. ) -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) ######### kmimeassociationstest ######## set(kmimeassociationstest_SRCS kmimeassociationstest.cpp ../kmimeassociations.cpp) -kde4_add_unit_test(kmimeassociationstest ${kmimeassociationstest_SRCS}) +kde4_add_test(kmimeassociationstest ${kmimeassociationstest_SRCS}) target_link_libraries(kmimeassociationstest ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY}) diff --git a/kdewebkit/kwebkitpart/kdelauncher/main.cpp b/kdewebkit/kwebkitpart/kdelauncher/main.cpp index b910844c..c9903ac9 100644 --- a/kdewebkit/kwebkitpart/kdelauncher/main.cpp +++ b/kdewebkit/kwebkitpart/kdelauncher/main.cpp @@ -169,7 +169,7 @@ protected slots: } void print() { -#if !defined(QT_NO_PRINTER) +#ifndef QT_NO_PRINTER QScopedPointer dlg (new QPrintPreviewDialog(this)); connect(dlg.data(), SIGNAL(paintRequested(QPrinter*)), view, SLOT(print(QPrinter*))); diff --git a/kdewebkit/kwebkitpart/src/CMakeLists.txt b/kdewebkit/kwebkitpart/src/CMakeLists.txt index 2e797d25..51bdd009 100644 --- a/kdewebkit/kwebkitpart/src/CMakeLists.txt +++ b/kdewebkit/kwebkitpart/src/CMakeLists.txt @@ -1,12 +1,12 @@ include_directories( - ${KDE4_INCLUDES} - ${KDE4_KDECORE_INCLUDES} - ${KDE4_KDEUI_INCLUDES} - ${KDE4_KIO_INCLUDES} - ${CMAKE_SOURCE_DIR}/kdewebkit - ${CMAKE_SOURCE_DIR}/kutils - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_BINARY_DIR} + ${KDE4_INCLUDES} + ${KDE4_KDECORE_INCLUDES} + ${KDE4_KDEUI_INCLUDES} + ${KDE4_KIO_INCLUDES} + ${CMAKE_SOURCE_DIR}/kdewebkit + ${CMAKE_SOURCE_DIR}/kutils + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_BINARY_DIR} ) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) diff --git a/kinit/tests/CMakeLists.txt b/kinit/tests/CMakeLists.txt index b31b9491..11f3a042 100644 --- a/kinit/tests/CMakeLists.txt +++ b/kinit/tests/CMakeLists.txt @@ -1,17 +1,7 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) - include_directories( ${KDE4_KIO_INCLUDES} ) set(klaunchertest_SRCS klaunchertest.cpp ) - -kde4_add_executable(klaunchertest TEST ${klaunchertest_SRCS}) +add_executable(klaunchertest ${klaunchertest_SRCS}) target_link_libraries(klaunchertest ${KDE4_KDECORE_LIBS} kio ) - -########### install files ############### - - - - - diff --git a/kio/tests/CMakeLists.txt b/kio/tests/CMakeLists.txt index be549940..a9eb83ee 100644 --- a/kio/tests/CMakeLists.txt +++ b/kio/tests/CMakeLists.txt @@ -3,67 +3,67 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${KDE4_KIO_INCLUDES} ) MACRO(KIO_UNIT_TESTS) - FOREACH(_testname ${ARGN}) - kde4_add_unit_test(${_testname} TESTNAME kio-${_testname} ${_testname}.cpp) - target_link_libraries(${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) - ENDFOREACH(_testname) + FOREACH(_testname ${ARGN}) + kde4_add_test(kio-${_testname} ${_testname}.cpp) + target_link_libraries(kio-${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) + ENDFOREACH(_testname) ENDMACRO(KIO_UNIT_TESTS) MACRO(KIO_EXECUTABLE_TESTS) - FOREACH(_testname ${ARGN}) - kde4_add_executable(${_testname} TEST ${_testname}.cpp) - target_link_libraries(${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) - ENDFOREACH(_testname) + FOREACH(_testname ${ARGN}) + add_executable(kio-${_testname} ${_testname}.cpp) + target_link_libraries(kio-${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) + ENDFOREACH(_testname) ENDMACRO(KIO_EXECUTABLE_TESTS) # jobtest seems to trigger a ctest problem; jobtest finishes and ctest waits for ever KIO_UNIT_TESTS( - krununittest - kprotocolinfotest - jobtest - jobguitest - jobremotetest - kurlcompletiontest - kfileitemtest - kbookmarktest - kacltest - kdirmodeltest - kdirlistertest - fileundomanagertest - kfilemetainfotest - dataprotocoltest - clipboardupdatertest - globaltest - udsentrytest + krununittest + kprotocolinfotest + jobtest + jobguitest + jobremotetest + kurlcompletiontest + kfileitemtest + kbookmarktest + kacltest + kdirmodeltest + kdirlistertest + fileundomanagertest + kfilemetainfotest + dataprotocoltest + clipboardupdatertest + globaltest + udsentrytest ) KIO_EXECUTABLE_TESTS( - ksycocatest - getalltest - kruntest - kioslavetest - speed - kscantest - kdirlistertest_gui - previewtest - kionetrctest - kpropsdlgtest - kmfitest - ksycocaupdatetest - netaccesstest - kdirmodeltest_gui - kmimetypechoosertest_gui - ksslkeygentest - kdbusservicestartertest - kurlrequestertest - kopenwithtest - kicondialogtest - kfiledialogtest + ksycocatest + getalltest + kruntest + kioslavetest + speed + kscantest + kdirlistertest_gui + previewtest + kionetrctest + kpropsdlgtest + kmfitest + ksycocaupdatetest + netaccesstest + kdirmodeltest_gui + kmimetypechoosertest_gui + ksslkeygentest + kdbusservicestartertest + kurlrequestertest + kopenwithtest + kicondialogtest + kfiledialogtest ) ########### kfstest ############### set(kfstest_SRCS kfstest.cpp kfdtest.cpp) -kde4_add_executable(kfstest TEST ${kfstest_SRCS}) +add_executable(kfstest ${kfstest_SRCS}) target_link_libraries(kfstest ${KDE4_KIO_LIBS} ) diff --git a/knotify/tests/CMakeLists.txt b/knotify/tests/CMakeLists.txt index ce425578..6933e2c0 100644 --- a/knotify/tests/CMakeLists.txt +++ b/knotify/tests/CMakeLists.txt @@ -1,4 +1,3 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) # This can be used for finding data files in the source dir, without installing them project(knotifytest) @@ -6,19 +5,8 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../config ) ########### knotifytest ############### -set(knotifytest_SRCS main.cpp knotifytestwindow.cpp ) +set(knotifytest_SRCS main.cpp knotifytestwindow.cpp knotifytestview.ui) -kde4_add_ui_files(knotifytest_SRCS knotifytestview.ui) - - -kde4_add_executable(knotifytest TEST ${knotifytest_SRCS}) +add_executable(knotifytest ${knotifytest_SRCS}) target_link_libraries(knotifytest ${KDE4_KIO_LIBS} knotifyconfig ) - -#the binary file doesn't need to be installed -#install(TARGETS knotifytest DESTINATION ${BIN_INSTALL_DIR} ) - - -########### install files ############### - - diff --git a/kparts/tests/CMakeLists.txt b/kparts/tests/CMakeLists.txt index e3c194cb..fabf38e2 100644 --- a/kparts/tests/CMakeLists.txt +++ b/kparts/tests/CMakeLists.txt @@ -5,13 +5,12 @@ include_directories( ${KDE4_KPARTS_INCLUDES} ) ########### next target ############### set(kpartstest_SRCS -testmainwindow.cpp -parts.cpp -notepad.cpp + testmainwindow.cpp + parts.cpp + notepad.cpp ) - -kde4_add_executable(kpartstest TEST ${kpartstest_SRCS}) +add_executable(kpartstest ${kpartstest_SRCS}) target_link_libraries(kpartstest ${KDE4_KPARTS_LIBS} ) @@ -19,13 +18,12 @@ target_link_libraries(kpartstest ${KDE4_KPARTS_LIBS} ) ########### next target ############### set(normalktmtest_SRCS -normalktm.cpp -parts.cpp -notepad.cpp + normalktm.cpp + parts.cpp + notepad.cpp ) - -kde4_add_executable(normalktmtest TEST ${normalktmtest_SRCS}) +add_executable(normalktmtest ${normalktmtest_SRCS}) target_link_libraries(normalktmtest ${KDE4_KPARTS_LIBS} ) @@ -33,15 +31,15 @@ target_link_libraries(normalktmtest ${KDE4_KPARTS_LIBS} ) ########### next target ############### set(partviewer_SRCS -partviewer.cpp + partviewer.cpp ) -kde4_add_executable(partviewer TEST ${partviewer_SRCS}) +add_executable(partviewer ${partviewer_SRCS}) target_link_libraries(partviewer ${KDE4_KPARTS_LIBS} ) ########### test prog for "open or save question" ############### -kde4_add_executable(openorsavequestion TEST openorsavequestion.cpp) +add_executable(openorsavequestion openorsavequestion.cpp) target_link_libraries(openorsavequestion ${KDE4_KPARTS_LIBS} ) ########### next target ############### @@ -59,7 +57,6 @@ install(TARGETS spellcheckplugin DESTINATION ${PLUGIN_INSTALL_DIR} ) set(notepadpart_PART_SRCS notepad.cpp) - kde4_add_plugin(notepadpart ${notepadpart_PART_SRCS}) target_link_libraries(notepadpart ${KDE4_KPARTS_LIBS} ) @@ -71,17 +68,17 @@ install(TARGETS notepadpart DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### unit tests ############### MACRO(KPARTS_UNIT_TESTS) - FOREACH(_testname ${ARGN}) - kde4_add_unit_test(${_testname} TESTNAME kparts-${_testname} ${_testname}.cpp) - target_link_libraries(${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) - ENDFOREACH(_testname) + FOREACH(_testname ${ARGN}) + kde4_add_test(kparts-${_testname} ${_testname}.cpp) + target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) + ENDFOREACH(_testname) ENDMACRO(KPARTS_UNIT_TESTS) MACRO(KPARTS_EXECUTABLE_TESTS) - FOREACH(_testname ${ARGN}) - kde4_add_executable(${_testname} TEST ${_testname}.cpp) - target_link_libraries(${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) - set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") - ENDFOREACH(_testname) + FOREACH(_testname ${ARGN}) + add_executable(kparts-${_testname} ${_testname}.cpp) + target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) + set_target_properties(kparts-${_testname} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") + ENDFOREACH(_testname) ENDMACRO(KPARTS_EXECUTABLE_TESTS) set(kparts_unittests diff --git a/kpty/tests/CMakeLists.txt b/kpty/tests/CMakeLists.txt index d3eee121..806dc07b 100644 --- a/kpty/tests/CMakeLists.txt +++ b/kpty/tests/CMakeLists.txt @@ -1,5 +1,4 @@ -set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) include_directories( ${KDE4_KPTY_INCLUDES} ) -kde4_add_unit_test(kptyprocesstest kptyprocesstest.cpp) +kde4_add_test(kptyprocesstest kptyprocesstest.cpp) target_link_libraries(kptyprocesstest ${KDE4_KPTY_LIBS} ${QT_QTTEST_LIBRARY}) diff --git a/kross/core/CMakeLists.txt b/kross/core/CMakeLists.txt index 388ff28d..1e59c4f0 100644 --- a/kross/core/CMakeLists.txt +++ b/kross/core/CMakeLists.txt @@ -1,23 +1,37 @@ -include_directories(${CMAKE_SOURCE_DIR} ${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES}) +include_directories( + ${CMAKE_SOURCE_DIR} + ${KDE4_KDECORE_INCLUDES} + ${KDE4_KDEUI_INCLUDES} +) set(krosscore_LIB_SRCS - krossconfig.cpp - interpreter.cpp - script.cpp - action.cpp - actioncollection.cpp - manager.cpp - object.cpp + krossconfig.cpp + interpreter.cpp + script.cpp + action.cpp + actioncollection.cpp + manager.cpp + object.cpp ) add_library(krosscore ${LIBRARY_TYPE} ${krosscore_LIB_SRCS}) -target_link_libraries(krosscore PRIVATE ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS} ${QT_QTSCRIPT_LIBRARY} ${QT_QTXML_LIBRARY}) -target_link_libraries(krosscore PUBLIC kdecore ${QT_QTSCRIPT_LIBRARY} ${QT_QTXML_LIBRARY} ) -set_target_properties(krosscore PROPERTIES VERSION ${GENERIC_LIB_VERSION} - SOVERSION ${GENERIC_LIB_SOVERSION} - ) +target_link_libraries(krosscore PRIVATE + ${KDE4_KDECORE_LIBS} + ${KDE4_KDEUI_LIBS} + ${QT_QTSCRIPT_LIBRARY} + ${QT_QTXML_LIBRARY} +) +target_link_libraries(krosscore PUBLIC + kdecore + ${QT_QTSCRIPT_LIBRARY} + ${QT_QTXML_LIBRARY} +) +set_target_properties(krosscore PROPERTIES + VERSION ${GENERIC_LIB_VERSION} + SOVERSION ${GENERIC_LIB_SOVERSION} +) install(TARGETS krosscore EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/kross/test/CMakeLists.txt b/kross/test/CMakeLists.txt index b82c01b7..91200932 100644 --- a/kross/test/CMakeLists.txt +++ b/kross/test/CMakeLists.txt @@ -2,11 +2,12 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) include_directories(${KDE4_KIO_INCLUDES}) set(krosstest_SRCS - testobject.cpp - main.cpp ) + testobject.cpp + main.cpp +) -kde4_add_executable(krosstest TEST ${krosstest_SRCS}) +add_executable(krosstest ${krosstest_SRCS}) target_link_libraries(krosstest ${KDE4_KDEUI_LIBS} krosscore ) diff --git a/kunitconversion/tests/CMakeLists.txt b/kunitconversion/tests/CMakeLists.txt index 051817c5..4d513689 100644 --- a/kunitconversion/tests/CMakeLists.txt +++ b/kunitconversion/tests/CMakeLists.txt @@ -1,10 +1,9 @@ -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) include_directories(${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES}) macro(KUNITCONVERSION_UNIT_TESTS) foreach(_testname ${ARGN}) - kde4_add_unit_test(${_testname} TESTNAME kunitconversion-${_testname} ${_testname}.cpp) - target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} kunitconversion ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} ) + kde4_add_test(kunitconversion-${_testname} ${_testname}.cpp) + target_link_libraries(kunitconversion-${_testname} ${KDE4_KDECORE_LIBS} kunitconversion ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} ) endforeach(_testname) endmacro(KUNITCONVERSION_UNIT_TESTS) diff --git a/kutils/kemoticons/tests/CMakeLists.txt b/kutils/kemoticons/tests/CMakeLists.txt index e6a7c60c..197d8446 100644 --- a/kutils/kemoticons/tests/CMakeLists.txt +++ b/kutils/kemoticons/tests/CMakeLists.txt @@ -1,11 +1,9 @@ -set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) - include_directories(${CMAKE_SOURCE_DIR} ../ ${CMAKE_CURRENT_BINARY_DIR}) -kde4_add_executable(kemoticonstest main.cpp) +add_executable(kemoticonstest main.cpp) target_link_libraries(kemoticonstest ${KDE4_KDEUI_LIBS} kemoticons) -add_definitions( -DSRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}/\\"" ) +add_definitions(-DSRCDIR="${CMAKE_CURRENT_SOURCE_DIR}/") set(kemoticontest2_SRCS kemoticontest.cpp) -kde4_add_unit_test(kemoticontest2 TESTNAME kutils-kemoticontest2 ${kemoticontest2_SRCS}) -target_link_libraries(kemoticontest2 ${QT_QTTEST_LIBRARY} ${KDE4_KIO_LIBS} kemoticons) +kde4_add_test(kutils-kemoticontest2 ${kemoticontest2_SRCS}) +target_link_libraries(kutils-kemoticontest2 ${QT_QTTEST_LIBRARY} ${KDE4_KIO_LIBS} kemoticons) diff --git a/solid/tests/CMakeLists.txt b/solid/tests/CMakeLists.txt index a282e4ba..2b36e2a1 100644 --- a/solid/tests/CMakeLists.txt +++ b/solid/tests/CMakeLists.txt @@ -6,9 +6,9 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} ) set(fakehardwaretest_SRCS fakehardwaretest.cpp ) -kde4_add_unit_test(fakehardwaretest ${fakehardwaretest_SRCS}) +kde4_add_test(solid-fakehardwaretest ${fakehardwaretest_SRCS}) -target_link_libraries(fakehardwaretest solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) +target_link_libraries(solid-fakehardwaretest solid_static ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ) add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"") ########### solidhwtest ############### @@ -17,12 +17,12 @@ set(solidhwtest_SRCS solidhwtest.cpp ) -kde4_add_unit_test(solidhwtest ${solidhwtest_SRCS}) +kde4_add_test(solid-solidhwtest ${solidhwtest_SRCS}) add_definitions(-DFAKE_COMPUTER_XML="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"") include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw ) -target_link_libraries(solidhwtest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ${LIBS} solid_static) +target_link_libraries(solid-solidhwtest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY} ${LIBS} solid_static) ########### solidnettestdbusservice ############### @@ -33,7 +33,7 @@ target_link_libraries(solidhwtest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT #QT4_ADD_DBUS_ADAPTOR(solidnettestdbusservice_SRCS ../solid/org.kde.Solid.Networking.Client.xml # solidnettestdbusservice.h TestNetworkingService) -#kde4_add_executable(solidnettestdbusservice TEST ${solidnettestdbusservice_SRCS}) +#add_executable(solidnettestdbusservice ${solidnettestdbusservice_SRCS}) #target_link_libraries(solidnettestdbusservice ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTTEST_LIBRARY}) @@ -42,15 +42,12 @@ target_link_libraries(solidhwtest ${QT_QTCORE_LIBRARY} ${QT_QTDBUS_LIBRARY} ${QT include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES} ${KDE4_KIO_INCLUDES}) -set(networkingclient_SRCS networkingclient.cpp) - -kde4_add_ui_files(networkingclient_SRCS networkingclientview.ui) +set(networkingclient_SRCS networkingclient.cpp networkingclientview.ui) qt4_add_dbus_interface(networkingclient_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../solid/org.kde.Solid.Networking.Client.xml clientinterface) +add_executable(solid-networkingclient ${networkingclient_SRCS}) -kde4_add_executable(networkingclient TEST ${networkingclient_SRCS}) - -target_link_libraries(networkingclient solid_static ${KDE4_KDEUI_LIBS}) +target_link_libraries(solid-networkingclient solid_static ${KDE4_KDEUI_LIBS}) ########### install files ############### diff --git a/threadweaver/Tests/run-n-tests.py b/threadweaver/Tests/run-n-tests.py index 251793ae..d4981805 100644 --- a/threadweaver/Tests/run-n-tests.py +++ b/threadweaver/Tests/run-n-tests.py @@ -14,10 +14,10 @@ def RunTests( Number ): # if re.search( "Darwin", Platform ): # Command = "DYLD_LIBRARY_PATH=../Weaver:../Experimental ./JobTests.app/Contents/MacOs/JobTests >/dev/null" for count in range( Number ): - retValue = os.system ( Command) - resultString = " (FAILED)" - if retValue == 0: - resultString = " (succeeded)" + retValue = os.system ( Command) + resultString = " (FAILED)" + if retValue == 0: + resultString = " (succeeded)" SuccessCount = SuccessCount + 1 print "Test run #" + str(count + 1) + resultString return SuccessCount