generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-09-04 13:06:11 +00:00
parent 8babe90166
commit eeba19d4c4
79 changed files with 216 additions and 332 deletions

View file

@ -21,7 +21,6 @@
#define FAKE_BACKEND_H #define FAKE_BACKEND_H
#include "AuthBackend.h" #include "AuthBackend.h"
#include <QHash>
class QByteArray; class QByteArray;

View file

@ -21,7 +21,6 @@
#ifndef DBUS_HELPER_PROXY_H #ifndef DBUS_HELPER_PROXY_H
#define DBUS_HELPER_PROXY_H #define DBUS_HELPER_PROXY_H
#include <QVariant>
#include "HelperProxy.h" #include "HelperProxy.h"
#include "kauthactionreply.h" #include "kauthactionreply.h"

View file

@ -21,9 +21,7 @@
#ifndef ACTION_H #ifndef ACTION_H
#define ACTION_H #define ACTION_H
#include <QtCore/QString> #include <QtCore/qvariant.h>
#include <QtCore/QVariant>
#include <QtCore/QHash>
#include <kdecore_export.h> #include <kdecore_export.h>

View file

@ -21,10 +21,8 @@
#ifndef ACTION_REPLY_H #ifndef ACTION_REPLY_H
#define ACTION_REPLY_H #define ACTION_REPLY_H
#include <QtCore/QString> #include <QtCore/qvariant.h>
#include <QtCore/QVariant> #include <QtCore/qdatastream.h>
#include <QtCore/QMap>
#include <QtCore/QDataStream>
#include <kdecore_export.h> #include <kdecore_export.h>
/** /**

View file

@ -20,9 +20,6 @@
#ifndef ACTION_WATCHER_H #ifndef ACTION_WATCHER_H
#define ACTION_WATCHER_H #define ACTION_WATCHER_H
#include <QtCore/QObject>
#include <QtCore/QString>
#include <kdecore_export.h> #include <kdecore_export.h>
#include "kauthactionreply.h" #include "kauthactionreply.h"

View file

@ -20,8 +20,7 @@
#ifndef HELPER_SUPPORT_H #ifndef HELPER_SUPPORT_H
#define HELPER_SUPPORT_H #define HELPER_SUPPORT_H
#include <QtCore/QObject> #include <QtCore/qvariant.h>
#include <QtCore/QVariant>
#include <kdecore_export.h> #include <kdecore_export.h>

View file

@ -22,8 +22,7 @@
#include <karchive_export.h> #include <karchive_export.h>
#include <QtCore/QObject> #include <QtCore/qiodevice.h>
#include <QtCore/QString>
class QIODevice; class QIODevice;

View file

@ -24,7 +24,7 @@
#include <assert.h> #include <assert.h>
#include <QDebug> #include <QDebug>
#include <QtCore/QFile> #include <QtCore/qfile.h>
#define BUFFER_SIZE 8*1024 #define BUFFER_SIZE 8*1024

View file

@ -19,8 +19,7 @@
#define KFILTERDEV_H #define KFILTERDEV_H
#include <karchive_export.h> #include <karchive_export.h>
#include <QtCore/QIODevice> #include <QtCore/qfile.h>
#include <QtCore/QString>
class QFile; class QFile;
class KFilterBase; class KFilterBase;

View file

@ -23,7 +23,7 @@
#include <time.h> #include <time.h>
#include <zlib.h> #include <zlib.h>
#include <QtCore/QIODevice> #include <QtCore/qiodevice.h>
/* gzip flag byte */ /* gzip flag byte */

View file

@ -32,16 +32,16 @@
// - truncateLeft() provides way to cut off beginning of the buffer // - truncateLeft() provides way to cut off beginning of the buffer
// - split() works more like strtok_r than QByteArray.split() // - split() works more like strtok_r than QByteArray.split()
// - truncateLeft() and mid() require position argument to be valid // - truncateLeft() and mid() require position argument to be valid
class KConfigIniBackend::BufferFragment class KConfigIniBackend::BufferFragment
{ {
public: public:
BufferFragment() : d(0), len(0) BufferFragment() : d(0), len(0)
{ {
} }
BufferFragment(char* buf, int size) : d(buf), len(size) BufferFragment(char* buf, int size) : d(buf), len(size)
{ {
} }
@ -122,7 +122,7 @@ public:
{ {
return (d == 0); return (d == 0);
} }
BufferFragment mid(unsigned int pos, int length=-1) const BufferFragment mid(unsigned int pos, int length=-1) const
{ {
Q_ASSERT(pos < len); Q_ASSERT(pos < len);
@ -171,7 +171,7 @@ public:
QByteArray toByteArray() const { QByteArray toByteArray() const {
return QByteArray(d,len); return QByteArray(d,len);
} }
// this is faster than toByteArray, but returned QByteArray becomes invalid // this is faster than toByteArray, but returned QByteArray becomes invalid
// when buffer for this BufferFragment disappears // when buffer for this BufferFragment disappears
QByteArray toVolatileByteArray() const { QByteArray toVolatileByteArray() const {

View file

@ -22,15 +22,11 @@
#ifndef CONVERSION_CHECK_H #ifndef CONVERSION_CHECK_H
#define CONVERSION_CHECK_H #define CONVERSION_CHECK_H
#include <QtCore/QString> #include <QtGui/qcolor.h>
#include <QtGui/QColor> #include <QtGui/qfont.h>
#include <QtGui/QFont>
#include <QtCore/qdatetime.h> #include <QtCore/qdatetime.h>
#include <QtCore/QPoint> #include <QtCore/qrect.h>
#include <QtCore/QSize>
#include <QtCore/QRect>
#include <kurl.h> #include <kurl.h>
#include <QtCore/QVariant>
namespace ConversionCheck { namespace ConversionCheck {

View file

@ -28,10 +28,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QString> #include <QtCore/qvariant.h>
#include <QtCore/QVariant>
#include <QtCore/QByteArray>
#include <QtCore/QList>
class KConfigGroup; class KConfigGroup;
class KComponentData; class KComponentData;

View file

@ -32,10 +32,7 @@
#include "kstandarddirs.h" #include "kstandarddirs.h"
#include "klocale.h" #include "klocale.h"
#include <QtCore/QStringList> #include <QtCore/qstack.h>
#include <QtCore/QStack>
#include <QtCore/QFile>
#include <QtCore/QDir>
#include <unistd.h> #include <unistd.h>

View file

@ -23,9 +23,6 @@
#ifndef KCONFIGBACKEND_H #ifndef KCONFIGBACKEND_H
#define KCONFIGBACKEND_H #define KCONFIGBACKEND_H
#include <QtCore/QObject>
#include <QtCore/QString>
#include <kdecore_export.h> #include <kdecore_export.h>
#include <kconfigbase.h> #include <kconfigbase.h>
#include <kdebug.h> #include <kdebug.h>

View file

@ -26,7 +26,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/qglobal.h> #include <QtCore/qstringlist.h>
class QStringList; class QStringList;
class KConfigGroup; class KConfigGroup;

View file

@ -22,7 +22,7 @@
#ifndef KCONFIGBASE_P_H #ifndef KCONFIGBASE_P_H
#define KCONFIGBASE_P_H #define KCONFIGBASE_P_H
#include <QtCore/QSharedData> #include <QtCore/qshareddata.h>
class KConfigBasePrivate : public QSharedData class KConfigBasePrivate : public QSharedData
{ {

View file

@ -23,10 +23,7 @@
#ifndef KCONFIGDATA_H #ifndef KCONFIGDATA_H
#define KCONFIGDATA_H #define KCONFIGDATA_H
#include <QtCore/QByteArray> #include <QtCore/qdebug.h>
#include <QtCore/QString>
#include <QtCore/QMap>
#include <QtCore/QDebug>
/** /**
* map/dict/list config node entry. * map/dict/list config node entry.

View file

@ -29,8 +29,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/qsharedpointer.h> #include <QtCore/qsharedpointer.h>
#include <QtCore/QVariant> #include <QtCore/qvariant.h>
#include <QtCore/QStringList>
class KConfig; class KConfig;
class KConfigGroupPrivate; class KConfigGroupPrivate;

View file

@ -21,7 +21,6 @@
#ifndef KCONFIGGROUP_P_H #ifndef KCONFIGGROUP_P_H
#define KCONFIGGROUP_P_H #define KCONFIGGROUP_P_H
#include <QtCore/QVariant>
#include "kconfiggroup.h" #include "kconfiggroup.h"
class KConfigGroup; class KConfigGroup;

View file

@ -29,11 +29,7 @@
#include <ksharedconfig.h> #include <ksharedconfig.h>
#include <kconfiggroup.h> #include <kconfiggroup.h>
#include <QtCore/qdatetime.h> #include <QtCore/qrect.h>
#include <QtCore/QHash>
#include <QtCore/QRect>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
class KConfigSkeletonItemPrivate; class KConfigSkeletonItemPrivate;
/** /**

View file

@ -20,9 +20,7 @@
#ifndef KCALENDARERA_H #ifndef KCALENDARERA_H
#define KCALENDARERA_H #define KCALENDARERA_H
#include <QtCore/QString>
#include <QtCore/qdatetime.h> #include <QtCore/qdatetime.h>
#include "klocale.h" #include "klocale.h"
class KCalendarSystemPrivate; class KCalendarSystemPrivate;

View file

@ -26,7 +26,6 @@
#include "klocale.h" // needed for enums #include "klocale.h" // needed for enums
#include "kglobal.h" #include "kglobal.h"
#include <QtCore/QStringList>
#include <QtCore/qdatetime.h> #include <QtCore/qdatetime.h>
class KCalendarSystemPrivate; class KCalendarSystemPrivate;

View file

@ -29,7 +29,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <ktimezone.h> #include <ktimezone.h>
#include <QtCore/QMetaType> #include <QtCore/qmetatype.h>
#include <QtCore/qshareddata.h> #include <QtCore/qshareddata.h>
class QDataStream; class QDataStream;

View file

@ -20,9 +20,6 @@
#ifndef KLOCALIZEDDATE_H #ifndef KLOCALIZEDDATE_H
#define KLOCALIZEDDATE_H #define KLOCALIZEDDATE_H
#include <QtCore/QString>
#include <QtCore/qdatetime.h>
#include <kdecore_export.h> #include <kdecore_export.h>
#include "kcalendarsystem.h" #include "kcalendarsystem.h"
#include "klocale.h" #include "klocale.h"

View file

@ -30,11 +30,8 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include "ktimezone.h" #include "ktimezone.h"
#include <QtCore/QObject> #include <QtCore/qobject.h>
#include <QtCore/QDateTime> #include <QtCore/qdatetime.h>
#include <QtCore/QList>
#include <QtCore/QString>
#include <QtCore/QByteArray>
class KSystemTimeZoneSource; class KSystemTimeZoneSource;
class KSystemTimeZonePrivate; class KSystemTimeZonePrivate;

View file

@ -33,11 +33,8 @@
#include <sys/time.h> #include <sys/time.h>
#include <ctime> #include <ctime>
#include <QtCore/QDateTime> #include <QtCore/qdatetime.h>
#include <QtCore/QMap> #include <QtCore/qmap.h>
#include <QtCore/QList>
#include <QtCore/QString>
#include <QtCore/QByteArray>
#include <QtCore/qshareddata.h> #include <QtCore/qshareddata.h>
class KTimeZone; class KTimeZone;

View file

@ -29,8 +29,6 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <ktimezone.h> #include <ktimezone.h>
#include <QtCore/QString>
class KTzfileTimeZoneSource; class KTzfileTimeZoneSource;
class KTzfileTimeZonePrivate; class KTzfileTimeZonePrivate;
class KTzfileTimeZoneDataPrivate; class KTzfileTimeZoneDataPrivate;

View file

@ -18,7 +18,7 @@ import re
cmdname = os.path.basename(sys.argv[0]) cmdname = os.path.basename(sys.argv[0])
def error (msg): def error (msg):
print >>sys.stderr, "%s: %s" % (cmdname, msg) sys.stderr.write("%s: %s\n" % (cmdname, msg))
sys.exit(1) sys.exit(1)
system_zonetab_paths = [ system_zonetab_paths = [
@ -26,19 +26,18 @@ system_zonetab_paths = [
] ]
if len(sys.argv) not in (2, 3): if len(sys.argv) not in (2, 3):
print >>sys.stderr, "usage: %s TIMEZONES_PATH [ZONETAB_PATH]" % cmdname error("usage: %s TIMEZONES_PATH [ZONETAB_PATH]" % cmdname)
sys.exit(1)
timezone_path = sys.argv[1] timezone_path = sys.argv[1]
if not os.path.isfile(timezone_path): if not os.path.isfile(timezone_path):
error("TIMEZONES file '%s' does not exist " 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: if len(sys.argv) >= 3:
zonetab_path = sys.argv[2] zonetab_path = sys.argv[2]
if not os.path.isfile(zonetab_path): if not os.path.isfile(zonetab_path):
error("zone.tab file '%s' does not exist" % 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: else:
for system_zonetab_path in system_zonetab_paths: for system_zonetab_path in system_zonetab_paths:
if os.path.isfile(system_zonetab_path): if os.path.isfile(system_zonetab_path):
@ -46,7 +45,7 @@ else:
break break
if not zonetab_path: if not zonetab_path:
error("cannot fine zone.tab file at any of known system locations") 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]. # Parse current timezones into dictionary zone->[comments].
ifs = codecs.open(timezone_path, "r", "UTF-8") ifs = codecs.open(timezone_path, "r", "UTF-8")
@ -117,6 +116,6 @@ if num_new_tzones or num_new_tzcomments:
ofs.writelines(tzlines) ofs.writelines(tzlines)
ofs.close() ofs.close()
num_new = num_new_tzones + num_new_tzcomments 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: else:
print "no new timezones/comments to add" print("no new timezones/comments to add")

View file

@ -25,9 +25,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <QtCore/qdatetime.h> #include <QtCore/qdatetime.h>
#include <QtCore/QString> #include <QtCore/qstringlist.h>
#include <QtCore/QStringList>
#include <QtCore/QHash>
#include <kdecore_export.h> #include <kdecore_export.h>

View file

@ -21,8 +21,8 @@
#include <stdio.h> // for FILENAME_MAX #include <stdio.h> // for FILENAME_MAX
#include <QtCore/qchar.h> #include <QtCore/qstringlist.h>
#include <QtCore/QCoreApplication> #include <QtCore/qcoreapplication.h>
#include "klockfile.h" #include "klockfile.h"
#include "krandom.h" #include "krandom.h"
#include "kglobal.h" #include "kglobal.h"

View file

@ -23,8 +23,8 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include "kurl.h" #include "kurl.h"
#include <QtCore/QFile> #include <QtCore/qfile.h>
#include <QtCore/QList> #include <QtCore/qlist.h>
class KAutoSaveFilePrivate; class KAutoSaveFilePrivate;
/** /**

View file

@ -24,8 +24,8 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QDebug> #include <QtCore/qdebug.h>
#include <QtCore/QElapsedTimer> #include <QtCore/qelapsedtimer.h>
/** /**
* \addtogroup kdebug Debug message generators * \addtogroup kdebug Debug message generators

View file

@ -235,7 +235,7 @@ KDirWatchPrivate::KDirWatchPrivate()
this, SLOT(inotifyEventReceived()) ); this, SLOT(inotifyEventReceived()) );
} }
#endif #endif
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
availableMethods << "QFileSystemWatcher"; availableMethods << "QFileSystemWatcher";
fsWatcher = 0; fsWatcher = 0;
#endif #endif
@ -261,7 +261,7 @@ KDirWatchPrivate::~KDirWatchPrivate()
if ( supports_inotify ) if ( supports_inotify )
::close( m_inotify_fd ); ::close( m_inotify_fd );
#endif #endif
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
delete fsWatcher; delete fsWatcher;
#endif #endif
} }
@ -706,7 +706,7 @@ bool KDirWatchPrivate::useINotify( Entry* e )
return false; return false;
} }
#endif #endif
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
bool KDirWatchPrivate::useQFSWatch(Entry* e) bool KDirWatchPrivate::useQFSWatch(Entry* e)
{ {
e->m_mode = QFSWatchMode; e->m_mode = QFSWatchMode;
@ -933,7 +933,7 @@ void KDirWatchPrivate::addWatch(Entry* e)
#if defined(HAVE_SYS_INOTIFY_H) #if defined(HAVE_SYS_INOTIFY_H)
case KDirWatch::INotify: entryAdded = useINotify(e); break; case KDirWatch::INotify: entryAdded = useINotify(e); break;
#endif #endif
#if defined(HAVE_QFILESYSTEMWATCHER) #ifndef QT_NO_FILESYSTEMWATCHER
case KDirWatch::QFSWatch: entryAdded = useQFSWatch(e); break; case KDirWatch::QFSWatch: entryAdded = useQFSWatch(e); break;
#endif #endif
case KDirWatch::Stat: entryAdded = useStat(e); break; case KDirWatch::Stat: entryAdded = useStat(e); break;
@ -948,7 +948,7 @@ void KDirWatchPrivate::addWatch(Entry* e)
#if defined(HAVE_FAM) #if defined(HAVE_FAM)
if (useFAM(e)) return; if (useFAM(e)) return;
#endif #endif
#if defined(HAVE_QFILESYSTEMWATCHER) #ifndef QT_NO_FILESYSTEMWATCHER
if (useQFSWatch(e)) return; if (useQFSWatch(e)) return;
#endif #endif
useStat(e); useStat(e);
@ -973,7 +973,7 @@ void KDirWatchPrivate::removeWatch(Entry* e)
} }
} }
#endif #endif
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
if (e->m_mode == QFSWatchMode && fsWatcher) { if (e->m_mode == QFSWatchMode && fsWatcher) {
if (s_verboseDebug) if (s_verboseDebug)
kDebug(7001) << "fsWatcher->removePath" << e->path; kDebug(7001) << "fsWatcher->removePath" << e->path;
@ -1684,7 +1684,7 @@ void KDirWatchPrivate::statistics()
} }
} }
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
// Slot for QFileSystemWatcher // Slot for QFileSystemWatcher
void KDirWatchPrivate::fswEventReceived(const QString &path) void KDirWatchPrivate::fswEventReceived(const QString &path)
{ {

View file

@ -18,9 +18,9 @@
#ifndef KDIRWATCH_H #ifndef KDIRWATCH_H
#define KDIRWATCH_H #define KDIRWATCH_H
#include <QtCore/QDateTime> #include <QtCore/qdatetime.h>
#include <QtCore/QObject> #include <QtCore/qobject.h>
#include <QtCore/QString> #include <QtCore/qstring.h>
#include <kdecore_export.h> #include <kdecore_export.h>

View file

@ -30,16 +30,11 @@
#include <io/config-kdirwatch.h> #include <io/config-kdirwatch.h>
#include "kdirwatch.h" #include "kdirwatch.h"
#ifndef QT_NO_FILESYSTEMWATCHER #include <QtCore/qset.h>
#define HAVE_QFILESYSTEMWATCHER #include <QtCore/qmap.h>
#endif #include <QtCore/qobject.h>
#include <QtCore/qtimer.h>
#include <QtCore/QList>
#include <QtCore/QSet>
#include <QtCore/QMap>
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QTimer>
class QFileSystemWatcher; class QFileSystemWatcher;
class QSocketNotifier; class QSocketNotifier;
@ -70,8 +65,8 @@ class QSocketNotifier;
#define invalid_ctime ((time_t)-1) #define invalid_ctime ((time_t)-1)
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
#include <QtCore/QFileSystemWatcher> #include <QtCore/qfilesystemwatcher.h>
typedef QFileSystemWatcher KFileSystemWatcher; typedef QFileSystemWatcher KFileSystemWatcher;
#endif #endif
@ -226,7 +221,7 @@ public:
bool useINotify(Entry*); bool useINotify(Entry*);
#endif #endif
#ifdef HAVE_QFILESYSTEMWATCHER #ifndef QT_NO_FILESYSTEMWATCHER
KFileSystemWatcher *fsWatcher; KFileSystemWatcher *fsWatcher;
bool useQFSWatch(Entry* e); bool useQFSWatch(Entry* e);
#endif #endif

View file

@ -16,6 +16,7 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#include <kdebug.h>
#include "klimitediodevice_p.h" #include "klimitediodevice_p.h"
KLimitedIODevice::KLimitedIODevice( QIODevice *dev, qint64 start, qint64 length ) KLimitedIODevice::KLimitedIODevice( QIODevice *dev, qint64 start, qint64 length )

View file

@ -19,8 +19,7 @@
#ifndef KLIMITEDIODEVICE_P_H #ifndef KLIMITEDIODEVICE_P_H
#define KLIMITEDIODEVICE_P_H #define KLIMITEDIODEVICE_P_H
#include <kdebug.h> #include <QtCore/qiodevice.h>
#include <QtCore/QIODevice>
/** /**
* A readonly device that reads from an underlying device * A readonly device that reads from an underlying device
* from a given point to another (e.g. to give access to a single * from a given point to another (e.g. to give access to a single

View file

@ -21,7 +21,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QString> #include <QtCore/qstring.h>
class KMessageHandler; class KMessageHandler;
/** /**

View file

@ -24,7 +24,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <ksharedptr.h> #include <ksharedptr.h>
#include <QtCore/QStringList> #include <QtCore/qstringlist.h>
/** /**
* The KMountPoint class provides information about mounted and unmounted disks. * The KMountPoint class provides information about mounted and unmounted disks.

View file

@ -24,7 +24,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QProcess> #include <QtCore/qprocess.h>
class KProcessPrivate; class KProcessPrivate;

View file

@ -24,8 +24,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QFile> #include <QtCore/qfile.h>
#include <QtCore/QString>
#include <kglobal.h> #include <kglobal.h>
/** /**

View file

@ -21,7 +21,7 @@
#define KTEMPDIR_H #define KTEMPDIR_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QString> #include <QtCore/qstring.h>
/** /**
* \class KTempDir ktempdir.h <KTempDir> * \class KTempDir ktempdir.h <KTempDir>

View file

@ -24,7 +24,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <kglobal.h> #include <kglobal.h>
#include <QtCore/QTemporaryFile> #include <QtCore/qtemporaryfile.h>
class KTemporaryFilePrivate; class KTemporaryFilePrivate;

View file

@ -24,9 +24,8 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QVariant> #include <QtCore/qvariant.h>
#include <QtCore/QUrl> #include <QtCore/qurl.h>
#include <QtCore/QMap>
class QStringList; class QStringList;
class QMimeData; class QMimeData;

View file

@ -23,7 +23,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <kjob.h> #include <kjob.h>
#include <QtCore/QList> #include <QtCore/qlist.h>
class KCompositeJobPrivate; class KCompositeJobPrivate;
/** /**

View file

@ -23,8 +23,8 @@
#define KJOB_H #define KJOB_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QObject> #include <QtCore/qobject.h>
#include <QtCore/QPair> #include <QtCore/qpair.h>
class KJobUiDelegate; class KJobUiDelegate;

View file

@ -23,7 +23,7 @@
#define KJOB_P_H #define KJOB_P_H
#include "kjob.h" #include "kjob.h"
#include <QMap> #include <QtCore/qmap.h>
class KJobUiDelegate; class KJobUiDelegate;
class QTimer; class QTimer;

View file

@ -23,9 +23,6 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <kjob.h> #include <kjob.h>
#include <QtCore/QObject>
#include <QtCore/QPair>
/** /**
* The interface to implement to track the progresses of a job. * The interface to implement to track the progresses of a job.
*/ */

View file

@ -23,7 +23,7 @@
#define KJOBUIDELEGATE_H #define KJOBUIDELEGATE_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QObject> #include <QtCore/qobject.h>
class KJob; class KJob;

View file

@ -27,14 +27,13 @@
// Compiling this file with this flag is just crazy // Compiling this file with this flag is just crazy
#undef QT_NO_CAST_FROM_ASCII #undef QT_NO_CAST_FROM_ASCII
#include <QtCore/QCoreApplication> #include <QtCore/qcoreapplication.h>
#include <QtCore/QFile> #include <QtCore/qfileinfo.h>
#include <QtCore/QFileInfo> #include <QtCore/qsettings.h>
#include <QtCore/QSettings> #include <QtCore/qtextstream.h>
#include <QtCore/QTextStream> #include <QtCore/qregexp.h>
#include <QtCore/qstringlist.h>
#include <QtXml/qdom.h> #include <QtXml/qdom.h>
#include <QtCore/QRegExp>
#include <QtCore/QStringList>
#include <ostream> #include <ostream>
#include <iostream> #include <iostream>

View file

@ -28,10 +28,6 @@
#include <klocale.h> #include <klocale.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
// Qt
#include <QtCore/QString>
#include <QtCore/qshareddata.h>
template <class T> class QList; template <class T> class QList;
class QVariant; class QVariant;
class KAboutData; class KAboutData;

View file

@ -20,7 +20,6 @@
#define KCMDLINEARGS_H #define KCMDLINEARGS_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/qglobal.h>
#include <klocale.h> #include <klocale.h>

View file

@ -21,9 +21,6 @@
#define KERNEL_KCOMPONENTDATA_P_H #define KERNEL_KCOMPONENTDATA_P_H
#include "kcomponentdata.h" #include "kcomponentdata.h"
#include <QtCore/qatomic.h>
#include <QtCore/qdebug.h>
#include <QString>
#include <kconfig.h> #include <kconfig.h>
#include <kaboutdata.h> #include <kaboutdata.h>

View file

@ -22,7 +22,7 @@
#define KDBUSCONNECTIONPOOL_H #define KDBUSCONNECTIONPOOL_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtDBus/QDBusConnection> #include <QtDBus/qdbusconnection.h>
namespace KDBusConnectionPool namespace KDBusConnectionPool
{ {

View file

@ -21,8 +21,9 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/qatomic.h> #include <QtCore/qatomic.h>
#include <QtCore/qobject.h>
#include <sys/types.h> #include <sys/types.h>
#include <QtCore/QObject>
// //
// WARNING!! // WARNING!!

View file

@ -21,7 +21,6 @@
#define KGLOBAL_P_H #define KGLOBAL_P_H
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/qatomic.h>
class KComponentData; class KComponentData;

View file

@ -23,9 +23,8 @@
#ifndef KSTANDARDDIRS_H #ifndef KSTANDARDDIRS_H
#define KSTANDARDDIRS_H #define KSTANDARDDIRS_H
#include <QtCore/QStringList>
#include <kglobal.h> #include <kglobal.h>
#include <QtCore/QMap> #include <QtCore/qmap.h>
class KConfig; class KConfig;

View file

@ -30,12 +30,6 @@
#include <klockfile.h> #include <klockfile.h>
#include <klocale.h> #include <klocale.h>
#include <QMutex>
#include <QtCore/qmutex.h>
#include <QCoreApplication>
#include <QThread>
#include <QtCore/qprocess.h>
#include <errno.h> #include <errno.h>

View file

@ -27,9 +27,7 @@
#include <kdecore_export.h> #include <kdecore_export.h>
#include <QtCore/QObject> #include <QtCore/qstringlist.h>
#include <QtCore/QByteArray>
#include <QtCore/QStringList>
class OrgKdeKLauncherInterface; class OrgKdeKLauncherInterface;
class KUrl; class KUrl;

View file

@ -41,14 +41,6 @@
#include "kmessage.h" #include "kmessage.h"
#include "kservice.h" #include "kservice.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QProcess>
#include <QtCore/QHash>
#include <QtCore/QDebug>
#include <QtCore/qglobal.h>
#include <QtCore/QFile>
#include <QtDBus/QtDBus>
static QStringList splitEmailAddressList( const QString & aStr ) static QStringList splitEmailAddressList( const QString & aStr )
{ {
// This is a copy of KPIM::splitEmailAddrList(). // This is a copy of KPIM::splitEmailAddrList().

View file

@ -23,8 +23,7 @@
#define KSSLD_H #define KSSLD_H
#include <kdedmodule.h> #include <kdedmodule.h>
#include <QtCore/QList> #include <QtCore/qvariant.h>
#include <QtCore/QVariant>
class KSSLDPrivate; class KSSLDPrivate;

View file

@ -23,9 +23,6 @@
#define KSSLDINTERFACE_H #define KSSLDINTERFACE_H
#include <QtCore/QObject> #include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QString>
#include <QtCore/QVariant> #include <QtCore/QVariant>
#include <QtDBus/QtDBus> #include <QtDBus/QtDBus>

View file

@ -21,12 +21,6 @@
#include "ksycocadict_p.h" #include "ksycocadict_p.h"
#include "ksycocaresourcelist.h" #include "ksycocaresourcelist.h"
#include <kglobal.h>
#include <kstandarddirs.h>
#include <kdebug.h>
#include <klocale.h>
#include <assert.h>
KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() : KBuildProtocolInfoFactory::KBuildProtocolInfoFactory() :
KProtocolInfoFactory() KProtocolInfoFactory()
{ {

View file

@ -1,11 +1,10 @@
include_directories( ${KDE4_KIO_INCLUDES} .. ) include_directories( ${KDE4_KIO_INCLUDES} .. )
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
######### kmimeassociationstest ######## ######### kmimeassociationstest ########
set(kmimeassociationstest_SRCS kmimeassociationstest.cpp ../kmimeassociations.cpp) 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}) target_link_libraries(kmimeassociationstest ${KDE4_KDECORE_LIBS} ${QT_QTTEST_LIBRARY})

View file

@ -169,7 +169,7 @@ protected slots:
} }
void print() { void print() {
#if !defined(QT_NO_PRINTER) #ifndef QT_NO_PRINTER
QScopedPointer<QPrintPreviewDialog> dlg (new QPrintPreviewDialog(this)); QScopedPointer<QPrintPreviewDialog> dlg (new QPrintPreviewDialog(this));
connect(dlg.data(), SIGNAL(paintRequested(QPrinter*)), connect(dlg.data(), SIGNAL(paintRequested(QPrinter*)),
view, SLOT(print(QPrinter*))); view, SLOT(print(QPrinter*)));

View file

@ -1,12 +1,12 @@
include_directories( include_directories(
${KDE4_INCLUDES} ${KDE4_INCLUDES}
${KDE4_KDECORE_INCLUDES} ${KDE4_KDECORE_INCLUDES}
${KDE4_KDEUI_INCLUDES} ${KDE4_KDEUI_INCLUDES}
${KDE4_KIO_INCLUDES} ${KDE4_KIO_INCLUDES}
${CMAKE_SOURCE_DIR}/kdewebkit ${CMAKE_SOURCE_DIR}/kdewebkit
${CMAKE_SOURCE_DIR}/kutils ${CMAKE_SOURCE_DIR}/kutils
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
) )
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})

View file

@ -1,17 +1,7 @@
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KDE4_KIO_INCLUDES} ) include_directories( ${KDE4_KIO_INCLUDES} )
set(klaunchertest_SRCS klaunchertest.cpp ) set(klaunchertest_SRCS klaunchertest.cpp )
add_executable(klaunchertest ${klaunchertest_SRCS})
kde4_add_executable(klaunchertest TEST ${klaunchertest_SRCS})
target_link_libraries(klaunchertest ${KDE4_KDECORE_LIBS} kio ) target_link_libraries(klaunchertest ${KDE4_KDECORE_LIBS} kio )
########### install files ###############

View file

@ -3,67 +3,67 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KDE4_KIO_INCLUDES} ) include_directories( ${KDE4_KIO_INCLUDES} )
MACRO(KIO_UNIT_TESTS) MACRO(KIO_UNIT_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
kde4_add_unit_test(${_testname} TESTNAME kio-${_testname} ${_testname}.cpp) kde4_add_test(kio-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) target_link_libraries(kio-${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY})
ENDFOREACH(_testname) ENDFOREACH(_testname)
ENDMACRO(KIO_UNIT_TESTS) ENDMACRO(KIO_UNIT_TESTS)
MACRO(KIO_EXECUTABLE_TESTS) MACRO(KIO_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
kde4_add_executable(${_testname} TEST ${_testname}.cpp) add_executable(kio-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY}) target_link_libraries(kio-${_testname} ${KDE4_KIO_LIBS} ${QT_QTTEST_LIBRARY})
ENDFOREACH(_testname) ENDFOREACH(_testname)
ENDMACRO(KIO_EXECUTABLE_TESTS) ENDMACRO(KIO_EXECUTABLE_TESTS)
# jobtest seems to trigger a ctest problem; jobtest finishes and ctest waits for ever # jobtest seems to trigger a ctest problem; jobtest finishes and ctest waits for ever
KIO_UNIT_TESTS( KIO_UNIT_TESTS(
krununittest krununittest
kprotocolinfotest kprotocolinfotest
jobtest jobtest
jobguitest jobguitest
jobremotetest jobremotetest
kurlcompletiontest kurlcompletiontest
kfileitemtest kfileitemtest
kbookmarktest kbookmarktest
kacltest kacltest
kdirmodeltest kdirmodeltest
kdirlistertest kdirlistertest
fileundomanagertest fileundomanagertest
kfilemetainfotest kfilemetainfotest
dataprotocoltest dataprotocoltest
clipboardupdatertest clipboardupdatertest
globaltest globaltest
udsentrytest udsentrytest
) )
KIO_EXECUTABLE_TESTS( KIO_EXECUTABLE_TESTS(
ksycocatest ksycocatest
getalltest getalltest
kruntest kruntest
kioslavetest kioslavetest
speed speed
kscantest kscantest
kdirlistertest_gui kdirlistertest_gui
previewtest previewtest
kionetrctest kionetrctest
kpropsdlgtest kpropsdlgtest
kmfitest kmfitest
ksycocaupdatetest ksycocaupdatetest
netaccesstest netaccesstest
kdirmodeltest_gui kdirmodeltest_gui
kmimetypechoosertest_gui kmimetypechoosertest_gui
ksslkeygentest ksslkeygentest
kdbusservicestartertest kdbusservicestartertest
kurlrequestertest kurlrequestertest
kopenwithtest kopenwithtest
kicondialogtest kicondialogtest
kfiledialogtest kfiledialogtest
) )
########### kfstest ############### ########### kfstest ###############
set(kfstest_SRCS kfstest.cpp kfdtest.cpp) 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} ) target_link_libraries(kfstest ${KDE4_KIO_LIBS} )

View file

@ -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 # This can be used for finding data files in the source dir, without installing them
project(knotifytest) project(knotifytest)
@ -6,19 +5,8 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../config )
########### knotifytest ############### ########### 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) add_executable(knotifytest ${knotifytest_SRCS})
kde4_add_executable(knotifytest TEST ${knotifytest_SRCS})
target_link_libraries(knotifytest ${KDE4_KIO_LIBS} knotifyconfig ) 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 ###############

View file

@ -5,13 +5,12 @@ include_directories( ${KDE4_KPARTS_INCLUDES} )
########### next target ############### ########### next target ###############
set(kpartstest_SRCS set(kpartstest_SRCS
testmainwindow.cpp testmainwindow.cpp
parts.cpp parts.cpp
notepad.cpp notepad.cpp
) )
add_executable(kpartstest ${kpartstest_SRCS})
kde4_add_executable(kpartstest TEST ${kpartstest_SRCS})
target_link_libraries(kpartstest ${KDE4_KPARTS_LIBS} ) target_link_libraries(kpartstest ${KDE4_KPARTS_LIBS} )
@ -19,13 +18,12 @@ target_link_libraries(kpartstest ${KDE4_KPARTS_LIBS} )
########### next target ############### ########### next target ###############
set(normalktmtest_SRCS set(normalktmtest_SRCS
normalktm.cpp normalktm.cpp
parts.cpp parts.cpp
notepad.cpp notepad.cpp
) )
add_executable(normalktmtest ${normalktmtest_SRCS})
kde4_add_executable(normalktmtest TEST ${normalktmtest_SRCS})
target_link_libraries(normalktmtest ${KDE4_KPARTS_LIBS} ) target_link_libraries(normalktmtest ${KDE4_KPARTS_LIBS} )
@ -33,15 +31,15 @@ target_link_libraries(normalktmtest ${KDE4_KPARTS_LIBS} )
########### next target ############### ########### next target ###############
set(partviewer_SRCS 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} ) target_link_libraries(partviewer ${KDE4_KPARTS_LIBS} )
########### test prog for "open or save question" ############### ########### 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} ) target_link_libraries(openorsavequestion ${KDE4_KPARTS_LIBS} )
########### next target ############### ########### next target ###############
@ -59,7 +57,6 @@ install(TARGETS spellcheckplugin DESTINATION ${PLUGIN_INSTALL_DIR} )
set(notepadpart_PART_SRCS notepad.cpp) set(notepadpart_PART_SRCS notepad.cpp)
kde4_add_plugin(notepadpart ${notepadpart_PART_SRCS}) kde4_add_plugin(notepadpart ${notepadpart_PART_SRCS})
target_link_libraries(notepadpart ${KDE4_KPARTS_LIBS} ) target_link_libraries(notepadpart ${KDE4_KPARTS_LIBS} )
@ -71,17 +68,17 @@ install(TARGETS notepadpart DESTINATION ${PLUGIN_INSTALL_DIR} )
########### unit tests ############### ########### unit tests ###############
MACRO(KPARTS_UNIT_TESTS) MACRO(KPARTS_UNIT_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
kde4_add_unit_test(${_testname} TESTNAME kparts-${_testname} ${_testname}.cpp) kde4_add_test(kparts-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY})
ENDFOREACH(_testname) ENDFOREACH(_testname)
ENDMACRO(KPARTS_UNIT_TESTS) ENDMACRO(KPARTS_UNIT_TESTS)
MACRO(KPARTS_EXECUTABLE_TESTS) MACRO(KPARTS_EXECUTABLE_TESTS)
FOREACH(_testname ${ARGN}) FOREACH(_testname ${ARGN})
kde4_add_executable(${_testname} TEST ${_testname}.cpp) add_executable(kparts-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY}) target_link_libraries(kparts-${_testname} ${KDE4_KPARTS_LIBS} ${QT_QTTEST_LIBRARY})
set_target_properties(${_testname} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"") set_target_properties(kparts-${_testname} PROPERTIES COMPILE_FLAGS -DKDESRCDIR="\\"${CMAKE_CURRENT_SOURCE_DIR}\\"")
ENDFOREACH(_testname) ENDFOREACH(_testname)
ENDMACRO(KPARTS_EXECUTABLE_TESTS) ENDMACRO(KPARTS_EXECUTABLE_TESTS)
set(kparts_unittests set(kparts_unittests

View file

@ -1,5 +1,4 @@
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KDE4_KPTY_INCLUDES} ) 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}) target_link_libraries(kptyprocesstest ${KDE4_KPTY_LIBS} ${QT_QTTEST_LIBRARY})

View file

@ -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 set(krosscore_LIB_SRCS
krossconfig.cpp krossconfig.cpp
interpreter.cpp interpreter.cpp
script.cpp script.cpp
action.cpp action.cpp
actioncollection.cpp actioncollection.cpp
manager.cpp manager.cpp
object.cpp object.cpp
) )
add_library(krosscore ${LIBRARY_TYPE} ${krosscore_LIB_SRCS}) 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} target_link_libraries(krosscore PRIVATE
SOVERSION ${GENERIC_LIB_SOVERSION} ${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}) install(TARGETS krosscore EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})

View file

@ -2,11 +2,12 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(${KDE4_KIO_INCLUDES}) include_directories(${KDE4_KIO_INCLUDES})
set(krosstest_SRCS set(krosstest_SRCS
testobject.cpp testobject.cpp
main.cpp ) main.cpp
)
kde4_add_executable(krosstest TEST ${krosstest_SRCS}) add_executable(krosstest ${krosstest_SRCS})
target_link_libraries(krosstest ${KDE4_KDEUI_LIBS} krosscore ) target_link_libraries(krosstest ${KDE4_KDEUI_LIBS} krosscore )

View file

@ -1,10 +1,9 @@
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES}) include_directories(${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES})
macro(KUNITCONVERSION_UNIT_TESTS) macro(KUNITCONVERSION_UNIT_TESTS)
foreach(_testname ${ARGN}) foreach(_testname ${ARGN})
kde4_add_unit_test(${_testname} TESTNAME kunitconversion-${_testname} ${_testname}.cpp) kde4_add_test(kunitconversion-${_testname} ${_testname}.cpp)
target_link_libraries(${_testname} ${KDE4_KDECORE_LIBS} kunitconversion ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} ) target_link_libraries(kunitconversion-${_testname} ${KDE4_KDECORE_LIBS} kunitconversion ${QT_QTTEST_LIBRARY} ${QT_QTGUI_LIBRARY} )
endforeach(_testname) endforeach(_testname)
endmacro(KUNITCONVERSION_UNIT_TESTS) endmacro(KUNITCONVERSION_UNIT_TESTS)

View file

@ -1,11 +1,9 @@
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR} ../ ${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) 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) set(kemoticontest2_SRCS kemoticontest.cpp)
kde4_add_unit_test(kemoticontest2 TESTNAME kutils-kemoticontest2 ${kemoticontest2_SRCS}) kde4_add_test(kutils-kemoticontest2 ${kemoticontest2_SRCS})
target_link_libraries(kemoticontest2 ${QT_QTTEST_LIBRARY} ${KDE4_KIO_LIBS} kemoticons) target_link_libraries(kutils-kemoticontest2 ${QT_QTTEST_LIBRARY} ${KDE4_KIO_LIBS} kemoticons)

View file

@ -6,9 +6,9 @@ set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
set(fakehardwaretest_SRCS fakehardwaretest.cpp ) 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\\"") add_definitions(-DTEST_DATA="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
########### solidhwtest ############### ########### solidhwtest ###############
@ -17,12 +17,12 @@ set(solidhwtest_SRCS
solidhwtest.cpp ) 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\\"") add_definitions(-DFAKE_COMPUTER_XML="\\"${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw/fakecomputer.xml\\"")
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/../solid/backends/fakehw ) 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 ############### ########### 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 #QT4_ADD_DBUS_ADAPTOR(solidnettestdbusservice_SRCS ../solid/org.kde.Solid.Networking.Client.xml
# solidnettestdbusservice.h TestNetworkingService) # 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}) #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} include_directories (${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}
${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES} ${KDE4_KIO_INCLUDES}) ${KDE4_KDECORE_INCLUDES} ${KDE4_KDEUI_INCLUDES} ${KDE4_KIO_INCLUDES})
set(networkingclient_SRCS networkingclient.cpp) set(networkingclient_SRCS networkingclient.cpp networkingclientview.ui)
kde4_add_ui_files(networkingclient_SRCS networkingclientview.ui)
qt4_add_dbus_interface(networkingclient_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../solid/org.kde.Solid.Networking.Client.xml clientinterface) 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(solid-networkingclient solid_static ${KDE4_KDEUI_LIBS})
target_link_libraries(networkingclient solid_static ${KDE4_KDEUI_LIBS})
########### install files ############### ########### install files ###############

View file

@ -14,10 +14,10 @@ def RunTests( Number ):
# if re.search( "Darwin", Platform ): # if re.search( "Darwin", Platform ):
# Command = "DYLD_LIBRARY_PATH=../Weaver:../Experimental ./JobTests.app/Contents/MacOs/JobTests >/dev/null" # Command = "DYLD_LIBRARY_PATH=../Weaver:../Experimental ./JobTests.app/Contents/MacOs/JobTests >/dev/null"
for count in range( Number ): for count in range( Number ):
retValue = os.system ( Command) retValue = os.system ( Command)
resultString = " (FAILED)" resultString = " (FAILED)"
if retValue == 0: if retValue == 0:
resultString = " (succeeded)" resultString = " (succeeded)"
SuccessCount = SuccessCount + 1 SuccessCount = SuccessCount + 1
print "Test run #" + str(count + 1) + resultString print "Test run #" + str(count + 1) + resultString
return SuccessCount return SuccessCount