Fixed a wrong behavior of the QRegularExpression wizard. 5_4_x

Sat, 18 Jan 2014 15:42:25 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 18 Jan 2014 15:42:25 +0100
branch
5_4_x
changeset 3214
c7c19a65dcde
parent 3199
564d4e8ae27a
child 3216
001982b9acf9

Fixed a wrong behavior of the QRegularExpression wizard.
(grafted from 95fbeca03619ca7f8ad6e462f25b5cf9732e8e3f)

Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py	Sun Jan 12 17:37:19 2014 +0100
+++ b/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py	Sat Jan 18 15:42:25 2014 +0100
@@ -12,7 +12,7 @@
 import sys
 import json
 
-from PyQt4.QtCore import QFileInfo, pyqtSlot, qVersion, QProcess, QByteArray
+from PyQt4.QtCore import QFileInfo, pyqtSlot, QProcess, QByteArray
 from PyQt4.QtGui import QWidget, QDialog, QInputDialog, QApplication, \
     QClipboard, QTextCursor, QDialogButtonBox, QVBoxLayout, QTableWidgetItem
 
@@ -97,7 +97,7 @@
             self.trUtf8("Load"), QDialogButtonBox.ActionRole)
         self.loadButton.setToolTip(
             self.trUtf8("Load a regular expression from a file"))
-        if qVersion() >= "5.0.0" and self.__pyqt5Available:
+        if self.__pyqt5Available:
             self.validateButton = self.buttonBox.addButton(
                 self.trUtf8("Validate"), QDialogButtonBox.ActionRole)
             self.validateButton.setToolTip(
@@ -474,8 +474,8 @@
         """
         Private slot to validate the entered QRegularExpression.
         """
-        if qVersion() < "5.0.0" or not self.__pyqt5Available:
-            # only available for Qt5
+        if not self.__pyqt5Available:
+            # only available for PyQt5
             return
         
         regexp = self.regexpTextEdit.toPlainText()
@@ -547,8 +547,8 @@
         
         @param startpos starting position for the QRegularExpression matching
         """
-        if qVersion() < "5.0.0" or not self.__pyqt5Available:
-            # only available for Qt5
+        if not self.__pyqt5Available:
+            # only available for PyQt5
             return
         
         regexp = self.regexpTextEdit.toPlainText()

eric ide

mercurial