if the UI file is bogus for whatever reason (not just "we can't open it") call the script's createConfigurationInterface to see if that works any better
svn path=/branches/KDE/4.4/kdelibs/; revision=1084730
This commit is contained in:
parent
e924c9d534
commit
ed37e1acc0
18
applet.cpp
18
applet.cpp
@ -1717,26 +1717,22 @@ void Applet::showConfigurationInterface()
|
|||||||
|
|
||||||
QString uiFile = d->package->filePath("mainconfigui");
|
QString uiFile = d->package->filePath("mainconfigui");
|
||||||
if (!uiFile.isEmpty()) {
|
if (!uiFile.isEmpty()) {
|
||||||
dialog->setWindowTitle(d->configWindowTitle());
|
|
||||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
|
||||||
|
|
||||||
QUiLoader loader;
|
|
||||||
QFile f(uiFile);
|
QFile f(uiFile);
|
||||||
if (!f.open(QIODevice::ReadOnly)) {
|
QUiLoader loader;
|
||||||
|
QWidget *w = loader.load(&f);
|
||||||
|
if (!w) {
|
||||||
delete dialog;
|
delete dialog;
|
||||||
|
|
||||||
if (d->script) {
|
if (d->script) {
|
||||||
d->script->showConfigurationInterface();
|
d->script->showConfigurationInterface();
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget *w = loader.load(&f);
|
dialog->setWindowTitle(d->configWindowTitle());
|
||||||
f.close();
|
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", name()));
|
||||||
if (w) {
|
|
||||||
dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", name()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
d->addGlobalShortcutsPage(dialog);
|
d->addGlobalShortcutsPage(dialog);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user