mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use qsizetype instead of int where required by Qt6
This commit is contained in:
parent
a93391e247
commit
cd7bdc8998
2 changed files with 6 additions and 6 deletions
|
@ -549,10 +549,10 @@ void AddNewTorrentDialog::displayContentTreeMenu(const QPoint &)
|
||||||
|
|
||||||
const QModelIndexList selectedRows = m_ui->contentTreeView->selectionModel()->selectedRows(0);
|
const QModelIndexList selectedRows = m_ui->contentTreeView->selectionModel()->selectedRows(0);
|
||||||
|
|
||||||
const int priorityGroups = 3;
|
const qsizetype priorityGroups = 3;
|
||||||
const int priorityGroupSize = std::max((selectedRows.length() / priorityGroups), 1);
|
const auto priorityGroupSize = std::max<qsizetype>((selectedRows.length() / priorityGroups), 1);
|
||||||
|
|
||||||
for (int i = 0; i < selectedRows.length(); ++i)
|
for (qsizetype i = 0; i < selectedRows.length(); ++i)
|
||||||
{
|
{
|
||||||
auto priority = BitTorrent::DownloadPriority::Ignored;
|
auto priority = BitTorrent::DownloadPriority::Ignored;
|
||||||
switch (i / priorityGroupSize)
|
switch (i / priorityGroupSize)
|
||||||
|
|
|
@ -637,10 +637,10 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &)
|
||||||
|
|
||||||
const QModelIndexList selectedRows = m_ui->filesList->selectionModel()->selectedRows(0);
|
const QModelIndexList selectedRows = m_ui->filesList->selectionModel()->selectedRows(0);
|
||||||
|
|
||||||
const int priorityGroups = 3;
|
const qsizetype priorityGroups = 3;
|
||||||
const int priorityGroupSize = std::max((selectedRows.length() / priorityGroups), 1);
|
const auto priorityGroupSize = std::max<qsizetype>((selectedRows.length() / priorityGroups), 1);
|
||||||
|
|
||||||
for (int i = 0; i < selectedRows.length(); ++i)
|
for (qsizetype i = 0; i < selectedRows.length(); ++i)
|
||||||
{
|
{
|
||||||
auto priority = BitTorrent::DownloadPriority::Ignored;
|
auto priority = BitTorrent::DownloadPriority::Ignored;
|
||||||
switch (i / priorityGroupSize)
|
switch (i / priorityGroupSize)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue