aboutsummaryrefslogtreecommitdiff
path: root/src/qt
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2014-08-09 15:29:55 +0200
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2014-08-28 23:14:11 +0200
commitbbad683224c77743a9fef5cc2fc64cc43fbec192 (patch)
tree54aba0663ac851b15022ade1e3c2df9f5a601bef /src/qt
parent21f15164681ae57c3f0b4fa6e6771b4f4fb00a1a (diff)
[Qt] simplify return code and return values in txtablemodel
- also move an added space in a string where it belongs
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/transactiontablemodel.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp
index 98812b6f80..5f420c0c6c 100644
--- a/src/qt/transactiontablemodel.cpp
+++ b/src/qt/transactiontablemodel.cpp
@@ -209,10 +209,7 @@ public:
}
return rec;
}
- else
- {
- return 0;
- }
+ return 0;
}
QString describe(TransactionRecord *rec, int unit)
@@ -225,7 +222,7 @@ public:
return TransactionDesc::toHTML(wallet, mi->second, rec, unit);
}
}
- return QString("");
+ return QString();
}
};
@@ -330,10 +327,7 @@ QString TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const
{
return GUIUtil::dateTimeStr(wtx->time);
}
- else
- {
- return QString();
- }
+ return QString();
}
/* Look up address in address book, if found return label (address)
@@ -345,11 +339,11 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
QString description;
if(!label.isEmpty())
{
- description += label + QString(" ");
+ description += label;
}
if(label.isEmpty() || tooltip)
{
- description += QString("(") + QString::fromStdString(address) + QString(")");
+ description += QString(" (") + QString::fromStdString(address) + QString(")");
}
return description;
}
@@ -389,7 +383,6 @@ QVariant TransactionTableModel::txAddressDecoration(const TransactionRecord *wtx
default:
return QIcon(":/icons/tx_inout");
}
- return QVariant();
}
QString TransactionTableModel::formatTxToAddress(const TransactionRecord *wtx, bool tooltip) const
@@ -641,10 +634,7 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex
{
return createIndex(row, column, priv->index(row));
}
- else
- {
- return QModelIndex();
- }
+ return QModelIndex();
}
void TransactionTableModel::updateDisplayUnit()