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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 13 Mar 2016 14:23:26 +0100
changeset 4852
bbc8bf477e15
parent 4850
ab7a57e78fd9
child 4855
e86bd02adfed

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

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:09:03 2016 +0100
+++ b/Preferences/ConfigurationPages/NetworkPage.py	Sun Mar 13 14:23:26 2016 +0100
@@ -60,14 +60,17 @@
         self.downloadDirPicker.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:09:03 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">
@@ -75,7 +75,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