Added TODO comments to eliminate the use of Qt resources (prepare for PyQt 6).

Thu, 24 Sep 2020 19:51:19 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 24 Sep 2020 19:51:19 +0200
changeset 7716
313e09453306
parent 7715
ae49e290890d
child 7717
f32d7965a17e

Added TODO comments to eliminate the use of Qt resources (prepare for PyQt 6).

eric6/E5Network/E5TldExtractor.py file | annotate | diff | comparison | revisions
eric6/IconEditor/IconEditorGrid.py file | annotate | diff | comparison | revisions
eric6/IconEditor/cursors/cursors.qrc file | annotate | diff | comparison | revisions
eric6/UI/CodeDocumentationViewerTemplate.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/Bookmarks/BookmarksManager.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/Network/EricSchemeHandler.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/OpenSearch/OpenSearchManager.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/UserAgent/UserAgentMenu.py file | annotate | diff | comparison | revisions
eric6/WebBrowser/WebBrowserView.py file | annotate | diff | comparison | revisions
scripts/install.py file | annotate | diff | comparison | revisions
--- a/eric6/E5Network/E5TldExtractor.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/E5Network/E5TldExtractor.py	Thu Sep 24 19:51:19 2020 +0200
@@ -249,6 +249,7 @@
         @return default search paths for the TLD data file
         @rtype list of str
         """
+        # TODO: replace this with path to our data directory to remove .qrc
         return [":"]
     
     def getTldDownloadUrl(self):
@@ -433,6 +434,7 @@
         """
         return host.lower()
     
+    # TODO: remove this part and delete 'test_psl.txt'
     #################################################################
     ## Methods below are for testing purposes
     #################################################################
--- a/eric6/IconEditor/IconEditorGrid.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/IconEditor/IconEditorGrid.py	Thu Sep 24 19:51:19 2020 +0200
@@ -167,6 +167,7 @@
         
         self.__checkClipboard()
     
+    # TODO: change to get rid of .qrc
     def __initCursors(self):
         """
         Private method to initialize the various cursors.
--- a/eric6/IconEditor/cursors/cursors.qrc	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/IconEditor/cursors/cursors.qrc	Thu Sep 24 19:51:19 2020 +0200
@@ -3,7 +3,6 @@
 <qresource>
   <file>aim-cursor.xpm</file>
   <file>colorpicker-cursor.xpm</file>
-  <file>cursors.qrc</file>
   <file>eraser-cursor.xpm</file>
   <file>fill-cursor.xpm</file>
   <file>paintbrush-cursor.xpm</file>
--- a/eric6/UI/CodeDocumentationViewerTemplate.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/UI/CodeDocumentationViewerTemplate.py	Thu Sep 24 19:51:19 2020 +0200
@@ -15,6 +15,7 @@
 import Utilities
 
 
+# TODO: convert style sheet files to Python source file and embed style in mainTemplate.
 def prepareDocumentationViewerHtmlDocument(documentationInfo):
     """
     Public function to prepare the HTML document.
--- a/eric6/WebBrowser/Bookmarks/BookmarksManager.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/WebBrowser/Bookmarks/BookmarksManager.py	Thu Sep 24 19:51:19 2020 +0200
@@ -128,6 +128,7 @@
         
         bookmarkFile = self.getFileName()
         if not QFile.exists(bookmarkFile):
+            # TODO: convert this to not use .qrc
             from . import DefaultBookmarks_rc       # __IGNORE_WARNING__
             bookmarkFile = QFile(":/DefaultBookmarks.xbel")
             bookmarkFile.open(QIODevice.ReadOnly)
--- a/eric6/WebBrowser/Network/EricSchemeHandler.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/WebBrowser/Network/EricSchemeHandler.py	Thu Sep 24 19:51:19 2020 +0200
@@ -163,6 +163,7 @@
         message = self.tr(
             "Blocked by rule: <i>{0} ({1})</i>").format(rule, subscription)
         
+        # TODO: convert this to not use .qrc
         page = readAllFileContents(":/html/adblockPage.html")
         page = page.replace(
             "@FAVICON@", "qrc:icons/adBlockPlus16.png")
@@ -180,6 +181,7 @@
         @return built Start page
         @rtype str
         """
+        # TODO: convert this to not use .qrc
         page = readAllFileContents(":/html/startPage.html")
         page = page.replace("@FAVICON@", "qrc:icons/ericWeb16.png")
         page = page.replace("@IMAGE@", "qrc:icons/ericWeb32.png")
@@ -202,6 +204,7 @@
         
         @return prepared speeddial page (QByteArray)
         """
+        # TODO: convert this to not use .qrc
         if not self._speedDialPage:
             page = readAllFileContents(":/html/speeddialPage.html")
             page = page.replace("@FAVICON@", "qrc:icons/ericWeb16.png")
--- a/eric6/WebBrowser/OpenSearch/OpenSearchManager.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/WebBrowser/OpenSearch/OpenSearchManager.py	Thu Sep 24 19:51:19 2020 +0200
@@ -423,6 +423,7 @@
         """
         Public method to restore the default search engines.
         """
+        # TODO: convert this to not use .qrc
         from .OpenSearchReader import OpenSearchReader
         from .DefaultSearchEngines import DefaultSearchEngines_rc
         # __IGNORE_WARNING__
--- a/eric6/WebBrowser/UserAgent/UserAgentMenu.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/WebBrowser/UserAgent/UserAgentMenu.py	Thu Sep 24 19:51:19 2020 +0200
@@ -126,6 +126,7 @@
         
         @return flag indicating that a user agent entry is checked (boolean)
         """
+        # TODO: convert this to not use .qrc
         from . import UserAgentDefaults_rc              # __IGNORE_WARNING__
         defaultUserAgents = QFile(":/UserAgentDefaults.xml")
         defaultUserAgents.open(QIODevice.ReadOnly)
--- a/eric6/WebBrowser/WebBrowserView.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/eric6/WebBrowser/WebBrowserView.py	Thu Sep 24 19:51:19 2020 +0200
@@ -1771,6 +1771,7 @@
         self.page().deleteLater()
         self.__createNewPage()
         
+        # TODO: convert this to not use .qrc
         html = readAllFileContents(":/html/tabCrashPage.html")
         html = html.replace("@IMAGE@", pixmapToDataUrl(
             qApp.style().standardIcon(QStyle.SP_MessageBoxWarning).pixmap(
--- a/scripts/install.py	Thu Sep 24 19:47:55 2020 +0200
+++ b/scripts/install.py	Thu Sep 24 19:51:19 2020 +0200
@@ -748,6 +748,7 @@
                 shutilCopy(configName + 'c', modDir)
         
         # copy the various parts of eric6
+        # TODO: extend this to include more data file to get rid of .qrc
         copyTree(
             eric6SourceDir, cfg['ericDir'],
             ['*.py', '*.pyc', '*.pyo', '*.pyw'],

eric ide

mercurial