Browse Source

qml: consistency camelcase public slots qedaemon, qeinvoice, qewizard

master
Sander van Grieken 3 years ago
parent
commit
264540e12b
  1. 6
      electrum/gui/qml/components/InvoiceDialog.qml
  2. 2
      electrum/gui/qml/components/NewWalletWizard.qml
  3. 2
      electrum/gui/qml/components/OpenWalletDialog.qml
  4. 2
      electrum/gui/qml/components/ServerConnectWizard.qml
  5. 4
      electrum/gui/qml/components/WalletMainView.qml
  6. 4
      electrum/gui/qml/components/Wallets.qml
  7. 6
      electrum/gui/qml/components/main.qml
  8. 2
      electrum/gui/qml/qedaemon.py
  9. 6
      electrum/gui/qml/qeinvoice.py
  10. 2
      electrum/gui/qml/qewizard.py

6
electrum/gui/qml/components/InvoiceDialog.qml

@ -397,7 +397,7 @@ ElDialog {
if (invoice.amount.isEmpty) {
invoice.amountOverride = amountMax.checked ? MAX : Config.unitsToSats(amountBtc.text)
}
invoice.save_invoice()
invoice.saveInvoice()
app.stack.push(Qt.resolvedUrl('Invoices.qml'))
dialog.close()
}
@ -414,7 +414,7 @@ ElDialog {
}
if (!invoice.isSaved) {
// save invoice if newly parsed
invoice.save_invoice()
invoice.saveInvoice()
}
doPay() // only signal here
}
@ -432,7 +432,7 @@ ElDialog {
if (payImmediately) {
if (invoice.canPay) {
if (!invoice.isSaved) {
invoice.save_invoice()
invoice.saveInvoice()
}
doPay()
}

2
electrum/gui/qml/components/NewWalletWizard.qml

@ -18,7 +18,7 @@ Wizard {
wiz: Daemon.newWalletWizard
Component.onCompleted: {
var view = wiz.start_wizard()
var view = wiz.startWizard()
_loadNextComponent(view)
}

2
electrum/gui/qml/components/OpenWalletDialog.qml

@ -120,7 +120,7 @@ ElDialog {
}
onReadyChanged: {
if (ready) {
Daemon.load_wallet(openwalletdialog.path, password.text)
Daemon.loadWallet(openwalletdialog.path, password.text)
openwalletdialog.close()
}
}

2
electrum/gui/qml/components/ServerConnectWizard.qml

@ -28,7 +28,7 @@ Wizard {
}
Component.onCompleted: {
var view = wiz.start_wizard()
var view = wiz.startWizard()
_loadNextComponent(view)
}
}

4
electrum/gui/qml/components/WalletMainView.qml

@ -164,7 +164,7 @@ Item {
newww.walletCreated.connect(function() {
Daemon.availableWallets.reload()
// and load the new wallet
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
})
newww.open()
}
@ -341,7 +341,7 @@ Item {
dialog.open()
} else if (invoice.invoiceType == Invoice.LightningInvoice) {
console.log('About to pay lightning invoice')
invoice.pay_lightning_invoice()
invoice.payLightningInvoice()
}
}

4
electrum/gui/qml/components/Wallets.qml

@ -21,7 +21,7 @@ Pane {
dialog.walletCreated.connect(function() {
Daemon.availableWallets.reload()
// and load the new wallet
Daemon.load_wallet(dialog.path, dialog.wizard_data['password'])
Daemon.loadWallet(dialog.path, dialog.wizard_data['password'])
})
}
@ -59,7 +59,7 @@ Pane {
onClicked: {
if (!Daemon.currentWallet || Daemon.currentWallet.name != model.name)
Daemon.load_wallet(model.path)
Daemon.loadWallet(model.path)
else
app.stack.pop()
}

6
electrum/gui/qml/components/main.qml

@ -420,7 +420,7 @@ ApplicationWindow
newww.walletCreated.connect(function() {
Daemon.availableWallets.reload()
// and load the new wallet
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
})
newww.open()
})
@ -428,13 +428,13 @@ ApplicationWindow
} else {
Daemon.startNetwork()
if (Daemon.availableWallets.rowCount() > 0) {
Daemon.load_wallet()
Daemon.loadWallet()
} else {
var newww = app.newWalletWizard.createObject(app)
newww.walletCreated.connect(function() {
Daemon.availableWallets.reload()
// and load the new wallet
Daemon.load_wallet(newww.path, newww.wizard_data['password'])
Daemon.loadWallet(newww.path, newww.wizard_data['password'])
})
newww.open()
}

2
electrum/gui/qml/qedaemon.py

@ -158,7 +158,7 @@ class QEDaemon(AuthMixin, QObject):
@pyqtSlot()
@pyqtSlot(str)
@pyqtSlot(str, str)
def load_wallet(self, path=None, password=None):
def loadWallet(self, path=None, password=None):
if path is None:
self._path = self.daemon.config.get('wallet_path') # command line -w option
if self._path is None:

6
electrum/gui/qml/qeinvoice.py

@ -370,12 +370,12 @@ class QEInvoice(QObject, QtEventListener):
self.canPay = True
@pyqtSlot()
def pay_lightning_invoice(self):
def payLightningInvoice(self):
if not self.canPay:
raise Exception('can not pay invoice, canPay is false')
if self.invoiceType != QEInvoice.Type.LightningInvoice:
raise Exception('pay_lightning_invoice can only pay lightning invoices')
raise Exception('payLightningInvoice can only pay lightning invoices')
if self.amount.isEmpty:
if self.amountOverride.isEmpty:
@ -651,7 +651,7 @@ class QEInvoiceParser(QEInvoice):
self.recipient = invoice['pr']
@pyqtSlot()
def save_invoice(self):
def saveInvoice(self):
if not self._effectiveInvoice:
return
if self.isSaved:

2
electrum/gui/qml/qewizard.py

@ -13,7 +13,7 @@ class QEAbstractWizard(QObject):
QObject.__init__(self, parent)
@pyqtSlot(result=str)
def start_wizard(self):
def startWizard(self):
self.start()
return self._current.view

Loading…
Cancel
Save