aboutsummaryrefslogtreecommitdiff
path: root/src/qt/editaddressdialog.h
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-01-08 08:17:58 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-01-09 16:55:24 +0100
commite6d230056202b05a27f187dff2648eb5c76fcfee (patch)
tree2280c65d80a7014472a0f42b524e5959870de006 /src/qt/editaddressdialog.h
parent429915bd0dfcdb03b13d9a3c2fb82d5401ef70ce (diff)
Bitcoin-Qt: fix known addressbook bugs
- add qSort() for cachedAddressTable, as qLowerBound() and qUpperBound() require the list to be in ascending order (see http://harmattan-dev.nokia.com/docs/library/html/qt4/qtalgorithms.html#qLowerBound) - add a new check in AddressTableModel::setData() to just return, when no changes were made to a label or an address (prevents entry duplication issue) - remove "rec->label = value.toString();" from AddressTableModel::setData() as the label gets updated by AddressTablePriv::updateEntry() anyway (seems @sipa added this line via https://github.com/bitcoin/bitcoin/commit/1025440184ef100a22d07c7bb543ee45cf169d64#L6R225) - add another new check in AddressTableModel::setData() to just return, if a duplicate address was found (prevents address overwrite) - add a new check to EditAddressDialog::setModel() to prevent setting an invalid model - re-work the switch-case statement in AddressTableModel::accept() to always break (as return get's called anyway) and order the list to match the enum definition - make accept() in editaddressdialog.h a public slot, which it should be - misc small coding style changes
Diffstat (limited to 'src/qt/editaddressdialog.h')
-rw-r--r--src/qt/editaddressdialog.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qt/editaddressdialog.h b/src/qt/editaddressdialog.h
index 7ec053f135..0e4183bd52 100644
--- a/src/qt/editaddressdialog.h
+++ b/src/qt/editaddressdialog.h
@@ -27,15 +27,17 @@ public:
};
explicit EditAddressDialog(Mode mode, QWidget *parent = 0);
- ~EditAddressDialog();
+ ~EditAddressDialog();
void setModel(AddressTableModel *model);
void loadRow(int row);
- void accept();
-
QString getAddress() const;
void setAddress(const QString &address);
+
+public slots:
+ void accept();
+
private:
bool saveCurrentRow();