Browse Source

qml: consistency camelcase qewallet

master
Sander van Grieken 3 years ago
parent
commit
61179ede8c
  1. 2
      electrum/gui/qml/components/Invoices.qml
  2. 2
      electrum/gui/qml/components/ReceiveRequests.qml
  3. 2
      electrum/gui/qml/components/WalletDetails.qml
  4. 2
      electrum/gui/qml/components/WalletMainView.qml
  5. 4
      electrum/gui/qml/components/main.qml
  6. 18
      electrum/gui/qml/qewallet.py

2
electrum/gui/qml/components/Invoices.qml

@ -94,7 +94,7 @@ Pane {
icon.source: '../../icons/delete.png'
visible: listview.currentIndex >= 0
onClicked: {
Daemon.currentWallet.delete_invoice(listview.currentItem.getKey())
Daemon.currentWallet.deleteInvoice(listview.currentItem.getKey())
}
}
FlatButton {

2
electrum/gui/qml/components/ReceiveRequests.qml

@ -93,7 +93,7 @@ Pane {
icon.source: '../../icons/delete.png'
visible: listview.currentIndex >= 0
onClicked: {
Daemon.currentWallet.delete_request(listview.currentItem.getKey())
Daemon.currentWallet.deleteRequest(listview.currentItem.getKey())
}
}
FlatButton {

2
electrum/gui/qml/components/WalletDetails.qml

@ -493,7 +493,7 @@ Pane {
infotext: qsTr('If you forget your password, you\'ll need to restore from seed. Please make sure you have your seed stored safely')
})
dialog.accepted.connect(function() {
Daemon.currentWallet.set_password(dialog.password)
Daemon.currentWallet.setPassword(dialog.password)
})
dialog.open()
}

2
electrum/gui/qml/components/WalletMainView.qml

@ -193,7 +193,7 @@ Item {
}
onPressAndHold: {
Config.userKnowsPressAndHold = true
Daemon.currentWallet.delete_expired_requests()
Daemon.currentWallet.deleteExpiredRequests()
app.stack.push(Qt.resolvedUrl('ReceiveRequests.qml'))
AppController.haptic()
}

4
electrum/gui/qml/components/main.qml

@ -541,13 +541,13 @@ ApplicationWindow
function handleAuthRequired(qtobject, method, authMessage) {
console.log('auth using method ' + method)
if (method == 'wallet') {
if (Daemon.currentWallet.verify_password('')) {
if (Daemon.currentWallet.verifyPassword('')) {
// wallet has no password
qtobject.authProceed()
} else {
var dialog = app.passwordDialog.createObject(app, {'title': qsTr('Enter current password')})
dialog.accepted.connect(function() {
if (Daemon.currentWallet.verify_password(dialog.password)) {
if (Daemon.currentWallet.verifyPassword(dialog.password)) {
qtobject.authProceed()
} else {
qtobject.authCancel()

18
electrum/gui/qml/qewallet.py

@ -614,7 +614,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
threading.Thread(target=pay_thread, daemon=True).start()
@pyqtSlot()
def delete_expired_requests(self):
def deleteExpiredRequests(self):
keys = self.wallet.delete_expired_requests()
for key in keys:
self.requestModel.delete_invoice(key)
@ -654,27 +654,19 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
self.requestCreateSuccess.emit(key)
@pyqtSlot(str)
def delete_request(self, key: str):
def deleteRequest(self, key: str):
self._logger.debug('delete req %s' % key)
self.wallet.delete_request(key)
self.requestModel.delete_invoice(key)
@pyqtSlot(str, result='QVariant')
def get_request(self, key: str):
return self.requestModel.get_model_invoice(key)
@pyqtSlot(str)
def delete_invoice(self, key: str):
def deleteInvoice(self, key: str):
self._logger.debug('delete inv %s' % key)
self.wallet.delete_invoice(key)
self.invoiceModel.delete_invoice(key)
@pyqtSlot(str, result='QVariant')
def get_invoice(self, key: str):
return self.invoiceModel.get_model_invoice(key)
@pyqtSlot(str, result=bool)
def verify_password(self, password):
def verifyPassword(self, password):
try:
self.wallet.storage.check_password(password)
return True
@ -682,7 +674,7 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
return False
@pyqtSlot(str)
def set_password(self, password):
def setPassword(self, password):
if password == '':
password = None

Loading…
Cancel
Save