From c4b8f33ac701748707c918b7e7af095ab44e5d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 28 Aug 2013 13:48:49 +0200 Subject: [PATCH] Port KWin/Killer to QCommandLineParser And with that it no longer needs kde4support. --- killer/CMakeLists.txt | 1 - killer/killer.cpp | 58 +++++++++++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/killer/CMakeLists.txt b/killer/CMakeLists.txt index 8a2f14c674..8073fc9247 100644 --- a/killer/CMakeLists.txt +++ b/killer/CMakeLists.txt @@ -9,7 +9,6 @@ set_target_properties(kwin_killer_helper PROPERTIES COMPILE_FLAGS ${Qt5Widgets_E target_link_libraries(kwin_killer_helper Qt5::Widgets Qt5::X11Extras - ${KDE4Support_LIBRARIES} # KCmdLineArgs ${KInterProcessWindowing_LIBRARY} KF5::KAuth KF5::KI18n diff --git a/killer/killer.cpp b/killer/killer.cpp index 248628b904..5d17ce87d5 100644 --- a/killer/killer.cpp +++ b/killer/killer.cpp @@ -22,11 +22,11 @@ DEALINGS IN THE SOFTWARE. ****************************************************************************/ -#include #include #include #include #include +#include #include #include #include @@ -36,17 +36,6 @@ DEALINGS IN THE SOFTWARE. int main(int argc, char* argv[]) { - KCmdLineArgs::init(argc, argv, "kwin_killer_helper", "kwin", ki18n("Window Manager"), "1.0" , - ki18n("KWin helper utility")); - - KCmdLineOptions options; - options.add("pid ", ki18n("PID of the application to terminate")); - options.add("hostname ", ki18n("Hostname on which the application is running")); - options.add("windowname ", ki18n("Caption of the window to be terminated")); - options.add("applicationname ", ki18n("Name of the application to be terminated")); - options.add("wid ", ki18n("ID of resource belonging to the application")); - options.add("timestamp