Fixed an issue in the site info dialog causing it to fail, if no disk cache was enabled.

Tue, 08 Nov 2011 18:37:34 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 08 Nov 2011 18:37:34 +0100
changeset 1433
cb6507f68b16
parent 1432
688fcdc5e942
child 1434
69c3d77a8dd6

Fixed an issue in the site info dialog causing it to fail, if no disk cache was enabled.

Helpviewer/SiteInfo/SiteInfoDialog.py file | annotate | diff | comparison | revisions
diff -r 688fcdc5e942 -r cb6507f68b16 Helpviewer/SiteInfo/SiteInfoDialog.py
--- a/Helpviewer/SiteInfo/SiteInfoDialog.py	Mon Nov 07 20:02:59 2011 +0100
+++ b/Helpviewer/SiteInfo/SiteInfoDialog.py	Tue Nov 08 18:37:34 2011 +0100
@@ -142,7 +142,10 @@
             imageUrl.setScheme(QUrl(self.siteAddressLabel.text()).scheme())
         
         cache = Helpviewer.HelpWindow.HelpWindow.networkAccessManager().cache()
-        cacheData = cache.data(imageUrl)
+        if cache:
+            cacheData = cache.data(imageUrl)
+        else:
+            cacheData = None
         pixmap = QPixmap()
         invalidPixmap = False
         scene = QGraphicsScene(self.imagePreview)
@@ -203,7 +206,10 @@
             imageUrl.setScheme(QUrl(self.siteAddressLabel.text()).scheme())
         
         cache = Helpviewer.HelpWindow.HelpWindow.networkAccessManager().cache()
-        cacheData = cache.data(imageUrl)
+        if cache:
+            cacheData = cache.data(imageUrl)
+        else:
+            cacheData = None
         if not cacheData:
             E5MessageBox.critical(self,
                 self.trUtf8("Save Image"),

eric ide

mercurial