generic: misc cleanups

This commit is contained in:
Ivailo Monev 2015-09-27 01:19:30 +00:00
parent 9f0377bfa4
commit 2eceb5f064
14 changed files with 56 additions and 58 deletions

View file

@ -32,6 +32,11 @@
#include <errno.h>
#include <QtCore/QThread>
#include <QtCore/QProcess>
#include <QtCore/QCoreApplication>
#include <QtDBus/QDBusInterface>
#include <QtDBus/QDBusConnectionInterface>
KToolInvocation *KToolInvocation::self()
{

View file

@ -29,7 +29,8 @@
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusAbstractInterface>
#include <QtDBus/QDBusReply>
/*
* Proxy class for interface org.kde.KLauncher

View file

@ -35,12 +35,9 @@
#include "kbuildprotocolinfofactory.h"
#include "kctimefactory.h"
#include <ktemporaryfile.h>
#include <QtCore/QDataStream>
#include <QtCore/QDir>
#include <QtCore/QEventLoop>
#include <QtCore/QFile>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>
#include <QtCore/QFileInfo>
#include <QtDBus/QDBusConnectionInterface>
#include <errno.h>
#include <assert.h>

View file

@ -30,12 +30,6 @@
#include <signal.h>
#include <time.h>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>
#include <kuniqueapplication.h>
#include <kapplication.h>
#include <kcmdlineargs.h>

View file

@ -25,8 +25,8 @@
#include <QtCore/QTimer>
#include <QtCore/QHash>
#include <QtCore/QSet>
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusAbstractAdaptor>
#include <ksycoca.h>
#include <ksycocatype.h>

View file

@ -21,7 +21,8 @@
#ifndef KDED_KDEDADAPTOR_H
#define KDED_KDEDADAPTOR_H
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusAbstractAdaptor>
#include <QtDBus/QDBusMessage>
class KdedAdaptor: public QDBusAbstractAdaptor
{

View file

@ -43,6 +43,7 @@
#include <QtGui/QSessionManager>
#include <QtGui/QStyle>
#include <QtGui/QWidget>
#include <QtDBus/QDBusConnection>
#include <kaction.h>
#include <kapplication.h>

View file

@ -30,7 +30,6 @@
#include <QtGui/QBitmap>
#include <QDesktopWidget>
#include <QtGui/QDialog>
#include <QtDBus/QtDBus>
#include <QtGui/qx11info_x11.h>
#include <X11/Xatom.h>

View file

@ -32,7 +32,7 @@
#include <QtGui/QBitmap>
#include <QDesktopWidget>
#include <QtGui/QDialog>
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusInterface>
#include <QtGui/qx11info_x11.h>
#include <X11/Xatom.h>

View file

@ -22,7 +22,7 @@
#define KMAINWINDOWIFACE_P_H
#include <kdeui_export.h>
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusAbstractAdaptor>
#include <QtCore/QMap>
class KXmlGuiWindow;

View file

@ -36,17 +36,15 @@
#include <config.h>
#include <QtGui/qevent.h>
#include <QDesktopWidget>
#include <QDockWidget>
#include <QtXml/qdom.h>
#include <QtGui/qevent.h>
#include <QtGui/QLayout>
#include <QtCore/QObject>
#include <QtGui/QSessionManager>
#include <QtGui/QStyle>
#include <QtCore/QTimer>
#include <QtGui/QWidget>
#include <QtCore/QList>
#include <QtDBus/QDBusConnection>
#include <kaction.h>
#include <kapplication.h>
#include <kauthorized.h>

View file

@ -4,7 +4,7 @@ if(ENABLE_TESTING)
add_subdirectory(tests)
endif()
include_directories( ${KDE4_KPARTS_INCLUDES} )
include_directories(${KDE4_KPARTS_INCLUDES})
########### Configuring (mainly for proctitle) ###########
@ -22,35 +22,34 @@ check_function_exists(setproctitle HAVE_SETPROCTITLE)
# used by 4 executables in this file
if(HAVE_SOCKET_LIBRARY)
set(KINIT_SOCKET_LIBRARY socket)
set(KINIT_SOCKET_LIBRARY socket)
else(HAVE_SOCKET_LIBRARY)
set(KINIT_SOCKET_LIBRARY)
set(KINIT_SOCKET_LIBRARY)
endif(HAVE_SOCKET_LIBRARY)
########### kdeinit4 ###############
set(kdeinit_SRCS kinit.cpp proctitle.cpp klauncher_cmds.cpp )
set(kdeinit_LIBS "")
set(kdeinit_SRCS kinit.cpp proctitle.cpp klauncher_cmds.cpp)
add_executable(kdeinit4 ${kdeinit_SRCS})
target_link_libraries(kdeinit4 ${KDE4_KDEUI_LIBS} ${kdeinit_LIBS} ${KINIT_SOCKET_LIBRARY} )
target_link_libraries(kdeinit4 ${KDE4_KDEUI_LIBS} ${KINIT_SOCKET_LIBRARY})
if (Q_WS_X11)
target_link_libraries(kdeinit4 ${X11_X11_LIB})
target_link_libraries(kdeinit4 ${X11_X11_LIB})
endif(Q_WS_X11)
install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS})
########### kwrapper4 ###############
set(kwrapper_SRCS kwrapper.c )
set(kwrapper_SRCS kwrapper.c)
add_executable(kwrapper4 ${kwrapper_SRCS})
target_link_libraries(kwrapper4 ${KINIT_SOCKET_LIBRARY})
install(TARGETS kwrapper4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kwrapper4 ${INSTALL_TARGETS_DEFAULT_ARGS})
########### kdeinit4_wrapper ###############
@ -62,7 +61,7 @@ if (NOT Q_WS_X11 AND NOT Q_WS_QWS)
add_definitions(-DNO_DISPLAY)
endif (NOT Q_WS_X11 AND NOT Q_WS_QWS)
install(TARGETS kdeinit4_wrapper ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kdeinit4_wrapper ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kdeinit4_wrapper ${INSTALL_TARGETS_DEFAULT_ARGS} RENAME kdeinit4_shutdown)
########### kshell4 ###############
@ -71,17 +70,17 @@ add_executable(kshell4 shell.c)
target_link_libraries(kshell4 ${KINIT_SOCKET_LIBRARY})
install(TARGETS kshell4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
install(TARGETS kshell4 ${INSTALL_TARGETS_DEFAULT_ARGS})
########### lnusertemp ###############
set(lnusertemp_SRCS lnusertemp.c )
set(lnusertemp_SRCS lnusertemp.c)
add_executable(lnusertemp ${lnusertemp_SRCS})
target_link_libraries(lnusertemp kdefakes)
install(TARGETS lnusertemp DESTINATION ${LIBEXEC_INSTALL_DIR} )
install(TARGETS lnusertemp DESTINATION ${LIBEXEC_INSTALL_DIR})
########### kioslave ###############
@ -90,35 +89,39 @@ set(kioslave_SRCS kioslave.cpp)
add_executable(kioslave ${kioslave_SRCS})
target_link_libraries(kioslave ${KDE4_KIO_LIBS} )
target_link_libraries(kioslave ${KDE4_KIO_LIBS})
install(TARGETS kioslave DESTINATION ${LIBEXEC_INSTALL_DIR} )
install(TARGETS kioslave DESTINATION ${LIBEXEC_INSTALL_DIR})
########### klauncher ###############
set(klauncher_SRCS
klauncher.cpp
klauncher_main.cpp
klauncher_adaptor.cpp
autostart.cpp
klauncher_cmds.cpp
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml # just so that it gets generated
)
klauncher.cpp
klauncher_main.cpp
klauncher_adaptor.cpp
autostart.cpp
klauncher_cmds.cpp
# just so that it gets generated
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml
)
# The adaptor is manually edited, generate the xml from it.
qt4_generate_dbus_interface(klauncher_adaptor.h org.kde.KLauncher.xml)
add_executable( klauncher ${klauncher_SRCS})
add_executable(klauncher ${klauncher_SRCS})
set_target_properties(klauncher PROPERTIES DEFINE_SYMBOL MAKE_KLAUNCHER)
target_link_libraries(klauncher ${KDE4_KIO_LIBS} ${X11_LIBRARIES})
target_link_libraries(klauncher ${KDE4_KIO_LIBS} ${X11_LIBRARIES})
install(TARGETS klauncher DESTINATION ${LIBEXEC_INSTALL_DIR} )
install(TARGETS klauncher DESTINATION ${LIBEXEC_INSTALL_DIR})
########### install files ###############
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR} )
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml
DESTINATION ${DBUS_INTERFACES_INSTALL_DIR}
)
########### config-kdeinit.h ############
configure_file(config-kdeinit.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config-kdeinit.h )
configure_file(config-kdeinit.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdeinit.h)

View file

@ -82,17 +82,15 @@ AutoStart::loadAutoStartList()
QString::fromLatin1("*.desktop"),
KStandardDirs::NoDuplicates);
for(QStringList::ConstIterator it = files.begin();
it != files.end();
++it)
foreach(const QString it, files)
{
KAutostart config(*it);
KAutostart config(it);
if( !config.autostarts(QString::fromLatin1("KDE"), KAutostart::CheckAll))
continue;
AutoStartItem *item = new AutoStartItem;
item->name = extractName(*it);
item->service = *it;
item->name = extractName(it);
item->service = it;
item->startAfter = config.startAfter();
item->phase = config.startPhase();
if (item->phase < 0)

View file

@ -37,7 +37,8 @@
#include <QtCore/QTimer>
#include <QtCore/QList>
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
#include <QtDBus/QDBusMessage>
#include <QtDBus/QDBusConnectionInterface>
#include <kservice.h>
#include <kprocess.h>