Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'cura_app.py')
-rwxr-xr-xcura_app.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/cura_app.py b/cura_app.py
index 0290049c28..905d8f4ee0 100755
--- a/cura_app.py
+++ b/cura_app.py
@@ -20,7 +20,7 @@ if sys.platform != "linux": # Turns out the Linux build _does_ use this, but we
os.environ["QML2_IMPORT_PATH"] = "" # Security workaround: Don't need it, and introduces an attack vector, so set to nul.
os.environ["QT_OPENGL_DLL"] = "" # Security workaround: Don't need it, and introduces an attack vector, so set to nul.
-from PyQt5.QtNetwork import QSslConfiguration, QSslSocket
+from PyQt6.QtNetwork import QSslConfiguration, QSslSocket
from UM.Platform import Platform
from cura import ApplicationMetadata
@@ -52,6 +52,8 @@ if with_sentry_sdk:
sentry_env = "development" # Master is always a development version.
elif "beta" in ApplicationMetadata.CuraVersion or "BETA" in ApplicationMetadata.CuraVersion:
sentry_env = "beta"
+ elif "alpha" in ApplicationMetadata.CuraVersion or "ALPHA" in ApplicationMetadata.CuraVersion:
+ sentry_env = "alpha"
try:
if ApplicationMetadata.CuraVersion.split(".")[2] == "99":
sentry_env = "nightly"
@@ -150,15 +152,15 @@ def exceptHook(hook_type, value, traceback):
# The flag "CuraApplication.Created" is set to True when CuraApplication finishes its constructor call.
#
# Before the "started" flag is set to True, the Qt event loop has not started yet. The event loop is a blocking
- # call to the QApplication.exec_(). In this case, we need to:
+ # call to the QApplication.exec(). In this case, we need to:
# 1. Remove all scheduled events so no more unnecessary events will be processed, such as loading the main dialog,
# loading the machine, etc.
- # 2. Start the Qt event loop with exec_() and show the Crash Dialog.
+ # 2. Start the Qt event loop with exec() and show the Crash Dialog.
#
# If the application has finished its initialization and was running fine, and then something causes a crash,
# we run the old routine to show the Crash Dialog.
#
- from PyQt5.Qt import QApplication
+ from PyQt6.QtWidgets import QApplication
if CuraApplication.Created:
_crash_handler = CrashHandler(hook_type, value, traceback, has_started)
if CuraApplication.splash is not None:
@@ -166,7 +168,7 @@ def exceptHook(hook_type, value, traceback):
if not has_started:
CuraApplication.getInstance().removePostedEvents(None)
_crash_handler.early_crash_dialog.show()
- sys.exit(CuraApplication.getInstance().exec_())
+ sys.exit(CuraApplication.getInstance().exec())
else:
_crash_handler.show()
else:
@@ -177,7 +179,7 @@ def exceptHook(hook_type, value, traceback):
if CuraApplication.splash is not None:
CuraApplication.splash.close()
_crash_handler.early_crash_dialog.show()
- sys.exit(application.exec_())
+ sys.exit(application.exec())
# Set exception hook to use the crash dialog handler
@@ -230,7 +232,7 @@ if Platform.isLinux():
if ApplicationMetadata.CuraDebugMode:
ssl_conf = QSslConfiguration.defaultConfiguration()
- ssl_conf.setPeerVerifyMode(QSslSocket.VerifyNone)
+ ssl_conf.setPeerVerifyMode(QSslSocket.PeerVerifyMode.VerifyNone)
QSslConfiguration.setDefaultConfiguration(ssl_conf)
app = CuraApplication()