mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 06:55:54 +08:00
Marketplace doesn't need to inherit from QObject
Review comment Contributes to: CURA-8587
This commit is contained in:
parent
ea4ec5ca27
commit
dae92c354c
@ -2,7 +2,7 @@
|
|||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
from PyQt5.QtCore import pyqtSlot, QObject
|
from PyQt5.QtCore import pyqtSlot
|
||||||
from PyQt5.QtQml import qmlRegisterType
|
from PyQt5.QtQml import qmlRegisterType
|
||||||
from typing import Optional, TYPE_CHECKING
|
from typing import Optional, TYPE_CHECKING
|
||||||
|
|
||||||
@ -18,15 +18,14 @@ if TYPE_CHECKING:
|
|||||||
from PyQt5.QtCore import QObject
|
from PyQt5.QtCore import QObject
|
||||||
|
|
||||||
|
|
||||||
class Marketplace(Extension, QObject):
|
class Marketplace(Extension):
|
||||||
"""
|
"""
|
||||||
The main managing object for the Marketplace plug-in.
|
The main managing object for the Marketplace plug-in.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent: Optional[QObject] = None) -> None:
|
def __init__(self) -> None:
|
||||||
QObject.__init__(self, parent = parent)
|
super().__init__()
|
||||||
Extension.__init__(self)
|
self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here.
|
||||||
self._window: Optional[QObject] = None # If the window has been loaded yet, it'll be cached in here.
|
|
||||||
self.plugin_registry: Optional[PluginRegistry] = None
|
self.plugin_registry: Optional[PluginRegistry] = None
|
||||||
|
|
||||||
qmlRegisterType(RemotePackageList, "Marketplace", 1, 0, "RemotePackageList")
|
qmlRegisterType(RemotePackageList, "Marketplace", 1, 0, "RemotePackageList")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user