76 elif arg.startswith("--settings="): |
76 elif arg.startswith("--settings="): |
77 from PyQt5.QtCore import QSettings |
77 from PyQt5.QtCore import QSettings |
78 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
78 settingsDir = os.path.expanduser(arg.replace("--settings=", "")) |
79 if not os.path.isdir(settingsDir): |
79 if not os.path.isdir(settingsDir): |
80 os.makedirs(settingsDir) |
80 os.makedirs(settingsDir) |
81 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, |
81 QSettings.setPath( |
82 settingsDir) |
82 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir) |
83 sys.argv.remove(arg) |
83 sys.argv.remove(arg) |
84 |
84 |
85 # make Third-Party package available as a packages repository |
85 # make Third-Party package available as a packages repository |
86 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
86 sys.path.insert(2, os.path.join(os.path.dirname(__file__), |
87 "ThirdParty", "Pygments")) |
87 "ThirdParty", "Pygments")) |
383 args = sys.argv[1:] |
383 args = sys.argv[1:] |
384 |
384 |
385 # get the Qt translations directory |
385 # get the Qt translations directory |
386 qtTransDir = Preferences.getQtTranslationsDir() |
386 qtTransDir = Preferences.getQtTranslationsDir() |
387 if not qtTransDir: |
387 if not qtTransDir: |
388 qtTransDir = QLibraryInfo.location(QLibraryInfo.TranslationsPath) |
388 qtTransDir = QLibraryInfo.location( |
|
389 QLibraryInfo.LibraryLocation.TranslationsPath) |
389 |
390 |
390 # Load translation files and install them |
391 # Load translation files and install them |
391 loc = Startup.loadTranslators(qtTransDir, app, ("qscintilla",)) |
392 loc = Startup.loadTranslators(qtTransDir, app, ("qscintilla",)) |
392 |
393 |
393 # Initialize SSL stuff |
394 # Initialize SSL stuff |