aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-02-28 16:11:15 -0500
committerluigi1111 <luigi1111w@gmail.com>2020-02-28 16:11:15 -0500
commit7a8685606308c443b55945c3f17f2865892c77c9 (patch)
tree1ed812de6fa52fc8530a68c95f4e98ec0586ff76 /src/model
parent86f35992dcebb03681059db58f414c32b3db4308 (diff)
parent9deca92e0776a97e6364b6e6f36cc8a8718ea2cb (diff)
downloadmonzero-gui-7a8685606308c443b55945c3f17f2865892c77c9.tar.gz
monzero-gui-7a8685606308c443b55945c3f17f2865892c77c9.tar.xz
monzero-gui-7a8685606308c443b55945c3f17f2865892c77c9.zip
Merge pull request #2787
9deca92 fix multiple minor issues (c-style casts, default branch, etc.) (xiphon)
Diffstat (limited to 'src/model')
-rw-r--r--src/model/AddressBookModel.cpp2
-rw-r--r--src/model/SubaddressAccountModel.cpp2
-rw-r--r--src/model/SubaddressModel.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/model/AddressBookModel.cpp b/src/model/AddressBookModel.cpp
index 98145bd1..d9086c34 100644
--- a/src/model/AddressBookModel.cpp
+++ b/src/model/AddressBookModel.cpp
@@ -71,6 +71,8 @@ QVariant AddressBookModel::data(const QModelIndex &index, int role) const
// Qt doesnt support size_t overload type casting
result.setValue(row.getRowId());
break;
+ default:
+ qCritical() << "Unimplemented role " << role;
}
});
if (!found) {
diff --git a/src/model/SubaddressAccountModel.cpp b/src/model/SubaddressAccountModel.cpp
index 51721b8b..e4bce411 100644
--- a/src/model/SubaddressAccountModel.cpp
+++ b/src/model/SubaddressAccountModel.cpp
@@ -53,7 +53,7 @@ int SubaddressAccountModel::rowCount(const QModelIndex &) const
QVariant SubaddressAccountModel::data(const QModelIndex &index, int role) const
{
- if (!index.isValid() || index.row() < 0 || (unsigned)index.row() >= m_subaddressAccount->count())
+ if (!index.isValid() || index.row() < 0 || static_cast<quint64>(index.row()) >= m_subaddressAccount->count())
return {};
QVariant result;
diff --git a/src/model/SubaddressModel.cpp b/src/model/SubaddressModel.cpp
index 38168ecf..7d4c408c 100644
--- a/src/model/SubaddressModel.cpp
+++ b/src/model/SubaddressModel.cpp
@@ -54,7 +54,7 @@ int SubaddressModel::rowCount(const QModelIndex &) const
QVariant SubaddressModel::data(const QModelIndex &index, int role) const
{
- if (!index.isValid() || index.row() < 0 || (unsigned)index.row() >= m_subaddress->count())
+ if (!index.isValid() || index.row() < 0 || static_cast<quint64>(index.row()) >= m_subaddress->count())
return {};
QVariant result;