mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
[qt] Simplifies boolean expression model && model->haveWatchOnly()
The boolean expression model && model->haveWatchOnly() can be simplified to model->haveWatchOnly(), because if (!model || !model->getOptionsModel()) { return; } guards against a potential dereferenced null pointer.
This commit is contained in:
parent
63a4dc1087
commit
6dda059bde
1 changed files with 1 additions and 1 deletions
|
|
@ -365,7 +365,7 @@ void TransactionView::exportClicked()
|
||||||
// name, column, role
|
// name, column, role
|
||||||
writer.setModel(transactionProxyModel);
|
writer.setModel(transactionProxyModel);
|
||||||
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
|
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
|
||||||
if (model && model->haveWatchOnly())
|
if (model->haveWatchOnly())
|
||||||
writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
|
writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
|
||||||
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
|
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
|
||||||
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
|
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue