qml: don't initialize instance variables on class scope for non-singletons

(this somehow escaped attention before, as most objects usually don't have multiple instances,
unless multiple wallets are open at the same time.)
Also, move all signal declarations, class constants and variables to the top of class definitions.
This commit is contained in:
Sander van Grieken
2023-01-12 13:09:21 +01:00
parent 58d25d4a5d
commit 0bc8460005
22 changed files with 250 additions and 240 deletions
+16 -16
View File
@@ -8,27 +8,27 @@ from .qewallet import QEWallet
class QEAddressDetails(QObject):
_logger = get_logger(__name__)
detailsChanged = pyqtSignal()
def __init__(self, parent=None):
super().__init__(parent)
_logger = get_logger(__name__)
self._wallet = None
self._address = None
_wallet = None
_address = None
self._label = None
self._frozen = False
self._scriptType = None
self._status = None
self._balance = QEAmount()
self._pubkeys = None
self._privkey = None
self._derivationPath = None
self._numtx = 0
_label = None
_frozen = False
_scriptType = None
_status = None
_balance = QEAmount()
_pubkeys = None
_privkey = None
_derivationPath = None
_numtx = 0
_historyModel = None
detailsChanged = pyqtSignal()
self._historyModel = None
walletChanged = pyqtSignal()
@pyqtProperty(QEWallet, notify=walletChanged)