1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-07 09:52:18 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
sledgehammer999
c0ccf28d2c Bump to v3.2.5 2015-10-31 15:28:35 +02:00
sledgehammer999
9ff617a644 Update Changelog. 2015-10-31 15:24:25 +02:00
Vladimir Golovnev (Glassez)
0fbdc6471c Fix DownloadedPiecesBar::bitfieldToFloatVector(). 2015-10-29 23:30:19 +02:00
Vladimir Golovnev (Glassez)
1ecdcfc29c Fix PieceAvailabilityBar::intToFloatVector(). Closes #3937. 2015-10-29 23:30:13 +02:00
sledgehammer999
522ff3b611 Merge pull request #3920 from Gelmir/qt5fix
Fix Qt5 build
2015-10-11 16:26:52 -05:00
Nick Tiskov
edac24ecca Fix Qt5 build 2015-10-11 15:55:07 +03:00
7 changed files with 19 additions and 28 deletions

View File

@@ -1,3 +1,7 @@
* Sat Oct 31 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.5
- BUGFIX: Fix difficult to reproduce crash. (glassez)
- OTHER: Fix Windows' Qt5 build. (Gelmir)
* Sat Oct 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.4
- FEATURE: Select the file of single file torrents when opening destination folder (pmzqla)
- BUGFIX: Fix crash with invalid favicon. Closes #3632. (glassez)

2
dist/mac/Info.plist vendored
View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.2.4</string>
<string>3.2.5</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>

View File

@@ -19,7 +19,7 @@ XPStyle on
!define CSIDL_APPDATA '0x1A' ;Application Data path
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
!define PROG_VERSION "3.2.4"
!define PROG_VERSION "3.2.5"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)

View File

@@ -669,7 +669,7 @@ misc::NaturalCompare::NaturalCompare()
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
#if defined(Q_OS_WIN)
// Without ICU library, QCollator doesn't support `setNumericMode(true)` on OS older than Win7
if(SysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
if(QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
return;
#endif
m_collator.setNumericMode(true);
@@ -682,7 +682,7 @@ bool misc::NaturalCompare::operator()(const QString &l, const QString &r)
#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0))
#if defined(Q_OS_WIN)
// Without ICU library, QCollator doesn't support `setNumericMode(true)` on OS older than Win7
if(SysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
if(QSysInfo::windowsVersion() < QSysInfo::WV_WINDOWS7)
return lessThan(l, r);
#endif
return (m_collator.compare(l, r) < 0);

View File

@@ -59,24 +59,17 @@ std::vector<float> DownloadedPiecesBar::bitfieldToFloatVector(const libtorrent::
// image.x(1) = pieces.x(1.7 >= x < 3.4)
for (int x = 0; x < reqSize; ++x) {
// don't use previously calculated value "ratio" here!!!
// float cannot save irrational number like 7/9, if this number will be rounded up by std::ceil
// give you x2 == pieces.size(), and index out of range: pieces[x2]
// this code is safe, so keep that in mind when you try optimize more.
// tested with size = 3000000ul
// R - real
const float fromR = (x * vecin.size()) / (float)reqSize;
const float toR = ((x + 1) * vecin.size()) / (float)reqSize;
const float fromR = x * ratio;
const float toR = (x + 1) * ratio;
// C - integer
int fromC = fromR;// std::floor not needed
int toC = std::ceil(toR);
if (toC > vecin.size())
--toC;
// position in pieces table
// libtorrent::bitfield::m_size is unsigned int(31 bits), so qlonglong is not needed
// tested with size = 3000000ul
int x2 = fromC;
// little speed up for really big pieces table, 10K+ size
@@ -88,7 +81,7 @@ std::vector<float> DownloadedPiecesBar::bitfieldToFloatVector(const libtorrent::
// case when calculated range is (15.2 >= x < 15.7)
if (x2 == toCMinusOne) {
if (vecin[x2]) {
value += toR - fromR;
value += ratio;
}
++x2;
}

View File

@@ -70,23 +70,17 @@ std::vector<float> PieceAvailabilityBar::intToFloatVector(const std::vector<int>
for (int x = 0; x < reqSize; ++x) {
// don't use previously calculated value "ratio" here!!!
// float cannot save irrational number like 7/9, if this number will be rounded up by std::ceil
// give you x2 == pieces.size(), and index out of range: pieces[x2]
// this code is safe, so keep that in mind when you try optimize more.
// tested with size = 3000000ul
// R - real
const float fromR = (x * vecin.size()) / (float)reqSize;
const float toR = ((x + 1) * vecin.size()) / (float)reqSize;
const float fromR = x * ratio;
const float toR = (x + 1) * ratio;
// C - integer
int fromC = fromR;// std::floor not needed
int toC = std::ceil(toR);
if (toC > vecin.size())
--toC;
// position in pieces table
// libtorrent::bitfield::m_size is unsigned int(31 bits), so qlonglong is not needed
// tested with size = 3000000ul
int x2 = fromC;
// little speed up for really big pieces table, 10K+ size
@@ -98,7 +92,7 @@ std::vector<float> PieceAvailabilityBar::intToFloatVector(const std::vector<int>
// case when calculated range is (15.2 >= x < 15.7)
if (x2 == toCMinusOne) {
if (vecin[x2]) {
value += (toR - fromR) * vecin[x2];
value += ratio * vecin[x2];
}
++x2;
}

View File

@@ -3,7 +3,7 @@ PROJECT_NAME = qbittorrent
# Define version numbers here
VER_MAJOR = 3
VER_MINOR = 2
VER_BUGFIX = 4
VER_BUGFIX = 5
VER_BUILD = 0
VER_STATUS = # Should be empty for stable releases!