From 9706da58e32ea1411425bddf8444a594677da6ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 15 Aug 2013 11:46:53 +0200 Subject: [PATCH] Port KWin Killer away from deprecated functionality * KApplication -> QApplication * Qt::escape -> QString::toHtmlEscaped * KDebug -> QDebug In addition it uses KMessageBox::warningContinueCancelWId from KInterProcessWindowing as we have the window id. KCmdLineArgs is still used as the replacement is still in kdeqt5staging. --- killer/CMakeLists.txt | 2 ++ killer/killer.cpp | 37 +++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/killer/CMakeLists.txt b/killer/CMakeLists.txt index c1a297d7bd..82158fb736 100644 --- a/killer/CMakeLists.txt +++ b/killer/CMakeLists.txt @@ -8,7 +8,9 @@ set_target_properties(kwin_killer_helper PROPERTIES COMPILE_FLAGS ${Qt5Widgets_E target_link_libraries(kwin_killer_helper ${Qt5Widgets_LIBRARIES} + ${Qt5X11Extras_LIBRARIES} ${KDE4Support_LIBRARIES} # KCmdLineArgs + ${KInterProcessWindowing_LIBRARY} KF5::KAuth KF5::KI18n KF5::KWidgetsAddons diff --git a/killer/killer.cpp b/killer/killer.cpp index bd99efb267..248628b904 100644 --- a/killer/killer.cpp +++ b/killer/killer.cpp @@ -23,17 +23,13 @@ DEALINGS IN THE SOFTWARE. ****************************************************************************/ #include -#include -#include -#include +#include #include -#include -#include -#include +#include +#include +#include #include -// TODO: remove with Qt 5, only for HTML escaping the caption -#include -#include +#include #include #include #include @@ -51,8 +47,13 @@ int main(int argc, char* argv[]) options.add("wid ", ki18n("ID of resource belonging to the application")); options.add("timestamp