[Qt] simplify return code and return values in txtablemodel

- also move an added space in a string where it belongs
This commit is contained in:
Philip Kaufmann 2014-08-09 15:29:55 +02:00
parent 21f1516468
commit bbad683224
1 changed files with 6 additions and 16 deletions

View File

@ -209,11 +209,8 @@ public:
}
return rec;
}
else
{
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,11 +327,8 @@ QString TransactionTableModel::formatTxDate(const TransactionRecord *wtx) const
{
return GUIUtil::dateTimeStr(wtx->time);
}
else
{
return QString();
}
}
/* Look up address in address book, if found return label (address)
otherwise just return (address)
@ -345,7 +339,7 @@ QString TransactionTableModel::lookupAddress(const std::string &address, bool to
QString description;
if(!label.isEmpty())
{
description += label + QString(" ");
description += label;
}
if(label.isEmpty() || tooltip)
{
@ -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,11 +634,8 @@ QModelIndex TransactionTableModel::index(int row, int column, const QModelIndex
{
return createIndex(row, column, priv->index(row));
}
else
{
return QModelIndex();
}
}
void TransactionTableModel::updateDisplayUnit()
{