OSDN Git Service

generic: misc cleanups
authorIvailo Monev <xakepa10@gmail.com>
Sun, 27 Sep 2015 04:22:24 +0000 (04:22 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Sun, 27 Sep 2015 04:22:24 +0000 (04:22 +0000)
knotify/knotify.cpp
knotify/knotify.h
knotify/notifybysound.cpp
kpasswdserver/kpasswdserver.h
kwalletd/backend/backendpersisthandler.h
kwalletd/kwalletd.h
kwalletd/tests/CMakeLists.txt

index 20830d0..7d9049c 100644 (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));
 
index 08dfc9e..ed4d178 100644 (file)
 #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"
 
index 48840b5..c5314a2 100644 (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 );
index 4bd012c..5654550 100644 (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>
index 11d67f2..9828bbd 100644 (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);
 };
index 7018e9d..636ef07 100644 (file)
 #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;
 
index 245c97e..28ff21d 100644 (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 ###############