mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
[qt] Display more helpful message when adding a send address has failed
Addresses #12796. When we're unable to add a sending address to the address book because it already exists as a receiving address, display a message indicating as much. This should help avoid confusion about an address supposedly already in the book but which isn't currently visible in the interface.
This commit is contained in:
@@ -67,10 +67,12 @@ public:
|
||||
*/
|
||||
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type);
|
||||
|
||||
/* Look up label for address in address book, if not found return empty string.
|
||||
*/
|
||||
/** Look up label for address in address book, if not found return empty string. */
|
||||
QString labelForAddress(const QString &address) const;
|
||||
|
||||
/** Look up purpose for address in address book, if not found return empty string. */
|
||||
QString purposeForAddress(const QString &address) const;
|
||||
|
||||
/* Look up row index of an address in the model.
|
||||
Return -1 if not found.
|
||||
*/
|
||||
@@ -86,6 +88,9 @@ private:
|
||||
QStringList columns;
|
||||
EditStatus editStatus;
|
||||
|
||||
/** Look up address book data given an address string. */
|
||||
bool getAddressData(const QString &address, std::string* name, std::string* purpose) const;
|
||||
|
||||
/** Notify listeners that data changed. */
|
||||
void emitDataChanged(int index);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user