Commit 7ad0891a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Port some deprecated methods

parent 2d066f00
......@@ -17,6 +17,7 @@
#include "solarsystem.h"
#include <math.h>
#include <QList>
/*
* Mathematics, ideas, public domain code used for these classes from:
......
......@@ -24,6 +24,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
#include <QObject>
#include <KWindowSystem>
#include <QHash>
/*
* Relay class for KWindowSystem events that batches updates
......
......@@ -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);
}
}
......
......@@ -19,6 +19,7 @@
//Project-Includes
#include "killrunner_config.h"
#include <kconfigwidgets_version.h>
//KDE-Includes
#include <KSharedConfig>
#include <KPluginFactory>
......@@ -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<int>::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<int>::of(&QComboBox::currentIndexChanged), this, &KillRunnerConfig::markAsChanged);
#endif
load();
}
......
......@@ -22,6 +22,7 @@
#include <kautostart.h>
#include <QStandardPaths>
#include <QDir>
#include <QHash>
AutoStart::AutoStart()
: m_phase(-1), m_phasedone(false)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment