[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdelibs/plasma
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2010-02-03 17:41:19
Message-ID: 1265218879.163391.28525.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1084747 by aseigo:
another use case, another way the code could fail; reorganize this code so that if a \
dialog isn't auto-generated (no matter why!) we fall back to the ScriptEngine's own \
implemenation
M +12 -16 applet.cpp
--- branches/KDE/4.4/kdelibs/plasma/applet.cpp #1084746:1084747
@@ -1713,31 +1713,27 @@
}
if (d->package && d->configLoader) {
- KConfigDialog *dialog = new KConfigDialog(0, d->configDialogId(), \
d->configLoader); + KConfigDialog *dialog = 0;
QString uiFile = d->package->filePath("mainconfigui");
if (!uiFile.isEmpty()) {
QFile f(uiFile);
QUiLoader loader;
QWidget *w = loader.load(&f);
- if (!w) {
- delete dialog;
-
- if (d->script) {
- d->script->showConfigurationInterface();
- }
-
- return;
+ if (w) {
+ dialog = new KConfigDialog(0, d->configDialogId(), d->configLoader);
+ dialog->setWindowTitle(d->configWindowTitle());
+ dialog->setAttribute(Qt::WA_DeleteOnClose, true);
+ dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", \
name())); + d->addGlobalShortcutsPage(dialog);
+ d->addPublishPage(dialog);
+ dialog->show();
}
-
- dialog->setWindowTitle(d->configWindowTitle());
- dialog->setAttribute(Qt::WA_DeleteOnClose, true);
- dialog->addPage(w, i18n("Settings"), icon(), i18n("%1 Settings", \
name())); }
- d->addGlobalShortcutsPage(dialog);
- d->addPublishPage(dialog);
- dialog->show();
+ if (!dialog && d->script) {
+ d->script->showConfigurationInterface();
+ }
} else if (d->script) {
d->script->showConfigurationInterface();
} else {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic