Browse Source

Use qsizetype instead of int where required by Qt6

adaptive-webui-19844
Vladimir Golovnev (Glassez) 4 years ago
parent
commit
cd7bdc8998
No known key found for this signature in database
GPG Key ID: 52A2C7DEE2DFA6F7
  1. 6
      src/gui/addnewtorrentdialog.cpp
  2. 6
      src/gui/properties/propertieswidget.cpp

6
src/gui/addnewtorrentdialog.cpp

@ -549,10 +549,10 @@ void AddNewTorrentDialog::displayContentTreeMenu(const QPoint &) @@ -549,10 +549,10 @@ void AddNewTorrentDialog::displayContentTreeMenu(const QPoint &)
const QModelIndexList selectedRows = m_ui->contentTreeView->selectionModel()->selectedRows(0);
const int priorityGroups = 3;
const int priorityGroupSize = std::max((selectedRows.length() / priorityGroups), 1);
const qsizetype priorityGroups = 3;
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;
switch (i / priorityGroupSize)

6
src/gui/properties/propertieswidget.cpp

@ -637,10 +637,10 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &) @@ -637,10 +637,10 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &)
const QModelIndexList selectedRows = m_ui->filesList->selectionModel()->selectedRows(0);
const int priorityGroups = 3;
const int priorityGroupSize = std::max((selectedRows.length() / priorityGroups), 1);
const qsizetype priorityGroups = 3;
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;
switch (i / priorityGroupSize)

Loading…
Cancel
Save