Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py

changeset 3213
95fbeca03619
parent 3190
a9a94491c4fd
child 3345
071afe8be2a1
--- 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