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:
parent
aef8ba8d1a
commit
8f21921843
17 changed files with 1 additions and 31 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -39,8 +39,6 @@ MagicLampEffectConfig::MagicLampEffectConfig(QWidget* parent, const QVariantList
|
|||
|
||||
MagicLampConfig::instance(KWIN_CONFIG);
|
||||
addConfig(MagicLampConfig::self(), m_ui);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
void MagicLampEffectConfig::save()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -56,7 +56,6 @@ MouseClickEffectConfig::MouseClickEffectConfig(QWidget* parent, const QVariantLi
|
|||
|
||||
MouseClickConfig::instance(KWIN_CONFIG);
|
||||
addConfig(MouseClickConfig::self(), m_ui);
|
||||
load();
|
||||
}
|
||||
|
||||
MouseClickEffectConfig::~MouseClickEffectConfig()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -73,8 +73,6 @@ PresentWindowsEffectConfig::PresentWindowsEffectConfig(QWidget* parent, const QV
|
|||
|
||||
PresentWindowsConfig::instance(KWIN_CONFIG);
|
||||
addConfig(PresentWindowsConfig::self(), m_ui);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
PresentWindowsEffectConfig::~PresentWindowsEffectConfig()
|
||||
|
|
|
@ -30,8 +30,6 @@ ShowFpsEffectConfig::ShowFpsEffectConfig(QWidget* parent, const QVariantList& ar
|
|||
|
||||
ShowFpsConfig::instance(KWIN_CONFIG);
|
||||
addConfig(ShowFpsConfig::self(), this);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
ShowFpsEffectConfig::~ShowFpsEffectConfig()
|
||||
|
|
|
@ -44,8 +44,6 @@ ShowPaintEffectConfig::ShowPaintEffectConfig(QWidget *parent, const QVariantList
|
|||
|
||||
connect(m_ui->shortcutsEditor, &KShortcutsEditor::keyChange,
|
||||
this, &ShowPaintEffectConfig::markAsChanged);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
ShowPaintEffectConfig::~ShowPaintEffectConfig()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -61,8 +61,6 @@ TrackMouseEffectConfig::TrackMouseEffectConfig(QWidget* parent, const QVariantLi
|
|||
|
||||
connect(m_ui->shortcut, &KKeySequenceWidget::keySequenceChanged,
|
||||
this, &TrackMouseEffectConfig::shortcutChanged);
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
TrackMouseEffectConfig::~TrackMouseEffectConfig()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue