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");
|
||||
if (!uiFile.isEmpty()) {
|
||||
dialog->setWindowTitle(d->configWindowTitle());
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
|
||||
QUiLoader loader;
|
||||
QFile f(uiFile);
|
||||
if (!f.open(QIODevice::ReadOnly)) {
|
||||
QUiLoader loader;
|
||||
QWidget *w = loader.load(&f);
|
||||
if (!w) {
|
||||
delete dialog;
|
||||
|
||||
if (d->script) {
|
||||
d->script->showConfigurationInterface();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
QWidget *w = loader.load(&f);
|
||||
f.close();
|
||||
|
||||
if (w) {
|
||||
dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", name()));
|
||||
}
|
||||
dialog->setWindowTitle(d->configWindowTitle());
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose, true);
|
||||
dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", name()));
|
||||
}
|
||||
|
||||
d->addGlobalShortcutsPage(dialog);
|
||||
|
Loading…
x
Reference in New Issue
Block a user