From 0cf8c59f82a026935d2b158cded65112d2d8f6dc Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sun, 27 Sep 2015 04:22:24 +0000 Subject: [PATCH] generic: misc cleanups --- knotify/knotify.cpp | 1 - knotify/knotify.h | 9 +++------ knotify/notifybysound.cpp | 3 +-- kpasswdserver/kpasswdserver.h | 5 +++-- kwalletd/backend/backendpersisthandler.h | 7 +++---- kwalletd/kwalletd.h | 14 +++++++------- kwalletd/tests/CMakeLists.txt | 3 --- 7 files changed, 17 insertions(+), 25 deletions(-) diff --git a/knotify/knotify.cpp b/knotify/knotify.cpp index 20830d08..7d9049c3 100644 --- a/knotify/knotify.cpp +++ b/knotify/knotify.cpp @@ -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)); diff --git a/knotify/knotify.h b/knotify/knotify.h index 08dfc9eb..ed4d1786 100644 --- a/knotify/knotify.h +++ b/knotify/knotify.h @@ -21,12 +21,9 @@ #ifndef KNOTIFY_H #define KNOTIFY_H -#include -#include - - -#include - +#include +#include +#include #include "knotifyconfig.h" diff --git a/knotify/notifybysound.cpp b/knotify/notifybysound.cpp index 48840b5b..c5314a24 100644 --- a/knotify/notifybysound.cpp +++ b/knotify/notifybysound.cpp @@ -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 ); diff --git a/kpasswdserver/kpasswdserver.h b/kpasswdserver/kpasswdserver.h index 4bd012cd..5654550a 100644 --- a/kpasswdserver/kpasswdserver.h +++ b/kpasswdserver/kpasswdserver.h @@ -26,8 +26,9 @@ #define KPASSWDSERVER_H #include -#include -#include +#include +#include +#include #include #include diff --git a/kwalletd/backend/backendpersisthandler.h b/kwalletd/backend/backendpersisthandler.h index 11d67f2b..9828bbdd 100644 --- a/kwalletd/backend/backendpersisthandler.h +++ b/kwalletd/backend/backendpersisthandler.h @@ -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); }; diff --git a/kwalletd/kwalletd.h b/kwalletd/kwalletd.h index 7018e9d0..636ef079 100644 --- a/kwalletd/kwalletd.h +++ b/kwalletd/kwalletd.h @@ -24,19 +24,19 @@ #ifndef _KWALLETD_H_ #define _KWALLETD_H_ -#include -#include #include -#include "kwalletbackend.h" #include -#include -#include -#include -#include +#include +#include +#include +#include "kwalletbackend.h" #include "ktimeout.h" #include "kwalletsessionstore.h" +#include +#include + class KDirWatch; class KTimeout; diff --git a/kwalletd/tests/CMakeLists.txt b/kwalletd/tests/CMakeLists.txt index 245c97e6..28ff21db 100644 --- a/kwalletd/tests/CMakeLists.txt +++ b/kwalletd/tests/CMakeLists.txt @@ -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 ############### -- 2.11.0