Fixed a wrong behavior of the QRegularExpression wizard.

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 18 Jan 2014 15:42:25 +0100
changeset 3213
95fbeca03619
parent 3212
27a73942b8c8
child 3215
6c5877c48067

Fixed a wrong behavior of the QRegularExpression wizard.

Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py	Sat Jan 18 14:52:33 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.tr("Load"), QDialogButtonBox.ActionRole)
         self.loadButton.setToolTip(
             self.tr("Load a regular expression from a file"))
-        if qVersion() >= "5.0.0" and self.__pyqt5Available:
+        if self.__pyqt5Available:
             self.validateButton = self.buttonBox.addButton(
                 self.tr("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