OSDN Git Service

generic: misc cleanups
authorIvailo Monev <xakepa10@gmail.com>
Thu, 28 Apr 2016 22:27:02 +0000 (22:27 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Thu, 28 Apr 2016 22:27:02 +0000 (22:27 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
38 files changed:
kcontrol/access/kcmaccess.cpp
kcontrol/input/main.cpp
kcontrol/keyboard/keyboard_daemon.h
kcontrol/kfontinst/lib/Misc.h
khotkeys/libkhotkeysprivate/actions/actions.h
khotkeys/libkhotkeysprivate/khotkeysglobal.h
khotkeys/libkhotkeysprivate/windows_helper/window_selection_interface.h
kioslave/about/kio_about.cpp
kioslave/applications/kio_applications.cpp
kioslave/archive/kio_archive.cpp
kioslave/bookmarks/kio_bookmarks.cpp
kioslave/cgi/cgi.cpp
kioslave/desktop/kio_desktop.cpp
kioslave/filter/filter.cc
kioslave/finger/kio_finger.cpp
kioslave/fish/fish.cpp
kioslave/floppy/kio_floppy.cpp
kioslave/info/info.cc
kioslave/man/man.cc
kioslave/mtp/kio_mtp.cpp
kioslave/network/ioslave/main.cpp
kioslave/recentdocuments/recentdocuments.cpp
kioslave/remote/kio_remote.cpp
kioslave/settings/kio_settings.cpp
kioslave/smb/kio_smb.cpp
kioslave/thumbnail/epubthumbnail.cpp
kioslave/thumbnail/textcreator.cpp
kioslave/thumbnail/thumbnail.cpp
kioslave/trash/kio_trash.cpp
ktouchpadenabler/ktouchpadenabler_daemon.h
kwin/clients/oxygen/demo/CMakeLists.txt
libs/kephal/service/kephalservice.cpp
libs/ksysguard/lsofui/lsof.h
libs/ksysguard/signalplotter/kgraphicssignalplotter.h
libs/ksysguard/signalplotter/ksignalplotter.h
plasma/shells/plasma-desktop/plasmaapp.h
powerdevil/PowerDevilSettings.kcfg
powerdevil/daemon/powerdevilactionpool.h

index eccdd8e..8f2b860 100644 (file)
@@ -773,7 +773,7 @@ extern "C"
   /* This one gets called by kcminit
 
    */
-  KDE_EXPORT void kcminit_access()
+  Q_DECL_EXPORT void kcminit_access()
   {
     KConfig config("kaccessrc", KConfig::NoGlobals);
     KToolInvocation::startServiceByDesktopName("kaccess");
index efb1d6b..dc32d45 100644 (file)
@@ -41,7 +41,7 @@
 
 extern "C"
 {
-  KDE_EXPORT void kcminit_mouse()
+  Q_DECL_EXPORT void kcminit_mouse()
   {
       KConfig *config = new KConfig("kcminputrc", KConfig::NoGlobals );
     MouseSettings settings;
index 5b77866..b4ab4e9 100644 (file)
@@ -21,6 +21,7 @@
 #define KEYBOARD_DAEMON_H_
 
 #include <kdedmodule.h>
+#include <kdemacros.h>
 #include <QtCore/QStringList>
 
 #include "layout_memory.h"
index be69af9..516ad92 100644 (file)
@@ -32,6 +32,7 @@
 #include <QtCore/QDataStream>
 #include <QtCore/QFile>
 #include <KUrl>
+#include <kdemacros.h>
 #include "KfiConstants.h"
 
 class QTextStream;
index 6d4ed09..6105785 100644 (file)
@@ -16,6 +16,7 @@
 #include <QtCore/QTimer>
 
 #include <kservice.h>
+#include <kdemacros.h>
 
 class KConfig;
 
index ce039bd..e766b88 100644 (file)
@@ -15,6 +15,7 @@
 #define KHOTKEYS_CONFIG_FILE "khotkeysrc"
 
 #include <klocale.h>
+#include <kdemacros.h>
 
 #include <QtCore/QPointer>
 
index d7396d8..b01d55d 100644 (file)
@@ -21,6 +21,7 @@
 #include "kio_about.h"
 
 #include <kcomponentdata.h>
+#include <kdemacros.h>
 
 using namespace KIO;
 
index 02958bb..e528a36 100644 (file)
    Boston, MA 02110-1301, USA.
 */
 
-#include <kio/slavebase.h>
-#include <kcomponentdata.h>
-#include <kdebug.h>
-#include <klocale.h>
 #include <sys/stat.h>
 #include <time.h>
 #include <kservice.h>
 #include <kservicegroup.h>
 #include <kstandarddirs.h>
+#include <kio/slavebase.h>
+#include <kcomponentdata.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kdemacros.h>
 
 class ApplicationsProtocol : public KIO::SlaveBase
 {
index 5a6b7d0..931fe2f 100644 (file)
@@ -42,9 +42,7 @@
 
 using namespace KIO;
 
-extern "C" { int KDE_EXPORT kdemain(int argc, char **argv); }
-
-int kdemain( int argc, char **argv )
+extern "C" int Q_DECL_EXPORT kdemain( int argc, char **argv )
 {
   KComponentData componentData( "kio_archive" );
 
index fd4a78a..b650dba 100644 (file)
@@ -29,7 +29,7 @@
 #include <kapplication.h>
 #include <kcmdlineargs.h>
 #include <kaboutdata.h>
-
+#include <kdemacros.h>
 #include <kshell.h>
 #include <kstandarddirs.h>
 #include <kcomponentdata.h>
index 9f4b4db..056bf64 100644 (file)
@@ -30,6 +30,7 @@
 #include <klocale.h>
 #include <kconfig.h>
 #include <kconfiggroup.h>
+#include <kdemacros.h>
 
 #include <QFile>
 
index 13a45a2..4e1a9f1 100644 (file)
@@ -26,6 +26,7 @@
 #include <KGlobalSettings>
 #include <KStandardDirs>
 #include <kdeversion.h>
+#include <kdemacros.h>
 
 #include <kio/udsentry.h>
 
index 6b30758..7a72b6c 100644 (file)
@@ -31,6 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include <kmimetype.h>
 #include <kfilterbase.h>
 #include <kurl.h>
+#include <kdemacros.h>
 
 extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
 
index 81e8faf..6001dab 100644 (file)
@@ -32,7 +32,8 @@
 #include <kstandarddirs.h>
 #include <klocale.h>
 #include <kurl.h>
-#include <KProcess>
+#include <kprocess.h>
+#include <kdemacros.h>
 
 
 using namespace KIO;
index e5a6f0d..d613336 100644 (file)
@@ -79,6 +79,7 @@
 #include <errno.h>
 #include <sys/resource.h>
 #include <kdefakes.h>
+#include <kdemacros.h>
 
 #include "fishcode.h"
 
index df25243..feee912 100644 (file)
@@ -44,6 +44,7 @@
 #include <kdebug.h>
 #include <kio/global.h>
 #include <klocale.h>
+#include <kdemacros.h>
 
 using namespace KIO;
 
index 471e0c1..b021781 100644 (file)
@@ -13,6 +13,7 @@
 #include <kiconloader.h>
 #include <kcomponentdata.h>
 #include <klocale.h>
+#include <kdemacros.h>
 
 using namespace KIO;
 
index 6916e3d..692d101 100644 (file)
@@ -13,6 +13,7 @@
 #include <kiconloader.h>
 #include <kcomponentdata.h>
 #include <klocale.h>
+#include <kdemacros.h>
 
 using namespace KIO;
 
index 83b3cb5..4cf491d 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <KComponentData>
 #include <KTemporaryFile>
+#include <kdemacros.h>
 #include <QFileInfo>
 #include <QDateTime>
 #include <QCoreApplication>
index 95fc3fa..f357e41 100644 (file)
@@ -24,6 +24,7 @@
 
 // KDE
 #include <KComponentData>
+#include <kdemacros.h>
 // Qt
 #include <QtCore/QCoreApplication>
 
index 252cb7c..742328a 100644 (file)
@@ -10,6 +10,7 @@
 #include <KStandardDirs>
 #include <KIO/Job>
 #include <KIO/NetAccess>
+#include <kdemacros.h>
 
 #include <stdio.h>
 
index d48713b..47bb250 100644 (file)
@@ -26,7 +26,7 @@
 #include <kapplication.h>
 #include <kcmdlineargs.h>
 #include <kglobal.h>
-
+#include <kdemacros.h>
 
 extern "C" {
        int KDE_EXPORT kdemain( int argc, char **argv )
index 6f6fbb0..a497cdb 100644 (file)
    Boston, MA 02110-1301, USA.
 */
 
-#include <kservicetypetrader.h>
-#include <kio/slavebase.h>
-#include <kcomponentdata.h>
-#include <kdebug.h>
-#include <klocale.h>
+
 #include <sys/stat.h>
 #include <time.h>
+
 #include <kservice.h>
 #include <kservicegroup.h>
 #include <kstandarddirs.h>
+#include <kservicetypetrader.h>
+#include <kio/slavebase.h>
+#include <kcomponentdata.h>
+#include <kdebug.h>
+#include <klocale.h>
+#include <kdemacros.h>
 
 class SettingsProtocol : public KIO::SlaveBase
 {
index 2c2523a..4586c71 100644 (file)
@@ -31,6 +31,7 @@
 #include "kio_smb.h"
 #include "kio_smb_internal.h"
 #include <kcomponentdata.h>
+#include <kdemacros.h>
 #include <QCoreApplication>
 
 //===========================================================================
index 46f9ea1..321e0e8 100644 (file)
@@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 #include <QtGui/QImage>
 #include <QtCore/QDebug>
+#include <kdemacros.h>
 
 extern "C"
 {
@@ -88,4 +89,4 @@ bool EPUBCreator::create(const QString &path, int width, int height, QImage &img
 ThumbCreator::Flags EPUBCreator::flags() const
 {
     return None;
-}
\ No newline at end of file
+}
index 3a50632..56d2a2d 100644 (file)
@@ -30,6 +30,7 @@
 #include <kstandarddirs.h>
 #include <kglobalsettings.h>
 #include <klocale.h>
+#include <kdemacros.h>
 
 extern "C"
 {
index e1d7df0..4506bd1 100644 (file)
@@ -56,6 +56,7 @@
 #include <kfilemetainfo.h>
 #include <klocale.h>
 #include <kde_file.h>
+#include <kdemacros.h>
 
 #include <config-runtime.h> // For HAVE_NICE
 #include <kio/thumbcreator.h>
index 3368827..fdefafd 100644 (file)
@@ -27,6 +27,7 @@
 #include <kde_file.h>
 #include <kcomponentdata.h>
 #include <kmimetype.h>
+#include <kdemacros.h>
 
 #include <QCoreApplication>
 #include <QDataStream>
index 8143189..78bd8d4 100644 (file)
@@ -21,6 +21,7 @@
 #define KTOUCHPADENABLER_DAEMON_H
 
 #include <kdedmodule.h>
+#include <kdemacros.h>
 
 class TouchpadEnablerDaemonPrivate;
 
index da56c5d..23af174 100644 (file)
@@ -1,18 +1,19 @@
-include_directories(${CMAKE_SOURCE_DIR}/libs/oxygen)
-include_directories( ${KDE4_KDEUI_INCLUDES} )
+include_directories(
+    ${CMAKE_SOURCE_DIR}/libs/oxygen
+    ${KDE4_KDEUI_INCLUDES}
+)
 
 
 ########### next target ###############
-set( oxygen_shadow_demo_SOURCES
+set(oxygen_shadow_demo_SOURCES
     oxygenshadowdemodialog.cpp
     oxygenshadowdemowidget.cpp
     main.cpp
-    oxygenshadowdemo.ui
 )
 
-add_executable( oxygen-shadow-demo ${oxygen_shadow_demo_SOURCES} )
+add_executable(oxygen-shadow-demo ${oxygen_shadow_demo_SOURCES})
 
-target_link_libraries( oxygen-shadow-demo
+target_link_libraries(oxygen-shadow-demo
     ${KDE4_KDEUI_LIBS}
     ${X11_X11_LIB}
     ${X11_Xrender_LIB}
@@ -21,4 +22,4 @@ target_link_libraries( oxygen-shadow-demo
 )
 
 ########### install files ###############
-install (TARGETS oxygen-shadow-demo ${INSTALL_TARGETS_DEFAULT_ARGS} )
+install(TARGETS oxygen-shadow-demo ${INSTALL_TARGETS_DEFAULT_ARGS})
index be66a2b..ee7b778 100644 (file)
@@ -85,12 +85,12 @@ void KephalService::init()
 
     m_outputs = 0;
 #ifdef HAS_RANDR_1_2
-    RandRDisplay * display;
+    RandRDisplay *display = 0;
     if (! m_noXRandR) {
         display = new RandRDisplay();
     }
 
-    if ((! m_noXRandR) && display->isValid()) {
+    if ((! m_noXRandR) && display && display->isValid()) {
         m_outputs = new XRandROutputs(this, display);
         if (m_outputs->outputs().size() <= 1) {
             delete m_outputs;
index 1b7bb3a..72cef9b 100644 (file)
@@ -26,6 +26,7 @@
 #include <QtCore/QProcess>
 #include <QtGui/QTreeWidget>
 #include <kapplication.h>
+#include <kdemacros.h>
 
 struct KLsofWidgetPrivate;
 
index cabf4c1..c289619 100644 (file)
@@ -29,6 +29,7 @@
 #include <QtGui/QGraphicsWidget>
 #include <klocalizedstring.h>
 #include <kcomponentdata.h>
+#include <kdemacros.h>
 
 class QPaintEvent;
 class QResizeEvent;
index bea638c..830e659 100644 (file)
@@ -29,6 +29,7 @@
 #include <QtGui/QWidget>
 #include <klocalizedstring.h>
 #include <kcomponentdata.h>
+#include <kdemacros.h>
 
 class QPaintEvent;
 class QResizeEvent;
index 15ed69a..4d2235b 100644 (file)
 #include <Plasma/Plasma>
 #include <plasma/packagemetadata.h>
 
+#ifdef Q_WS_X11
+// for Atom
+#include <X11/Xlib.h>
+#include <fixx11h.h>
+#endif
+
 class QSignalMapper;
 
 namespace Plasma
index cd103c6..686993c 100644 (file)
@@ -6,6 +6,8 @@
                           http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
   <kcfgfile name="powerdevilrc"/>
 
+  <include>"kdemacros.h"</include>
+
   <!--The following group is retained just for compatibility and upgrades.-->
   <group name="Profiles">
     <entry name="ACProfile" type="String">
index ca436ff..fe5b881 100644 (file)
@@ -25,6 +25,7 @@
 #include <QtCore/QStringList>
 
 #include <kglobal.h>
+#include <kdemacros.h>
 
 class KConfigGroup;
 namespace PowerDevil