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
#include "AuthBackend.h"
#include <QHash>
class QByteArray;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -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")

View file

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

View file

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

View file

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

View file

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

View file

@ -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)
{

View file

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

View file

@ -30,16 +30,11 @@
#include <io/config-kdirwatch.h>
#include "kdirwatch.h"
#ifndef QT_NO_FILESYSTEMWATCHER
#define HAVE_QFILESYSTEMWATCHER
#endif
#include <QtCore/qset.h>
#include <QtCore/qmap.h>
#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 QSocketNotifier;
@ -70,8 +65,8 @@ class QSocketNotifier;
#define invalid_ctime ((time_t)-1)
#ifdef HAVE_QFILESYSTEMWATCHER
#include <QtCore/QFileSystemWatcher>
#ifndef QT_NO_FILESYSTEMWATCHER
#include <QtCore/qfilesystemwatcher.h>
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

View file

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

View file

@ -19,8 +19,7 @@
#ifndef KLIMITEDIODEVICE_P_H
#define KLIMITEDIODEVICE_P_H
#include <kdebug.h>
#include <QtCore/QIODevice>
#include <QtCore/qiodevice.h>
/**
* A readonly device that reads from an underlying device
* 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 <QtCore/QString>
#include <QtCore/qstring.h>
class KMessageHandler;
/**

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -41,14 +41,6 @@
#include "kmessage.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 )
{
// This is a copy of KPIM::splitEmailAddrList().

View file

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

View file

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

View file

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

View file

@ -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})

View file

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

View file

@ -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})

View file

@ -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 ###############

View file

@ -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} )

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
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 ###############

View file

@ -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

View file

@ -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})

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
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})

View file

@ -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 )

View file

@ -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)

View file

@ -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)

View file

@ -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 ###############

View file

@ -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