effects: Don't call load() from KCM constructor

It is automatically called (and documented as such) by KCModule
after the constructor is run.

This avoids calling a virtual method from the constructor.

Signed-off-by: Eike Hein <eike.hein@mbition.io>
This commit is contained in:
Kai Uwe Broulik 2022-02-23 09:23:09 +01:00 committed by Kai Uwe Broulik
parent aef8ba8d1a
commit 8f21921843
17 changed files with 1 additions and 31 deletions

View file

@ -23,8 +23,6 @@ BlurEffectConfig::BlurEffectConfig(QWidget *parent, const QVariantList &args)
ui.setupUi(this);
BlurConfig::instance(KWIN_CONFIG);
addConfig(BlurConfig::self(), this);
load();
}
BlurEffectConfig::~BlurEffectConfig()

View file

@ -79,9 +79,6 @@ DesktopGridEffectConfig::DesktopGridEffectConfig(QWidget* parent, const QVariant
connect(m_ui->desktopNameAlignmentCombo, qOverload<int>(&QComboBox::currentIndexChanged), this, &DesktopGridEffectConfig::markAsChanged);
connect(m_ui->clickBehaviorButtonGroup, qOverload<int>(&QButtonGroup::buttonClicked), this, &DesktopGridEffectConfig::markAsChanged);
connect(m_ui->shortcutEditor, &KShortcutsEditor::keyChange, this, &DesktopGridEffectConfig::markAsChanged);
load();
layoutSelectionChanged();
}
DesktopGridEffectConfig::~DesktopGridEffectConfig()
@ -111,6 +108,7 @@ void DesktopGridEffectConfig::load()
if (clickBehaviorButton) {
clickBehaviorButton->setChecked(true);
}
layoutSelectionChanged();
}
void DesktopGridEffectConfig::layoutSelectionChanged()

View file

@ -29,7 +29,6 @@ DimInactiveEffectConfig::DimInactiveEffectConfig(QWidget *parent, const QVariant
m_ui.setupUi(this);
DimInactiveConfig::instance(KWIN_CONFIG);
addConfig(DimInactiveConfig::self(), this);
load();
}
DimInactiveEffectConfig::~DimInactiveEffectConfig()

View file

@ -24,7 +24,6 @@ GlideEffectConfig::GlideEffectConfig(QWidget *parent, const QVariantList &args)
ui.setupUi(this);
GlideConfig::instance(KWIN_CONFIG);
addConfig(GlideConfig::self(), this);
load();
}
GlideEffectConfig::~GlideEffectConfig()

View file

@ -50,8 +50,6 @@ InvertEffectConfig::InvertEffectConfig(QWidget* parent, const QVariantList& args
KShortcutsEditor::GlobalAction, KShortcutsEditor::LetterShortcutsDisallowed);
connect(mShortcutEditor, &KShortcutsEditor::keyChange, this, &InvertEffectConfig::markAsChanged);
layout->addWidget(mShortcutEditor);
load();
}
InvertEffectConfig::~InvertEffectConfig()

View file

@ -39,8 +39,6 @@ MagicLampEffectConfig::MagicLampEffectConfig(QWidget* parent, const QVariantList
MagicLampConfig::instance(KWIN_CONFIG);
addConfig(MagicLampConfig::self(), m_ui);
load();
}
void MagicLampEffectConfig::save()

View file

@ -73,8 +73,6 @@ MagnifierEffectConfig::MagnifierEffectConfig(QWidget* parent, const QVariantList
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_0);
m_ui->editor->addCollection(m_actionCollection);
load();
}
MagnifierEffectConfig::~MagnifierEffectConfig()

View file

@ -56,7 +56,6 @@ MouseClickEffectConfig::MouseClickEffectConfig(QWidget* parent, const QVariantLi
MouseClickConfig::instance(KWIN_CONFIG);
addConfig(MouseClickConfig::self(), m_ui);
load();
}
MouseClickEffectConfig::~MouseClickEffectConfig()

View file

@ -44,8 +44,6 @@ OverviewEffectConfig::OverviewEffectConfig(QWidget *parent, const QVariantList &
ui.shortcutsEditor->addCollection(actionCollection);
connect(ui.shortcutsEditor, &KShortcutsEditor::keyChange, this, &OverviewEffectConfig::markAsChanged);
load();
}
OverviewEffectConfig::~OverviewEffectConfig()

View file

@ -73,8 +73,6 @@ PresentWindowsEffectConfig::PresentWindowsEffectConfig(QWidget* parent, const QV
PresentWindowsConfig::instance(KWIN_CONFIG);
addConfig(PresentWindowsConfig::self(), m_ui);
load();
}
PresentWindowsEffectConfig::~PresentWindowsEffectConfig()

View file

@ -30,8 +30,6 @@ ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& ar
ShowFpsConfig::instance(KWIN_CONFIG);
addConfig(ShowFpsConfig::self(), this);
load();
}
ShowFpsEffectConfig::~ShowFpsEffectConfig()

View file

@ -44,8 +44,6 @@ ShowPaintEffectConfig::ShowPaintEffectConfig(QWidget *parent, const QVariantList
connect(m_ui->shortcutsEditor, &KShortcutsEditor::keyChange,
this, &ShowPaintEffectConfig::markAsChanged);
load();
}
ShowPaintEffectConfig::~ShowPaintEffectConfig()

View file

@ -27,7 +27,6 @@ SlideEffectConfig::SlideEffectConfig(QWidget *parent, const QVariantList &args)
m_ui.setupUi(this);
SlideConfig::instance(KWIN_CONFIG);
addConfig(SlideConfig::self(), this);
load();
}
SlideEffectConfig::~SlideEffectConfig()

View file

@ -62,8 +62,6 @@ ThumbnailAsideEffectConfig::ThumbnailAsideEffectConfig(QWidget* parent, const QV
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::CTRL + Qt::Key_T);
m_ui->editor->addCollection(m_actionCollection);
load();
}
ThumbnailAsideEffectConfig::~ThumbnailAsideEffectConfig()

View file

@ -61,8 +61,6 @@ TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantLi
connect(m_ui->shortcut, &KKeySequenceWidget::keySequenceChanged,
this, &TrackMouseEffectConfig::shortcutChanged);
load();
}
TrackMouseEffectConfig::~TrackMouseEffectConfig()

View file

@ -74,8 +74,6 @@ WobblyWindowsEffectConfig::WobblyWindowsEffectConfig(QWidget* parent, const QVar
addConfig(WobblyWindowsConfig::self(), this);
connect(m_ui.kcfg_WobblynessLevel, &QSlider::valueChanged, this, &WobblyWindowsEffectConfig::wobblinessChanged);
load();
}
WobblyWindowsEffectConfig::~WobblyWindowsEffectConfig()

View file

@ -116,8 +116,6 @@ ZoomEffectConfig::ZoomEffectConfig(QWidget* parent, const QVariantList& args) :
KGlobalAccel::self()->setShortcut(a, QList<QKeySequence>() << Qt::META + Qt::Key_F6);
m_ui->editor->addCollection(actionCollection);
load();
}
ZoomEffectConfig::~ZoomEffectConfig()