Qt: Fix Qt6 compile warnings for traffic tabs

Some conversions are warning, that qsizetype is implicitly
converted, this fixes that
This commit is contained in:
Roland Knall 2022-06-14 22:10:31 +02:00
parent a4f25e5115
commit 4f283e9ef8
2 changed files with 3 additions and 3 deletions

View File

@ -337,7 +337,7 @@ void TrafficTab::insertProtoTab(int protoId, bool emitSignals)
return; return;
QList<int> lFull = _allProtocols; QList<int> lFull = _allProtocols;
int idx = lFull.indexOf(protoId); int idx = (int) lFull.indexOf(protoId);
if (idx < 0) if (idx < 0)
return; return;
@ -346,7 +346,7 @@ void TrafficTab::insertProtoTab(int protoId, bool emitSignals)
if (part.count() > 0) { if (part.count() > 0) {
for (int cnt = idx - 1; cnt >= 0; cnt--) { for (int cnt = idx - 1; cnt >= 0; cnt--) {
if (lUsed.contains(part[cnt]) && part[cnt] != protoId) { if (lUsed.contains(part[cnt]) && part[cnt] != protoId) {
insertAt = lUsed.indexOf(part[cnt]) + 1; insertAt = (int) lUsed.indexOf(part[cnt]) + 1;
break; break;
} }
} }

View File

@ -87,7 +87,7 @@ TrafficTypesModel::TrafficTypesModel(GList ** recentList, QObject *parent) :
int TrafficTypesModel::rowCount(const QModelIndex &) const int TrafficTypesModel::rowCount(const QModelIndex &) const
{ {
return _allTaps.count(); return (int) _allTaps.count();
} }
int TrafficTypesModel::columnCount(const QModelIndex &) const int TrafficTypesModel::columnCount(const QModelIndex &) const