Fixed a Qt 5.6 compatibility issue in the Network configuration page. 6_1_x

Sun, 13 Mar 2016 14:23:26 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 13 Mar 2016 14:23:26 +0100
branch
6_1_x
changeset 4853
f28d62c581de
parent 4851
1ac86f824f49
child 4854
b946a74a945f

Fixed a Qt 5.6 compatibility issue in the Network configuration page.
(grafted from bbc8bf477e156ec50a7336c4cb315636bc1d8fc9)

Preferences/ConfigurationPages/NetworkPage.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/NetworkPage.ui file | annotate | diff | comparison | revisions
--- a/Preferences/ConfigurationPages/NetworkPage.py	Sun Mar 13 13:11:48 2016 +0100
+++ b/Preferences/ConfigurationPages/NetworkPage.py	Sun Mar 13 14:23:26 2016 +0100
@@ -66,14 +66,17 @@
         self.downloadDirEdit.setText(Preferences.getUI("DownloadPath"))
         self.requestFilenameCheckBox.setChecked(
             Preferences.getUI("RequestDownloadFilename"))
-        policy = Preferences.getHelp("DownloadManagerRemovePolicy")
-        from Helpviewer.Download.DownloadManager import DownloadManager
-        if policy == DownloadManager.RemoveNever:
-            self.cleanupNeverButton.setChecked(True)
-        elif policy == DownloadManager.RemoveExit:
-            self.cleanupExitButton.setChecked(True)
-        else:
-            self.cleanupSuccessfulButton.setChecked(True)
+        try:
+            policy = Preferences.getHelp("DownloadManagerRemovePolicy")
+            from Helpviewer.Download.DownloadManager import DownloadManager
+            if policy == DownloadManager.RemoveNever:
+                self.cleanupNeverButton.setChecked(True)
+            elif policy == DownloadManager.RemoveExit:
+                self.cleanupExitButton.setChecked(True)
+            else:
+                self.cleanupSuccessfulButton.setChecked(True)
+        except ImportError:
+            self.cleanupGroup.hide()
         
         # HTTP proxy
         self.httpProxyHostEdit.setText(
--- a/Preferences/ConfigurationPages/NetworkPage.ui	Sun Mar 13 13:11:48 2016 +0100
+++ b/Preferences/ConfigurationPages/NetworkPage.ui	Sun Mar 13 14:23:26 2016 +0100
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>591</width>
-    <height>789</height>
+    <height>941</height>
    </rect>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_5">
@@ -73,7 +73,7 @@
        </widget>
       </item>
       <item>
-       <widget class="QGroupBox" name="groupBox_3">
+       <widget class="QGroupBox" name="cleanupGroup">
         <property name="title">
          <string>Download Manager Cleanup Policy</string>
         </property>

eric ide

mercurial