From 7ad0891a97c821e956c496b38c55e7290b2a5e8b Mon Sep 17 00:00:00 2001 From: Laurent Montel Date: Wed, 13 Nov 2019 22:45:19 +0100 Subject: [PATCH] Port some deprecated methods --- dataengines/time/solarsystem.cpp | 1 + libtaskmanager/xwindowsystemeventbatcher.h | 1 + libtaskmanager/xwindowtasksmodel.cpp | 8 ++++---- runners/kill/killrunner_config.cpp | 8 +++++++- startkde/plasma-session/autostart.cpp | 1 + 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/dataengines/time/solarsystem.cpp b/dataengines/time/solarsystem.cpp index aab85d562..5d5725922 100644 --- a/dataengines/time/solarsystem.cpp +++ b/dataengines/time/solarsystem.cpp @@ -17,6 +17,7 @@ #include "solarsystem.h" #include +#include /* * Mathematics, ideas, public domain code used for these classes from: diff --git a/libtaskmanager/xwindowsystemeventbatcher.h b/libtaskmanager/xwindowsystemeventbatcher.h index c4596438b..709043cc3 100644 --- a/libtaskmanager/xwindowsystemeventbatcher.h +++ b/libtaskmanager/xwindowsystemeventbatcher.h @@ -24,6 +24,7 @@ License along with this library. If not, see . #include #include +#include /* * Relay class for KWindowSystem events that batches updates diff --git a/libtaskmanager/xwindowtasksmodel.cpp b/libtaskmanager/xwindowtasksmodel.cpp index ebb3d09d9..afa30e87d 100644 --- a/libtaskmanager/xwindowtasksmodel.cpp +++ b/libtaskmanager/xwindowtasksmodel.cpp @@ -617,7 +617,7 @@ QVariant XWindowTasksModel::data(const QModelIndex &index, int role) const } else if (role == IsMinimized) { return d->windowInfo(window)->isMinimized(); } else if (role == IsKeepAbove) { - return d->windowInfo(window)->hasState(NET::StaysOnTop); + return d->windowInfo(window)->hasState(NET::KeepAbove); } else if (role == IsKeepBelow) { return d->windowInfo(window)->hasState(NET::KeepBelow); } else if (role == IsFullScreenable) { @@ -849,10 +849,10 @@ void XWindowTasksModel::requestToggleKeepAbove(const QModelIndex &index) NETWinInfo ni(QX11Info::connection(), window, QX11Info::appRootWindow(), NET::WMState, NET::Properties2()); - if (info->hasState(NET::StaysOnTop)) { - ni.setState(NET::States(), NET::StaysOnTop); + if (info->hasState(NET::KeepAbove)) { + ni.setState(NET::States(), NET::KeepAbove); } else { - ni.setState(NET::StaysOnTop, NET::StaysOnTop); + ni.setState(NET::KeepAbove, NET::KeepAbove); } } diff --git a/runners/kill/killrunner_config.cpp b/runners/kill/killrunner_config.cpp index 793839941..effb8b538 100644 --- a/runners/kill/killrunner_config.cpp +++ b/runners/kill/killrunner_config.cpp @@ -19,6 +19,7 @@ //Project-Includes #include "killrunner_config.h" +#include //KDE-Includes #include #include @@ -42,10 +43,15 @@ KillRunnerConfig::KillRunnerConfig(QWidget* parent, const QVariantList& args) : m_ui->sorting->addItem(i18n("CPU usage"), CPU); m_ui->sorting->addItem(i18n("inverted CPU usage"), CPUI); m_ui->sorting->addItem(i18n("nothing"), NONE); - +#if KCONFIGWIDGETS_VERSION < QT_VERSION_CHECK(5, 64, 0) connect(m_ui->useTriggerWord, &QCheckBox::stateChanged, this, QOverload<>::of(&KillRunnerConfig::changed)); connect(m_ui->triggerWord, &KLineEdit::textChanged, this, QOverload<>::of(&KillRunnerConfig::changed)); connect(m_ui->sorting, QOverload::of(&QComboBox::currentIndexChanged), this, QOverload<>::of(&KillRunnerConfig::changed)); +#else + connect(m_ui->useTriggerWord, &QCheckBox::stateChanged, this, &KillRunnerConfig::markAsChanged); + connect(m_ui->triggerWord, &KLineEdit::textChanged, this, &KillRunnerConfig::markAsChanged); + connect(m_ui->sorting, QOverload::of(&QComboBox::currentIndexChanged), this, &KillRunnerConfig::markAsChanged); +#endif load(); } diff --git a/startkde/plasma-session/autostart.cpp b/startkde/plasma-session/autostart.cpp index 9d199541b..16fdaed3a 100644 --- a/startkde/plasma-session/autostart.cpp +++ b/startkde/plasma-session/autostart.cpp @@ -22,6 +22,7 @@ #include #include #include +#include AutoStart::AutoStart() : m_phase(-1), m_phasedone(false)