Qt5->Qt6: (Until) attempted fix Python 3.10 'stack overflow' issue.

part of CURA-8591
This commit is contained in:
Remco Burema 2021-12-28 18:12:36 +01:00
parent 7021ff0b67
commit b62e708b87
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
3 changed files with 13 additions and 10 deletions

View file

@ -1,7 +1,7 @@
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from PyQt6.QtCore import pyqtSlot, pyqtProperty, QObject, pyqtSignal, QRegExp
from PyQt6.QtCore import pyqtSlot, pyqtProperty, QObject, pyqtSignal
from PyQt6.QtGui import QValidator
import os #For statvfs.
import urllib #To escape machine names for how they're saved to file.
@ -65,6 +65,6 @@ class MachineNameValidator(QObject):
self.validation_regex = "a^" #Never matches (unless you manage to get "a" before the start of the string... good luck).
self.validationChanged.emit()
@pyqtProperty("QRegExp", notify=validationChanged)
@pyqtProperty(str, notify=validationChanged)
def machineNameRegex(self):
return QRegExp(self.machine_name_regex)
return str(self.machine_name_regex)