Ignore:
Timestamp:
03/07/13 12:44:22 (14 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added caching to help view browser.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/canvasmain.py

    r11384 r11387  
    2020    Qt, QEvent, QSize, QUrl, QTimer, QFile, QByteArray 
    2121) 
     22 
     23from PyQt4.QtNetwork import QNetworkDiskCache 
    2224 
    2325from PyQt4.QtWebKit import QWebView 
     
    352354        self.help_dock.setAllowedAreas(Qt.NoDockWidgetArea) 
    353355        self.help_view = QWebView() 
     356        manager = self.help_view.page().networkAccessManager() 
     357        cache = QNetworkDiskCache() 
     358        cache.setCacheDirectory( 
     359            os.path.join(config.cache_dir(), "help", "help-view-cache") 
     360        ) 
     361        manager.setCache(cache) 
    354362        self.help_dock.setWidget(self.help_view) 
    355363        self.help_dock.hide() 
Note: See TracChangeset for help on using the changeset viewer.