aboutsummaryrefslogtreecommitdiff
path: root/src/qt/addresstablemodel.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-08-08 17:38:17 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-08-08 17:38:17 +0200
commitb0849613bf02b61774b23804c8feed54aa88474a (patch)
treee5a9c69413609d241f69b743394c733192685aff /src/qt/addresstablemodel.cpp
parentfb390d3505c9d0ad8f88cc9a26a2f8190254eda5 (diff)
downloadbitcoin-b0849613bf02b61774b23804c8feed54aa88474a.tar.xz
QtUI code cleanup / comment improvements
Diffstat (limited to 'src/qt/addresstablemodel.cpp')
-rw-r--r--src/qt/addresstablemodel.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp
index c8329bb2fd..bd314ba0f0 100644
--- a/src/qt/addresstablemodel.cpp
+++ b/src/qt/addresstablemodel.cpp
@@ -161,13 +161,13 @@ bool AddressTableModel::setData(const QModelIndex & index, const QVariant & valu
rec->label = value.toString();
break;
case Address:
- // Refuse to set invalid address
+ // Refuse to set invalid address, set error status and return false
if(!walletModel->validateAddress(value.toString()))
{
editStatus = INVALID_ADDRESS;
return false;
}
- // Double-check that we're not overwriting receiving address
+ // Double-check that we're not overwriting a receiving address
if(rec->type == AddressTableEntry::Sending)
{
CRITICAL_BLOCK(wallet->cs_mapAddressBook)
@@ -234,7 +234,7 @@ QModelIndex AddressTableModel::index(int row, int column, const QModelIndex & pa
void AddressTableModel::updateList()
{
- // Update internal model from Bitcoin core
+ // Update address book model from Bitcoin core
beginResetModel();
priv->refreshAddressTable();
endResetModel();
@@ -247,7 +247,6 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
editStatus = OK;
-
if(type == Send)
{
if(!walletModel->validateAddress(address))
@@ -255,7 +254,7 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
editStatus = INVALID_ADDRESS;
return QString();
}
- // Check for duplicate
+ // Check for duplicate addresses
CRITICAL_BLOCK(wallet->cs_mapAddressBook)
{
if(wallet->mapAddressBook.count(strAddress))