Qml/Main: add error handling to installation

This commit is contained in:
Toast 2025-06-06 02:21:52 +02:00 committed by Toast
parent e94d11f138
commit 0cd631c92c
2 changed files with 34 additions and 1 deletions

View file

@ -4,7 +4,7 @@ from urllib.parse import urlparse
from PySide6.QtCore import Property, QObject, Signal
from PySide6.QtQml import QmlElement, QmlSingleton
from leek.mod_installer import ModInstaller, UnsupportedArchiveTypeError
from leek.mod_installer import ModInstaller, UnsupportedArchiveTypeError, NoModExceptionError
QML_IMPORT_NAME = "Leek.QModInstaller"
QML_IMPORT_MAJOR_VERSION = 1
@ -43,6 +43,9 @@ class QModInstaller(QObject):
except UnsupportedArchiveTypeError:
self.__status = "UnsupportedArchiveTypeError"
self.status_changed.emit()
except NoModExceptionError:
self.__status = "NoModExceptionError"
self.status_changed.emit()
install_status_changed = Signal(name="installStatusChanged")