From 264540e12b743f8a71e9a167c619929e13d0f4ef Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Tue, 25 Apr 2023 13:40:16 +0200 Subject: [PATCH] qml: consistency camelcase public slots qedaemon, qeinvoice, qewizard --- electrum/gui/qml/components/InvoiceDialog.qml | 6 +++--- electrum/gui/qml/components/NewWalletWizard.qml | 2 +- electrum/gui/qml/components/OpenWalletDialog.qml | 2 +- electrum/gui/qml/components/ServerConnectWizard.qml | 2 +- electrum/gui/qml/components/WalletMainView.qml | 4 ++-- electrum/gui/qml/components/Wallets.qml | 4 ++-- electrum/gui/qml/components/main.qml | 6 +++--- electrum/gui/qml/qedaemon.py | 2 +- electrum/gui/qml/qeinvoice.py | 6 +++--- electrum/gui/qml/qewizard.py | 2 +- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/electrum/gui/qml/components/InvoiceDialog.qml b/electrum/gui/qml/components/InvoiceDialog.qml index cb86a2c8d..d46212573 100644 --- a/electrum/gui/qml/components/InvoiceDialog.qml +++ b/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() } diff --git a/electrum/gui/qml/components/NewWalletWizard.qml b/electrum/gui/qml/components/NewWalletWizard.qml index a9789b8f7..efb8e5867 100644 --- a/electrum/gui/qml/components/NewWalletWizard.qml +++ b/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) } diff --git a/electrum/gui/qml/components/OpenWalletDialog.qml b/electrum/gui/qml/components/OpenWalletDialog.qml index eb125e998..b9922c42c 100644 --- a/electrum/gui/qml/components/OpenWalletDialog.qml +++ b/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() } } diff --git a/electrum/gui/qml/components/ServerConnectWizard.qml b/electrum/gui/qml/components/ServerConnectWizard.qml index cfffa0f52..725388f34 100644 --- a/electrum/gui/qml/components/ServerConnectWizard.qml +++ b/electrum/gui/qml/components/ServerConnectWizard.qml @@ -28,7 +28,7 @@ Wizard { } Component.onCompleted: { - var view = wiz.start_wizard() + var view = wiz.startWizard() _loadNextComponent(view) } } diff --git a/electrum/gui/qml/components/WalletMainView.qml b/electrum/gui/qml/components/WalletMainView.qml index 9a2c865e6..f10008682 100644 --- a/electrum/gui/qml/components/WalletMainView.qml +++ b/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() } } diff --git a/electrum/gui/qml/components/Wallets.qml b/electrum/gui/qml/components/Wallets.qml index fb25da666..2ac0c7763 100644 --- a/electrum/gui/qml/components/Wallets.qml +++ b/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() } diff --git a/electrum/gui/qml/components/main.qml b/electrum/gui/qml/components/main.qml index f57aae203..acb7ac36a 100644 --- a/electrum/gui/qml/components/main.qml +++ b/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() } diff --git a/electrum/gui/qml/qedaemon.py b/electrum/gui/qml/qedaemon.py index 10645328d..cf6ba212b 100644 --- a/electrum/gui/qml/qedaemon.py +++ b/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: diff --git a/electrum/gui/qml/qeinvoice.py b/electrum/gui/qml/qeinvoice.py index 0509c3fa4..dda1759da 100644 --- a/electrum/gui/qml/qeinvoice.py +++ b/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: diff --git a/electrum/gui/qml/qewizard.py b/electrum/gui/qml/qewizard.py index 50da4b0dc..a061099c9 100644 --- a/electrum/gui/qml/qewizard.py +++ b/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