Qt: Fix another qsizetype warning.

Fix

ui/qt/models/filter_list_model.cpp:299:33: warning: implicit conversion loses integer precision: 'qsizetype' (aka 'long long') to 'int' [-Wshorten-64-to-32]
            storage.move(strow, storeTo);
                    ~~~~        ^~~~~~~

when building with Qt 5.
This commit is contained in:
Gerald Combs 2022-03-28 09:05:24 -05:00
parent 8df570294f
commit f54bad026f
1 changed files with 4 additions and 2 deletions

View File

@ -291,9 +291,11 @@ bool FilterListModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int strow = rows[0].toInt(&ok);
if (ok)
{
qsizetype storeTo = insertRow;
int storeTo = insertRow;
if (storeTo < 0 || storeTo >= storage.count())
storeTo = storage.count() - 1;
{
storeTo = static_cast<int>(storage.count()) - 1;
}
beginResetModel();
storage.move(strow, storeTo);