mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-02 09:55:55 +00:00
commit
f7194eecb0
@ -239,7 +239,7 @@ QVector<int> TorrentInfo::fileIndicesForPiece(int pieceIndex) const
|
|||||||
std::vector<libt::file_slice> files(
|
std::vector<libt::file_slice> files(
|
||||||
nativeInfo()->map_block(pieceIndex, 0, nativeInfo()->piece_size(pieceIndex)));
|
nativeInfo()->map_block(pieceIndex, 0, nativeInfo()->piece_size(pieceIndex)));
|
||||||
QVector<int> res;
|
QVector<int> res;
|
||||||
res.reserve(files.size());
|
res.reserve(int(files.size()));
|
||||||
std::transform(files.begin(), files.end(), std::back_inserter(res),
|
std::transform(files.begin(), files.end(), std::back_inserter(res),
|
||||||
[](const libt::file_slice &s) { return s.file_index; });
|
[](const libt::file_slice &s) { return s.file_index; });
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ void Utils::Misc::openFolderSelect(const QString &absolutePath)
|
|||||||
}
|
}
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
HRESULT hresult = ::CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
HRESULT hresult = ::CoInitializeEx(nullptr, COINIT_MULTITHREADED);
|
||||||
ITEMIDLIST *pidl = ::ILCreateFromPathW(reinterpret_cast<PCTSTR>(Utils::Fs::toNativePath(path).utf16()));
|
PIDLIST_ABSOLUTE pidl = ::ILCreateFromPathW(reinterpret_cast<PCTSTR>(Utils::Fs::toNativePath(path).utf16()));
|
||||||
if (pidl) {
|
if (pidl) {
|
||||||
::SHOpenFolderAndSelectItems(pidl, 0, nullptr, 0);
|
::SHOpenFolderAndSelectItems(pidl, 0, nullptr, 0);
|
||||||
::ILFree(pidl);
|
::ILFree(pidl);
|
||||||
|
@ -159,7 +159,7 @@ int SpeedPlotView::maxYValue()
|
|||||||
if (!m_properties[static_cast<GraphID>(id)].enable)
|
if (!m_properties[static_cast<GraphID>(id)].enable)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (int i = queue.size() - 1, j = 0; i >= 0 && j <= m_viewablePointsCount; --i, ++j)
|
for (int i = int(queue.size()) - 1, j = 0; i >= 0 && j <= m_viewablePointsCount; --i, ++j)
|
||||||
if (queue[i].y[id] > maxYValue)
|
if (queue[i].y[id] > maxYValue)
|
||||||
maxYValue = queue[i].y[id];
|
maxYValue = queue[i].y[id];
|
||||||
}
|
}
|
||||||
@ -241,7 +241,7 @@ void SpeedPlotView::paintEvent(QPaintEvent *)
|
|||||||
|
|
||||||
QVector<QPoint> points;
|
QVector<QPoint> points;
|
||||||
|
|
||||||
for (int i = queue.size() - 1, j = 0; i >= 0 && j <= m_viewablePointsCount; --i, ++j) {
|
for (int i = int(queue.size()) - 1, j = 0; i >= 0 && j <= m_viewablePointsCount; --i, ++j) {
|
||||||
|
|
||||||
int new_x = rect.right() - j * xTickSize;
|
int new_x = rect.right() - j * xTickSize;
|
||||||
int new_y = rect.bottom() - queue[i].y[id] * yMultiplier;
|
int new_y = rect.bottom() - queue[i].y[id] * yMultiplier;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user