eric5.py

changeset 2077
68a34718a0ce
parent 1939
eadb2328d7d4
child 2084
d3f083dd0222
--- a/eric5.py	Sat Sep 29 19:59:18 2012 +0200
+++ b/eric5.py	Sun Sep 30 13:27:28 2012 +0200
@@ -18,7 +18,7 @@
 import time
 import logging
 
-from PyQt4.QtCore import QTextCodec, qWarning, QLibraryInfo, QTimer
+from PyQt4.QtCore import qWarning, QLibraryInfo, QTimer, qVersion
 from PyQt4.QtGui import QApplication, QErrorMessage
 
 # some global variables needed to start the application
@@ -49,6 +49,9 @@
     sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
 
 from E5Gui.E5Application import E5Application
+# TODO: is this really needed for Qt5? At the moment it seems so.
+if qVersion() >= "5.0.0":
+    gapp = E5Application([])
 
 from UI.Info import BugAddress
 from UI.SplashScreen import SplashScreen, NoneSplashScreen
@@ -237,9 +240,6 @@
     # Load translation files and install them
     loc = Startup.loadTranslators(qt4TransDir, app, ("qscintilla",))
     
-    QTextCodec.setCodecForCStrings(QTextCodec.codecForName(
-        str(Preferences.getSystem("StringEncoding"))))
-    
     splash.showMessage(QApplication.translate("eric5", "Importing packages..."))
     # We can only import these after creating the E5Application because they
     # make Qt calls that need the E5Application to exist.

eric ide

mercurial