generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-09-27 04:22:24 +00:00
parent 874fb179d7
commit 0cf8c59f82
7 changed files with 17 additions and 25 deletions

View file

@ -66,7 +66,6 @@ void KNotify::loadConfig()
addPlugin(new NotifyByPopup(this));
addPlugin(new NotifyByExecute(this));
addPlugin(new NotifyByLogfile(this));
//TODO reactivate on Mac/Win when KWindowSystem::demandAttention will implemented on this system.
addPlugin(new NotifyByTaskbar(this));
addPlugin(new NotifyByKTTS(this));

View file

@ -21,12 +21,9 @@
#ifndef KNOTIFY_H
#define KNOTIFY_H
#include <QObject>
#include <QHash>
#include <QtDBus/QtDBus>
#include <QtCore/QObject>
#include <QtCore/QHash>
#include <QtDBus/QDBusAbstractAdaptor>
#include "knotifyconfig.h"

View file

@ -187,8 +187,7 @@ void NotifyBySound::loadConfig()
d->externalPlayer = cg.readPathEntry("External player", QString());
// try to locate a suitable player if none is configured
if ( d->externalPlayer.isEmpty() ) {
QStringList players;
players << "wavplay" << "aplay" << "auplay" << "artsplay" << "akodeplay";
const QStringList players = QStringList() << "wavplay" << "aplay" << "auplay" << "artsplay" << "akodeplay";
QStringList::const_iterator it = players.constBegin();
while ( d->externalPlayer.isEmpty() && it != players.constEnd() ) {
d->externalPlayer = KStandardDirs::findExe( *it );

View file

@ -26,8 +26,9 @@
#define KPASSWDSERVER_H
#include <QtCore/QHash>
#include <QtCore/QList>
#include <QtDBus/QtDBus>
#include <QtCore/QStringList>
#include <QtDBus/QDBusContext>
#include <QtDBus/QDBusMessage>
#include <qwindowdefs.h>
#include <kio/authinfo.h>

View file

@ -36,7 +36,6 @@ enum BackendCipherType {
BACKEND_CIPHER_GPG /// use GPG backend to encrypt wallet contents
#endif // HAVE_QGPGME
};
class BackendPersistHandler {
protected:
@ -52,7 +51,7 @@ public:
*/
static BackendPersistHandler *getPersistHandler(BackendCipherType cipherType);
static BackendPersistHandler *getPersistHandler(char magicBuf[KWMAGIC_LEN]);
virtual int write(Backend* wb, KSaveFile& sf, QByteArray& version, WId w) =0;
virtual int read(Backend* wb, QFile& sf, WId w) =0;
};
@ -62,7 +61,7 @@ class BlowfishPersistHandler : public BackendPersistHandler {
public:
explicit BlowfishPersistHandler(bool useECBforReading =false) : _useECBforReading(useECBforReading) {}
virtual ~BlowfishPersistHandler() {}
virtual int write(Backend* wb, KSaveFile& sf, QByteArray& version, WId w);
virtual int read(Backend* wb, QFile& sf, WId w);
private:
@ -74,7 +73,7 @@ class GpgPersistHandler : public BackendPersistHandler {
public:
GpgPersistHandler() {}
virtual ~GpgPersistHandler() {}
virtual int write(Backend* wb, KSaveFile& sf, QByteArray& version, WId w);
virtual int read(Backend* wb, QFile& sf, WId w);
};

View file

@ -24,19 +24,19 @@
#ifndef _KWALLETD_H_
#define _KWALLETD_H_
#include <QtCore/QString>
#include <QImage>
#include <QtCore/QHash>
#include "kwalletbackend.h"
#include <QtCore/QPointer>
#include <time.h>
#include <stdlib.h>
#include <QtDBus/QtDBus>
#include <QDBusServiceWatcher>
#include <QtDBus/QDBusContext>
#include <QtDBus/QDBusServiceWatcher>
#include <QtDBus/QDBusInterface>
#include "kwalletbackend.h"
#include "ktimeout.h"
#include "kwalletsessionstore.h"
#include <time.h>
#include <stdlib.h>
class KDirWatch;
class KTimeout;

View file

@ -1,4 +1,3 @@
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
# Tests don't need to go into toplevel/bin, they are fine in the current dir.
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/..
@ -21,8 +20,6 @@ if (QGPGME_FOUND)
target_link_libraries(kwalletwizardtest ${QGPGME_LIBRARIES})
endif(QGPGME_FOUND)
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories( ${KDE4_KDEUI_INCLUDES} ) # for kwallet.h
########### next target ###############