set the parent of the config skeleton object to be the dialog
BUG:287324
This commit is contained in:
parent
822243288d
commit
ed31f2aaee
@ -1900,6 +1900,11 @@ void Applet::showConfigurationInterface()
|
|||||||
KConfigSkeleton *configLoader = d->configLoader ? d->configLoader : new KConfigSkeleton(0);
|
KConfigSkeleton *configLoader = d->configLoader ? d->configLoader : new KConfigSkeleton(0);
|
||||||
dialog = new AppletConfigDialog(0, d->configDialogId(), configLoader);
|
dialog = new AppletConfigDialog(0, d->configDialogId(), configLoader);
|
||||||
|
|
||||||
|
if (!d->configLoader) {
|
||||||
|
// delete the temporary when this dialog is done
|
||||||
|
configLoader->setParent(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
dialog->setWindowTitle(d->configWindowTitle());
|
dialog->setWindowTitle(d->configWindowTitle());
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
bool hasPages = false;
|
bool hasPages = false;
|
||||||
@ -2016,6 +2021,7 @@ KConfigDialog *AppletPrivate::generateGenericConfigDialog()
|
|||||||
{
|
{
|
||||||
KConfigSkeleton *nullManager = new KConfigSkeleton(0);
|
KConfigSkeleton *nullManager = new KConfigSkeleton(0);
|
||||||
KConfigDialog *dialog = new AppletConfigDialog(0, configDialogId(), nullManager);
|
KConfigDialog *dialog = new AppletConfigDialog(0, configDialogId(), nullManager);
|
||||||
|
nullManager->setParent(dialog);
|
||||||
dialog->setFaceType(KPageDialog::Auto);
|
dialog->setFaceType(KPageDialog::Auto);
|
||||||
dialog->setWindowTitle(configWindowTitle());
|
dialog->setWindowTitle(configWindowTitle());
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
@ -2023,7 +2029,6 @@ KConfigDialog *AppletPrivate::generateGenericConfigDialog()
|
|||||||
dialog->showButton(KDialog::Default, false);
|
dialog->showButton(KDialog::Default, false);
|
||||||
QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished()));
|
QObject::connect(dialog, SIGNAL(applyClicked()), q, SLOT(configDialogFinished()));
|
||||||
QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished()));
|
QObject::connect(dialog, SIGNAL(okClicked()), q, SLOT(configDialogFinished()));
|
||||||
QObject::connect(dialog, SIGNAL(finished()), nullManager, SLOT(deleteLater()));
|
|
||||||
return dialog;
|
return dialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user