mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 09:02:31 -06:00
committed by
GitHub
parent
d2fceaa228
commit
5ef2a1df07
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user