From abe7c1bf7f969562d63702e412e671b1e631c178 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 28 Dec 2021 14:46:02 +0100 Subject: Search/replace Qt5->Qt6. part of upgrading Qt to v6.2: CURA-8591 --- cura_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index b9a42f0aba..001e71775e 100755 --- a/cura_app.py +++ b/cura_app.py @@ -16,7 +16,7 @@ import argparse import faulthandler import os -from PyQt5.QtNetwork import QSslConfiguration, QSslSocket +from PyQt6.QtNetwork import QSslConfiguration, QSslSocket from UM.Platform import Platform from cura import ApplicationMetadata @@ -156,7 +156,7 @@ def exceptHook(hook_type, value, traceback): # 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.Qt import QApplication if CuraApplication.Created: _crash_handler = CrashHandler(hook_type, value, traceback, has_started) if CuraApplication.splash is not None: -- cgit v1.2.3 From b62e708b8779c6817861dadbec7e803a69e33e7d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 28 Dec 2021 18:12:36 +0100 Subject: Qt5->Qt6: (Until) attempted fix Python 3.10 'stack overflow' issue. part of CURA-8591 --- cura_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index 001e71775e..4b689fdadb 100755 --- a/cura_app.py +++ b/cura_app.py @@ -156,7 +156,7 @@ def exceptHook(hook_type, value, traceback): # 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 PyQt6.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: @@ -228,7 +228,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() -- cgit v1.2.3 From 9d7b1e49ee3799a74d4607a5945270655cf29e18 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 29 Dec 2021 09:30:48 +0100 Subject: Qt5->Qt6: Make CrashHandler window show up again. part of CURA-8591 --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index 4b689fdadb..2374197b59 100755 --- a/cura_app.py +++ b/cura_app.py @@ -175,7 +175,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 -- cgit v1.2.3 From 20b435af76505c18d3ff693aef5b845fb7a0b79a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 29 Dec 2021 11:18:49 +0100 Subject: Qt5->Qt6: More renamed stuff. part of CURA-8591 --- cura_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cura_app.py') diff --git a/cura_app.py b/cura_app.py index 2374197b59..da8b3bc18d 100755 --- a/cura_app.py +++ b/cura_app.py @@ -148,10 +148,10 @@ 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. @@ -164,7 +164,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: -- cgit v1.2.3