Commit 7cf74d7d authored by Ismael Asensio's avatar Ismael Asensio
Browse files

Revert "[kwinrules] Show defaults indicator in System Settings"

That commit broke CI's build, while it's building fine locally.

Let's revert it until having a better understanding of the cause.
Also revert the attempt to fix it, which didn't succeed.

This reverts commit 9cbac6fe.
This reverts commit 3e15f640.
parent 3e15f640
......@@ -21,15 +21,6 @@ set(kwinrules_SRCS
kconfig_add_kcfg_files(kwinrules_SRCS ../../rulesettings.kcfgc)
kconfig_add_kcfg_files(kwinrules_SRCS ../../rulebooksettingsbase.kcfgc)
kcmutils_generate_module_data(
kwinrules_SRCS
MODULE_DATA_HEADER rulebookdata.h
MODULE_DATA_CLASS_NAME RuleBookData
SETTINGS_HEADERS rulebooksettings.h
SETTINGS_CLASSES RuleBookSettings
NAMESPACE KWin
)
add_library(KWinRulesObjects STATIC ${kwinrules_SRCS})
set(kwin_kcm_rules_XCB_LIBS
......@@ -43,7 +34,6 @@ set(kcm_libs
Qt5::QuickWidgets
KF5::I18n
KF5::KCMUtils
KF5::QuickAddons
KF5::WindowSystem
KF5::XmlGui
......
......@@ -7,8 +7,6 @@
#include "kcmrules.h"
#include "rulebookdata.h"
#include <QDBusConnection>
#include <QDBusMessage>
......@@ -235,9 +233,7 @@ void KCMKWinRules::importFromFile(const QUrl &path)
updateNeedsSave();
}
K_PLUGIN_FACTORY_WITH_JSON(KCMKWinRulesFactory, "kcm_kwinrules.json",
registerPlugin<KWin::KCMKWinRules>();
registerPlugin<KWin::RuleBookData>(););
K_PLUGIN_CLASS_WITH_JSON(KCMKWinRules, "kcm_kwinrules.json");
} // namespace
......
......@@ -6,15 +6,13 @@
#include "rulebookmodel.h"
#include "rulebooksettings.h"
namespace KWin
{
RuleBookModel::RuleBookModel(QObject *parent)
: QAbstractListModel(parent)
, m_ruleBookData(new RuleBookData(this))
, m_ruleBook(new RuleBookSettings(this))
{
}
......@@ -72,7 +70,7 @@ bool RuleBookModel::insertRows(int row, int count, const QModelIndex &parent)
m_rules.insert(row + i, newRule);
}
m_ruleBookData->settings()->setCount(m_rules.count());
m_ruleBook->setCount(m_rules.count());
endInsertRows();
return true;
......@@ -89,7 +87,7 @@ bool RuleBookModel::removeRows(int row, int count, const QModelIndex &parent)
delete m_rules.at(row + i);
}
m_rules.remove(row, count);
m_ruleBookData->settings()->setCount(m_rules.count());
m_ruleBook->setCount(m_rules.count());
endRemoveRows();
return true;
......@@ -159,17 +157,17 @@ void RuleBookModel::load()
{
beginResetModel();
m_ruleBookData->settings()->load();
m_ruleBook->load();
qDeleteAll(m_rules);
m_rules = m_ruleBookData->settings()->rules();
m_rules = m_ruleBook->rules();
endResetModel();
}
void RuleBookModel::save()
{
m_ruleBookData->settings()->setRules(m_rules);
m_ruleBookData->settings()->save();
m_ruleBook->setRules(m_rules);
m_ruleBook->save();
}
} // namespace
......@@ -6,7 +6,7 @@
#pragma once
#include "rulebookdata.h"
#include "rulebooksettings.h"
#include <rules.h>
#include <QAbstractListModel>
......@@ -43,7 +43,7 @@ public:
void save();
private:
RuleBookData *m_ruleBookData;
RuleBookSettings *m_ruleBook;
QVector<Rules *> m_rules;
};
......
Supports Markdown
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