mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Remove unused package_name property and add package_id in license model
The `_to_be_installed_package_id` and `_to_be_installed_package_path` can now be removed from the class as they can requested from the model itself. This we make sure that the we alway install the package for which the license was recently accepted. cura 8587
This commit is contained in:
parent
49a6a83fe9
commit
28b21628b4
2 changed files with 18 additions and 32 deletions
|
@ -5,23 +5,21 @@ catalog = i18nCatalog("cura")
|
|||
|
||||
# Model for the LicenseDialog
|
||||
class LicenseModel(QObject):
|
||||
|
||||
dialogTitleChanged = pyqtSignal()
|
||||
packageNameChanged = pyqtSignal()
|
||||
packageIdChanged = pyqtSignal()
|
||||
licenseTextChanged = pyqtSignal()
|
||||
|
||||
def __init__(self, licence_text: str, package_name: str) -> None:
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self._license_text = ""
|
||||
self._package_name = ""
|
||||
self._package_id = ""
|
||||
|
||||
@pyqtProperty(str, notify=packageNameChanged)
|
||||
def packageName(self) -> str:
|
||||
return self._package_name
|
||||
@pyqtProperty(str, notify=packageIdChanged)
|
||||
def packageId(self) -> str:
|
||||
return self._package_id
|
||||
|
||||
def setPackageName(self, name: str) -> None:
|
||||
self._package_name = name
|
||||
self.packageNameChanged.emit()
|
||||
def setPackageId(self, name: str) -> None:
|
||||
self._package_id = name
|
||||
self.packageIdChanged.emit()
|
||||
|
||||
@pyqtProperty(str, notify=licenseTextChanged)
|
||||
def licenseText(self) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue