mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 10:22:49 +00:00
kwin: delete the already created plugin config widget from KWin::KWinDecorationModule::load()
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
516b46e3ec
commit
d70570e598
1 changed files with 4 additions and 1 deletions
|
@ -89,11 +89,14 @@ KWinDecorationModule::~KWinDecorationModule()
|
|||
|
||||
void KWinDecorationModule::load()
|
||||
{
|
||||
delete m_pluginConfigWidget;
|
||||
m_pluginConfigWidget = nullptr;
|
||||
|
||||
KConfigGroup config(m_kwinConfig, "Style");
|
||||
QLibrary library(styleToConfigLib(config));
|
||||
if (library.load()) {
|
||||
void *alloc_ptr = library.resolve("allocate_config");
|
||||
if (alloc_ptr != NULL) {
|
||||
if (alloc_ptr != nullptr) {
|
||||
allocatePlugin = (QObject * (*)(KConfigGroup & conf, QWidget * parent))alloc_ptr;
|
||||
m_pluginConfigWidget = new KVBox(this);
|
||||
m_pluginObject = (QObject*)(allocatePlugin(config, m_pluginConfigWidget));
|
||||
|
|
Loading…
Add table
Reference in a new issue