Removed the Qt4 runtime stuff. without_py2_and_pyqt4

Sun, 01 Sep 2019 19:40:53 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 01 Sep 2019 19:40:53 +0200
branch
without_py2_and_pyqt4
changeset 7198
684261ef2165
parent 7197
331569d44b19
child 7199
c71bd6f21748

Removed the Qt4 runtime stuff.

eric6.e4p file | annotate | diff | comparison | revisions
eric6/DataViews/CodeMetricsDialog.py file | annotate | diff | comparison | revisions
eric6/Debugger/BreakPointViewer.py file | annotate | diff | comparison | revisions
eric6/Debugger/WatchPointViewer.py file | annotate | diff | comparison | revisions
eric6/Documentation/Source/eric6.Toolbox.PyQt4ImportHook.html file | annotate | diff | comparison | revisions
eric6/E5Gui/E5ErrorMessage.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5LineEdit.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5MapWidget.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5ModelMenu.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5ModelToolBar.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5SideBar.py file | annotate | diff | comparison | revisions
eric6/E5Gui/E5TabWidget.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5GoogleMail.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5SslCertificateSelectionDialog.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5SslCertificatesDialog.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5SslCertificatesInfoWidget.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5SslErrorHandler.py file | annotate | diff | comparison | revisions
eric6/E5Network/E5SslInfoWidget.py file | annotate | diff | comparison | revisions
eric6/Globals/__init__.py file | annotate | diff | comparison | revisions
eric6/Graphics/PixmapDiagram.py file | annotate | diff | comparison | revisions
eric6/Graphics/SvgDiagram.py file | annotate | diff | comparison | revisions
eric6/Graphics/UMLGraphicsView.py file | annotate | diff | comparison | revisions
eric6/IconEditor/IconEditorWindow.py file | annotate | diff | comparison | revisions
eric6/Network/IRC/IrcMessageEdit.py file | annotate | diff | comparison | revisions
eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditEditor.py file | annotate | diff | comparison | revisions
eric6/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py file | annotate | diff | comparison | revisions
eric6/Plugins/WizardPlugins/InputDialogWizard/InputDialogWizardDialog.py file | annotate | diff | comparison | revisions
eric6/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py file | annotate | diff | comparison | revisions
eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py file | annotate | diff | comparison | revisions
eric6/Preferences/ConfigurationPages/EditorHighlightersPage.py file | annotate | diff | comparison | revisions
eric6/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py file | annotate | diff | comparison | revisions
eric6/Preferences/ConfigurationPages/QtPage.py file | annotate | diff | comparison | revisions
eric6/Preferences/ConfigurationPages/QtPage.ui file | annotate | diff | comparison | revisions
eric6/Preferences/ProgramsDialog.py file | annotate | diff | comparison | revisions
eric6/Preferences/__init__.py file | annotate | diff | comparison | revisions
eric6/Project/CreateDialogCodeDialog.py file | annotate | diff | comparison | revisions
eric6/Project/LexerAssociationDialog.py file | annotate | diff | comparison | revisions
eric6/Project/Project.py file | annotate | diff | comparison | revisions
eric6/Project/PropertiesDialog.py file | annotate | diff | comparison | revisions
eric6/Project/UicLoadUi.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Editor.py file | annotate | diff | comparison | revisions
eric6/QScintilla/Shell.py file | annotate | diff | comparison | revisions
eric6/Snapshot/SnapshotDefaultGrabber.py file | annotate | diff | comparison | revisions
eric6/Snapshot/SnapshotFreehandGrabber.py file | annotate | diff | comparison | revisions
eric6/Snapshot/SnapshotRegionGrabber.py file | annotate | diff | comparison | revisions
eric6/SqlBrowser/SqlConnectionWidget.py file | annotate | diff | comparison | revisions
eric6/Toolbox/PyQt4ImportHook.py file | annotate | diff | comparison | revisions
eric6/Toolbox/Startup.py file | annotate | diff | comparison | revisions
eric6/Tools/TrayStarter.py file | annotate | diff | comparison | revisions
eric6/Tools/UIPreviewer.py file | annotate | diff | comparison | revisions
eric6/UI/Browser.py file | annotate | diff | comparison | revisions
eric6/UI/EmailDialog.py file | annotate | diff | comparison | revisions
eric6/UI/NumbersWidget.py file | annotate | diff | comparison | revisions
eric6/UI/Previewers/PreviewerHTML.py file | annotate | diff | comparison | revisions
eric6/UI/Previewers/PreviewerQSS.py file | annotate | diff | comparison | revisions
eric6/UI/SymbolsWidget.py file | annotate | diff | comparison | revisions
eric6/UI/UserInterface.py file | annotate | diff | comparison | revisions
eric6/Utilities/__init__.py file | annotate | diff | comparison | revisions
eric6/eric6.py file | annotate | diff | comparison | revisions
eric6/eric6_api.py file | annotate | diff | comparison | revisions
eric6/eric6_browser.py file | annotate | diff | comparison | revisions
eric6/eric6_compare.py file | annotate | diff | comparison | revisions
eric6/eric6_configure.py file | annotate | diff | comparison | revisions
eric6/eric6_diff.py file | annotate | diff | comparison | revisions
eric6/eric6_doc.py file | annotate | diff | comparison | revisions
eric6/eric6_editor.py file | annotate | diff | comparison | revisions
eric6/eric6_hexeditor.py file | annotate | diff | comparison | revisions
eric6/eric6_iconeditor.py file | annotate | diff | comparison | revisions
eric6/eric6_plugininstall.py file | annotate | diff | comparison | revisions
eric6/eric6_pluginrepository.py file | annotate | diff | comparison | revisions
eric6/eric6_pluginuninstall.py file | annotate | diff | comparison | revisions
eric6/eric6_qregexp.py file | annotate | diff | comparison | revisions
eric6/eric6_qregularexpression.py file | annotate | diff | comparison | revisions
eric6/eric6_re.py file | annotate | diff | comparison | revisions
eric6/eric6_shell.py file | annotate | diff | comparison | revisions
eric6/eric6_snap.py file | annotate | diff | comparison | revisions
eric6/eric6_sqlbrowser.py file | annotate | diff | comparison | revisions
eric6/eric6_tray.py file | annotate | diff | comparison | revisions
eric6/eric6_trpreviewer.py file | annotate | diff | comparison | revisions
eric6/eric6_uipreviewer.py file | annotate | diff | comparison | revisions
eric6/eric6_unittest.py file | annotate | diff | comparison | revisions
scripts/compileUiFiles.py file | annotate | diff | comparison | revisions
--- a/eric6.e4p	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6.e4p	Sun Sep 01 19:40:53 2019 +0200
@@ -1163,7 +1163,6 @@
     <Source>eric6/ThirdParty/asttokens/asttokens/mark_tokens.py</Source>
     <Source>eric6/ThirdParty/asttokens/asttokens/util.py</Source>
     <Source>eric6/ThirdParty/enum/__init__.py</Source>
-    <Source>eric6/Toolbox/PyQt4ImportHook.py</Source>
     <Source>eric6/Toolbox/SingleApplication.py</Source>
     <Source>eric6/Toolbox/Startup.py</Source>
     <Source>eric6/Toolbox/__init__.py</Source>
--- a/eric6/DataViews/CodeMetricsDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/DataViews/CodeMetricsDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,7 +20,6 @@
 from . import CodeMetrics
 
 import Utilities
-from Globals import qVersionTuple
 
 
 class CodeMetricsDialog(QDialog, Ui_CodeMetricsDialog):
@@ -236,14 +235,8 @@
         self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
         self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
         
-        if qVersionTuple() >= (5, 0, 0):
-            self.resultList.header().setSectionResizeMode(
-                QHeaderView.Interactive)
-            self.summaryList.header().setSectionResizeMode(
-                QHeaderView.Interactive)
-        else:
-            self.resultList.header().setResizeMode(QHeaderView.Interactive)
-            self.summaryList.header().setResizeMode(QHeaderView.Interactive)
+        self.resultList.header().setSectionResizeMode(QHeaderView.Interactive)
+        self.summaryList.header().setSectionResizeMode(QHeaderView.Interactive)
         
     def on_buttonBox_clicked(self, button):
         """
--- a/eric6/Debugger/BreakPointViewer.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Debugger/BreakPointViewer.py	Sun Sep 01 19:40:53 2019 +0200
@@ -16,8 +16,7 @@
 
 from E5Gui.E5Application import e5App
 
-from Globals import qVersionTuple, recentNameBreakpointFiles, \
-    recentNameBreakpointConditions
+from Globals import recentNameBreakpointFiles, recentNameBreakpointConditions
 
 import Preferences
 
@@ -80,10 +79,7 @@
         header = self.header()
         header.setSortIndicator(0, Qt.AscendingOrder)
         header.setSortIndicatorShown(True)
-        if qVersionTuple() >= (5, 0, 0):
-            header.setSectionsClickable(True)
-        else:
-            header.setClickable(True)
+        header.setSectionsClickable(True)
         
         self.setSortingEnabled(True)
         
--- a/eric6/Debugger/WatchPointViewer.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Debugger/WatchPointViewer.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,7 +18,6 @@
 from E5Gui import E5MessageBox
 
 import Utilities
-from Globals import qVersionTuple
 
 
 class WatchPointViewer(QTreeView):
@@ -69,10 +68,7 @@
         header = self.header()
         header.setSortIndicator(0, Qt.AscendingOrder)
         header.setSortIndicatorShown(True)
-        if qVersionTuple() >= (5, 0, 0):
-            header.setSectionsClickable(True)
-        else:
-            header.setClickable(True)
+        header.setSectionsClickable(True)
         
         self.setSortingEnabled(True)
         
--- a/eric6/Documentation/Source/eric6.Toolbox.PyQt4ImportHook.html	Sun Sep 01 17:44:33 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-<!DOCTYPE html>
-<html><head>
-<title>eric6.Toolbox.PyQt4ImportHook</title>
-<meta charset="UTF-8">
-<style>
-body {
-    background: #EDECE6;
-    margin: 0em 1em 10em 1em;
-    color: black;
-}
-
-h1 { color: white; background: #85774A; }
-h2 { color: white; background: #85774A; }
-h3 { color: white; background: #9D936E; }
-h4 { color: white; background: #9D936E; }
-    
-a { color: #BA6D36; }
-
-</style>
-</head>
-<body><a NAME="top" ID="top"></a>
-<h1>eric6.Toolbox.PyQt4ImportHook</h1>
-<p>
-Module implementing an import hook converting PyQt5 imports to PyQt4 imports.
-</p>
-<h3>Global Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Classes</h3>
-<table>
-<tr>
-<td><a href="#PyQt4Importer">PyQt4Importer</a></td>
-<td>Class implementing an importer converting PyQt5 imports to PyQt4 imports.</td>
-</tr>
-</table>
-<h3>Functions</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<hr /><hr />
-<a NAME="PyQt4Importer" ID="PyQt4Importer"></a>
-<h2>PyQt4Importer</h2>
-<p>
-    Class implementing an importer converting PyQt5 imports to PyQt4
-    imports.
-</p>
-<h3>Derived from</h3>
-object
-<h3>Class Attributes</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Class Methods</h3>
-<table>
-<tr><td>None</td></tr>
-</table>
-<h3>Methods</h3>
-<table>
-<tr>
-<td><a href="#PyQt4Importer.__init__">PyQt4Importer</a></td>
-<td>Constructor</td>
-</tr><tr>
-<td><a href="#PyQt4Importer.find_module">find_module</a></td>
-<td>Public method returning the module loader.</td>
-</tr><tr>
-<td><a href="#PyQt4Importer.load_module">load_module</a></td>
-<td>Public method to load a module.</td>
-</tr>
-</table>
-<h3>Static Methods</h3>
-<table>
-<tr>
-<td><a href="#PyQt4Importer.QComboBox_currentData">QComboBox_currentData</a></td>
-<td>Static method to emulate the currentData method of Qt5.</td>
-</tr>
-</table>
-<a NAME="PyQt4Importer.__init__" ID="PyQt4Importer.__init__"></a>
-<h4>PyQt4Importer (Constructor)</h4>
-<b>PyQt4Importer</b>(<i></i>)
-<p>
-        Constructor
-</p><a NAME="PyQt4Importer.find_module" ID="PyQt4Importer.find_module"></a>
-<h4>PyQt4Importer.find_module</h4>
-<b>find_module</b>(<i>fullname, path=None</i>)
-<p>
-        Public method returning the module loader.
-</p><dl>
-<dt><i>fullname</i></dt>
-<dd>
-name of the module to be loaded (string)
-</dd><dt><i>path</i></dt>
-<dd>
-path to resolve the module name (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-module loader object
-</dd>
-</dl><a NAME="PyQt4Importer.load_module" ID="PyQt4Importer.load_module"></a>
-<h4>PyQt4Importer.load_module</h4>
-<b>load_module</b>(<i>fullname</i>)
-<p>
-        Public method to load a module.
-</p><dl>
-<dt><i>fullname</i></dt>
-<dd>
-name of the module to be loaded (string)
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-reference to the loaded module (module)
-</dd>
-</dl><a NAME="PyQt4Importer.QComboBox_currentData" ID="PyQt4Importer.QComboBox_currentData"></a>
-<h4>PyQt4Importer.QComboBox_currentData (static)</h4>
-<b>QComboBox_currentData</b>(<i>role=None</i>)
-<p>
-        Static method to emulate the currentData method of Qt5.
-</p><dl>
-<dt><i>other</i> (QComboBox)</dt>
-<dd>
-reference to the combo box to get the user data of
-</dd><dt><i>role</i> (int)</dt>
-<dd>
-role of which data should be retrieved
-</dd>
-</dl><dl>
-<dt>Returns:</dt>
-<dd>
-stored data at current selection
-</dd>
-</dl><dl>
-<dt>Return Type:</dt>
-<dd>
-any
-</dd>
-</dl>
-<div align="right"><a href="#top">Up</a></div>
-<hr />
-</body></html>
\ No newline at end of file
--- a/eric6/E5Gui/E5ErrorMessage.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5ErrorMessage.py	Sun Sep 01 19:40:53 2019 +0200
@@ -98,21 +98,17 @@
             _filterSettings.setValue("MessageFilters", filters)
 
 
-def messageHandler(msgType, *args):
+def messageHandler(msgType, context, message):
     """
     Module function handling messages.
     
     @param msgType type of the message
     @type  int, QtMsgType
-    @param args message handler arguments, for PyQt4 message to be shown, for
-        PyQt5 context information and message to be shown
-    @type PyQt4: bytes; PyQt5: tuple of (QMessageLogContext, bytes)
+    @param context context information
+    @type QMessageLogContext
+    @param message message to be shown
+    @type bytes
     """
-    if len(args) == 2:
-        context = args[0]
-        message = args[1]
-    else:
-        message = args[0]
     if _msgHandlerDialog:
         try:
             if msgType == QtDebugMsg:
@@ -130,7 +126,7 @@
             message = message.replace("\r\n", "<br/>")\
                              .replace("\n", "<br/>")\
                              .replace("\r", "<br/>")
-            if len(args) == 2 and context.file is not None:
+            if context.file is not None:
                 msg = "<p><b>{0}</b></p><p>{1}</p><p>File: {2}</p>" \
                     "<p>Line: {3}</p><p>Function: {4}</p>".format(
                         messageType, Utilities.html_uencode(message),
@@ -163,12 +159,9 @@
         messageType = "Fatal Error"
     if isinstance(message, bytes):
         message = message.decode()
-    if len(args) == 2:
-        print("{0}: {1} in {2} at line {3} ({4})".format(
-            messageType, message, context.file, context.line,
-            context.function))
-    else:
-        print("{0}: {1}".format(messageType, message))
+    print("{0}: {1} in {2} at line {3} ({4})".format(
+        messageType, message, context.file, context.line,
+        context.function))
 
 
 def qtHandler():
--- a/eric6/E5Gui/E5LineEdit.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5LineEdit.py	Sun Sep 01 19:40:53 2019 +0200
@@ -10,16 +10,8 @@
 from __future__ import unicode_literals
 
 from PyQt5.QtCore import pyqtSignal, Qt, QEvent
-from PyQt5.QtGui import QPainter, QPalette
-from PyQt5.QtWidgets import QLineEdit, QStyle, QWidget, QHBoxLayout, \
-    QBoxLayout, QLayout, QApplication, QSpacerItem, QSizePolicy
-
-from Globals import qVersionTuple
-
-if qVersionTuple() >= (5, 0, 0):
-    from PyQt5.QtWidgets import QStyleOptionFrame
-else:
-    from PyQt5.QtWidgets import QStyleOptionFrameV2 as QStyleOptionFrame
+from PyQt5.QtWidgets import QLineEdit, QWidget, QHBoxLayout, QBoxLayout, \
+    QLayout, QApplication, QSpacerItem, QSizePolicy
 
 import UI.PixmapCache
 
@@ -70,10 +62,7 @@
         
         self.setMinimumHeight(22)
         
-        if qVersionTuple() < (4, 7, 0):
-            self.__inactiveText = inactiveText
-        else:
-            self.setPlaceholderText(inactiveText)
+        self.setPlaceholderText(inactiveText)
         
         self.__mainLayout = QHBoxLayout(self)
         self.__mainLayout.setContentsMargins(0, 0, 0, 0)
@@ -149,33 +138,6 @@
                 self.__rightLayout.setDirection(QBoxLayout.LeftToRight)
         return QLineEdit.event(self, evt)
     
-    def paintEvent(self, evt):
-        """
-        Protected method handling a paint event.
-        
-        @param evt reference to the paint event (QPaintEvent)
-        """
-        super(E5LineEdit, self).paintEvent(evt)
-        
-        if qVersionTuple() < (4, 7, 0):
-            if not self.text() and \
-               self.__inactiveText and \
-               not self.hasFocus():
-                panel = QStyleOptionFrame()
-                self.initStyleOption(panel)
-                textRect = self.style().subElementRect(
-                    QStyle.SE_LineEditContents, panel, self)
-                textRect.adjust(2, 0, 0, 0)
-                left = self.textMargin(self.LeftSide)
-                right = self.textMargin(self.RightSide)
-                textRect.adjust(left, 0, -right, 0)
-                painter = QPainter(self)
-                painter.setPen(self.palette().brush(
-                    QPalette.Disabled, QPalette.Text).color())
-                painter.drawText(
-                    textRect, Qt.AlignLeft | Qt.AlignVCenter,
-                    self.__inactiveText)
-    
     def _updateTextMargins(self):
         """
         Protected slot to update the text margins.
@@ -265,10 +227,7 @@
         
         @return inactive text (string)
         """
-        if qVersionTuple() < (4, 7, 0):
-            return self.__inactiveText
-        else:
-            return self.placeholderText()
+        return self.placeholderText()
     
     def setInactiveText(self, inactiveText):
         """
@@ -276,11 +235,7 @@
         
         @param inactiveText text to be shown on inactivity (string)
         """
-        if qVersionTuple() < (4, 7, 0):
-            self.__inactiveText = inactiveText
-            self.update()
-        else:
-            self.setPlaceholderText(inactiveText)
+        self.setPlaceholderText(inactiveText)
 
 
 class E5ClearableLineEdit(E5LineEdit):
--- a/eric6/E5Gui/E5MapWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5MapWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -13,8 +13,6 @@
 from PyQt5.QtGui import QColor, QBrush, QPainter
 from PyQt5.QtWidgets import QWidget, QAbstractScrollArea
 
-from Globals import qVersionTuple
-
 
 class E5MapWidget(QWidget):
     """
@@ -251,10 +249,7 @@
         
         @param event reference to the wheel event (QWheelEvent)
         """
-        if qVersionTuple() >= (5, 0, 0):
-            isVertical = event.angleDelta().x() == 0
-        else:
-            isVertical = event.orientation() == Qt.Vertical
+        isVertical = event.angleDelta().x() == 0
         if self._master and \
             event.modifiers() == Qt.NoModifier and \
                 isVertical:
--- a/eric6/E5Gui/E5ModelMenu.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5ModelMenu.py	Sun Sep 01 19:40:53 2019 +0200
@@ -10,11 +10,10 @@
 from __future__ import unicode_literals
 
 from PyQt5.QtCore import pyqtSignal, Qt, QModelIndex, QPoint
-from PyQt5.QtGui import QFontMetrics, QDrag, QPixmap
+from PyQt5.QtGui import QFontMetrics, QDrag
 from PyQt5.QtWidgets import QMenu, QAction, QApplication
 
 import UI.PixmapCache
-from Globals import qVersionTuple
 
 
 class E5ModelMenu(QMenu):
@@ -393,10 +392,7 @@
         drag = QDrag(self)
         drag.setMimeData(self.__model.mimeData([idx]))
         actionRect = self.actionGeometry(act)
-        if qVersionTuple() >= (5, 0, 0):
-            drag.setPixmap(self.grab(actionRect))
-        else:
-            drag.setPixmap(QPixmap.grabWidget(self, actionRect))
+        drag.setPixmap(self.grab(actionRect))
         
         if drag.exec_() == Qt.MoveAction:
             row = idx.row()
--- a/eric6/E5Gui/E5ModelToolBar.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5ModelToolBar.py	Sun Sep 01 19:40:53 2019 +0200
@@ -10,11 +10,9 @@
 from __future__ import unicode_literals
 
 from PyQt5.QtCore import pyqtSignal, Qt, QModelIndex, QPoint, QEvent
-from PyQt5.QtGui import QDrag, QPixmap, QIcon
+from PyQt5.QtGui import QDrag, QIcon
 from PyQt5.QtWidgets import QApplication, QToolBar, QToolButton
 
-from Globals import qVersionTuple
-
 
 class E5ModelToolBar(QToolBar):
     """
@@ -253,10 +251,7 @@
         drag = QDrag(self)
         drag.setMimeData(self.__model.mimeData([idx]))
         actionRect = self.actionGeometry(act)
-        if qVersionTuple() >= (5, 0, 0):
-            drag.setPixmap(self.grab(actionRect))
-        else:
-            drag.setPixmap(QPixmap.grabWidget(self, actionRect))
+        drag.setPixmap(self.grab(actionRect))
         
         if drag.exec_() == Qt.MoveAction:
             row = idx.row()
--- a/eric6/E5Gui/E5SideBar.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5SideBar.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,7 +17,6 @@
 from E5Gui.E5Application import e5App
 
 import UI.PixmapCache
-from Globals import qVersionTuple
 
 
 class E5SideBar(QWidget):
@@ -255,10 +254,7 @@
                 elif self.isMinimized():
                     self.expand()
             elif evt.type() == QEvent.Wheel:
-                if qVersionTuple() >= (5, 0, 0):
-                    delta = evt.angleDelta().y()
-                else:
-                    delta = evt.delta()
+                delta = evt.angleDelta().y()
                 if delta > 0:
                     self.prevTab()
                 else:
--- a/eric6/E5Gui/E5TabWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Gui/E5TabWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -13,8 +13,6 @@
 from PyQt5.QtGui import QDrag, QMovie
 from PyQt5.QtWidgets import QTabWidget, QTabBar, QApplication, QStyle, QLabel
 
-from Globals import qVersionTuple
-
 
 class E5WheelTabBar(QTabBar):
     """
@@ -37,10 +35,7 @@
         @param event reference to the wheel event (QWheelEvent)
         """
         try:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = event.angleDelta().y()
-            else:
-                delta = event.delta()
+            delta = event.angleDelta().y()
             if delta > 0:
                 self._tabWidget.prevTab()
             elif delta < 0:
--- a/eric6/E5Network/E5GoogleMail.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5GoogleMail.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,7 +18,7 @@
 from google.oauth2.credentials import Credentials
 from requests_oauthlib import OAuth2Session
 
-from PyQt5.QtCore import pyqtSlot, pyqtSignal, QObject, QUrl
+from PyQt5.QtCore import pyqtSlot, pyqtSignal, QObject, QUrl, QUrlQuery
 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout
 
 from E5Gui.E5TextInputDialog import E5TextInputDialog
@@ -80,14 +80,9 @@
         url = self.__browser.url()
         if url.toString().startswith(
                 "https://accounts.google.com/o/oauth2/approval/v2"):
-            if Globals.qVersionTuple() >= (5, 0, 0):
-                from PyQt5.QtCore import QUrlQuery
-                urlQuery = QUrlQuery(url)
-                approvalCode = urlQuery.queryItemValue(
-                    "approvalCode", QUrl.FullyDecoded)
-            else:
-                approvalCode = QUrl.fromPercentEncoding(
-                    url.encodedQueryItemValue(b"approvalCode"))
+            urlQuery = QUrlQuery(url)
+            approvalCode = urlQuery.queryItemValue(
+                "approvalCode", QUrl.FullyDecoded)
             if approvalCode:
                 self.approvalCodeReceived.emit(approvalCode)
                 self.close()
--- a/eric6/E5Network/E5SslCertificateSelectionDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5SslCertificateSelectionDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -21,7 +21,6 @@
 
 import Utilities
 import UI.PixmapCache
-from Globals import qVersionTuple
 
 
 class E5SslCertificateSelectionDialog(QDialog,
@@ -74,16 +73,10 @@
         @type QSslCertificate
         """
         # step 1: extract the info to be shown
-        if qVersionTuple() >= (5, 0, 0):
-            organisation = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
-            commonName = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
-        else:
-            organisation = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.Organization))
-            commonName = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.CommonName))
+        organisation = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
+        commonName = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
         if organisation is None or organisation == "":
             organisation = self.tr("(Unknown)")
         if commonName is None or commonName == "":
--- a/eric6/E5Network/E5SslCertificatesDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5SslCertificatesDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -26,7 +26,6 @@
 import Utilities
 import UI.PixmapCache
 import Globals
-from Globals import qVersionTuple
 
 
 class E5SslCertificatesDialog(QDialog, Ui_E5SslCertificatesDialog):
@@ -87,16 +86,10 @@
         @param cert certificate to insert (QSslCertificate)
         """
         # step 1: extract the info to be shown
-        if qVersionTuple() >= (5, 0, 0):
-            organisation = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
-            commonName = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
-        else:
-            organisation = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.Organization))
-            commonName = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.CommonName))
+        organisation = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
+        commonName = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
         if organisation is None or organisation == "":
             organisation = self.tr("(Unknown)")
         if commonName is None or commonName == "":
@@ -216,12 +209,8 @@
             pems = QByteArray()
             for cert in certs:
                 if cert in sCerts:
-                    if qVersionTuple() >= (5, 0, 0):
-                        commonStr = ", ".join(
-                            cert.subjectInfo(QSslCertificate.CommonName))
-                    else:
-                        commonStr = cert.subjectInfo(
-                            QSslCertificate.CommonName)
+                    commonStr = ", ".join(
+                        cert.subjectInfo(QSslCertificate.CommonName))
                     E5MessageBox.warning(
                         self,
                         self.tr("Import Certificate"),
@@ -300,16 +289,10 @@
         @param cert certificate to insert (QSslCertificate)
         """
         # step 1: extract the info to be shown
-        if qVersionTuple() >= (5, 0, 0):
-            organisation = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
-            commonName = Utilities.decodeString(
-                ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
-        else:
-            organisation = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.Organization))
-            commonName = Utilities.decodeString(
-                cert.subjectInfo(QSslCertificate.CommonName))
+        organisation = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.Organization)))
+        commonName = Utilities.decodeString(
+            ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))
         if organisation is None or organisation == "":
             organisation = self.tr("(Unknown)")
         if commonName is None or commonName == "":
@@ -407,12 +390,8 @@
             caCerts = self.__getSystemCaCertificates()
             for cert in certs:
                 if cert in caCerts:
-                    if qVersionTuple() >= (5, 0, 0):
-                        commonStr = ", ".join(
-                            cert.subjectInfo(QSslCertificate.CommonName))
-                    else:
-                        commonStr = cert.subjectInfo(
-                            QSslCertificate.CommonName)
+                    commonStr = ", ".join(
+                        cert.subjectInfo(QSslCertificate.CommonName))
                     E5MessageBox.warning(
                         self,
                         self.tr("Import Certificate"),
--- a/eric6/E5Network/E5SslCertificatesInfoWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5SslCertificatesInfoWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -16,7 +16,6 @@
 from .Ui_E5SslCertificatesInfoWidget import Ui_E5SslCertificatesInfoWidget
 
 import Utilities
-from Globals import qVersionTuple
 
 
 class E5SslCertificatesInfoWidget(QWidget, Ui_E5SslCertificatesInfoWidget):
@@ -48,16 +47,10 @@
         self.__chain = certificateChain[:]
         
         for cert in self.__chain:
-            if qVersionTuple() >= (5, 0, 0):
-                name = ", ".join(cert.subjectInfo(QSslCertificate.CommonName))
-            else:
-                name = cert.subjectInfo(QSslCertificate.CommonName)
+            name = ", ".join(cert.subjectInfo(QSslCertificate.CommonName))
             if not name:
-                if qVersionTuple() >= (5, 0, 0):
-                    name = ", ".join(
-                        cert.subjectInfo(QSslCertificate.Organization))
-                else:
-                    name = cert.subjectInfo(QSslCertificate.Organization)
+                name = ", ".join(
+                    cert.subjectInfo(QSslCertificate.Organization))
             if not name:
                 name = cert.serialNumber()
             self.chainComboBox.addItem(name)
@@ -91,41 +84,25 @@
         self.expiredLabel.setStyleSheet(
             "QLabel { color : white; background-color : red; }")
         
-        if qVersionTuple() >= (5, 0, 0):
-            self.subjectCommonNameLabel.setText(self.__certificateString(
-                ", ".join(certificate.subjectInfo(
-                    QSslCertificate.CommonName))))
-            self.subjectOrganizationLabel.setText(self.__certificateString(
-                ", ".join(certificate.subjectInfo(
-                    QSslCertificate.Organization))))
-            self.subjectOrganizationalUnitLabel.setText(
-                self.__certificateString(", ".join(
-                    certificate.subjectInfo(
-                        QSslCertificate.OrganizationalUnitName))))
-            self.issuerCommonNameLabel.setText(self.__certificateString(
-                ", ".join(certificate.issuerInfo(QSslCertificate.CommonName))))
-            self.issuerOrganizationLabel.setText(self.__certificateString(
-                ", ".join(certificate.issuerInfo(
-                    QSslCertificate.Organization))))
-            self.issuerOrganizationalUnitLabel.setText(
-                self.__certificateString(", ".join(
-                    certificate.issuerInfo(
-                        QSslCertificate.OrganizationalUnitName))))
-        else:
-            self.subjectCommonNameLabel.setText(self.__certificateString(
-                certificate.subjectInfo(QSslCertificate.CommonName)))
-            self.subjectOrganizationLabel.setText(self.__certificateString(
-                certificate.subjectInfo(QSslCertificate.Organization)))
-            self.subjectOrganizationalUnitLabel.setText(
-                self.__certificateString(certificate.subjectInfo(
-                    QSslCertificate.OrganizationalUnitName)))
-            self.issuerCommonNameLabel.setText(self.__certificateString(
-                certificate.issuerInfo(QSslCertificate.CommonName)))
-            self.issuerOrganizationLabel.setText(self.__certificateString(
-                certificate.issuerInfo(QSslCertificate.Organization)))
-            self.issuerOrganizationalUnitLabel.setText(
-                self.__certificateString(certificate.issuerInfo(
-                    QSslCertificate.OrganizationalUnitName)))
+        self.subjectCommonNameLabel.setText(self.__certificateString(
+            ", ".join(certificate.subjectInfo(
+                QSslCertificate.CommonName))))
+        self.subjectOrganizationLabel.setText(self.__certificateString(
+            ", ".join(certificate.subjectInfo(
+                QSslCertificate.Organization))))
+        self.subjectOrganizationalUnitLabel.setText(
+            self.__certificateString(", ".join(
+                certificate.subjectInfo(
+                    QSslCertificate.OrganizationalUnitName))))
+        self.issuerCommonNameLabel.setText(self.__certificateString(
+            ", ".join(certificate.issuerInfo(QSslCertificate.CommonName))))
+        self.issuerOrganizationLabel.setText(self.__certificateString(
+            ", ".join(certificate.issuerInfo(
+                QSslCertificate.Organization))))
+        self.issuerOrganizationalUnitLabel.setText(
+            self.__certificateString(", ".join(
+                certificate.issuerInfo(
+                    QSslCertificate.OrganizationalUnitName))))
         self.serialNumberLabel.setText(self.__serialNumber(certificate))
         self.effectiveLabel.setText(
             certificate.effectiveDate().toString("yyyy-MM-dd"))
@@ -138,8 +115,7 @@
             str(certificate.digest(QCryptographicHash.Md5).toHex(),
                 encoding="ascii")))
         
-        if (qVersionTuple() >= (5, 0, 0) and certificate.isBlacklisted()) or \
-           (qVersionTuple() < (5, 0, 0) and not certificate.isValid()):
+        if certificate.isBlacklisted():
             # something is wrong; indicate it to the user
             if self.__hasExpired(certificate.effectiveDate(),
                                  certificate.expiryDate()):
--- a/eric6/E5Network/E5SslErrorHandler.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5SslErrorHandler.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,7 +20,6 @@
 import Preferences
 import Utilities
 import Globals
-from Globals import qVersionTuple
 
 
 class E5SslErrorHandler(QObject):
@@ -209,32 +208,18 @@
         """
         result = "<p>"
         
-        if qVersionTuple() >= (5, 0, 0):
-            result += self.tr("Name: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))))
-            
-            result += self.tr("<br/>Organization: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    ", ".join(cert.subjectInfo(
-                        QSslCertificate.Organization)))))
-            
-            result += self.tr("<br/>Issuer: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    ", ".join(cert.issuerInfo(QSslCertificate.CommonName)))))
-        else:
-            result += self.tr("Name: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    cert.subjectInfo(QSslCertificate.CommonName))))
-            
-            result += self.tr("<br/>Organization: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    cert.subjectInfo(QSslCertificate.Organization))))
-            
-            result += self.tr("<br/>Issuer: {0}")\
-                .format(Utilities.html_encode(Utilities.decodeString(
-                    cert.issuerInfo(QSslCertificate.CommonName))))
+        result += self.tr("Name: {0}")\
+            .format(Utilities.html_encode(Utilities.decodeString(
+                ", ".join(cert.subjectInfo(QSslCertificate.CommonName)))))
         
+        result += self.tr("<br/>Organization: {0}")\
+            .format(Utilities.html_encode(Utilities.decodeString(
+                ", ".join(cert.subjectInfo(
+                    QSslCertificate.Organization)))))
+        
+        result += self.tr("<br/>Issuer: {0}")\
+            .format(Utilities.html_encode(Utilities.decodeString(
+                ", ".join(cert.issuerInfo(QSslCertificate.CommonName)))))
         result += self.tr(
             "<br/>Not valid before: {0}<br/>Valid Until: {1}")\
             .format(Utilities.html_encode(
--- a/eric6/E5Network/E5SslInfoWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/E5Network/E5SslInfoWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -15,7 +15,6 @@
 
 import UI.PixmapCache
 import Utilities
-from Globals import qVersionTuple
 
 
 class E5SslInfoWidget(QMenu):
@@ -69,16 +68,10 @@
                 "Warning: this site is NOT carrying a certificate."))
             imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png"))
         else:
-            if qVersionTuple() >= (5, 0, 0):
-                valid = not cert.isBlacklisted()
-            else:
-                valid = cert.isValid()
+            valid = not cert.isBlacklisted()
             if valid:
-                if qVersionTuple() >= (5, 0, 0):
-                    txt = ", ".join(
-                        cert.issuerInfo(QSslCertificate.CommonName))
-                else:
-                    txt = cert.issuerInfo(QSslCertificate.CommonName)
+                txt = ", ".join(
+                    cert.issuerInfo(QSslCertificate.CommonName))
                 label.setText(self.tr(
                     "The certificate for this site is valid"
                     " and has been verified by:\n{0}").format(
@@ -152,24 +145,26 @@
                 sslVersion = self.tr("unknown")
                 imageLabel.setPixmap(
                     UI.PixmapCache.getPixmap("securityLow32.png"))
-            if qVersionTuple() >= (5, 0, 0):
-                if proto == QSsl.TlsV1_0:
-                    sslVersion = "TLS 1.0"
-                    imageLabel.setPixmap(
-                        UI.PixmapCache.getPixmap("securityHigh32.png"))
-                elif proto == QSsl.TlsV1_1:
-                    sslVersion = "TLS 1.1"
-                    imageLabel.setPixmap(
-                        UI.PixmapCache.getPixmap("securityHigh32.png"))
-                elif proto == QSsl.TlsV1_2:
+            if proto == QSsl.TlsV1_0:
+                sslVersion = "TLS 1.0"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
+            elif proto == QSsl.TlsV1_1:
+                sslVersion = "TLS 1.1"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
+            elif proto == QSsl.TlsV1_2:
+                sslVersion = "TLS 1.2"
+                imageLabel.setPixmap(
+                    UI.PixmapCache.getPixmap("securityHigh32.png"))
+            try:
+                # Qt 5.12 and newer
+                if proto == QSsl.TlsV1_2:
                     sslVersion = "TLS 1.2"
                     imageLabel.setPixmap(
                         UI.PixmapCache.getPixmap("securityHigh32.png"))
-            else:
-                if proto == QSsl.TlsV1:
-                    sslVersion = "TLS 1.0"
-                    imageLabel.setPixmap(
-                        UI.PixmapCache.getPixmap("securityHigh32.png"))
+            except AttributeError:
+                pass
             rows += 1
             
             label = QLabel(self)
--- a/eric6/Globals/__init__.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Globals/__init__.py	Sun Sep 01 19:40:53 2019 +0200
@@ -232,15 +232,15 @@
 
 def getPyQt5ModulesDirectory():
     """
-    Function to determine the path to PyQt5's (or PyQt4's) modules directory.
+    Function to determine the path to PyQt5 modules directory.
     
-    @return path to the PyQt5/PyQt4 modules directory (string)
+    @return path to the PyQt5 modules directory (string)
     """
     import distutils.sysconfig
-    for pyqt in ["PyQt5", "PyQt4"]:
-        pyqtPath = os.path.join(distutils.sysconfig.get_python_lib(True), pyqt)
-        if os.path.exists(pyqtPath):
-            return pyqtPath
+    
+    pyqtPath = os.path.join(distutils.sysconfig.get_python_lib(True), "PyQt5")
+    if os.path.exists(pyqtPath):
+        return pyqtPath
     
     return ""
     
--- a/eric6/Graphics/PixmapDiagram.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Graphics/PixmapDiagram.py	Sun Sep 01 19:40:53 2019 +0200
@@ -22,7 +22,6 @@
 import UI.Config
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class PixmapDiagram(E5MainWindow):
@@ -188,10 +187,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = evt.angleDelta().y()
-            else:
-                delta = evt.delta()
+            delta = evt.angleDelta().y()
             if delta < 0:
                 self.__zoomOut()
             elif delta > 0:
--- a/eric6/Graphics/SvgDiagram.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Graphics/SvgDiagram.py	Sun Sep 01 19:40:53 2019 +0200
@@ -21,7 +21,6 @@
 import UI.Config
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class SvgDiagram(E5MainWindow):
@@ -158,10 +157,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = evt.angleDelta().y()
-            else:
-                delta = evt.delta()
+            delta = evt.angleDelta().y()
             if delta < 0:
                 self.__zoomOut()
             elif delta > 0:
--- a/eric6/Graphics/UMLGraphicsView.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Graphics/UMLGraphicsView.py	Sun Sep 01 19:40:53 2019 +0200
@@ -25,7 +25,6 @@
 import UI.PixmapCache
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class UMLGraphicsView(E5GraphicsView):
@@ -602,10 +601,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = evt.angleDelta().y()
-            else:
-                delta = evt.delta()
+            delta = evt.angleDelta().y()
             if delta < 0:
                 self.zoomOut()
             elif delta > 0:
--- a/eric6/IconEditor/IconEditorWindow.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/IconEditor/IconEditorWindow.py	Sun Sep 01 19:40:53 2019 +0200
@@ -28,7 +28,6 @@
 import UI.Config
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class IconEditorWindow(E5MainWindow):
@@ -1353,10 +1352,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = evt.angleDelta().y()
-            else:
-                delta = evt.delta()
+            delta = evt.angleDelta().y()
             if delta < 0:
                 self.__zoomOut()
             elif delta > 0:
--- a/eric6/Network/IRC/IrcMessageEdit.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Network/IRC/IrcMessageEdit.py	Sun Sep 01 19:40:53 2019 +0200
@@ -13,8 +13,6 @@
 
 from E5Gui.E5LineEdit import E5LineEdit, E5ClearableLineEdit
 
-from Globals import qVersionTuple
-
 
 class IrcMessageEdit(E5ClearableLineEdit):
     """
@@ -77,10 +75,7 @@
         
         @param evt reference to the wheel event (QWheelEvent)
         """
-        if qVersionTuple() >= (5, 0, 0):
-            delta = evt.angleDelta().y()
-        else:
-            delta = evt.delta()
+        delta = evt.angleDelta().y()
         if delta > 0:
             self.__getHistory(True)
         elif delta < 0:
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditEditor.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditEditor.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,8 +20,6 @@
     os.path.dirname(__file__), "..", "..", "..", ".."))
 # four times up is the eric6 package directory
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -22,6 +22,7 @@
 import Globals
 
 
+# TODO: adjust this to Qt5 QFileDialog and Eric E5FileDialog
 class FileDialogWizardDialog(QDialog, Ui_FileDialogWizardDialog):
     """
     Class implementing the color dialog wizard dialog.
--- a/eric6/Plugins/WizardPlugins/InputDialogWizard/InputDialogWizardDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/InputDialogWizard/InputDialogWizardDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -117,7 +117,7 @@
         
     def getCode(self, indLevel, indString):
         """
-        Public method to get the source code for Qt4/Qt5.
+        Public method to get the source code for Qt5.
         
         @param indLevel indentation level (int)
         @param indString string used for indentation (space or tab) (string)
--- a/eric6/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -103,9 +103,9 @@
         self.bTest = self.buttonBox.addButton(
             self.tr("Test"), QDialogButtonBox.ActionRole)
     
-    def __testQt42(self):
+    def __testSelectedOptions(self):
         """
-        Private method to test the selected options for Qt 4.2.0.
+        Private method to test the selected options.
         """
         buttons = QMessageBox.NoButton
         if self.abortCheck.isChecked():
@@ -209,7 +209,7 @@
                 self.eCaption.text()
             )
         else:
-            self.__testQt42()
+            self.__testSelectedOptions()
     
     def __enabledGroups(self):
         """
--- a/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -25,7 +25,6 @@
 
 import Utilities
 import Preferences
-from Globals import qVersionTuple
 
 
 class QRegExpWizardWidget(QWidget, Ui_QRegExpWizardWidget):
@@ -82,8 +81,7 @@
         self.syntaxCombo.addItem("Unix Wildcard", QRegExp.WildcardUnix)
         self.syntaxCombo.addItem("Fixed String", QRegExp.FixedString)
         self.syntaxCombo.addItem("W3C XML Schema 1.1", QRegExp.W3CXmlSchema11)
-        if qVersionTuple() >= (5, 0, 0):
-            self.syntaxCombo.setCurrentIndex(1)
+        self.syntaxCombo.setCurrentIndex(1)
         
         self.saveButton = self.buttonBox.addButton(
             self.tr("Save"), QDialogButtonBox.ActionRole)
@@ -647,8 +645,7 @@
                 istring, reVar, os.linesep)
         syntax = self.syntaxCombo.itemData(self.syntaxCombo.currentIndex())
         needPatternSyntax = True
-        if qVersionTuple() < (5, 0, 0) and syntax == QRegExp.RegExp or \
-           qVersionTuple() >= (5, 0, 0) and syntax == QRegExp.RegExp2:
+        if syntax == QRegExp.RegExp2:
             # default value selected
             needPatternSyntax = False
         if needPatternSyntax:
--- a/eric6/Preferences/ConfigurationPages/EditorHighlightersPage.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/EditorHighlightersPage.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,7 +20,6 @@
 from .Ui_EditorHighlightersPage import Ui_EditorHighlightersPage
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class EditorHighlightersPage(ConfigurationPageBase, Ui_EditorHighlightersPage):
@@ -40,10 +39,7 @@
         self.editorLexerList.headerItem().setText(
             self.editorLexerList.columnCount(), "")
         header = self.editorLexerList.header()
-        if qVersionTuple() >= (5, 0, 0):
-            header.setSectionResizeMode(QHeaderView.ResizeToContents)
-        else:
-            header.setResizeMode(QHeaderView.ResizeToContents)
+        header.setSectionResizeMode(QHeaderView.ResizeToContents)
         header.setSortIndicator(0, Qt.AscendingOrder)
         
         try:
--- a/eric6/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,8 +20,6 @@
 
 from E5Gui import E5MessageBox, E5FileDialog
 
-from Globals import qVersionTuple
-
 import UI.PixmapCache
 
 try:
@@ -60,10 +58,6 @@
         self.editSubstyleButton.setIcon(UI.PixmapCache.getIcon("edit"))
         self.copySubstyleButton.setIcon(UI.PixmapCache.getIcon("editCopy"))
         
-        if qVersionTuple() < (5, 0, 0):
-            self.monospacedButton.setChecked(False)
-            self.monospacedButton.hide()
-        
         self.__fontButtonMenu = QMenu()
         act = self.__fontButtonMenu.addAction(self.tr("Font"))
         act.setData(self.FONT)
--- a/eric6/Preferences/ConfigurationPages/QtPage.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/QtPage.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,7 +17,6 @@
 from .Ui_QtPage import Ui_QtPage
 
 import Preferences
-from Globals import qVersionTuple
 
 
 class QtPage(ConfigurationPageBase, Ui_QtPage):
@@ -32,22 +31,18 @@
         self.setupUi(self)
         self.setObjectName("QtPage")
         
-        self.qt4TransPicker.setMode(E5PathPickerModes.DirectoryMode)
+        self.qtTransPicker.setMode(E5PathPickerModes.DirectoryMode)
         self.qtToolsDirPicker.setMode(E5PathPickerModes.DirectoryShowFilesMode)
         self.pyqtToolsDirPicker.setMode(
             E5PathPickerModes.DirectoryShowFilesMode)
         
         # set initial values
-        if qVersionTuple() < (5, 0, 0):
-            self.qt4TransPicker.setText(
-                Preferences.getQt("Qt4TranslationsDir"))
-        else:
-            self.qt4TransPicker.setText(
-                Preferences.getQt("Qt5TranslationsDir"))
+        self.qtTransPicker.setText(
+            Preferences.getQt("Qt5TranslationsDir"))
         self.qtToolsDirPicker.setText(Preferences.getQt("QtToolsDir"))
-        self.qt4PrefixEdit.setText(Preferences.getQt("QtToolsPrefix4"))
-        self.qt4PostfixEdit.setText(Preferences.getQt("QtToolsPostfix4"))
-        self.__updateQt4Sample()
+        self.qtPrefixEdit.setText(Preferences.getQt("QtToolsPrefix"))
+        self.qtPostfixEdit.setText(Preferences.getQt("QtToolsPostfix"))
+        self.__updateQtSample()
         self.pyqtToolsDirPicker.setText(Preferences.getQt("PyQtToolsDir"))
         self.pyuicIndentSpinBox.setValue(Preferences.getQt("PyuicIndent"))
         self.pyuicImportsCheckBox.setChecked(
@@ -57,43 +52,40 @@
         """
         Public slot to save the Qt configuration.
         """
-        if qVersionTuple() < (5, 0, 0):
-            Preferences.setQt("Qt4TranslationsDir", self.qt4TransPicker.text())
-        else:
-            Preferences.setQt("Qt5TranslationsDir", self.qt4TransPicker.text())
+        Preferences.setQt("Qt5TranslationsDir", self.qtTransPicker.text())
         Preferences.setQt("QtToolsDir", self.qtToolsDirPicker.text())
-        Preferences.setQt("QtToolsPrefix4", self.qt4PrefixEdit.text())
-        Preferences.setQt("QtToolsPostfix4", self.qt4PostfixEdit.text())
+        Preferences.setQt("QtToolsPrefix", self.qtPrefixEdit.text())
+        Preferences.setQt("QtToolsPostfix", self.qtPostfixEdit.text())
         Preferences.setQt("PyQtToolsDir", self.pyqtToolsDirPicker.text())
         Preferences.setQt("PyuicIndent", self.pyuicIndentSpinBox.value())
         Preferences.setQt("PyuicFromImports",
                           self.pyuicImportsCheckBox.isChecked())
         
-    def __updateQt4Sample(self):
+    def __updateQtSample(self):
         """
-        Private slot to update the Qt4 tools sample label.
+        Private slot to update the Qt tools sample label.
         """
-        self.qt4SampleLabel.setText(
+        self.qtSampleLabel.setText(
             self.tr("Sample: {0}designer{1}").format(
-                self.qt4PrefixEdit.text(), self.qt4PostfixEdit.text()))
+                self.qtPrefixEdit.text(), self.qtPostfixEdit.text()))
     
     @pyqtSlot(str)
-    def on_qt4PrefixEdit_textChanged(self, txt):
+    def on_qtPrefixEdit_textChanged(self, txt):
         """
         Private slot to handle a change in the entered Qt directory.
         
         @param txt the entered string (string)
         """
-        self.__updateQt4Sample()
+        self.__updateQtSample()
     
     @pyqtSlot(str)
-    def on_qt4PostfixEdit_textChanged(self, txt):
+    def on_qtPostfixEdit_textChanged(self, txt):
         """
         Private slot to handle a change in the entered Qt directory.
         
         @param txt the entered string (string)
         """
-        self.__updateQt4Sample()
+        self.__updateQtSample()
     
 
 def create(dlg):
--- a/eric6/Preferences/ConfigurationPages/QtPage.ui	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/ConfigurationPages/QtPage.ui	Sun Sep 01 19:40:53 2019 +0200
@@ -45,7 +45,7 @@
        </widget>
       </item>
       <item>
-       <widget class="E5PathPicker" name="qt4TransPicker" native="true">
+       <widget class="E5PathPicker" name="qtTransPicker" native="true">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
           <horstretch>0</horstretch>
@@ -131,7 +131,7 @@
          </widget>
         </item>
         <item>
-         <widget class="QLineEdit" name="qt4PrefixEdit">
+         <widget class="QLineEdit" name="qtPrefixEdit">
           <property name="toolTip">
            <string>Enter the prefix for the Qt tools name</string>
           </property>
@@ -145,14 +145,14 @@
          </widget>
         </item>
         <item>
-         <widget class="QLineEdit" name="qt4PostfixEdit">
+         <widget class="QLineEdit" name="qtPostfixEdit">
           <property name="toolTip">
            <string>Enter the postfix for the Qt tools name</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QLabel" name="qt4SampleLabel">
+         <widget class="QLabel" name="qtSampleLabel">
           <property name="sizePolicy">
            <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
             <horstretch>1</horstretch>
@@ -283,10 +283,10 @@
   </customwidget>
  </customwidgets>
  <tabstops>
-  <tabstop>qt4TransPicker</tabstop>
+  <tabstop>qtTransPicker</tabstop>
   <tabstop>qtToolsDirPicker</tabstop>
-  <tabstop>qt4PrefixEdit</tabstop>
-  <tabstop>qt4PostfixEdit</tabstop>
+  <tabstop>qtPrefixEdit</tabstop>
+  <tabstop>qtPostfixEdit</tabstop>
   <tabstop>pyqtToolsDirPicker</tabstop>
   <tabstop>pyuicIndentSpinBox</tabstop>
   <tabstop>pyuicImportsCheckBox</tabstop>
--- a/eric6/Preferences/ProgramsDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/ProgramsDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -81,7 +81,7 @@
         header.setSortIndicator(0, Qt.AscendingOrder)
         header.setSortIndicatorShown(False)
         
-        # 1. do the Qt4/Qt5 programs
+        # 1. do the Qt5 programs
         # 1a. Translation Converter
         exe = Utilities.isWindowsPlatform() and \
             "{0}.exe".format(Utilities.generateQtToolName("lrelease")) or \
@@ -132,6 +132,7 @@
         
         # 2. do the PyQt programs
         # 2.1 do the PyQt4 programs
+        # deprecated
         # 2.1a. Translation Extractor PyQt4
         self.__createProgramEntry(
             self.tr("Translation Extractor (Python, PyQt4)"),
--- a/eric6/Preferences/__init__.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Preferences/__init__.py	Sun Sep 01 19:40:53 2019 +0200
@@ -775,6 +775,7 @@
     
     # defaults for the project browser flags settings
     projectBrowserFlagsDefaults = {
+        # deprecated
         "Qt4": (
             SourcesBrowserFlag |
             FormsBrowserFlag |
@@ -783,6 +784,7 @@
             InterfacesBrowserFlag |
             OthersBrowserFlag |
             ProtocolsBrowserFlag),
+        # deprecated
         "Qt4C": (
             SourcesBrowserFlag |
             ResourcesBrowserFlag |
@@ -880,90 +882,6 @@
         "PySide2DocDir": "",
         "EricDocDir": "",
     }
-##    
-##    @classmethod
-##    def initWebSettingsDefaults(cls):
-##        """
-##        Class method to initialize the web settings related defaults.
-##        """
-##        if QWebSettings is None:
-##            return
-##        
-##        websettings = QWebSettings.globalSettings()
-##        fontFamily = websettings.fontFamily(QWebSettings.StandardFont)
-##        fontSize = websettings.fontSize(QWebSettings.DefaultFontSize)
-##        cls.helpDefaults["StandardFont"] = \
-##            QFont(fontFamily, fontSize).toString()
-##        fontFamily = websettings.fontFamily(QWebSettings.FixedFont)
-##        fontSize = websettings.fontSize(QWebSettings.DefaultFixedFontSize)
-##        cls.helpDefaults["FixedFont"] = QFont(fontFamily, fontSize).toString()
-##        cls.helpDefaults.update({
-##            "AutoLoadImages":
-##            websettings.testAttribute(QWebSettings.AutoLoadImages),
-##            "UserStyleSheet": "",
-##            "SaveUrlColor": QColor(248, 248, 210),
-##            "JavaEnabled":
-##            websettings.testAttribute(QWebSettings.JavaEnabled),
-##            "JavaScriptEnabled":
-##            websettings.testAttribute(QWebSettings.JavascriptEnabled),
-##            "JavaScriptCanOpenWindows":
-##            websettings.testAttribute(
-##                QWebSettings.JavascriptCanOpenWindows),
-##            "JavaScriptCanCloseWindows":
-##            websettings.testAttribute(
-##                QWebSettings.JavascriptCanCloseWindows),
-##            "JavaScriptCanAccessClipboard":
-##            websettings.testAttribute(
-##                QWebSettings.JavascriptCanAccessClipboard),
-##            "PluginsEnabled":
-##            websettings.testAttribute(QWebSettings.PluginsEnabled),
-##            "OfflineStorageDatabaseEnabled":
-##            websettings.testAttribute(
-##                QWebSettings.OfflineStorageDatabaseEnabled),
-##        })
-##        if hasattr(QWebSettings, "OfflineWebApplicationCacheEnabled"):
-##            cls.helpDefaults.update({
-##                "OfflineWebApplicationCacheEnabled":
-##                websettings.testAttribute(
-##                    QWebSettings.OfflineWebApplicationCacheEnabled),
-##                "OfflineWebApplicationCacheQuota": 50,     # 50 MB
-##            })
-##        if hasattr(QWebSettings, "LocalStorageEnabled"):
-##            cls.helpDefaults["LocalStorageEnabled"] = \
-##                websettings.testAttribute(QWebSettings.LocalStorageEnabled)
-##        if hasattr(QWebSettings, "DnsPrefetchEnabled"):
-##            cls.helpDefaults["DnsPrefetchEnabled"] = \
-##                websettings.testAttribute(QWebSettings.DnsPrefetchEnabled)
-##        if hasattr(QWebSettings, "defaultTextEncoding"):
-##            cls.helpDefaults["DefaultTextEncoding"] = \
-##                websettings.defaultTextEncoding()
-##        if hasattr(QWebSettings, "SpatialNavigationEnabled"):
-##            cls.helpDefaults["SpatialNavigationEnabled"] = \
-##                websettings.testAttribute(
-##                    QWebSettings.SpatialNavigationEnabled)
-##        if hasattr(QWebSettings, "LinksIncludedInFocusChain"):
-##            cls.helpDefaults["LinksIncludedInFocusChain"] = \
-##                websettings.testAttribute(
-##                    QWebSettings.LinksIncludedInFocusChain)
-##        if hasattr(QWebSettings, "LocalContentCanAccessRemoteUrls"):
-##            cls.helpDefaults["LocalContentCanAccessRemoteUrls"] = \
-##                websettings.testAttribute(
-##                    QWebSettings.LocalContentCanAccessRemoteUrls)
-##        if hasattr(QWebSettings, "LocalContentCanAccessFileUrls"):
-##            cls.helpDefaults["LocalContentCanAccessFileUrls"] = \
-##                websettings.testAttribute(
-##                    QWebSettings.LocalContentCanAccessFileUrls)
-##        if hasattr(QWebSettings, "XSSAuditingEnabled"):
-##            cls.helpDefaults["XSSAuditingEnabled"] = \
-##                websettings.testAttribute(QWebSettings.XSSAuditingEnabled)
-##        if hasattr(QWebSettings, "SiteSpecificQuirksEnabled"):
-##            cls.helpDefaults["SiteSpecificQuirksEnabled"] = \
-##                websettings.testAttribute(
-##                    QWebSettings.SiteSpecificQuirksEnabled)
-##        
-##        cls.webSettingsIntitialized = True
-##    
-##    webSettingsIntitialized = False
     
     # defaults for the web browser settings
     webBrowserDefaults = {
@@ -1269,11 +1187,10 @@
 
     # defaults for Qt related stuff
     qtDefaults = {
-        "Qt4TranslationsDir": "",
         "Qt5TranslationsDir": "",
         "QtToolsDir": "",
-        "QtToolsPrefix4": "",
-        "QtToolsPostfix4": "",
+        "QtToolsPrefix": "",
+        "QtToolsPostfix": "",
         "PyuicIndent": 4,
         "PyuicFromImports": False,
         "PyQtToolsDir": "",
@@ -2664,7 +2581,7 @@
     Module function to retrieve the Qt5DocDir setting.
     
     @param prefClass preferences class used as the storage area
-    @return the requested Qt4DocDir setting (string)
+    @return the requested Qt5DocDir setting (string)
     """
     s = prefClass.settings.value(
         "Help/Qt5DocDir", prefClass.helpDefaults["Qt5DocDir"])
@@ -2955,27 +2872,19 @@
 
 def getQtTranslationsDir(prefClass=Prefs):
     """
-    Module function to retrieve the Qt4TranslationsDir or Qt5TranslationsDir
+    Module function to retrieve the Qt5TranslationsDir
     setting depending on the current Qt version.
     
     @param prefClass preferences class used as the storage area
     @return the requested setting (string)
     """
-    if Globals.qVersionTuple() < (5, 0, 0):
-        s = prefClass.settings.value(
-            "Qt/Qt4TranslationsDir",
-            prefClass.qtDefaults["Qt4TranslationsDir"])
-    else:
-        s = prefClass.settings.value(
-            "Qt/Qt5TranslationsDir",
-            prefClass.qtDefaults["Qt5TranslationsDir"])
+    s = prefClass.settings.value(
+        "Qt/Qt5TranslationsDir",
+        prefClass.qtDefaults["Qt5TranslationsDir"])
     if s == "":
         s = os.getenv("QTTRANSLATIONSDIR", "")
     if s == "":
-        if Globals.qVersionTuple() < (5, 0, 0):
-            s = os.getenv("QT4TRANSLATIONSDIR", "")
-        else:
-            s = os.getenv("QT5TRANSLATIONSDIR", "")
+        s = os.getenv("QT5TRANSLATIONSDIR", "")
     if s == "":
         s = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
     if s == "" and Globals.isWindowsPlatform():
@@ -2994,7 +2903,7 @@
     @param prefClass preferences class used as the storage area
     @return the requested Qt setting
     """
-    if key in ["Qt4TranslationsDir", "Qt5TranslationsDir"]:
+    if key in ["Qt5TranslationsDir"]:
         return getQtTranslationsDir(prefClass)
     elif key in ["PyuicIndent"]:
         return int(prefClass.settings.value(
--- a/eric6/Project/CreateDialogCodeDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Project/CreateDialogCodeDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -4,7 +4,7 @@
 #
 
 """
-Module implementing a dialog to generate code for a Qt4/Qt5 dialog.
+Module implementing a dialog to generate code for a Qt5 dialog.
 """
 
 from __future__ import unicode_literals
@@ -38,7 +38,7 @@
 
 class CreateDialogCodeDialog(QDialog, Ui_CreateDialogCodeDialog):
     """
-    Class implementing a dialog to generate code for a Qt4/Qt5 dialog.
+    Class implementing a dialog to generate code for a Qt5 dialog.
     """
     DialogClasses = {
         "QDialog", "QWidget", "QMainWindow", "QWizard", "QWizardPage",
--- a/eric6/Project/LexerAssociationDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Project/LexerAssociationDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -16,8 +16,6 @@
 
 from .Ui_LexerAssociationDialog import Ui_LexerAssociationDialog
 
-from Globals import qVersionTuple
-
 
 class LexerAssociationDialog(QDialog, Ui_LexerAssociationDialog):
     """
@@ -36,10 +34,7 @@
         self.editorLexerList.headerItem().setText(
             self.editorLexerList.columnCount(), "")
         header = self.editorLexerList.header()
-        if qVersionTuple() >= (5, 0, 0):
-            header.setSectionResizeMode(QHeaderView.ResizeToContents)
-        else:
-            header.setResizeMode(QHeaderView.ResizeToContents)
+        header.setSectionResizeMode(QHeaderView.ResizeToContents)
         header.setSortIndicator(0, Qt.AscendingOrder)
         
         try:
--- a/eric6/Project/Project.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Project/Project.py	Sun Sep 01 19:40:53 2019 +0200
@@ -273,8 +273,8 @@
         self.__binaryTranslationsCallbacks = {}
         
         self.__projectTypes = {
-            "Qt4": self.tr("PyQt4 GUI"),
-            "Qt4C": self.tr("PyQt4 Console"),
+            "Qt4": self.tr("PyQt4 GUI (deprecated)"),
+            "Qt4C": self.tr("PyQt4 Console (deprecated)"),
             "PyQt5": self.tr("PyQt5 GUI"),
             "PyQt5C": self.tr("PyQt5 Console"),
             "E6Plugin": self.tr("Eric6 Plugin"),
--- a/eric6/Project/PropertiesDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Project/PropertiesDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -89,7 +89,7 @@
             curIndex = self.projectTypeComboBox.findData(
                 self.project.pdata["PROJECTTYPE"])
             if curIndex == -1:
-                curIndex = self.projectTypeComboBox.findData("Qt4")
+                curIndex = self.projectTypeComboBox.findData("PyQt5")
             self.projectTypeComboBox.setCurrentIndex(curIndex)
             self.dirPicker.setText(self.project.ppath)
             self.versionEdit.setText(self.project.pdata["VERSION"])
--- a/eric6/Project/UicLoadUi.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Project/UicLoadUi.py	Sun Sep 01 19:40:53 2019 +0200
@@ -14,22 +14,12 @@
 import xml.etree.ElementTree
 
 try:
-    from PyQt5.QtCore import qVersion, QMetaMethod, QByteArray
+    from PyQt5.QtCore import QMetaMethod, QByteArray
     from PyQt5.QtWidgets import QAction, QWidget, QApplication
     from PyQt5 import uic
-    
-    pyqtType = 5
 except ImportError:
-    try:
-        # try a potential PyQt4 installation
-        from PyQt4.QtCore import qVersion, QMetaMethod, QByteArray
-        from PyQt4.QtGui import QAction, QWidget, QApplication
-        from PyQt4 import uic
-        
-        pyqtType = 4
-    except ImportError:
-        print("Neither PyQt5 nor PyQt4 found.")
-        sys.exit(1)
+    print("PyQt5 could not be found.")
+    sys.exit(1)
 
 
 def objectName(formFile, projectPath):
@@ -87,16 +77,15 @@
     # I. always check for *
     mapped = mapped.replace("*", "")
     
-    if pyqtType != 4:
-        # 1. check for const
-        mapped = mapped.replace("const ", "")
-        
-        # 2. replace QString and QStringList
-        mapped = mapped.replace("QStringList", "list")\
-                       .replace("QString", "str")
-        
-        # 3. replace double by float
-        mapped = mapped.replace("double", "float")
+    # 1. check for const
+    mapped = mapped.replace("const ", "")
+    
+    # 2. replace QString and QStringList
+    mapped = mapped.replace("QStringList", "list")\
+                   .replace("QString", "str")
+    
+    # 3. replace double by float
+    mapped = mapped.replace("double", "float")
     
     return mapped
 
@@ -135,28 +124,16 @@
                     signatureDict = {
                         "methods": []
                     }
-                    if qVersion().startswith("5."):
-                        signatureDict["signature"] = "on_{0}_{1}".format(
-                            name,
-                            bytes(metaMethod.methodSignature()).decode()
-                        )
-                    else:
-                        signatureDict["signature"] = "on_{0}_{1}".format(
-                            name,
-                            metaMethod.signature()
-                        )
+                    signatureDict["signature"] = "on_{0}_{1}".format(
+                        name,
+                        bytes(metaMethod.methodSignature()).decode()
+                    )
                     
-                    if qVersion().startswith("5."):
-                        signatureDict["methods"].append("on_{0}_{1}".format(
-                            name,
-                            bytes(metaMethod.methodSignature())
-                            .decode().split("(")[0]
-                        ))
-                    else:
-                        signatureDict["methods"].append("on_{0}_{1}".format(
-                            name,
-                            metaMethod.signature().split("(")[0]
-                        ))
+                    signatureDict["methods"].append("on_{0}_{1}".format(
+                        name,
+                        bytes(metaMethod.methodSignature())
+                        .decode().split("(")[0]
+                    ))
                     signatureDict["methods"].append("{0}({1})".format(
                         signatureDict["methods"][-1],
                         ", ".join([
@@ -191,29 +168,17 @@
                     methNamesSig = ", ".join(parameterNamesList)
                     
                     if methNamesSig:
-                        if qVersion().startswith("5."):
-                            pythonSignature = \
-                                "on_{0}_{1}(self, {2})".format(
-                                    name,
-                                    bytes(metaMethod.methodSignature())
-                                    .decode().split("(")[0],
-                                    methNamesSig)
-                        else:
-                            pythonSignature = \
-                                "on_{0}_{1}(self, {2})".format(
-                                    name,
-                                    metaMethod.signature().split("(")[0],
-                                    methNamesSig)
-                    else:
-                        if qVersion().startswith("5."):
-                            pythonSignature = "on_{0}_{1}(self)".format(
+                        pythonSignature = \
+                            "on_{0}_{1}(self, {2})".format(
                                 name,
                                 bytes(metaMethod.methodSignature())
-                                .decode().split("(")[0])
-                        else:
-                            pythonSignature = "on_{0}_{1}(self)".format(
-                                name,
-                                metaMethod.signature().split("(")[0])
+                                .decode().split("(")[0],
+                                methNamesSig)
+                    else:
+                        pythonSignature = "on_{0}_{1}(self)".format(
+                            name,
+                            bytes(metaMethod.methodSignature())
+                            .decode().split("(")[0])
                     signatureDict["python_signature"] = pythonSignature
                     
                     objectDict["methods"].append(signatureDict)
--- a/eric6/QScintilla/Editor.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/QScintilla/Editor.py	Sun Sep 01 19:40:53 2019 +0200
@@ -30,7 +30,6 @@
 import Preferences
 import Utilities
 from Utilities import MouseUtilities
-from Globals import qVersionTuple
 
 import UI.PixmapCache
 
@@ -6812,10 +6811,7 @@
         
         @param evt reference to the wheel event (QWheelEvent)
         """
-        if qVersionTuple() >= (5, 0, 0):
-            delta = evt.angleDelta().y()
-        else:
-            delta = evt.delta()
+        delta = evt.angleDelta().y()
         if evt.modifiers() & Qt.ControlModifier:
             if delta < 0:
                 self.zoomOut()
--- a/eric6/QScintilla/Shell.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/QScintilla/Shell.py	Sun Sep 01 19:40:53 2019 +0200
@@ -30,7 +30,6 @@
 
 import Preferences
 import Utilities
-from Globals import qVersionTuple
 
 import UI.PixmapCache
 
@@ -1217,10 +1216,7 @@
         @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.modifiers() & Qt.ControlModifier:
-            if qVersionTuple() >= (5, 0, 0):
-                delta = evt.angleDelta().y()
-            else:
-                delta = evt.delta()
+            delta = evt.angleDelta().y()
             if delta < 0:
                 self.zoomOut()
             elif delta > 0:
--- a/eric6/Snapshot/SnapshotDefaultGrabber.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Snapshot/SnapshotDefaultGrabber.py	Sun Sep 01 19:40:53 2019 +0200
@@ -150,14 +150,9 @@
         
         if mode == SnapshotModes.Fullscreen:
             desktop = QApplication.desktop()
-            if Globals.qVersionTuple() >= (5, 0, 0):
-                snapshot = QApplication.screens()[0].grabWindow(
-                    desktop.winId(), desktop.x(), desktop.y(),
-                    desktop.width(), desktop.height())
-            else:
-                snapshot = QPixmap.grabWindow(
-                    desktop.winId(), desktop.x(), desktop.y(),
-                    desktop.width(), desktop.height())
+            snapshot = QApplication.screens()[0].grabWindow(
+                desktop.winId(), desktop.x(), desktop.y(),
+                desktop.width(), desktop.height())
         elif mode == SnapshotModes.SelectedScreen:
             desktop = QApplication.desktop()
             if Globals.qVersionTuple() >= (5, 10, 0):
@@ -168,12 +163,8 @@
                 geom = desktop.screenGeometry(screenId)
             x = geom.x()
             y = geom.y()
-            if Globals.qVersionTuple() >= (5, 0, 0):
-                snapshot = QApplication.screens()[0].grabWindow(
-                    desktop.winId(), x, y, geom.width(), geom.height())
-            else:
-                snapshot = QPixmap.grabWindow(
-                    desktop.winId(), x, y, geom.width(), geom.height())
+            snapshot = QApplication.screens()[0].grabWindow(
+                desktop.winId(), x, y, geom.width(), geom.height())
         else:
             snapshot = QPixmap()
         
--- a/eric6/Snapshot/SnapshotFreehandGrabber.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Snapshot/SnapshotFreehandGrabber.py	Sun Sep 01 19:40:53 2019 +0200
@@ -14,8 +14,6 @@
     QPolygon, QPen, QBrush, QPaintEngine
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
-from Globals import qVersionTuple
-
 
 def drawPolygon(painter, polygon, outline, fill=None):
     """
@@ -87,14 +85,9 @@
         self.__desktop = QApplication.desktop()
         x = self.__desktop.x()
         y = self.__desktop.y()
-        if qVersionTuple() >= (5, 0, 0):
-            self.__pixmap = QApplication.screens()[0].grabWindow(
-                self.__desktop.winId(), x, y,
-                self.__desktop.width(), self.__desktop.height())
-        else:
-            self.__pixmap = QPixmap.grabWindow(
-                self.__desktop.winId(), x, y,
-                self.__desktop.width(), self.__desktop.height())
+        self.__pixmap = QApplication.screens()[0].grabWindow(
+            self.__desktop.winId(), x, y,
+            self.__desktop.width(), self.__desktop.height())
         self.resize(self.__pixmap.size())
         self.move(x, y)
         self.setCursor(Qt.CrossCursor)
--- a/eric6/Snapshot/SnapshotRegionGrabber.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Snapshot/SnapshotRegionGrabber.py	Sun Sep 01 19:40:53 2019 +0200
@@ -14,8 +14,6 @@
     QPaintEngine, QPen, QBrush
 from PyQt5.QtWidgets import QWidget, QApplication, QToolTip
 
-from Globals import qVersionTuple
-
 
 def drawRect(painter, rect, outline, fill=None):
     """
@@ -115,14 +113,9 @@
         self.__desktop = QApplication.desktop()
         x = self.__desktop.x()
         y = self.__desktop.y()
-        if qVersionTuple() >= (5, 0, 0):
-            self.__pixmap = QApplication.screens()[0].grabWindow(
-                self.__desktop.winId(), x, y,
-                self.__desktop.width(), self.__desktop.height())
-        else:
-            self.__pixmap = QPixmap.grabWindow(
-                self.__desktop.winId(), x, y,
-                self.__desktop.width(), self.__desktop.height())
+        self.__pixmap = QApplication.screens()[0].grabWindow(
+            self.__desktop.winId(), x, y,
+            self.__desktop.width(), self.__desktop.height())
         self.resize(self.__pixmap.size())
         self.move(x, y)
         self.setCursor(Qt.CrossCursor)
--- a/eric6/SqlBrowser/SqlConnectionWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/SqlBrowser/SqlConnectionWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -14,8 +14,6 @@
     QTreeWidgetItem, QAction
 from PyQt5.QtSql import QSqlDatabase
 
-from Globals import qVersionTuple
-
 
 class SqlConnectionWidget(QWidget):
     """
@@ -44,11 +42,8 @@
         self.__connectionTree = QTreeWidget(self)
         self.__connectionTree.setObjectName("connectionTree")
         self.__connectionTree.setHeaderLabels([self.tr("Database")])
-        if qVersionTuple() >= (5, 0, 0):
-            self.__connectionTree.header().setSectionResizeMode(
-                QHeaderView.Stretch)
-        else:
-            self.__connectionTree.header().setResizeMode(QHeaderView.Stretch)
+        self.__connectionTree.header().setSectionResizeMode(
+            QHeaderView.Stretch)
         refreshAction = QAction(self.tr("Refresh"), self.__connectionTree)
         self.__schemaAction = QAction(
             self.tr("Show Schema"), self.__connectionTree)
--- a/eric6/Toolbox/PyQt4ImportHook.py	Sun Sep 01 17:44:33 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-# -*- coding: utf-8 -*-
-
-# Copyright (c) 2014 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
-#
-
-"""
-Module implementing an import hook converting PyQt5 imports to PyQt4 imports.
-"""
-
-from __future__ import unicode_literals
-
-import sys
-import importlib
-
-
-# TODO: get rid of this class and module
-class PyQt4Importer(object):
-    """
-    Class implementing an importer converting PyQt5 imports to PyQt4
-    imports.
-    """
-    def __init__(self):
-        """
-        Constructor
-        """
-        self.__path = None
-    
-    def find_module(self, fullname, path=None):
-        """
-        Public method returning the module loader.
-        
-        @param fullname name of the module to be loaded (string)
-        @param path path to resolve the module name (string)
-        @return module loader object
-        """
-        if fullname.startswith("PyQt5"):
-            self.__path = path
-            return self
-        
-        return None
-    
-    @staticmethod
-    def QComboBox_currentData(other, role=None):
-        """
-        Static method to emulate the currentData method of Qt5.
-        
-        @param other reference to the combo box to get the user data of
-        @type QComboBox
-        @param role role of which data should be retrieved
-        @type int
-        @return stored data at current selection
-        @rtype any
-        """
-        import PyQt4.Qt
-        if role is None:
-            role = PyQt4.Qt.Qt.UserRole
-        
-        idx = other.currentIndex()
-        return other.itemData(idx, role)
-    
-    def load_module(self, fullname):
-        """
-        Public method to load a module.
-        
-        @param fullname name of the module to be loaded (string)
-        @return reference to the loaded module (module)
-        """
-        if fullname in ["PyQt5.QtWidgets", "PyQt5.QtPrintSupport"]:
-            newname = "PyQt4.QtGui"
-        elif fullname in ["PyQt5.QtWebKitWidgets"]:
-            newname = "PyQt4.QtWebKit"
-        else:
-            newname = fullname.replace("PyQt5", "PyQt4")
-        
-        module = importlib.import_module(newname)
-        sys.modules[fullname] = module
-        if fullname == "PyQt5.QtCore":
-            import PyQt4.QtGui
-            module.qInstallMessageHandler = module.qInstallMsgHandler
-            module.QItemSelectionModel = PyQt4.QtGui.QItemSelectionModel
-            module.QItemSelection = PyQt4.QtGui.QItemSelection
-            module.QSortFilterProxyModel = \
-                PyQt4.QtGui.QSortFilterProxyModel
-            module.QAbstractProxyModel = PyQt4.QtGui.QAbstractProxyModel
-            module.QStringListModel = PyQt4.QtGui.QStringListModel
-            
-            PyQt4.QtGui.QComboBox.currentData = self.QComboBox_currentData
-        return module
-
-try:
-    if "--pyqt4" in sys.argv:
-        sys.argv.remove("--pyqt4")
-        # fake a failed PyQt5 import
-        raise ImportError
-    import PyQt5    # __IGNORE_WARNING__
-except ImportError:
-    sys.meta_path.insert(0, PyQt4Importer())
--- a/eric6/Toolbox/Startup.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Toolbox/Startup.py	Sun Sep 01 19:40:53 2019 +0200
@@ -12,13 +12,12 @@
 import os
 import sys
 
-from PyQt5.QtCore import QTranslator, QLocale, QLibraryInfo, QDir, QTextCodec
+from PyQt5.QtCore import QTranslator, QLocale, QLibraryInfo, QDir
 from PyQt5.QtWidgets import QApplication
 
 from E5Gui.E5Application import E5Application
 
 import Globals
-from Globals import qVersionTuple
 
 import UI.PixmapCache
 
@@ -166,10 +165,6 @@
     
     global loaded_translators
     
-    if qVersionTuple() < (5, 0, 0):
-        # set the default encoding for tr()
-        QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8"))
-    
     translations = ("qt", "eric6") + translationFiles
     loc = Preferences.getUILanguage()
     if loc is None:
--- a/eric6/Tools/TrayStarter.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Tools/TrayStarter.py	Sun Sep 01 19:40:53 2019 +0200
@@ -32,12 +32,10 @@
     """
     Class implementing a starter for the system tray.
     """
-    def __init__(self, usePyQt4, settingsDir):
+    def __init__(self, settingsDir):
         """
         Constructor
         
-        @param usePyQt4 flag indicating to use PyQt4
-        @type bool
         @param settingsDir directory to be used for the settings files
         @type str
         """
@@ -45,7 +43,6 @@
             UI.PixmapCache.getIcon(
                 Preferences.getTrayStarter("TrayStarterIcon")))
         
-        self.usePyQt4 = usePyQt4
         self.settingsDir = settingsDir
         
         self.maxMenuFilePathLen = 75
@@ -255,8 +252,6 @@
         
         args = []
         args.append(applPath)
-        if self.usePyQt4:
-            args.append("--pyqt4")
         args.append("--config={0}".format(Utilities.getConfigDir()))
         if self.settingsDir:
             args.append("--settings={0}".format(self.settingsDir))
--- a/eric6/Tools/UIPreviewer.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Tools/UIPreviewer.py	Sun Sep 01 19:40:53 2019 +0200
@@ -10,7 +10,7 @@
 from __future__ import unicode_literals
 
 from PyQt5.QtCore import QDir, QFileInfo, QEvent, QSize, Qt
-from PyQt5.QtGui import QCursor, QKeySequence, QPixmap, QImageWriter, QPainter
+from PyQt5.QtGui import QCursor, QKeySequence, QImageWriter, QPainter
 from PyQt5.QtWidgets import QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, \
     QWhatsThis, QDialog, QScrollArea, qApp, QApplication, QStyleFactory, \
     QFrame, QMainWindow, QComboBox, QVBoxLayout, QAction, QLabel
@@ -24,7 +24,6 @@
 import Preferences
 import UI.PixmapCache
 import UI.Config
-from Globals import qVersionTuple
 
 
 class UIPreviewer(E5MainWindow):
@@ -475,10 +474,7 @@
             ext = defaultExt
             fname.append(".{0}".format(defaultExt.lower()))
         
-        if qVersionTuple() >= (5, 0, 0):
-            pix = self.mainWidget.grab()
-        else:
-            pix = QPixmap.grabWidget(self.mainWidget)
+        pix = self.mainWidget.grab()
         self.__updateChildren(self.lastStyle)
         if not pix.save(fname, str(ext)):
             E5MessageBox.critical(
@@ -500,10 +496,7 @@
             return
         
         cb = QApplication.clipboard()
-        if qVersionTuple() >= (5, 0, 0):
-            cb.setPixmap(self.mainWidget.grab())
-        else:
-            cb.setPixmap(QPixmap.grabWidget(self.mainWidget))
+        cb.setPixmap(self.mainWidget.grab())
         self.__updateChildren(self.lastStyle)
     
     def __printImage(self):
@@ -598,10 +591,7 @@
             marginX *= 2
             width = printer.width() - marginX * 2
             height = printer.height() - marginY * 2
-        if qVersionTuple() >= (5, 0, 0):
-            img = self.mainWidget.grab().toImage()
-        else:
-            img = QPixmap.grabWidget(self.mainWidget).toImage()
+        img = self.mainWidget.grab().toImage()
         self.__updateChildren(self.lastStyle)
         p.drawImage(marginX, marginY,
                     img.scaled(width, height,
--- a/eric6/UI/Browser.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/Browser.py	Sun Sep 01 19:40:53 2019 +0200
@@ -30,7 +30,6 @@
 import Preferences
 import Utilities
 import Utilities.MimeTypes
-from Globals import qVersionTuple
 
 
 class Browser(QTreeView):
@@ -164,10 +163,7 @@
         header = self.header()
         header.setSortIndicator(0, Qt.AscendingOrder)
         header.setSortIndicatorShown(True)
-        if qVersionTuple() >= (5, 0, 0):
-            header.setSectionsClickable(True)
-        else:
-            header.setClickable(True)
+        header.setSectionsClickable(True)
         
         self.setSortingEnabled(True)
         
--- a/eric6/UI/EmailDialog.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/EmailDialog.py	Sun Sep 01 19:40:53 2019 +0200
@@ -34,8 +34,6 @@
 from email.mime.multipart import MIMEMultipart
 from email.header import Header
 
-from Globals import qVersionTuple
-
 
 ############################################################
 ## This code is to work around a bug in the Python email  ##
@@ -87,11 +85,8 @@
         
         self.attachments.headerItem().setText(
             self.attachments.columnCount(), "")
-        if qVersionTuple() >= (5, 0, 0):
-            self.attachments.header().setSectionResizeMode(
-                QHeaderView.Interactive)
-        else:
-            self.attachments.header().setResizeMode(QHeaderView.Interactive)
+        self.attachments.header().setSectionResizeMode(
+            QHeaderView.Interactive)
         
         sig = Preferences.getUser("Signature")
         if sig:
--- a/eric6/UI/NumbersWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/NumbersWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,7 +17,6 @@
 from .Ui_NumbersWidget import Ui_NumbersWidget
 
 import UI.PixmapCache
-from Globals import qVersionTuple
 
 
 class BinaryModel(QAbstractTableModel):
@@ -201,12 +200,8 @@
         
         self.__model = BinaryModel(self)
         self.binTable.setModel(self.__model)
-        if qVersionTuple() >= (5, 0, 0):
-            self.binTable.horizontalHeader().setSectionResizeMode(
-                QHeaderView.ResizeToContents)
-        else:
-            self.binTable.horizontalHeader().setResizeMode(
-                QHeaderView.ResizeToContents)
+        self.binTable.horizontalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents)
         self.__model.setBitsAndValue(self.__bytes * 8, self.__input)
         self.__model.dataChanged.connect(self.__binModelDataChanged)
     
--- a/eric6/UI/Previewers/PreviewerHTML.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/Previewers/PreviewerHTML.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,7 +17,7 @@
 import sys
 import io
 
-from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QSize, QThread
+from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QUrl, QThread
 from PyQt5.QtGui import QCursor
 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QLabel, QCheckBox, \
     QSizePolicy, QToolTip
--- a/eric6/UI/Previewers/PreviewerQSS.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/Previewers/PreviewerQSS.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,7 +18,6 @@
 
 import Preferences
 import UI.PixmapCache
-from Globals import qVersionTuple
 
 
 class PreviewerQSS(QWidget, Ui_PreviewerQSS):
@@ -46,16 +45,10 @@
         self.__mdi.resize(160, 80)
         
         # tree and table widgets
-        if qVersionTuple() >= (5, 0, 0):
-            self.tree.header().setSectionResizeMode(
-                QHeaderView.ResizeToContents)
-            self.table.horizontalHeader().setSectionResizeMode(
-                QHeaderView.ResizeToContents)
-        else:
-            self.tree.header().setResizeMode(
-                QHeaderView.ResizeToContents)
-            self.table.horizontalHeader().setResizeMode(
-                QHeaderView.ResizeToContents)
+        self.tree.header().setSectionResizeMode(
+            QHeaderView.ResizeToContents)
+        self.table.horizontalHeader().setSectionResizeMode(
+            QHeaderView.ResizeToContents)
         self.tree.topLevelItem(0).setExpanded(True)
         
         # icon list widget
--- a/eric6/UI/SymbolsWidget.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/SymbolsWidget.py	Sun Sep 01 19:40:53 2019 +0200
@@ -22,7 +22,6 @@
 
 import UI.PixmapCache
 import Preferences
-from Globals import qVersionTuple
 
 
 class SymbolsModel(QAbstractTableModel):
@@ -501,12 +500,8 @@
         self.symbolsTable.selectionModel().currentRowChanged.connect(
             self.__currentRowChanged)
         
-        if qVersionTuple() >= (5, 0, 0):
-            self.symbolsTable.horizontalHeader().setSectionResizeMode(
-                QHeaderView.Fixed)
-        else:
-            self.symbolsTable.horizontalHeader().setResizeMode(
-                QHeaderView.Fixed)
+        self.symbolsTable.horizontalHeader().setSectionResizeMode(
+            QHeaderView.Fixed)
         fm = self.fontMetrics()
         em = fm.width("M")
         self.symbolsTable.horizontalHeader().resizeSection(0, em * 5)
--- a/eric6/UI/UserInterface.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/UI/UserInterface.py	Sun Sep 01 19:40:53 2019 +0200
@@ -15,7 +15,7 @@
 
 from PyQt5.QtCore import pyqtSlot, QTimer, QFile, QFileInfo, pyqtSignal, \
     PYQT_VERSION_STR, QDate, QIODevice, qVersion, QProcess, QSize, QUrl, \
-    QObject, Qt, QUuid, QThread
+    QObject, Qt, QUuid, QThread, QUrlQuery
 from PyQt5.QtGui import QKeySequence, QDesktopServices
 from PyQt5.QtWidgets import QSizePolicy, QWidget, QWhatsThis, QToolBar, \
     QDialog, QSplitter, QApplication, QMenu, QVBoxLayout, QDockWidget, \
@@ -53,8 +53,6 @@
 
 from eric6config import getConfig
 
-from Globals import qVersionTuple
-
 
 class Redirector(QObject):
     """
@@ -3113,18 +3111,10 @@
                                           self.__menus["window"])
         self.__menus["subwindow"].setTearOffEnabled(True)
         # central park
-        try:
-            self.__menus["subwindow"].addSection(self.tr("Central Park"))
-        except AttributeError:
-            # Qt4
-            self.__menus["subwindow"].addSeparator()
+        self.__menus["subwindow"].addSection(self.tr("Central Park"))
         self.__menus["subwindow"].addAction(self.viewmanagerActivateAct)
         # left side
-        try:
-            self.__menus["subwindow"].addSection(self.tr("Left Side"))
-        except AttributeError:
-            # Qt4
-            pass
+        self.__menus["subwindow"].addSection(self.tr("Left Side"))
         if self.__shellPosition == "left":
             self.__menus["subwindow"].addAction(self.shellActivateAct)
         self.__menus["subwindow"].addAction(self.pbActivateAct)
@@ -3136,22 +3126,14 @@
         if self.symbolsViewer is not None:
             self.__menus["subwindow"].addAction(self.symbolsViewerActivateAct)
         # bottom side
-        try:
-            self.__menus["subwindow"].addSection(self.tr("Bottom Side"))
-        except AttributeError:
-            # Qt4
-            self.__menus["subwindow"].addSeparator()
+        self.__menus["subwindow"].addSection(self.tr("Bottom Side"))
         if self.__shellPosition == "bottom":
             self.__menus["subwindow"].addAction(self.shellActivateAct)
         self.__menus["subwindow"].addAction(self.taskViewerActivateAct)
         self.__menus["subwindow"].addAction(self.logViewerActivateAct)
         if self.numbersViewer is not None:
             self.__menus["subwindow"].addAction(self.numbersViewerActivateAct)
-        try:
-            self.__menus["subwindow"].addSection(self.tr("Right Side"))
-        except AttributeError:
-            # Qt4
-            self.__menus["subwindow"].addSeparator()
+        self.__menus["subwindow"].addSection(self.tr("Right Side"))
         # right side
         if self.__shellPosition == "right":
             self.__menus["subwindow"].addAction(self.shellActivateAct)
@@ -3171,11 +3153,7 @@
         if self.microPythonWidget is not None:
             self.__menus["subwindow"].addAction(
                 self.microPythonWidgetActivateAct)
-        try:
-            self.__menus["subwindow"].addSection(self.tr("Plug-ins"))
-        except AttributeError:
-            # Qt4
-            self.__menus["subwindow"].addSeparator()
+        self.__menus["subwindow"].addSection(self.tr("Plug-ins"))
         
         ##############################################################
         ## Window/Toolbars menu
@@ -3756,15 +3734,10 @@
                 Utilities.generateDistroInfo("\r\n"))
         
         url = QUrl("mailto:{0}".format(address))
-        if qVersionTuple() >= (5, 0, 0):
-            from PyQt5.QtCore import QUrlQuery
-            urlQuery = QUrlQuery(url)
-            urlQuery.addQueryItem("subject", subject)
-            urlQuery.addQueryItem("body", body)
-            url.setQuery(urlQuery)
-        else:
-            url.addQueryItem("subject", subject)
-            url.addQueryItem("body", body)
+        urlQuery = QUrlQuery(url)
+        urlQuery.addQueryItem("subject", subject)
+        urlQuery.addQueryItem("body", body)
+        url.setQuery(urlQuery)
         QDesktopServices.openUrl(url)
         
     def checkForErrorLog(self):
--- a/eric6/Utilities/__init__.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/Utilities/__init__.py	Sun Sep 01 19:40:53 2019 +0200
@@ -1707,9 +1707,9 @@
     @param toolname base name of the tool (string)
     @return the Qt tool name without extension (string)
     """
-    return "{0}{1}{2}".format(Preferences.getQt("QtToolsPrefix4"),
+    return "{0}{1}{2}".format(Preferences.getQt("QtToolsPrefix"),
                               toolname,
-                              Preferences.getQt("QtToolsPostfix4")
+                              Preferences.getQt("QtToolsPostfix")
                               )
 
 
--- a/eric6/eric6.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,15 +20,12 @@
 
 # generate list of arguments to be remembered for a restart
 restartArgsList = ["--no-splash", "--plugin", "--debug", "--config",
-                   "--pyqt4", "--settings", "--disable-crash",
-                   "--disable-plugin"]
+                   "--settings", "--disable-crash", "--disable-plugin"]
 restartArgs = [arg for arg in sys.argv[1:]
                if arg.split("=", 1)[0] in restartArgsList]
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 try:
     try:
         from PyQt5 import sip       # __IGNORE_EXCEPTION__
@@ -260,8 +257,6 @@
          "disable the given plug-in (may be repeated)"),
         ("--plugin=plugin-file",
          "load the given plugin file (plugin development)"),
-        ("--pyqt4",
-         "force use of PyQt4 in environments that have both PyQt variants"),
         ("--settings=settingsDir",
          "use the given directory to store the settings files"),
         ("--start-file", "load the most recently opened file"),
@@ -361,7 +356,7 @@
     if len(sys.argv) > 1:
         args = sys.argv[1:]
     
-    # get the Qt4 translations directory
+    # get the Qt translations directory
     qtTransDir = Preferences.getQtTranslationsDir()
     if not qtTransDir:
         qtTransDir = QLibraryInfo.location(QLibraryInfo.TranslationsPath)
--- a/eric6/eric6_api.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_api.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 import glob
 import fnmatch
 
--- a/eric6/eric6_browser.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_browser.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 try:
     try:
         from PyQt5 import sip
--- a/eric6/eric6_compare.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_compare.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_configure.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_configure.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,8 +17,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_diff.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_diff.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_doc.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_doc.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 import glob
 import fnmatch
 
--- a/eric6/eric6_editor.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_editor.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_hexeditor.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_hexeditor.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_iconeditor.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_iconeditor.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_plugininstall.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_plugininstall.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,8 +18,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_pluginrepository.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_pluginrepository.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,8 +18,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_pluginuninstall.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_pluginuninstall.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,8 +18,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_qregexp.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_qregexp.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_qregularexpression.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_qregularexpression.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_re.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_re.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_shell.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_shell.py	Sun Sep 01 19:40:53 2019 +0200
@@ -20,8 +20,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_snap.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_snap.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,8 +18,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_sqlbrowser.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_sqlbrowser.py	Sun Sep 01 19:40:53 2019 +0200
@@ -18,8 +18,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_tray.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_tray.py	Sun Sep 01 19:40:53 2019 +0200
@@ -17,13 +17,10 @@
 import sys
 import os
 
-PyQt4Option = "--pyqt4" in sys.argv
 SettingsDir = None
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
@@ -52,7 +49,7 @@
     @return reference to the main widget (QWidget)
     """
     from Tools.TrayStarter import TrayStarter
-    return TrayStarter(PyQt4Option, SettingsDir)
+    return TrayStarter(SettingsDir)
 
 
 def main():
--- a/eric6/eric6_trpreviewer.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_trpreviewer.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_uipreviewer.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_uipreviewer.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/eric6/eric6_unittest.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/eric6/eric6_unittest.py	Sun Sep 01 19:40:53 2019 +0200
@@ -19,8 +19,6 @@
 
 sys.path.insert(1, os.path.dirname(__file__))
 
-import Toolbox.PyQt4ImportHook  # __IGNORE_WARNING__
-
 for arg in sys.argv[:]:
     if arg.startswith("--config="):
         import Globals
--- a/scripts/compileUiFiles.py	Sun Sep 01 17:44:33 2019 +0200
+++ b/scripts/compileUiFiles.py	Sun Sep 01 19:40:53 2019 +0200
@@ -12,19 +12,7 @@
 
 import sys
 
-# step 1: determine PyQt variant, preferring PyQt5
-try:
-    import PyQt5        # __IGNORE_WARNING__
-    pyqtVariant = "PyQt5"
-except ImportError:
-    import PyQt4    # __IGNORE_WARNING__
-    pyqtVariant = "PyQt4"
-
-# step 2: compile the UI files
-if pyqtVariant == "PyQt4":
-    from PyQt4.uic import compileUiDir
-else:
-    from PyQt5.uic import compileUiDir
+from PyQt5.uic import compileUiDir
 
 
 def __pyName(py_dir, py_file):

eric ide

mercurial