RefactoringRope/RefactoringClient.py

branch
server_client_variant
changeset 190
a1b9b4975806
parent 188
05fb0977ce1b
child 203
c38750e1bafd
--- a/RefactoringRope/RefactoringClient.py	Sun Sep 24 13:56:36 2017 +0200
+++ b/RefactoringRope/RefactoringClient.py	Sun Sep 24 17:09:39 2017 +0200
@@ -1525,6 +1525,19 @@
         sys.exit(1)
     
     host, port, projectPath = sys.argv[1:]
+    
+    # Create a Qt4/5 application object in order to allow the processing of
+    # modules containing Qt stuff.
+    try:
+        from PyQt5.QtCore import QCoreApplication
+    except ImportError:
+        try:
+            from PyQt4.QtCore import QCoreApplication
+        except ImportError:
+            QCoreApplication = None
+    if QCoreApplication is not None:
+        app = QCoreApplication(sys.argv)
+    
     client = RefactoringClient(host, int(port), projectPath)
     # Start the main loop
     client.run()

eric ide

mercurial