mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
generic: misc cleanups
This commit is contained in:
parent
9f0377bfa4
commit
2eceb5f064
14 changed files with 56 additions and 58 deletions
|
@ -32,6 +32,11 @@
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
#include <QtCore/QThread>
|
||||||
|
#include <QtCore/QProcess>
|
||||||
|
#include <QtCore/QCoreApplication>
|
||||||
|
#include <QtDBus/QDBusInterface>
|
||||||
|
#include <QtDBus/QDBusConnectionInterface>
|
||||||
|
|
||||||
KToolInvocation *KToolInvocation::self()
|
KToolInvocation *KToolInvocation::self()
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,8 @@
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusAbstractInterface>
|
||||||
|
#include <QtDBus/QDBusReply>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Proxy class for interface org.kde.KLauncher
|
* Proxy class for interface org.kde.KLauncher
|
||||||
|
|
|
@ -35,12 +35,9 @@
|
||||||
#include "kbuildprotocolinfofactory.h"
|
#include "kbuildprotocolinfofactory.h"
|
||||||
#include "kctimefactory.h"
|
#include "kctimefactory.h"
|
||||||
#include <ktemporaryfile.h>
|
#include <ktemporaryfile.h>
|
||||||
#include <QtCore/QDataStream>
|
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QEventLoop>
|
#include <QtCore/QFileInfo>
|
||||||
#include <QtCore/QFile>
|
#include <QtDBus/QDBusConnectionInterface>
|
||||||
#include <QtCore/QTimer>
|
|
||||||
#include <QtDBus/QtDBus>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
|
@ -30,12 +30,6 @@
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <QtCore/QDir>
|
|
||||||
#include <QtCore/QFile>
|
|
||||||
#include <QtCore/QTimer>
|
|
||||||
|
|
||||||
#include <QtDBus/QtDBus>
|
|
||||||
|
|
||||||
#include <kuniqueapplication.h>
|
#include <kuniqueapplication.h>
|
||||||
#include <kapplication.h>
|
#include <kapplication.h>
|
||||||
#include <kcmdlineargs.h>
|
#include <kcmdlineargs.h>
|
||||||
|
|
|
@ -25,8 +25,8 @@
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QSet>
|
#include <QtCore/QSet>
|
||||||
|
#include <QtDBus/QDBusMessage>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusAbstractAdaptor>
|
||||||
|
|
||||||
#include <ksycoca.h>
|
#include <ksycoca.h>
|
||||||
#include <ksycocatype.h>
|
#include <ksycocatype.h>
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
#ifndef KDED_KDEDADAPTOR_H
|
#ifndef KDED_KDEDADAPTOR_H
|
||||||
#define KDED_KDEDADAPTOR_H
|
#define KDED_KDEDADAPTOR_H
|
||||||
|
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusAbstractAdaptor>
|
||||||
|
#include <QtDBus/QDBusMessage>
|
||||||
|
|
||||||
class KdedAdaptor: public QDBusAbstractAdaptor
|
class KdedAdaptor: public QDBusAbstractAdaptor
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <QtGui/QSessionManager>
|
#include <QtGui/QSessionManager>
|
||||||
#include <QtGui/QStyle>
|
#include <QtGui/QStyle>
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
|
#include <QtDBus/QDBusConnection>
|
||||||
|
|
||||||
#include <kaction.h>
|
#include <kaction.h>
|
||||||
#include <kapplication.h>
|
#include <kapplication.h>
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <QtGui/QBitmap>
|
#include <QtGui/QBitmap>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
#include <QtDBus/QtDBus>
|
|
||||||
#include <QtGui/qx11info_x11.h>
|
#include <QtGui/qx11info_x11.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
#include <QtGui/QBitmap>
|
#include <QtGui/QBitmap>
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QtGui/QDialog>
|
#include <QtGui/QDialog>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusInterface>
|
||||||
#include <QtGui/qx11info_x11.h>
|
#include <QtGui/qx11info_x11.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
#define KMAINWINDOWIFACE_P_H
|
#define KMAINWINDOWIFACE_P_H
|
||||||
|
|
||||||
#include <kdeui_export.h>
|
#include <kdeui_export.h>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusAbstractAdaptor>
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
|
|
||||||
class KXmlGuiWindow;
|
class KXmlGuiWindow;
|
||||||
|
|
|
@ -36,17 +36,15 @@
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <QtGui/qevent.h>
|
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QDockWidget>
|
#include <QDockWidget>
|
||||||
#include <QtXml/qdom.h>
|
#include <QtXml/qdom.h>
|
||||||
|
#include <QtGui/qevent.h>
|
||||||
#include <QtGui/QLayout>
|
#include <QtGui/QLayout>
|
||||||
#include <QtCore/QObject>
|
|
||||||
#include <QtGui/QSessionManager>
|
#include <QtGui/QSessionManager>
|
||||||
#include <QtGui/QStyle>
|
#include <QtGui/QStyle>
|
||||||
#include <QtCore/QTimer>
|
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
#include <QtCore/QList>
|
#include <QtDBus/QDBusConnection>
|
||||||
#include <kaction.h>
|
#include <kaction.h>
|
||||||
#include <kapplication.h>
|
#include <kapplication.h>
|
||||||
#include <kauthorized.h>
|
#include <kauthorized.h>
|
||||||
|
|
|
@ -4,7 +4,7 @@ if(ENABLE_TESTING)
|
||||||
add_subdirectory(tests)
|
add_subdirectory(tests)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories( ${KDE4_KPARTS_INCLUDES} )
|
include_directories(${KDE4_KPARTS_INCLUDES})
|
||||||
|
|
||||||
########### Configuring (mainly for proctitle) ###########
|
########### Configuring (mainly for proctitle) ###########
|
||||||
|
|
||||||
|
@ -22,35 +22,34 @@ check_function_exists(setproctitle HAVE_SETPROCTITLE)
|
||||||
|
|
||||||
# used by 4 executables in this file
|
# used by 4 executables in this file
|
||||||
if(HAVE_SOCKET_LIBRARY)
|
if(HAVE_SOCKET_LIBRARY)
|
||||||
set(KINIT_SOCKET_LIBRARY socket)
|
set(KINIT_SOCKET_LIBRARY socket)
|
||||||
else(HAVE_SOCKET_LIBRARY)
|
else(HAVE_SOCKET_LIBRARY)
|
||||||
set(KINIT_SOCKET_LIBRARY)
|
set(KINIT_SOCKET_LIBRARY)
|
||||||
endif(HAVE_SOCKET_LIBRARY)
|
endif(HAVE_SOCKET_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
########### kdeinit4 ###############
|
########### kdeinit4 ###############
|
||||||
|
|
||||||
set(kdeinit_SRCS kinit.cpp proctitle.cpp klauncher_cmds.cpp )
|
set(kdeinit_SRCS kinit.cpp proctitle.cpp klauncher_cmds.cpp)
|
||||||
set(kdeinit_LIBS "")
|
|
||||||
|
|
||||||
add_executable(kdeinit4 ${kdeinit_SRCS})
|
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)
|
if (Q_WS_X11)
|
||||||
target_link_libraries(kdeinit4 ${X11_X11_LIB})
|
target_link_libraries(kdeinit4 ${X11_X11_LIB})
|
||||||
endif(Q_WS_X11)
|
endif(Q_WS_X11)
|
||||||
|
|
||||||
install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
install(TARGETS kdeinit4 ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
########### kwrapper4 ###############
|
########### kwrapper4 ###############
|
||||||
|
|
||||||
set(kwrapper_SRCS kwrapper.c )
|
set(kwrapper_SRCS kwrapper.c)
|
||||||
|
|
||||||
add_executable(kwrapper4 ${kwrapper_SRCS})
|
add_executable(kwrapper4 ${kwrapper_SRCS})
|
||||||
|
|
||||||
target_link_libraries(kwrapper4 ${KINIT_SOCKET_LIBRARY})
|
target_link_libraries(kwrapper4 ${KINIT_SOCKET_LIBRARY})
|
||||||
|
|
||||||
install(TARGETS kwrapper4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
install(TARGETS kwrapper4 ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
########### kdeinit4_wrapper ###############
|
########### kdeinit4_wrapper ###############
|
||||||
|
|
||||||
|
@ -62,7 +61,7 @@ if (NOT Q_WS_X11 AND NOT Q_WS_QWS)
|
||||||
add_definitions(-DNO_DISPLAY)
|
add_definitions(-DNO_DISPLAY)
|
||||||
endif (NOT Q_WS_X11 AND NOT Q_WS_QWS)
|
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)
|
install(TARGETS kdeinit4_wrapper ${INSTALL_TARGETS_DEFAULT_ARGS} RENAME kdeinit4_shutdown)
|
||||||
|
|
||||||
########### kshell4 ###############
|
########### kshell4 ###############
|
||||||
|
@ -71,17 +70,17 @@ add_executable(kshell4 shell.c)
|
||||||
|
|
||||||
target_link_libraries(kshell4 ${KINIT_SOCKET_LIBRARY})
|
target_link_libraries(kshell4 ${KINIT_SOCKET_LIBRARY})
|
||||||
|
|
||||||
install(TARGETS kshell4 ${INSTALL_TARGETS_DEFAULT_ARGS} )
|
install(TARGETS kshell4 ${INSTALL_TARGETS_DEFAULT_ARGS})
|
||||||
|
|
||||||
########### lnusertemp ###############
|
########### lnusertemp ###############
|
||||||
|
|
||||||
set(lnusertemp_SRCS lnusertemp.c )
|
set(lnusertemp_SRCS lnusertemp.c)
|
||||||
|
|
||||||
add_executable(lnusertemp ${lnusertemp_SRCS})
|
add_executable(lnusertemp ${lnusertemp_SRCS})
|
||||||
|
|
||||||
target_link_libraries(lnusertemp kdefakes)
|
target_link_libraries(lnusertemp kdefakes)
|
||||||
|
|
||||||
install(TARGETS lnusertemp DESTINATION ${LIBEXEC_INSTALL_DIR} )
|
install(TARGETS lnusertemp DESTINATION ${LIBEXEC_INSTALL_DIR})
|
||||||
|
|
||||||
|
|
||||||
########### kioslave ###############
|
########### kioslave ###############
|
||||||
|
@ -90,35 +89,39 @@ set(kioslave_SRCS kioslave.cpp)
|
||||||
|
|
||||||
add_executable(kioslave ${kioslave_SRCS})
|
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 ###############
|
########### klauncher ###############
|
||||||
set(klauncher_SRCS
|
set(klauncher_SRCS
|
||||||
klauncher.cpp
|
klauncher.cpp
|
||||||
klauncher_main.cpp
|
klauncher_main.cpp
|
||||||
klauncher_adaptor.cpp
|
klauncher_adaptor.cpp
|
||||||
autostart.cpp
|
autostart.cpp
|
||||||
klauncher_cmds.cpp
|
klauncher_cmds.cpp
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml # just so that it gets generated
|
# just so that it gets generated
|
||||||
)
|
${CMAKE_CURRENT_BINARY_DIR}/org.kde.KLauncher.xml
|
||||||
|
)
|
||||||
|
|
||||||
# The adaptor is manually edited, generate the xml from it.
|
# The adaptor is manually edited, generate the xml from it.
|
||||||
qt4_generate_dbus_interface(klauncher_adaptor.h org.kde.KLauncher.xml)
|
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)
|
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 ###############
|
||||||
|
|
||||||
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 ############
|
########### config-kdeinit.h ############
|
||||||
configure_file(config-kdeinit.h.cmake
|
configure_file(config-kdeinit.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kdeinit.h)
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/config-kdeinit.h )
|
|
||||||
|
|
|
@ -82,17 +82,15 @@ AutoStart::loadAutoStartList()
|
||||||
QString::fromLatin1("*.desktop"),
|
QString::fromLatin1("*.desktop"),
|
||||||
KStandardDirs::NoDuplicates);
|
KStandardDirs::NoDuplicates);
|
||||||
|
|
||||||
for(QStringList::ConstIterator it = files.begin();
|
foreach(const QString it, files)
|
||||||
it != files.end();
|
|
||||||
++it)
|
|
||||||
{
|
{
|
||||||
KAutostart config(*it);
|
KAutostart config(it);
|
||||||
if( !config.autostarts(QString::fromLatin1("KDE"), KAutostart::CheckAll))
|
if( !config.autostarts(QString::fromLatin1("KDE"), KAutostart::CheckAll))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
AutoStartItem *item = new AutoStartItem;
|
AutoStartItem *item = new AutoStartItem;
|
||||||
item->name = extractName(*it);
|
item->name = extractName(it);
|
||||||
item->service = *it;
|
item->service = it;
|
||||||
item->startAfter = config.startAfter();
|
item->startAfter = config.startAfter();
|
||||||
item->phase = config.startPhase();
|
item->phase = config.startPhase();
|
||||||
if (item->phase < 0)
|
if (item->phase < 0)
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
#include <QtCore/QTimer>
|
#include <QtCore/QTimer>
|
||||||
#include <QtCore/QList>
|
#include <QtCore/QList>
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtDBus/QtDBus>
|
#include <QtDBus/QDBusMessage>
|
||||||
|
#include <QtDBus/QDBusConnectionInterface>
|
||||||
|
|
||||||
#include <kservice.h>
|
#include <kservice.h>
|
||||||
#include <kprocess.h>
|
#include <kprocess.h>
|
||||||
|
|
Loading…
Add table
Reference in a new issue