Drop kdeinit linking

Summary:
This wasn't used on startup (ksmserver calls KProcess)
Nor for the rules dialog (kwin invokes it with QProcess)

We may as well simplify the code and drop the dependency

See also T12140

Test Plan:
Restarted
Opened the rules dialog

Reviewers: #kwin, zzag

Reviewed By: #kwin, zzag

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26835
This commit is contained in:
David Edmundson 2020-01-22 12:45:51 +00:00
parent 4979afbf7c
commit 996e840172
4 changed files with 28 additions and 35 deletions

View file

@ -70,7 +70,6 @@ find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
I18n I18n
IconThemes IconThemes
IdleTime IdleTime
Init
Notifications Notifications
Package Package
Plasma Plasma
@ -392,7 +391,7 @@ add_subdirectory(helpers)
########### next target ############### ########### next target ###############
set(kwin_KDEINIT_SRCS set(kwin_SRCS
abstract_client.cpp abstract_client.cpp
abstract_opengl_context_attribute_builder.cpp abstract_opengl_context_attribute_builder.cpp
abstract_output.cpp abstract_output.cpp
@ -504,14 +503,14 @@ set(kwin_KDEINIT_SRCS
) )
if (CMAKE_SYSTEM_NAME MATCHES "Linux") if (CMAKE_SYSTEM_NAME MATCHES "Linux")
set(kwin_KDEINIT_SRCS set(kwin_SRCS
${kwin_KDEINIT_SRCS} ${kwin_SRCS}
colorcorrection/clockskewnotifierengine_linux.cpp colorcorrection/clockskewnotifierengine_linux.cpp
) )
endif() endif()
include(ECMQtDeclareLoggingCategory) include(ECMQtDeclareLoggingCategory)
ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS ecm_qt_declare_logging_category(kwin_SRCS
HEADER HEADER
colorcorrect_logging.h colorcorrect_logging.h
IDENTIFIER IDENTIFIER
@ -524,7 +523,7 @@ ecm_qt_declare_logging_category(kwin_KDEINIT_SRCS
if (KWIN_BUILD_TABBOX) if (KWIN_BUILD_TABBOX)
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} set(kwin_SRCS ${kwin_SRCS}
tabbox/clientmodel.cpp tabbox/clientmodel.cpp
tabbox/desktopchain.cpp tabbox/desktopchain.cpp
tabbox/desktopmodel.cpp tabbox/desktopmodel.cpp
@ -538,33 +537,33 @@ if (KWIN_BUILD_TABBOX)
endif() endif()
if (KWIN_BUILD_ACTIVITIES) if (KWIN_BUILD_ACTIVITIES)
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} set(kwin_SRCS ${kwin_SRCS}
activities.cpp activities.cpp
) )
endif() endif()
if (HAVE_LINUX_VT_H) if (HAVE_LINUX_VT_H)
set(kwin_KDEINIT_SRCS ${kwin_KDEINIT_SRCS} set(kwin_SRCS ${kwin_SRCS}
virtual_terminal.cpp virtual_terminal.cpp
) )
endif() endif()
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS settings.kcfgc) kconfig_add_kcfg_files(kwin_SRCS settings.kcfgc)
kconfig_add_kcfg_files(kwin_KDEINIT_SRCS colorcorrection/colorcorrect_settings.kcfgc) kconfig_add_kcfg_files(kwin_SRCS colorcorrection/colorcorrect_settings.kcfgc)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.Compositing.xml dbusinterface.h KWin::CompositorDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.ColorCorrect.xml colorcorrection/colorcorrectdbusinterface.h KWin::ColorCorrect::ColorCorrectDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl) qt5_add_dbus_adaptor(kwin_SRCS ${kwin_effects_dbus_xml} effects.h KWin::EffectsHandlerImpl)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor) qt5_add_dbus_adaptor(kwin_SRCS org.kde.kwin.OrientationSensor.xml orientation_sensor.h KWin::OrientationSensor)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.VirtualDesktopManager.xml dbusinterface.h KWin::VirtualDesktopManagerDBusInterface)
qt5_add_dbus_adaptor(kwin_KDEINIT_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager) qt5_add_dbus_adaptor(kwin_SRCS org.kde.KWin.Session.xml sm.h KWin::SessionManager)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface) qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/kf5_org.freedesktop.ScreenSaver.xml screenlocker_interface)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface) qt5_add_dbus_interface(kwin_SRCS ${KSCREENLOCKER_DBUS_INTERFACES_DIR}/org.kde.screensaver.xml kscreenlocker_interface)
qt5_add_dbus_interface(kwin_KDEINIT_SRCS org.kde.kappmenu.xml appmenu_interface) qt5_add_dbus_interface(kwin_SRCS org.kde.kappmenu.xml appmenu_interface)
ki18n_wrap_ui(kwin_KDEINIT_SRCS ki18n_wrap_ui(kwin_SRCS
debug_console.ui debug_console.ui
shortcutdialog.ui shortcutdialog.ui
) )
@ -647,7 +646,7 @@ set(kwinLibs
Libinput::Libinput Libinput::Libinput
) )
add_library(kwin SHARED ${kwin_KDEINIT_SRCS}) add_library(kwin SHARED ${kwin_SRCS})
set_target_properties(kwin PROPERTIES set_target_properties(kwin PROPERTIES
VERSION ${PROJECT_VERSION} VERSION ${PROJECT_VERSION}
@ -659,11 +658,10 @@ generate_export_header(kwin EXPORT_FILE_NAME kwin_export.h)
target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY}) target_link_libraries(kwin kwinglutils ${epoxy_LIBRARY})
kf5_add_kdeinit_executable(kwin_x11 main_x11.cpp) add_executable(kwin_x11 main_x11.cpp)
target_link_libraries(kdeinit_kwin_x11 kwin KF5::Crash Qt5::X11Extras) target_link_libraries(kwin_x11 kwin KF5::Crash Qt5::X11Extras)
install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP) install(TARGETS kwin ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP)
install(TARGETS kdeinit_kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS}) install(TARGETS kwin_x11 ${INSTALL_TARGETS_DEFAULT_ARGS})
set(kwin_XWAYLAND_SRCS set(kwin_XWAYLAND_SRCS

View file

@ -6,13 +6,11 @@ add_definitions(-DKCMRULES)
include_directories(../../) include_directories(../../)
set(kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h) set(kwinrules_MOC_HDRS yesnobox.h ../../cursor.h ../../plugins/platforms/x11/standalone/x11cursor.h)
qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS}) qt5_wrap_cpp(kwinrules_MOC_SRCS ${kwinrules_MOC_HDRS})
set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp ${kwinrules_MOC_SRCS}) set(kwinrules_SRCS ruleswidget.cpp ruleslist.cpp kwinsrc.cpp detectwidget.cpp main.cpp ${kwinrules_MOC_SRCS})
ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui) ki18n_wrap_ui(kwinrules_SRCS ruleslist.ui detectwidget.ui editshortcut.ui ruleswidgetbase.ui)
set(kwin_rules_dialog_KDEINIT_SRCS main.cpp ${kwinrules_SRCS}) add_executable(kwin_rules_dialog ${kwinrules_SRCS})
kf5_add_kdeinit_executable(kwin_rules_dialog ${kwin_rules_dialog_KDEINIT_SRCS})
set(kwin_kcm_rules_XCB_LIBS set(kwin_kcm_rules_XCB_LIBS
XCB::CURSOR XCB::CURSOR
@ -36,9 +34,8 @@ if (KWIN_BUILD_ACTIVITIES)
set(kcm_libs ${kcm_libs} KF5::Activities) set(kcm_libs ${kcm_libs} KF5::Activities)
endif() endif()
target_link_libraries(kdeinit_kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS}) target_link_libraries(kwin_rules_dialog ${kcm_libs} ${kwin_kcm_rules_XCB_LIBS})
install(TARGETS kdeinit_kwin_rules_dialog ${INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR}) install(TARGETS kwin_rules_dialog DESTINATION ${LIBEXEC_INSTALL_DIR})
########### next target ############### ########### next target ###############

View file

@ -233,8 +233,7 @@ static void edit(const QVariantMap &data, bool whole_app)
} // namespace } // namespace
extern "C" int main(int argc, char* argv[])
KWIN_EXPORT int kdemain(int argc, char* argv[])
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
app.setAttribute(Qt::AA_UseHighDpiPixmaps, true); app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);

View file

@ -340,8 +340,7 @@ void ApplicationX11::crashHandler(int signal)
} // namespace } // namespace
extern "C" int main(int argc, char * argv[])
KWIN_EXPORT int kdemain(int argc, char * argv[])
{ {
KWin::Application::setupMalloc(); KWin::Application::setupMalloc();
KWin::Application::setupLocalizedString(); KWin::Application::setupLocalizedString();