Use QList explicitly

PR #21016.
This commit is contained in:
Vladimir Golovnev
2024-07-04 08:30:39 +03:00
committed by GitHub
parent d2fceaa228
commit 5ef2a1df07
95 changed files with 408 additions and 373 deletions

View File

@@ -222,7 +222,7 @@ QColor PiecesBar::colorBoxBorderColor() const
return palette().color(QPalette::ToolTipText);
}
const QVector<QRgb> &PiecesBar::pieceColors() const
const QList<QRgb> &PiecesBar::pieceColors() const
{
return m_pieceColors;
}
@@ -261,7 +261,7 @@ void PiecesBar::showToolTip(const QHelpEvent *e)
{
const PieceIndexToImagePos transform {torrentInfo, m_image};
const int pieceIndex = transform.pieceIndex(imagePos);
const QVector<int> fileIndexes = torrentInfo.fileIndicesForPiece(pieceIndex);
const QList<int> fileIndexes = torrentInfo.fileIndicesForPiece(pieceIndex);
QString tooltipTitle;
if (fileIndexes.count() > 1)
@@ -305,7 +305,7 @@ void PiecesBar::highlightFile(int imagePos)
PieceIndexToImagePos transform {torrentInfo, m_image};
int pieceIndex = transform.pieceIndex(imagePos);
QVector<int> fileIndices {torrentInfo.fileIndicesForPiece(pieceIndex)};
QList<int> fileIndices {torrentInfo.fileIndicesForPiece(pieceIndex)};
if (fileIndices.count() == 1)
{
BitTorrent::TorrentInfo::PieceRange filePieces = torrentInfo.filePieces(fileIndices.first());
@@ -327,7 +327,7 @@ void PiecesBar::highlightFile(int imagePos)
void PiecesBar::updatePieceColors()
{
m_pieceColors = QVector<QRgb>(256);
m_pieceColors = QList<QRgb>(256);
for (int i = 0; i < 256; ++i)
{
float ratio = (i / 255.0);