eric6/Tools/TrayStarter.py

changeset 8143
2c730d5fd177
parent 7960
e8fc383322f7
child 8205
4a0f1f896341
--- a/eric6/Tools/TrayStarter.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Tools/TrayStarter.py	Tue Mar 02 17:17:09 2021 +0100
@@ -47,8 +47,8 @@
         self.maxMenuFilePathLen = 75
         
         self.rsettings = QSettings(
-            QSettings.IniFormat,
-            QSettings.UserScope,
+            QSettings.Format.IniFormat,
+            QSettings.Scope.UserScope,
             Globals.settingsNameOrganization,
             Globals.settingsNameRecent)
         
@@ -231,11 +231,11 @@
             (QSystemTrayIcon.ActivationReason)
         """
         if (
-            reason == QSystemTrayIcon.Context or
-            reason == QSystemTrayIcon.MiddleClick
+            reason == QSystemTrayIcon.ActivationReason.Context or
+            reason == QSystemTrayIcon.ActivationReason.MiddleClick
         ):
             self.__showContextMenu()
-        elif reason == QSystemTrayIcon.DoubleClick:
+        elif reason == QSystemTrayIcon.ActivationReason.DoubleClick:
             self.__startEric()
     
     def __showContextMenu(self):
@@ -509,7 +509,7 @@
         dlg.showConfigurationPageByName("trayStarterPage")
         dlg.exec()
         QApplication.processEvents()
-        if dlg.result() == QDialog.Accepted:
+        if dlg.result() == QDialog.DialogCode.Accepted:
             dlg.setPreferences()
             Preferences.syncPreferences()
             self.preferencesChanged()

eric ide

mercurial