src/eric7/UI/UserInterface.py

branch
eric7
changeset 10158
b5aadedf4214
parent 10124
834c76d6ab4d
child 10174
6aac1022f330
child 10192
f457742dd3d6
--- a/src/eric7/UI/UserInterface.py	Thu Aug 17 14:47:52 2023 +0200
+++ b/src/eric7/UI/UserInterface.py	Fri Aug 25 10:49:39 2023 +0200
@@ -2894,20 +2894,8 @@
         self.testProjectAct.setEnabled(False)
         self.actions.append(self.testProjectAct)
 
-        # check for Qt5 designer and linguist
-        if OSUtilities.isWindowsPlatform():
-            designerExe = os.path.join(
-                QtUtilities.getQtBinariesPath(),
-                "{0}.exe".format(QtUtilities.generateQtToolName("designer")),
-            )
-        elif OSUtilities.isMacPlatform():
-            designerExe = QtUtilities.getQtMacBundle("designer")
-        else:
-            designerExe = os.path.join(
-                QtUtilities.getQtBinariesPath(),
-                QtUtilities.generateQtToolName("designer"),
-            )
-        if os.path.exists(designerExe):
+        # check for Qt6 designer and linguist
+        if QtUtilities.hasQtDesigner():
             self.designer4Act = EricAction(
                 self.tr("Qt-Designer"),
                 EricPixmapCache.getIcon("designer4"),
@@ -2926,19 +2914,7 @@
         else:
             self.designer4Act = None
 
-        if OSUtilities.isWindowsPlatform():
-            linguistExe = os.path.join(
-                QtUtilities.getQtBinariesPath(),
-                "{0}.exe".format(QtUtilities.generateQtToolName("linguist")),
-            )
-        elif OSUtilities.isMacPlatform():
-            linguistExe = QtUtilities.getQtMacBundle("linguist")
-        else:
-            linguistExe = os.path.join(
-                QtUtilities.getQtBinariesPath(),
-                QtUtilities.generateQtToolName("linguist"),
-            )
-        if os.path.exists(linguistExe):
+        if QtUtilities.hasQtLinguist():
             self.linguist4Act = EricAction(
                 self.tr("Qt-Linguist"),
                 EricPixmapCache.getIcon("linguist4"),

eric ide

mercurial