21 import Globals |
21 import Globals |
22 configDir = arg.replace("--config=", "") |
22 configDir = arg.replace("--config=", "") |
23 Globals.setConfigDir(configDir) |
23 Globals.setConfigDir(configDir) |
24 sys.argv.remove(arg) |
24 sys.argv.remove(arg) |
25 elif arg.startswith("--settings="): |
25 elif arg.startswith("--settings="): |
26 from PyQt5.QtCore import QSettings |
26 from PyQt6.QtCore import QSettings |
27 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
27 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
28 if not os.path.isdir(settingsDir): |
28 if not os.path.isdir(settingsDir): |
29 os.makedirs(settingsDir) |
29 os.makedirs(settingsDir) |
30 QSettings.setPath( |
30 QSettings.setPath( |
31 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir) |
31 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir) |
53 |
53 |
54 def main(): |
54 def main(): |
55 """ |
55 """ |
56 Main entry point into the application. |
56 Main entry point into the application. |
57 """ |
57 """ |
58 from PyQt5.QtGui import QGuiApplication |
58 from PyQt6.QtGui import QGuiApplication |
59 QGuiApplication.setDesktopFileName("eric7_sqlbrowser.desktop") |
59 QGuiApplication.setDesktopFileName("eric7_sqlbrowser.desktop") |
60 |
60 |
61 options = [ |
61 options = [ |
62 ("--config=configDir", |
62 ("--config=configDir", |
63 "use the given directory as the one containing the config files"), |
63 "use the given directory as the one containing the config files"), |