qml: consistency camelcase public slots qedaemon, qeinvoice, qewizard
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ Wizard {
|
||||
wiz: Daemon.newWalletWizard
|
||||
|
||||
Component.onCompleted: {
|
||||
var view = wiz.start_wizard()
|
||||
var view = wiz.startWizard()
|
||||
_loadNextComponent(view)
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ ElDialog {
|
||||
}
|
||||
onReadyChanged: {
|
||||
if (ready) {
|
||||
Daemon.load_wallet(openwalletdialog.path, password.text)
|
||||
Daemon.loadWallet(openwalletdialog.path, password.text)
|
||||
openwalletdialog.close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ Wizard {
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
var view = wiz.start_wizard()
|
||||
var view = wiz.startWizard()
|
||||
_loadNextComponent(view)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user