[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 16:20:10
Message-ID: 1265214010.901357.23158.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1084730 by aseigo:

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


 M  +7 -11     applet.cpp  


--- branches/KDE/4.4/kdelibs/plasma/applet.cpp #1084729:1084730
@@ -1717,26 +1717,22 @@
 
         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);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic