Skip to content

Commit be4fd43

Browse files
authored
Merge branch 'c0re100:v5_0_x' into v5_0_x
2 parents 8f8c2aa + 7333035 commit be4fd43

File tree

162 files changed

+46453
-41977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+46453
-41977
lines changed

Changelog

+34
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
Sun Nov 17th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v5.0.2
2+
- BUGFIX: Remove trackers from previous category when moved to new one (glassez)
3+
- BUGFIX: Fix `.torrent` file could not be deleted when torrent is canceled (glassez)
4+
- BUGFIX: Reset tracker entries when pausing the session (glassez)
5+
- BUGFIX: Check real palette darkness to detect "dark theme" (glassez)
6+
- BUGFIX: Correctly handle "torrent finished" events (glassez)
7+
- BUGFIX: Preserve initial torrent progress while checking resume data (glassez)
8+
- BUGFIX: Avoid reapplying Mark-of-the-Web when it already exists (Chocobo1)
9+
- BUGFIX: Don't apply Mark-of-the-Web on existing files (Chocobo1)
10+
- WEBUI: Add color scheme switcher (sledgehammer999)
11+
- SEARCH: Correctly delete the moved search tab (glassez)
12+
- WINDOWS: Correctly save and restore Qt style setting (glassez)
13+
- WINDOWS: NSIS: update Luxembourgish, Simplified Chinese and Traditional Chinese translations (Ikko Eltociear Ashimine, 3gf8jv4dv)
14+
15+
Mon Oct 28th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v5.0.1
16+
- FEATURE: Add "Simple pread/pwrite" disk IO type (Hanabishi)
17+
- BUGFIX: Don't ignore SSL errors (sledgehammer999)
18+
- BUGFIX: Don't try to apply Mark-of-the-Web to nonexistent files (glassez)
19+
- BUGFIX: Disable "Move to trash" option by default (glassez)
20+
- BUGFIX: Disable the ability to create torrents with a piece size of 256MiB (stalkerok)
21+
- BUGFIX: Allow to choose Qt style (glassez)
22+
- BUGFIX: Always notify user about duplicate torrent (glassez)
23+
- BUGFIX: Correctly handle "torrent finished after move" event (glassez)
24+
- BUGFIX: Correctly apply filename filter when `!qB` extension is enabled (glassez)
25+
- BUGFIX: Improve color scheme change detection (glassez)
26+
- BUGFIX: Fix button state for SSL certificate check (Chocobo1)
27+
- WEBUI: Fix CSS that results in hidden torrent list in some browsers (skomerko)
28+
- WEBUI: Use proper text color to highlight items in all filter lists (skomerko)
29+
- WEBUI: Fix 'rename files' dialog cannot be opened more than once (Chocobo1)
30+
- WEBUI: Fix UI of Advanced Settings to show all settings (glassez)
31+
- WEBUI: Free resources allocated by web session once it is destructed (dyseg)
32+
- SEARCH: Import correct libraries (Chocobo1)
33+
- OTHER: Sync flag icons with upstream (xavier2k6)
34+
135
Sun Sep 29th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v5.0.0
236
- FEATURE: Support creating .torrent with larger piece size (Chocobo1)
337
- FEATURE: Improve tracker entries handling (glassez)

dist/mac/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<key>CFBundlePackageType</key>
5656
<string>APPL</string>
5757
<key>CFBundleShortVersionString</key>
58-
<string>5.0.0</string>
58+
<string>5.0.2</string>
5959
<key>CFBundleExecutable</key>
6060
<string>${EXECUTABLE_NAME}</string>
6161
<key>CFBundleIdentifier</key>

dist/unix/org.qbittorrent.qBittorrent.desktop

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ Name[ta]=qBittorrent
161161
GenericName[te]=క్యు బిట్ టొరెంట్ క్లయింట్
162162
Comment[te]=క్యు బిట్ టొరెంట్ తో ఫైల్స్ దిగుమతి చేసుకోండి , పంచుకోండి
163163
Name[te]=qBittorrent
164-
GenericName[th]=โปรแกรมบิททอเร้นท์
165-
Comment[th]=ดาวน์โหลดและแชร์ไฟล์ผ่าน BitTorrent
164+
GenericName[th]=โปรแกรมบิตทอร์เรนต์
165+
Comment[th]=ดาวน์โหลดและแชร์ไฟล์ผ่านบิตทอร์เรนต์
166166
Name[th]=qBittorrent
167167
GenericName[tr]=BitTorrent istemcisi
168168
Comment[tr]=Dosyaları BitTorrent üzerinden indirin ve paylaşın

dist/unix/org.qbittorrent.qBittorrent.metainfo.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@
6262
<url type="contribute">https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md</url>
6363
<content_rating type="oars-1.1"/>
6464
<releases>
65-
<release version="5.0.0" date="2024-09-29"/>
65+
<release version="5.0.2" date="2024-11-17"/>
6666
</releases>
6767
</component>

dist/windows/config.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
; 4.5.1.3 -> good
1515
; 4.5.1.3.2 -> bad
1616
; 4.5.0beta -> bad
17-
!define /ifndef QBT_VERSION "5.0.0.10"
17+
!define /ifndef QBT_VERSION "5.0.2.10"
1818

1919
; Option that controls the installer's window name
2020
; If set, its value will be used like this:

dist/windows/installer-translations/luxembourgish.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LangString inst_magnet ${LANG_LUXEMBOURGISH} "Magnet-Linken mat qBittorrent opma
1515
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
1616
LangString inst_firewall ${LANG_LUXEMBOURGISH} "Reegel an der Windows Firewall dobäisetzen"
1717
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
18-
LangString inst_pathlimit ${LANG_LUXEMBOURGISH} "D'Windows path lenght (Padlängtbeschränkung) desaktivéieren (260 Zeechen MAX_PATH Beschränkung, erfuerdert min. Windows 10 1607)"
18+
LangString inst_pathlimit ${LANG_LUXEMBOURGISH} "D'Windows path length (Padlängtbeschränkung) desaktivéieren (260 Zeechen MAX_PATH Beschränkung, erfuerdert min. Windows 10 1607)"
1919
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
2020
LangString inst_firewallinfo ${LANG_LUXEMBOURGISH} "Reegel an der Windows Firewall dobäisetzen"
2121
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."

dist/windows/installer-translations/simpchinese.nsh

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ LangString inst_warning ${LANG_SIMPCHINESE} "qBittorrent 正在运行。 安装
2323
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
2424
LangString inst_uninstall_question ${LANG_SIMPCHINESE} "当前版本会被卸载。 用户设置和种子会被完整保留。"
2525
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
26-
LangString inst_unist ${LANG_SIMPCHINESE} "卸载以前的版本"
26+
LangString inst_unist ${LANG_SIMPCHINESE} "正在卸载以前的版本"
2727
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
2828
LangString launch_qbt ${LANG_SIMPCHINESE} "启动 qBittorrent。"
2929
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
3030
LangString inst_requires_64bit ${LANG_SIMPCHINESE} "此安装程序仅支持 64 位 Windows 系统。"
3131
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
32-
LangString inst_requires_win10 ${LANG_SIMPCHINESE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
32+
LangString inst_requires_win10 ${LANG_SIMPCHINESE} "此安装程序仅支持 Windows 10 (1809) / Windows Server 2019 或更新的系统。"
3333
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
3434
LangString inst_uninstall_link_description ${LANG_SIMPCHINESE} "卸载 qBittorrent"
3535

dist/windows/installer-translations/tradchinese.nsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ LangString launch_qbt ${LANG_TRADCHINESE} "啟動 qBittorrent"
2929
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
3030
LangString inst_requires_64bit ${LANG_TRADCHINESE} "此安裝程式僅支援 64 位元版本的 Windows。"
3131
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
32-
LangString inst_requires_win10 ${LANG_TRADCHINESE} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
32+
LangString inst_requires_win10 ${LANG_TRADCHINESE} "此安裝程式僅支援 Windows 10 (1809) / Windows Server 2019 以上的系統。"
3333
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
3434
LangString inst_uninstall_link_description ${LANG_TRADCHINESE} "移除 qBittorrent"
3535

src/base/addtorrentmanager.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,9 @@ void AddTorrentManager::setTorrentFileGuard(const QString &source, std::shared_p
195195
m_guardedTorrentFiles.emplace(source, std::move(torrentFileGuard));
196196
}
197197

198-
void AddTorrentManager::releaseTorrentFileGuard(const QString &source)
198+
std::shared_ptr<TorrentFileGuard> AddTorrentManager::releaseTorrentFileGuard(const QString &source)
199199
{
200-
auto torrentFileGuard = m_guardedTorrentFiles.take(source);
201-
if (torrentFileGuard)
202-
torrentFileGuard->setAutoRemove(false);
200+
return m_guardedTorrentFiles.take(source);
203201
}
204202

205203
bool AddTorrentManager::processTorrent(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr

src/base/addtorrentmanager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class AddTorrentManager : public ApplicationComponent<QObject>
7474
void handleAddTorrentFailed(const QString &source, const QString &reason);
7575
void handleDuplicateTorrent(const QString &source, const BitTorrent::TorrentDescriptor &torrentDescr, BitTorrent::Torrent *existingTorrent);
7676
void setTorrentFileGuard(const QString &source, std::shared_ptr<TorrentFileGuard> torrentFileGuard);
77-
void releaseTorrentFileGuard(const QString &source);
77+
std::shared_ptr<TorrentFileGuard> releaseTorrentFileGuard(const QString &source);
7878

7979
private:
8080
void onDownloadFinished(const Net::DownloadResult &result);

src/base/bittorrent/sessionimpl.cpp

+34-10
Original file line numberDiff line numberDiff line change
@@ -4188,14 +4188,29 @@ bool SessionImpl::isPaused() const
41884188

41894189
void SessionImpl::pause()
41904190
{
4191-
if (!m_isPaused)
4191+
if (m_isPaused)
4192+
return;
4193+
4194+
if (isRestored())
41924195
{
4193-
if (isRestored())
4194-
m_nativeSession->pause();
4196+
m_nativeSession->pause();
41954197

4196-
m_isPaused = true;
4197-
emit paused();
4198+
for (TorrentImpl *torrent : asConst(m_torrents))
4199+
{
4200+
torrent->resetTrackerEntryStatuses();
4201+
4202+
const QList<TrackerEntryStatus> trackers = torrent->trackers();
4203+
QHash<QString, TrackerEntryStatus> updatedTrackers;
4204+
updatedTrackers.reserve(trackers.size());
4205+
4206+
for (const TrackerEntryStatus &status : trackers)
4207+
updatedTrackers.emplace(status.url, status);
4208+
emit trackerEntryStatusesUpdated(torrent, updatedTrackers);
4209+
}
41984210
}
4211+
4212+
m_isPaused = true;
4213+
emit paused();
41994214
}
42004215

42014216
void SessionImpl::resume()
@@ -5417,9 +5432,6 @@ void SessionImpl::handleMoveTorrentStorageJobFinished(const Path &newPath)
54175432
if (torrent)
54185433
{
54195434
torrent->handleMoveStorageJobFinished(newPath, finishedJob.context, torrentHasOutstandingJob);
5420-
// The torrent may become "finished" at the end of the move if it was moved
5421-
// from the "incomplete" location after downloading finished.
5422-
processPendingFinishedTorrents();
54235435
}
54245436
else if (!torrentHasOutstandingJob)
54255437
{
@@ -5683,6 +5695,11 @@ void SessionImpl::setTorrentContentLayout(const TorrentContentLayout value)
56835695
// Read alerts sent by libtorrent session
56845696
void SessionImpl::readAlerts()
56855697
{
5698+
// cache current datetime of Qt and libtorrent clocks in order
5699+
// to optimize conversion of time points from lt to Qt clocks
5700+
m_ltNow = lt::clock_type::now();
5701+
m_qNow = QDateTime::currentDateTime();
5702+
56865703
const std::vector<lt::alert *> alerts = getPendingAlerts();
56875704

56885705
Q_ASSERT(m_loadedTorrents.isEmpty());
@@ -5709,6 +5726,9 @@ void SessionImpl::readAlerts()
57095726
}
57105727
}
57115728

5729+
// Some torrents may become "finished" after different alerts handling.
5730+
processPendingFinishedTorrents();
5731+
57125732
processTrackerStatuses();
57135733
}
57145734

@@ -6348,8 +6368,6 @@ void SessionImpl::handleStateUpdateAlert(const lt::state_update_alert *alert)
63486368
if (!updatedTorrents.isEmpty())
63496369
emit torrentsUpdated(updatedTorrents);
63506370

6351-
processPendingFinishedTorrents();
6352-
63536371
if (m_needSaveTorrentsQueue)
63546372
saveTorrentsQueue();
63556373

@@ -6546,3 +6564,9 @@ void SessionImpl::handleRemovedTorrent(const TorrentID &torrentID, const QString
65466564

65476565
m_removingTorrents.erase(removingTorrentDataIter);
65486566
}
6567+
6568+
QDateTime SessionImpl::fromLTTimePoint32(const libtorrent::time_point32 &timePoint) const
6569+
{
6570+
const auto secsSinceNow = lt::duration_cast<lt::seconds>(timePoint - m_ltNow + lt::milliseconds(500)).count();
6571+
return m_qNow.addSecs(secsSinceNow);
6572+
}

src/base/bittorrent/sessionimpl.h

+5
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,8 @@ namespace BitTorrent
477477
void addMappedPorts(const QSet<quint16> &ports);
478478
void removeMappedPorts(const QSet<quint16> &ports);
479479

480+
QDateTime fromLTTimePoint32(const lt::time_point32 &timePoint) const;
481+
480482
template <typename Func>
481483
void invoke(Func &&func)
482484
{
@@ -858,6 +860,9 @@ namespace BitTorrent
858860

859861
QList<TorrentImpl *> m_pendingFinishedTorrents;
860862

863+
QDateTime m_qNow;
864+
lt::clock_type::time_point m_ltNow;
865+
861866
friend void Session::initInstance();
862867
friend void Session::freeInstance();
863868
friend Session *Session::instance();

0 commit comments

Comments
 (0)