Preferences/__init__.py

changeset 5736
000ea446ff4b
parent 5733
aed3e558407f
child 5739
a870f5f03baa
--- a/Preferences/__init__.py	Sat May 13 13:46:05 2017 +0200
+++ b/Preferences/__init__.py	Sat May 13 16:32:54 2017 +0200
@@ -29,7 +29,7 @@
 import sys
 
 from PyQt5.QtCore import QDir, QPoint, QLocale, QSettings, QFileInfo, \
-    QCoreApplication, QByteArray, QSize, QUrl, Qt, QLibraryInfo, qVersion
+    QCoreApplication, QByteArray, QSize, QUrl, Qt, QLibraryInfo
 from PyQt5.QtGui import QColor, QFont, QPalette
 from PyQt5.QtWidgets import QInputDialog, QApplication
 from PyQt5.QtNetwork import QNetworkRequest
@@ -49,7 +49,7 @@
 
 from Globals import settingsNameOrganization, settingsNameGlobal, \
     settingsNameRecent, isWindowsPlatform, findPythonInterpreters, \
-    getPyQt5ModulesDirectory
+    getPyQt5ModulesDirectory, qVersionTuple
 
 from Project.ProjectBrowserFlags import SourcesBrowserFlag, FormsBrowserFlag, \
     ResourcesBrowserFlag, TranslationsBrowserFlag, InterfacesBrowserFlag, \
@@ -2987,7 +2987,7 @@
     @param prefClass preferences class used as the storage area
     @return the requested setting (string)
     """
-    if qVersion() < "5.0.0":
+    if qVersionTuple() < (5, 0, 0):
         s = prefClass.settings.value(
             "Qt/Qt4TranslationsDir",
             prefClass.qtDefaults["Qt4TranslationsDir"])
@@ -2998,7 +2998,7 @@
     if s == "":
         s = os.getenv("QTTRANSLATIONSDIR", "")
     if s == "":
-        if qVersion() < "5.0.0":
+        if qVersionTuple() < (5, 0, 0):
             s = os.getenv("QT4TRANSLATIONSDIR", "")
         else:
             s = os.getenv("QT5TRANSLATIONSDIR", "")

eric ide

mercurial