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

Compare commits

..

108 Commits

Author SHA1 Message Date
sledgehammer999
97853f31f2 Bump to 4.5.2 2023-02-28 00:40:57 +02:00
sledgehammer999
66ffb7328d Update Changelog 2023-02-28 00:40:15 +02:00
sledgehammer999
9d9101186d Sync translations from Transifex and run lupdate 2023-02-28 00:22:28 +02:00
sledgehammer999
621ec4e92f Migrate transifex tool config to new version 2023-02-28 00:22:28 +02:00
sledgehammer999
4b752cba4f Merge pull request #18627 from glassez/v4.5
Backport changes to v4.5.x branch
2023-02-27 23:08:07 +02:00
Vladimir Golovnev
38c0864bf2 Reject requests that contain backslash in path
PR #18626.
Closes #18618.
2023-02-27 16:52:42 +03:00
Vladimir Golovnev
c21c3d2300 WebAPI: Allow to set read-only directory as torrent location
PR #18613.
Closes #18480.
2023-02-27 10:14:28 +03:00
Vladimir Golovnev
3be5273246 Prevent RSS folder from being moved into itself
PR #18619.
Closes #18446.
2023-02-27 10:14:10 +03:00
Vladimir Golovnev
37e348ed92 Merge pull request #18567 from glassez/v4.5
Backport changes to v4.5.x branch
2023-02-19 20:47:11 +03:00
brvphoenix
36364121ba GHA CI: Add missing dependencies
PR #18596.
2023-02-19 17:04:56 +03:00
Vladimir Golovnev
df08bd331c Prevent precise timers from being used when unnecessary
The implementation of QTimer::singleShot() uses Qt::PreciseTimer if interval is less than 2 seconds. This isn't mentioned in the docs.
Qt::PreciseTimer increases the system's timer resolution which negatively affects power consumption.

PR #18555.
Closes #18350.
2023-02-19 15:06:54 +02:00
sledgehammer999
abd1ab5539 Support TLS 1.2+ only in the server
Closes #18122
2023-02-19 14:58:30 +02:00
sledgehammer999
632d33b266 Blacklist bad ciphers for TLS in the server
Prevents the ROBOT attack.
Closes #18483
2023-02-19 14:58:23 +02:00
Chocobo1
35f7e1c896 GHA CI: compress debug symbols
The result binary is smaller.
2023-02-19 10:56:01 +03:00
Chocobo1
792301dfe4 GHA CI: don't overwrite system default compile flags
System might have some default compile flags which are crucial for security hardening so we
should append our flags instead of overwriting them.
2023-02-19 10:52:08 +03:00
Chocobo1
e31cf5ac23 GHA CI: revert "[CI Ubuntu] Strip installed components"
For tester convenience, the binaries should ship with debug symbols.
This reverts commit b8aa9e5609.
2023-02-19 10:51:44 +03:00
Chocobo1
0bfe6ff64b GHA CI: use least permission level
`actions: write` is required by Chocobo1/setup-ccache-action.
`pull-requests: write` is required by actions/stale.
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
2023-02-19 10:51:10 +03:00
Chocobo1
d40c7e8833 GHA CI: speed up package installation on macOS
Setup time is shortened by cutting down unnecessary operations.

https://docs.brew.sh/Manpage#environment
2023-02-19 10:50:39 +03:00
Vladimir Golovnev
8e81d44b3c Update the cached state once recheck is started
We have to force update the cached state, otherwise someone will be able to get an incorrect one during the interval until the cached state is updated in a regular way.

PR #18579.
Closes #18559.
2023-02-17 07:23:20 +03:00
Vladimir Golovnev
97a30218bc Don't increase limits when prefetching metadata for added magnets
Adjusting limits was made based on the belief that "forced" torrents (internally used for prefetching metadata)
are still under limits, but ignore only the queue. This is not really the case. "Forced" torrents ignore the limits
like "maximum active torrents/downloads", so adjusting limits is not required, and what's more, it really causes the
problem of unexpectedly activated previously queued torrents when adding some magnet using "Add new torrent" dialog.

PR #18503.
Fixes #18490.
2023-02-16 11:31:43 +03:00
shitcod3r
e9884b9513 NSIS: Add Uzbek translation
PR #18568.
2023-02-15 12:00:31 +03:00
Chocobo1
a63269e3e1 Migrate away from unsafe function
MooTools More has CVE-2021-20088 and qbt is affected by it by using the
unsafe function call `String.parseQueryString()`, so migrate away from
it.

PR #18554.
2023-02-15 12:00:04 +03:00
Burak Yavuz
d03e715708 NSIS: Update Turkish translation
PR #18552.
2023-02-14 09:18:07 +03:00
sledgehammer999
927732f190 Bump to 4.5.1 2023-02-12 01:52:19 +02:00
sledgehammer999
88c991880f Update Changelog 2023-02-12 01:47:11 +02:00
sledgehammer999
29290fa109 Sync translations from Transifex and run lupdate 2023-02-12 01:13:26 +02:00
sledgehammer999
0a8d604ef3 Merge pull request #18452 from sledgehammer999/stage_v4_5_x
Backports for v4_5_x part 2
2023-02-12 00:54:37 +02:00
Vladimir Golovnev
532c985b50 Revert changes of conflict resolution strategy on automatic move
PR #18516.
Closes #18297.
Closes #18495.
2023-02-05 09:30:46 +03:00
sledgehammer999
a32182f794 Use previous color for pause icon for indicating status
Affects transfer list and status filters
Related to PR #18110
2023-01-28 17:05:47 +02:00
sledgehammer999
1aebcd3258 [WebUI] Use new pause icon color for toolbar/menu
This the webui part of PR #18110
2023-01-28 17:05:39 +02:00
sledgehammer999
9f743aab86 Adjust env variable for PDB discovery 2023-01-27 18:04:22 +02:00
sledgehammer999
ece839739e NSIS: Set shortcut's workind dir to install path 2023-01-27 18:04:22 +02:00
Nowshed H. Imran
2204757eca Fix Pause icon
PR #18110.
2023-01-27 18:01:40 +02:00
qbittorrentfan
bfda520ef4 properties endpoint returns name/torrentID
PR #18218.
2023-01-27 18:01:39 +02:00
sotiris-bos
af91f4ed51 WebAPI: Expose "IS PRIVATE" flag
PR #18227.
Closes #16052.
2023-01-27 18:01:39 +02:00
sledgehammer999
41c3a8af01 Migrate settings much earlier 2023-01-27 18:01:38 +02:00
sledgehammer999
cc7f8372a8 Migrate setting about Simplified Chinese locale
Related to PR #17978
2023-01-27 18:01:38 +02:00
Deividas
d20633f9cc NSIS: Update Lithuanian translation
PR #18434.
2023-01-27 18:01:37 +02:00
Midhun V Nadh
961e05e9a8 Remove suggestions while searching for torrents
Don't want torrent search history to pop up next time you try to search for torrents, right?
There are people who would search for 18+ content and what they searched would load up next time they are about to search.

PR #18285.
2023-01-27 18:01:37 +02:00
Fidel Selva
eb98a04245 WebUI: Improve hotkeys
PR #18326.
Fixes #18325.
Fixes #14033.
2023-01-27 18:01:37 +02:00
xavier2k6
5dc1c10848 GHA CI: Bump Boost version to 1.81.0 on Windows/macOS
PR #18279.
2023-01-27 18:01:36 +02:00
Jonatan
dcbff74dc0 NSIS: Update Swedish translation
PR #18240.
2023-01-27 18:01:36 +02:00
David Xuang
5e29960da2 Prevent incorrect line breaking
PR #18236.
2023-01-27 18:01:35 +02:00
sledgehammer999
aa43fc8ff4 [CI Ubuntu] Build AppImage
Upload an AppImage artifact on CI builds. This AppImage is a
simplified version of the official one. It is meant to help
with debugging PRs that fix issues.
2023-01-27 18:01:35 +02:00
sledgehammer999
2517e688d9 [CI Ubuntu] Strip installed components 2023-01-27 18:01:35 +02:00
Chocobo1
40d94fd8e9 Remove docker information
It has been moved to its own repo: https://github.com/qbittorrent/docker-qbittorrent-nox

PR #18199.
2023-01-27 18:01:34 +02:00
Torsten Schwarz
eb97e640cb WebUI: Make rename file dialog resizable
PR #18154.
2023-01-27 18:01:34 +02:00
sledgehammer999
2123c1c259 Remove dead code
Leftover from the system tray code refactoring.
2023-01-27 18:01:33 +02:00
sledgehammer999
6cf1351a77 Remove trailing newline from translation file
I also fixed it on Transifex.
2023-01-27 18:01:33 +02:00
Vladimir Golovnev
c924904308 Merge pull request #18271 from glassez/v4.5
Backport changes to v4.5.x branch
2023-01-25 09:06:23 +03:00
Vladimir Golovnev
904bcc14d5 Reload system tray icon to replace menu
PR #18250.
Closes #18074.
2023-01-22 16:58:30 +03:00
Vladimir Golovnev
c3abe4c2a6 Fix startup performance on Qt5
Use more appropriate container (QList) for resume data queue buffer.
QVector in Qt5 has poor performance of the first element taking operation,
which is used to process the resume data queue. In Qt6, QVector is just an
alias for QList, so there was no problem there.

PR #18387.
Fixes #18341.
2023-01-16 14:48:05 +03:00
Vladimir Golovnev
7144454a1f Remove confusing helpers from Session interface
Such helpers do not make practical sense, since they can be trivially implemented on top of the base interface, but at the same time they can lead to undesirable consequences when some calling code requires slightly different behavior than another.

PR #18367.
Fixes #18338.
2023-01-16 14:47:51 +03:00
Vladimir Golovnev
daaa88fa0d Use QThreadPool to invoke free disk space checking jobs
Prevent the creation of an excessive number of threads.
PR #18347.
Closes #18202.
2023-01-16 14:47:39 +03:00
Vladimir Golovnev
0b7c8497f9 Add all torrents passed via the command line
PR #18296.
Closes #18289.
2023-01-16 14:47:11 +03:00
thalieht
e3562be0d6 WebUI: Add "Resume data storage type" option
PR #18357.
2023-01-14 17:16:18 +03:00
brvphoenix
e0d0efcc20 WebUI: Add missing icons
PR #18380.
2023-01-13 11:00:20 +03:00
Jason Carr
fb22b58ce6 WebUI: change order of accepted types of file input
PR #18286.
2022-12-28 13:22:15 +03:00
brvphoenix
c78ac614f5 Unify the way to generate the language list in WebUI and GUI
PR #17994.
Closes #18090.
2022-12-26 10:02:30 +03:00
Vladimir Golovnev
de15907ea7 Re-allow to use icons from system theme
PR #18195.
2022-12-25 16:28:25 +03:00
Vladimir Golovnev
a4289a517f Apply correct tab order to Category options dialog
Also pre-select (sub)category name for editing when dialog is opened for creating new (sub)category.

PR #18270.
Closes #18265.
2022-12-25 16:16:18 +03:00
Nowshed H. Imran
967c3bb55d Fix icon colors inconsistencies
PR #18226.
Fixes #18163.
Fixes #18222.
2022-12-22 14:16:59 +03:00
Vladimir Golovnev
c57896df8f Use "additional trackers" when metadata retrieving
This can help when the DHT nodes are few.

PR #18251.
Closes #18244.
2022-12-22 08:35:54 +03:00
Vladimir Golovnev
911f0d4039 Correctly count the number of torrents in subcategories
PR #18261.
Closes #18137.
2022-12-22 08:35:13 +03:00
Vladimir Golovnev
e822d4fca7 Correctly detect whether desktop integration is active
PR #18259.
2022-12-22 08:22:36 +03:00
Vladimir Golovnev
0da132b69e Correctly detect drive letter in path
PR #18258.
Closes #18224.
2022-12-22 08:22:06 +03:00
Vladimir Golovnev
691cb4fe2b Don't drop !qB extension when rename incomplete file
PR #18186.
Closes #18181.
2022-12-22 07:15:39 +03:00
Vladimir Golovnev
97a053916b Ensure thread is stopped before deleting QThread
PR #18178.
Backports #18037.
2022-12-10 10:14:45 +03:00
Vladimir Golovnev
24bf8eef6d Use identical conversions of tracker names
PR #18146.
Closes #18070.

The problem is that conversions between std::string and QString is not mutually equivalent (i.e. QString::fromStdString(stdStr).toStdString() == stdStr isn't always true).
2022-12-08 17:02:47 +03:00
Vladimir Golovnev
4314bbdf9c Correctly load folder based UI theme
PR #18173.
2022-12-08 17:00:02 +03:00
Vladimir Golovnev
65611cd3dc WebAPI: return paths using platform-independent separator format
PR #18118.
Closes #18096.
2022-12-08 08:36:06 +03:00
Chocobo1
6a4bb1356a Fix wrong color code
Must have been a copy-paste error...
2022-12-04 12:49:37 +08:00
Chocobo1
06593e3678 Revise color for completed status
Now it uses the purple color which matches the completed status icon color.

Related: #18078.
2022-12-04 12:49:37 +08:00
sledgehammer999
18577d9cb0 Merge pull request #18119 from glassez/destruct-tray
Destroy desktop integration at correct place
2022-11-30 21:29:00 +02:00
Vladimir Golovnev
701b84dc48 Destroy desktop integration at correct place
Otherwise it is destructed in QObject destructor, i.e. after GUI application is already destructed.
This can be related to some problems with system tray icon.

PR #18108.
Closes #18093.
2022-11-30 20:11:46 +03:00
sledgehammer999
9a95237b85 Merge pull request #18101 from thalieht/backport
Backport
2022-11-29 20:16:08 +02:00
sledgehammer999
a6a99fbd36 Merge pull request #18102 from now-im/v4_5_x
Fix Speed limit icon size
2022-11-29 20:15:29 +02:00
Nowshed H. Imran
86671bee46 Fix Speed limit icon size 2022-11-29 22:19:00 +06:00
thalieht
f1432a2e3d WebUI: Fix missing "queued" icon 2022-11-29 18:09:09 +02:00
sledgehammer999
480e3f02ca Bump to 4.5.0 2022-11-26 23:16:23 +02:00
sledgehammer999
6b05c716a8 Update Changelog 2022-11-26 23:13:55 +02:00
sledgehammer999
c697829b1b Sync translations from Transifex and run lupdate 2022-11-26 23:12:44 +02:00
sledgehammer999
9a2ec6912b Merge pull request #18061 from sledgehammer999/fix_blocker
Temporarily fix blocker for v4_5_x
2022-11-26 23:09:34 +02:00
sledgehammer999
7601163d32 Revert "Destroy object within appropriate thread"
Temporary solution for #18059

This reverts commit 4f2ac34440.
2022-11-26 21:31:13 +02:00
sledgehammer999
8e2bda2b7a Update Changelog 2022-11-21 01:14:46 +02:00
sledgehammer999
1761f6c58e Update Changelog 2022-11-21 01:14:46 +02:00
sledgehammer999
419cdde4e1 Merge pull request #18043 from glassez/backport1
Prevent object from being used after destruction
2022-11-20 20:57:50 +02:00
sledgehammer999
6ec46a90d1 Merge pull request #18042 from glassez/backport
Revert "Use another workaround to update files tree view"
2022-11-20 20:57:37 +02:00
Vladimir Golovnev (Glassez)
f4051034d7 Prevent object from being used after destruction 2022-11-20 15:06:03 +03:00
Vladimir Golovnev (glassez)
1a8ba00f2c Revert "Use another workaround to update files tree view"
This reverts commit 0f82c16936.
2022-11-20 13:54:42 +03:00
Vladimir Golovnev
de4c1c9265 Don't miss to store metadata of new torrent
PR #18032.
2022-11-19 07:06:52 +03:00
sledgehammer999
bff9189e52 Merge pull request #18014 from sledgehammer999/maybe_backport
Backports to v4_5_x
2022-11-14 17:16:32 +02:00
Vladimir Golovnev
076b3628b1 Save correct resume data when added new torrent
PR #18003.
2022-11-13 21:30:39 +02:00
Vladimir Golovnev (Glassez)
75ccce705e Correctly handle model resetting 2022-11-13 21:30:38 +02:00
Vladimir Golovnev (Glassez)
964bf31775 Use another workaround to update files tree view 2022-11-13 21:30:38 +02:00
Vladimir Golovnev
507ced2fa2 Avoid blocking call when changing libtorrent session settings
We don't really need to get currently used settings pack in order to apply changes to session settings. It is enough to apply settings pack that contains only updated settings.

PR #17989.
2022-11-13 21:30:37 +02:00
Chocobo1
e62f9ef56a Move increment out of loop 2022-11-13 21:28:28 +02:00
Chocobo1
a5a242377b Clean up code 2022-11-13 21:28:28 +02:00
Chocobo1
0758109d15 Reserve space before appending elements 2022-11-13 21:28:28 +02:00
Chocobo1
3970d91d19 Fix typos 2022-11-13 21:28:27 +02:00
BallsOfSpaghetti
4e98b7f0cf Add confirmation to resume/pause all
This adds a confirmation dialog to Pause All and Resume All. First I wanted to only add it in Tray, but honestly, clicking around in the menu, using hotkeys might trigger it just as easy.

Closes #17683.
PR #17945.
2022-11-13 21:28:27 +02:00
sledgehammer999
27a69d9cca Fine tune translations loading for Chinese locales
Closes #17506
2022-11-13 21:28:26 +02:00
Chocobo1
d884ec1731 Add port forwarding option for embedded tracker
Closes #17781.
PR #17981.
2022-11-13 21:28:26 +02:00
Vladimir Golovnev
62b2959cb4 Don't use extra variable to distinguish restored torrents
PR #17984.
2022-11-13 21:28:26 +02:00
Hanabishi
2bdc91c53f Implement Peer ID Client column for Peers tab
PR #17940.
2022-11-13 21:28:25 +02:00
Chocobo1
d829df99aa Revise interface of port forwarder
This eases the usage of port forwarder as the caller code doesn't need
to store previous used port and now can rely on port forwarder doing
all the hard work.

PR #17967.
2022-11-13 21:28:19 +02:00
Vladimir Golovnev
4f2ac34440 Destroy object within appropriate thread
PR #18012.
2022-11-13 08:30:42 +03:00
Vladimir Golovnev
94e9e9fdb2 Delete database file only after it is released
PR #18011.
2022-11-13 08:29:50 +03:00
1124 changed files with 235067 additions and 263730 deletions

99
.appveyor.yml Normal file
View File

@@ -0,0 +1,99 @@
version: '{branch}-{build}'
# Do not build on tags (GitHub only)
skip_tags: true
image: Visual Studio 2022
branches:
except: # blacklist
- coverity_scan
environment:
REPO_DIR: &REPO_DIR c:\qbittorrent
CACHE_DIR: &CACHE_DIR c:\qbt_cache
QBT_VER_URL: https://builds.shiki.hu/appveyor/version_64
QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries_64.7z
# project directory
clone_folder: *REPO_DIR
# cache size should < 100MB (after compressing with fastest option):
# see: https://www.appveyor.com/docs/build-cache#save-update-cache-before-build-finishes
cache:
- *CACHE_DIR
clone_depth: 50
install:
# check if library needs update
- appveyor DownloadFile "%QBT_VER_URL%" -FileName "c:\version_new" && SET /P newVersion=<"c:\version_new"
- IF EXIST "%CACHE_DIR%\version" (SET /P oldVersion=<"%CACHE_DIR%\version")
- IF NOT EXIST "%CACHE_DIR%\version" (SET updateCache=1)
- IF NOT "%oldVersion%" == "%newVersion%" (SET updateCache=1)
# update library
- IF "%updateCache%" == "1" (ECHO "--- Will redownload libraries ---" &&
RMDIR /S /Q "%CACHE_DIR%" & MKDIR "%CACHE_DIR%" &&
appveyor DownloadFile "%QBT_LIB_URL%" -FileName "c:\qbt_lib.7z" && 7z x "c:\qbt_lib.7z" -o"%CACHE_DIR%" > nul &&
COPY "c:\version_new" "%CACHE_DIR%\version")
# Qt stay compressed in cache
- 7z x "%CACHE_DIR%\qt5_64.7z" -o"c:\qbt" > nul
before_build:
# setup env
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
# setup project
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
# workarounds
- MKLINK /J "c:\qbt\base" "%CACHE_DIR%\base"
build_script:
- cd "%REPO_DIR%"
# lupdate chokes when it parses headers from system inludes, especially Boost
# it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
# Workaround: temporarily rename them to run lupdate with the .pro file
- RENAME conf.pri conf.pri.temp
- RENAME src\app\qtlocalpeer qtlocalpeer.temp
- lupdate qbittorrent.pro
- RENAME conf.pri.temp conf.pri
- RENAME src\app\qtlocalpeer.temp qtlocalpeer
- qmake qbittorrent.pro && cd src && qmake src.pro
- jom -j2 -f Makefile.Release
after_build:
- cd "%REPO_DIR%"
- MKDIR upload
- COPY dist\windows\qt.conf upload
- COPY src\release\qbittorrent.exe upload
- COPY src\release\qbittorrent.pdb upload
- COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
- COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
- COPY "%CACHE_DIR%\base\lib\torrent-rasterbar.dll" upload
- COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
- MKDIR upload\plugins\iconengines
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
- MKDIR upload\plugins\imageformats
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
- MKDIR upload\plugins\platforms
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
- MKDIR upload\plugins\sqldrivers
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
- MKDIR upload\plugins\styles
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
test: off
artifacts:
- path: upload
name: qBittorrent-Appveyor_Windows-x64

View File

@@ -1,81 +0,0 @@
Checks: >
bugprone-*,
cert-*,
concurrency-*,
cppcoreguidelines-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-# not applicable at all,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-virtual-class-destructor,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
-modernize-avoid-c-arrays,
-modernize-pass-by-value,
-modernize-use-auto,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-named-parameter,
-readability-redundant-access-specifiers,
-readability-simplify-boolean-expr,
-readability-uppercase-literal-suffix,
-# only sometimes useful,
-bugprone-narrowing-conversions,
-cert-dcl58-cpp,
-cert-err33-c,
-cert-err58-cpp,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-concurrency-mt-unsafe,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-type-static-cast-downcast,
-misc-definitions-in-headers,
-modernize-concat-nested-namespaces,
-modernize-loop-convert,
-modernize-raw-string-literal,
-modernize-unary-static-assert,
-performance-no-automatic-move,
-readability-convert-member-functions-to-static,
-readability-else-after-return,
-readability-redundant-declaration,
-# obsoleted,
-cert-dcl21-cpp
CheckOptions:
- { key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors, value: true }
- { key: modernize-use-override.IgnoreDestructors, value: true }
- { key: performance-for-range-copy.AllowedTypes, value: "QJsonValue" }
- { key: performance-for-range-copy.WarnOnAllAutoCopies, value: true }
- { key: readability-braces-around-statements.ShortStatementLines, value: 3 }
HeaderFilterRegex: ".+/src/.*\\.h"
WarningsAsErrors: "*"

View File

@@ -1,10 +1,8 @@
# EditorConfig is awesome: https://EditorConfig.org
# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true

3
.gitattributes vendored
View File

@@ -5,6 +5,3 @@ core.eol=lf
*.png binary
*.qm binary
*.zip binary
dist/windows/license.txt text eol=crlf
test/testdata/crlf.txt text eol=crlf

2
.github/SUPPORT.md vendored
View File

@@ -9,7 +9,7 @@ For such questions, use one of the following community support resources:
* The [discussions section][discussions-url]
* The [official forum][forum-url]
* The official forum [official forum][forum-url]
* The [qBittorrent subreddit][subreddit-url]

View File

@@ -1,15 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
commit-message:
prefix: "GHA CI"
groups:
github-actions:
patterns:
- "*"
labels:
- "CI"
schedule:
interval: "monthly"

View File

@@ -30,7 +30,6 @@ from typing import Optional, Sequence
import argparse
import re
def main(argv: Optional[Sequence[str]] = None) -> int:
parser = argparse.ArgumentParser()
parser.add_argument('filenames', nargs='*', help='Filenames to check')
@@ -48,12 +47,12 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
for line in file:
if (match := regex.match(line)) is not None:
error_buffer += str(f"Defect file: \"{filename}\"\n"
f"Line: {line_counter}\n"
f"Column span: {match.span()}\n"
f"Part: \"{match.group()}\"\n\n")
f"Line: {line_counter}\n"
f"Column span: {match.span()}\n"
f"Part: \"{match.group()}\"\n\n")
line_counter += 1
except UnicodeDecodeError:
except UnicodeDecodeError as error:
# not a text file, skip
continue
@@ -65,6 +64,5 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
return 0
if __name__ == '__main__':
exit(main())

View File

@@ -14,31 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install tools
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: "*"
- name: Check files
uses: pre-commit/action@v3.0.1
- name: Check doc
env:
pandoc_path: "${{ github.workspace }}/../pandoc"
run: |
# install pandoc
curl \
-L \
-o "${{ runner.temp }}/pandoc.tar.gz" \
"https://github.com/jgm/pandoc/releases/download/3.1.7/pandoc-3.1.7-linux-amd64.tar.gz"
tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
# run pandoc
for lang in doc/*/; do
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent.1.md" -o "$lang/qbittorrent.1"
"${{ env.pandoc_path }}/bin/pandoc" -f markdown -t man -s "$lang/qbittorrent-nox.1.md" -o "$lang/qbittorrent-nox.1"
done
# check diff, ignore "Automatically generated by ..." part
git diff -I '\.\\".*' --exit-code
uses: pre-commit/action@v3.0.0

View File

@@ -17,64 +17,51 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.10", "1.2.19"]
libt_version: ["2.0.8", "1.2.18"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.7.0"]
qt_version: ["5.15.2", "6.4.0"]
exclude:
- libt_version: "1.2.18"
qt_version: "6.4.0"
env:
boost_path: "${{ github.workspace }}/../boost"
libtorrent_path: "${{ github.workspace }}/../libtorrent"
openssl_root: /usr/local/opt/openssl@1.1
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install dependencies
uses: Wandalen/wretry.action@v3
env:
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
with:
attempt_delay: 20000
attempt_limit: 6
command: |
brew update > /dev/null
brew install \
cmake ninja \
openssl@3 zlib
run: |
export \
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
HOMEBREW_NO_INSTALL_CLEANUP=1
brew update > /dev/null
brew install \
cmake ninja \
openssl@1.1 zlib
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: "85"
BOOST_PATCH_VERSION: "0"
run: |
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
set +e
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
if [ "$_exitCode" -ne "0" ]; then
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
curl \
-L \
-o "${{ runner.temp }}/boost.tar.bz2" \
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.bz2"
tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v4
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
archives: qtbase qtdeclarative qtsvg qttools
# Not sure why Qt made a hard dependency on qtdeclarative, try removing it when Qt > 6.4.0
cache: true
- name: Install libtorrent
run: |
@@ -82,22 +69,22 @@ jobs:
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git \
${{ env.libtorrent_path }}
cd ${{ env.libtorrent_path }}
https://github.com/arvidn/libtorrent.git
cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-Ddeprecated-functions=OFF
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
cmake --build build
sudo cmake --install build
- name: Build qBittorrent
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
@@ -107,6 +94,27 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQT6=ON \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
@@ -116,34 +124,14 @@ jobs:
- name: Prepare build artifacts
run: |
# create .dmg
appName="qbittorrent"
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
appName="qbittorrent-nox"
fi
# package
pushd build
PACKAGE_RETRY=0
while [ "$PACKAGE_RETRY" -lt "3" ]; do
macdeployqt "$appName.app" -dmg -no-strip
if [ -f "$appName.dmg" ]; then
break
fi
sleep 5
PACKAGE_RETRY=$((PACKAGE_RETRY + 1))
echo "Retry $PACKAGE_RETRY..."
done
popd
# prepare upload folder
mkdir upload
cp "build/$appName.dmg" upload
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
name: build-info_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -1,89 +0,0 @@
name: CI - Python
on: [pull_request, push]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python (auxiliary scripts)
uses: actions/setup-python@v5
with:
python-version: '3' # use default version
- name: Install tools (auxiliary scripts)
run: pip install bandit pycodestyle pyflakes
- name: Gather files (auxiliary scripts)
run: |
export "PY_FILES=$(find . -type f -name '*.py' ! -path '*searchengine*' -printf '%p ')"
echo $PY_FILES
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
- name: Lint code (auxiliary scripts)
run: |
pyflakes $PY_FILES
bandit --skip B314,B405 $PY_FILES
- name: Format code (auxiliary scripts)
run: |
pycodestyle \
--max-line-length=1000 \
--statistics \
$PY_FILES
- name: Build code (auxiliary scripts)
run: |
python -m compileall $PY_FILES
- name: Setup python (search engine)
uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Install tools (search engine)
run: pip install bandit mypy pycodestyle pyflakes pyright
- name: Gather files (search engine)
run: |
export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
echo $PY_FILES
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
- name: Check typings (search engine)
run: |
MYPYPATH="src/searchengine/nova3" \
mypy \
--follow-imports skip \
--strict \
$PY_FILES
pyright \
$PY_FILES
- name: Lint code (search engine)
run: |
pyflakes $PY_FILES
bandit --skip B110,B310,B314,B405 $PY_FILES
- name: Format code (search engine)
run: |
pycodestyle \
--ignore=E265,E402 \
--max-line-length=1000 \
--statistics \
$PY_FILES
- name: Build code (search engine)
run: |
python -m compileall $PY_FILES

View File

@@ -4,7 +4,6 @@ on: [pull_request, push]
permissions:
actions: write
security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -18,57 +17,36 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.10", "1.2.19"]
libt_version: ["2.0.8", "1.2.18"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.5.2"]
env:
boost_path: "${{ github.workspace }}/../boost"
harden_flags: "-D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS"
libtorrent_path: "${{ github.workspace }}/../libtorrent"
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.18"
qt_version: "6.2.0"
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build \
libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev libxkbcommon-x11-dev zlib1g-dev
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: "76"
BOOST_PATCH_VERSION: "0"
run: |
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
set +e
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
if [ "$_exitCode" -ne "0" ]; then
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v4
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
archives: icu qtbase qtdeclarative qtsvg qttools
cache: true
archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
@@ -76,39 +54,27 @@ jobs:
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git \
${{ env.libtorrent_path }}
cd ${{ env.libtorrent_path }}
CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }}" \
https://github.com/arvidn/libtorrent.git
cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
with:
config-file: ./.github/workflows/helper/codeql/cpp.yaml
languages: cpp
- name: Build qBittorrent
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
CXXFLAGS="$CXXFLAGS ${{ env.harden_flags }} -Werror" \
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
@@ -118,11 +84,25 @@ jobs:
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v3
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
with:
category: ${{ github.base_ref || github.ref_name }}
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
CXXFLAGS="$CXXFLAGS -Werror" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DQT6=ON \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Prepare build artifacts
run: |
@@ -130,41 +110,37 @@ jobs:
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Install AppImage
- name: 'AppImage: Prepare env'
run: |
sudo apt install libfuse2
curl \
-L \
-Z \
-O https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-static-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-static-x86_64.AppImage \
-O https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x \
linuxdeploy-static-x86_64.AppImage \
linuxdeploy-plugin-qt-static-x86_64.AppImage \
linuxdeploy-plugin-appimage-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage
- name: Prepare files for AppImage
- name: 'AppImage: Prepare nox'
if: matrix.qbt_gui == 'GUI=OFF'
run: |
mkdir -p qbittorrent/usr/share/applications
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps/
mkdir -p qbittorrent/usr/share/applications/
cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
- name: Package AppImage
- name: 'AppImage: Package'
run: |
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --plugin qt
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --plugin qt
rm qbittorrent/apprun-hooks/*
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
NO_APPSTREAM=1 \
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
./linuxdeploy-static-x86_64.AppImage --appdir qbittorrent --output appimage
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --output appimage
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -2,8 +2,7 @@ name: CI - WebUI
on: [pull_request, push]
permissions:
security-events: write
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@@ -20,10 +19,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Setup nodejs
uses: actions/setup-node@v4
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
@@ -37,12 +36,3 @@ jobs:
run: |
npm run format
git diff --exit-code
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
config-file: .github/workflows/helper/codeql/js.yaml
languages: javascript
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v3

View File

@@ -17,87 +17,70 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.10", "1.2.19"]
libt_version: ["2.0.8", "1.2.18"]
env:
boost_path: "${{ github.workspace }}/../boost"
libtorrent_path: "${{ github.workspace }}/../libtorrent"
vcpkg_path: "c:/vcpkg"
libtorrent_path: "${{ github.workspace }}/libtorrent"
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v3
- name: Setup devcmd
uses: ilammy/msvc-dev-cmd@v1
- name: Install build tools
run: |
if ((Get-Command "ninja.exe" -ErrorAction SilentlyContinue) -eq $null)
{
choco install ninja
}
where.exe ninja
ninja --version
choco install ninja
# https://learn.microsoft.com/en-us/vcpkg/users/binarycaching#gha
- name: Set variables for vcpkg
uses: actions/github-script@v7
# use the preinstalled vcpkg from image
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management
- name: Setup vcpkg
uses: lukka/run-vcpkg@v10
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', (process.env.ACTIONS_CACHE_URL || ''));
core.exportVariable('ACTIONS_RUNTIME_TOKEN', (process.env.ACTIONS_RUNTIME_TOKEN || ''));
vcpkgDirectory: C:/vcpkg
doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
- name: Install dependencies with vcpkg
- name: Install dependencies from vcpkg
run: |
# create our own triplet
# tell vcpkg to only build Release variants of the dependencies
New-Item `
-Force `
-ItemType File `
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake"
# OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now, see: https://github.com/openssl/openssl/issues/22554
-Path "${{ github.workspace }}" `
-Name "triplets_overlay" `
-ItemType Directory
Copy-Item `
"${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake" `
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake"
Add-Content `
-Path "${{ env.vcpkg_path }}/triplets_overlay/x64-windows-static-md-release.cmake" `
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
"set(VCPKG_LIBRARY_LINKAGE static)",
"set(VCPKG_CRT_LINKAGE dynamic)",
"set(VCPKG_BUILD_TYPE release)")
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake" `
-Value "set(VCPKG_BUILD_TYPE release)"
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
"openssl:x64-windows-static-md-release",
"zlib:x64-windows-static-md-release"
${{ env.vcpkg_path }}/vcpkg.exe upgrade `
--no-dry-run `
--overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay"
${{ env.vcpkg_path }}/vcpkg.exe install `
--binarysource="clear;x-gha,readwrite" `
"openssl:x64-windows-static-release",
"zlib:x64-windows-static-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
--no-dry-run
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install `
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
--clean-after-build `
--overlay-triplets="${{ env.vcpkg_path }}/triplets_overlay" `
$packages
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: "85"
BOOST_PATCH_VERSION: "0"
run: |
$boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
$boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
if ($LastExitCode -ne 0)
{
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
}
aria2c `
"https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.7z" `
-d "${{ runner.temp }}" `
-o "boost.7z"
7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v4
uses: jurplel/install-qt-action@v3
with:
version: "6.7.0"
version: "6.4.0"
archives: qtbase qtsvg qttools
cache: true
- name: Install libtorrent
run: |
@@ -105,40 +88,39 @@ jobs:
--branch v${{ matrix.libt_version }} `
--depth 1 `
--recurse-submodules `
https://github.com/arvidn/libtorrent.git `
${{ env.libtorrent_path }}
cd ${{ env.libtorrent_path }}
$env:CXXFLAGS+=" /guard:cf"
$env:LDFLAGS+=" /guard:cf"
https://github.com/arvidn/libtorrent.git
cd libtorrent
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS=/guard:cf `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}/install" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DBUILD_SHARED_LIBS=OFF `
-Ddeprecated-functions=OFF `
-Dstatic_runtime=OFF `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release
-Dstatic_runtime=ON `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release
cmake --build build
cmake --install build
- name: Build qBittorrent
run: |
$env:CXXFLAGS+=" /WX"
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS="/WX" `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.vcpkg_path }}/scripts/buildsystems/vcpkg.cmake" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/install/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=ON `
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=OFF `
-DQT6=ON `
-DTESTING=ON `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-release `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
-DVERBOSE_CONFIGURE=ON `
--graphviz=build/target_graph.dot
cmake --build build --target qbt_update_translations
@@ -148,51 +130,37 @@ jobs:
- name: Prepare build artifacts
run: |
mkdir upload
mkdir upload/qBittorrent
copy build/qbittorrent.exe upload/qBittorrent
copy build/qbittorrent.pdb upload/qBittorrent
copy dist/windows/qt.conf upload/qBittorrent
copy build/qbittorrent.exe upload
copy build/qbittorrent.pdb upload
copy dist/windows/qt.conf upload
# runtimes
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Core.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Gui.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Network.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Sql.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Svg.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Widgets.dll" upload/qBittorrent
copy "${{ env.Qt_ROOT_DIR }}/bin/Qt6Xml.dll" upload/qBittorrent
mkdir upload/qBittorrent/plugins/iconengines
copy "${{ env.Qt_ROOT_DIR }}/plugins/iconengines/qsvgicon.dll" upload/qBittorrent/plugins/iconengines
mkdir upload/qBittorrent/plugins/imageformats
copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qico.dll" upload/qBittorrent/plugins/imageformats
copy "${{ env.Qt_ROOT_DIR }}/plugins/imageformats/qsvg.dll" upload/qBittorrent/plugins/imageformats
mkdir upload/qBittorrent/plugins/platforms
copy "${{ env.Qt_ROOT_DIR }}/plugins/platforms/qwindows.dll" upload/qBittorrent/plugins/platforms
mkdir upload/qBittorrent/plugins/sqldrivers
copy "${{ env.Qt_ROOT_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/qBittorrent/plugins/sqldrivers
mkdir upload/qBittorrent/plugins/styles
copy "${{ env.Qt_ROOT_DIR }}/plugins/styles/qmodernwindowsstyle.dll" upload/qBittorrent/plugins/styles
mkdir upload/qBittorrent/plugins/tls
copy "${{ env.Qt_ROOT_DIR }}/plugins/tls/qschannelbackend.dll" upload/qBittorrent/plugins/tls
copy "${{ env.Qt6_DIR }}/bin/Qt6Core.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Gui.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Network.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Sql.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Svg.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Widgets.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Xml.dll" upload
mkdir upload/plugins/iconengines
copy "${{ env.Qt6_DIR }}/plugins/iconengines/qsvgicon.dll" upload/plugins/iconengines
mkdir upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qico.dll" upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qsvg.dll" upload/plugins/imageformats
mkdir upload/plugins/platforms
copy "${{ env.Qt6_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
mkdir upload/plugins/sqldrivers
copy "${{ env.Qt6_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
mkdir upload/plugins/styles
copy "${{ env.Qt6_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
# cmake additionals
mkdir upload/cmake
copy build/compile_commands.json upload/cmake
copy build/target_graph.dot upload/cmake
mkdir upload/cmake/libtorrent
copy ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
copy libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
path: upload
- name: Create installer
run: |
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}-setup
path: dist/windows/qbittorrent_*_setup.exe

View File

@@ -1,115 +0,0 @@
name: Coverity Scan
on:
schedule:
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
permissions: {}
jobs:
coverity_scan:
name: Scan
runs-on: ubuntu-latest
strategy:
matrix:
libt_version: ["2.0.10"]
qbt_gui: ["GUI=ON"]
qt_version: ["6.5.2"]
env:
boost_path: "${{ github.workspace }}/../boost"
coverity_path: "${{ github.workspace }}/../coverity"
libtorrent_path: "${{ github.workspace }}/../libtorrent"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build \
libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: "85"
BOOST_PATCH_VERSION: "0"
run: |
boost_url="https://boostorg.jfrog.io/artifactory/main/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
set +e
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
if [ "$_exitCode" -ne "0" ]; then
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: ${{ matrix.qt_version }}
archives: icu qtbase qtdeclarative qtsvg qttools
cache: true
- name: Install libtorrent
run: |
git clone \
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git \
${{ env.libtorrent_path }}
cd ${{ env.libtorrent_path }}
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBOOST_ROOT="${{ env.boost_path }}" \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
- name: Download Coverity Build Tool
run: |
curl \
-L \
-d "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
-o "${{ runner.temp }}/coverity_tool.tgz" \
"https://scan.coverity.com/download/linux64"
mkdir -p ${{ env.coverity_path }}
tar \
-xf "${{ runner.temp }}/coverity_tool.tgz" \
-C "${{ env.coverity_path }}" \
--strip-components 1
- name: Build qBittorrent
run: |
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
PATH="${{ env.coverity_path }}/bin:$PATH" \
cov-build \
--dir cov-int \
cmake --build build
- name: Submit the result to Coverity Scan
run: |
tar -caf qbittorrent.xz cov-int
curl \
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
--form email=sledgehammer999@qbittorrent.org \
--form file=@qbittorrent.xz \
--form version="$(git rev-parse --short HEAD)" \
--form description="master" \
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent

79
.github/workflows/coverity-scan.yml vendored Normal file
View File

@@ -0,0 +1,79 @@
name: Coverity Scan
on:
schedule:
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
permissions: {}
jobs:
coverity_scan:
name: Scan
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev zlib1g-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "6.4.0"
archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
git clone \
--branch "v2.0.8" \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
- name: Download Coverity Build Tool
run: |
wget \
-q \
https://scan.coverity.com/download/linux64 \
--post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=qbittorrent%2FqBittorrent" \
-O coverity_tool.tgz
mkdir coverity_tool
tar xzf coverity_tool.tgz --strip 1 -C coverity_tool
- name: Build qBittorrent
run: |
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=ON \
-DQT6=ON \
-DVERBOSE_CONFIGURE=ON
export PATH="$(pwd)/coverity_tool/bin:$PATH"
cov-build --dir cov-int cmake --build build
- name: Submit the result to Coverity Scan
run: |
tar caf qbittorrent.xz cov-int
curl \
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
--form email=sledgehammer999@qbittorrent.org \
--form file=@qbittorrent.xz \
--form version="$(git rev-parse --short HEAD)" \
--form description="master" \
https://scan.coverity.com/builds?project=qbittorrent%2FqBittorrent

4
.github/workflows/helper/appimage/export_vars.sh vendored Executable file → Normal file
View File

@@ -1,12 +1,10 @@
#!/bin/sh
# this file is called from AppRun so 'root_dir' will point to where AppRun is
root_dir="$(readlink -f "$(dirname "$0")")"
# Insert the default values because after the test we prepend our path
# and it will create problems with DEs (eg KDE) that don't set the variable
# and rely on the default paths
if [ -z "${XDG_DATA_DIRS}" ]; then
if [[ -z ${XDG_DATA_DIRS} ]]; then
XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
fi

View File

@@ -1,14 +0,0 @@
name: "CodeQL config for C++"
queries:
- uses: security-and-quality
query-filters:
- exclude:
id: cpp/commented-out-code
- exclude:
id: cpp/include-non-header
- exclude:
id: cpp/loop-variable-changed
- exclude:
id: cpp/useless-expression

View File

@@ -1,11 +0,0 @@
name: "CodeQL config for Javascript"
paths-ignore:
- "**/lib/*"
queries:
- uses: security-and-quality
query-filters:
- exclude:
id: js/superfluous-trailing-arguments

View File

@@ -1,18 +0,0 @@
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
# https://github.com/crate-ci/typos/blob/master/docs/design.md#identifiers-and-words
# try adding to `identifiers` list first, if doesn't work then `words` list
[default.extend-identifiers]
additionals = "additionals"
caf = "caf"
curren = "curren"
FO = "FO"
ket = "ket"
Q_INVOKABLE = "Q_INVOKABLE"
switchs = "switchs"
ths = "ths"
[default.extend-words]
BA = "BA"
helo = "helo"

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Mark and close stale PRs
uses: actions/stale@v9
uses: actions/stale@v5
with:
stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
close-pr-message: "This PR was closed because it has been stalled for some time with no activity."

5
.gitignore vendored
View File

@@ -1,4 +1,3 @@
.vscode/
src/gui/geoip/GeoIP.dat
src/gui/geoip/GeoIP.dat.gz
src/qbittorrent
@@ -17,7 +16,6 @@ Makefile*
*.o
*.pdb
*.exe
*.dll
# Generated MOC, resource and UI files
moc_*.cpp
@@ -25,7 +23,8 @@ moc_*.h
qrc_*.cpp
ui_*.h
*.moc
*.qm
src/lang/qbittorrent_*.qm
src/webui/www/translations/webui_*.qm
.DS_Store
.qmake.stash
src/qbittorrent.app

View File

@@ -3,7 +3,7 @@ repos:
hooks:
- id: check-translation-tag
name: Check newline characters in <translation> tag
entry: .github/workflows/helper/pre-commit/check_translation_tag.py
entry: .github/workflows/check_translation_tag.py
language: script
exclude: |
(?x)^(
@@ -13,7 +13,7 @@ repos:
- ts
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.5.0
rev: v4.3.0
hooks:
- id: check-json
name: Check JSON files
@@ -33,20 +33,17 @@ repos:
args: ["--fix=lf"]
exclude: |
(?x)^(
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.* |
dist/windows/license.txt |
test/testdata/crlf.txt
compile_commands.json |
src/webui/www/private/scripts/lib/.*
)$
- id: end-of-file-fixer
name: Check trailing newlines
exclude: |
(?x)^(
compile_commands.json |
configure |
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.* |
test/testdata/crlf.txt
src/webui/www/private/scripts/lib/.*
)$
exclude_types:
- svg
@@ -56,54 +53,7 @@ repos:
name: Check trailing whitespaces
exclude: |
(?x)^(
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.*
)$
exclude_types:
- ts
- repo: https://github.com/codespell-project/codespell.git
rev: v2.2.6
hooks:
- id: codespell
name: Check spelling (codespell)
args: ["--ignore-words-list", "additionals,curren,fo,ist,ket,searchin,superseeding,te,ths"]
exclude: |
(?x)^(
.*\.desktop |
.*\.qrc |
build-aux/.* |
Changelog |
dist/windows/installer-translations/.* |
m4/.* |
src/base/3rdparty/.* |
src/searchengine/nova3/socks.py |
src/webui/www/private/scripts/lib/.*
)$
exclude_types:
- ts
- repo: https://github.com/crate-ci/typos.git
rev: v1.16.18
hooks:
- id: typos
name: Check spelling (typos)
args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
exclude: |
(?x)^(
.*\.asc |
.*\.desktop |
.*\.qrc |
\.pre-commit-config\.yaml |
build-aux/.* |
Changelog |
configure.* |
dist/windows/installer-translations/.* |
m4/.* |
src/base/3rdparty/.* |
src/searchengine/nova3/socks.py |
src/webui/www/private/scripts/lib/.*
)$
exclude_types:
- svg
- ts

16
AUTHORS
View File

@@ -29,17 +29,13 @@ Code from other projects:
copyright: Dan Haim <negativeiq@users.sourceforge.net>
license: BSD
* files src/webui/www/private/css/lib/vanillaSelectBox.css src/webui/www/private/scripts/lib/vanillaSelectBox.js
copyright: Philippe Meyer <pmg.meyer@gmail.com>
license: MIT
Images Authors:
* files: src/icons/qbittorrent-tray.svg
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
license: GPLv2+
* files: src/qbittorrent_file.ico src/icons/fileicon.svg
copyright: 'unknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlaid above it.
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
license: GPLv3+
* files: src/icons/flags/*.svg
@@ -53,7 +49,7 @@ Images Authors:
* file: src/icons/qbittorrent-tray-dark.svg src/icons/qbittorrent-tray-light.svg
copyright: Daniel Eguren <deguren@gmail.com>
modified by: now-im <now-im.d8gcu@simplelogin.com> (@now-im)
modified by: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: LGPL
* folder: src/icons/
@@ -63,7 +59,7 @@ Images Authors:
media-seek-forward.svg, network-connect.svg, object-locked.svg, queued.svg, ratio.svg, reannounce.svg, slow_off.svg, slow.svg,
speedometer.svg, system-log-out.svg, tags.svg, task-complete.svg, task-reject.svg, tracker-error.svg, tracker-warning.svg,
trackerless.svg, trackers.svg, view-categories.svg
copyright: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
license: GPLv3+
* folder: src/icons/
@@ -76,18 +72,18 @@ Images Authors:
name.svg, network-server.svg, office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg,
preferences-system-network.svg, security-high.svg, security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg,
user-group-new.svg, view-preview.svg, view-refresh.svg, view-statistics.svg, wallet-open.svg, webui.svg
copyright: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
license: MIT
* folder: src/icons/
files: force-recheck.svg
copyright: now-im <now-im.d8gcu@simplelogin.com> (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
license: CC BY 4.0 License
* folder: src/icons/
files: downloading.svg, edit-clear.svg, error.svg, filter-active.svg, filter-inactive.svg, filter-stalled.svg, kt-set-max-download-speed.svg,
kt-set-max-upload-speed.svg, list-add.svg, preferences-web-browser-cookies.svg, stalledDL.svg, stalledUP.svg
copyright: now-im <now-im.d8gcu@simplelogin.com> (@now-im)
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: BSD 2-Clause License
Translations authors:

View File

@@ -7,13 +7,15 @@ project(qBittorrent
)
# version requirements - older versions may work, but you are on your own
set(minBoostVersion 1.76)
set(minQt6Version 6.5.0)
set(minOpenSSLVersion 3.0.2)
set(minLibtorrent1Version 1.2.19)
set(minLibtorrentVersion 2.0.10)
set(minBoostVersion 1.71)
set(minQt5Version 5.15.2)
set(minQt6Version 6.2)
set(minOpenSSLVersion 1.1.1)
set(minLibtorrent1Version 1.2.18)
set(minLibtorrentVersion 2.0.8)
set(minZlibVersion 1.2.11)
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
@@ -23,25 +25,21 @@ include(FeatureOptionsSetup)
# features, list is loosely sorted by user's interests
feature_option(GUI "Build GUI application" ON)
feature_option(WEBUI "Enable built-in HTTP server for remote control" ON)
feature_option(QT6 "Build with Qt 6 instead of Qt 5" OFF)
feature_option(STACKTRACE "Enable stacktrace support" ON)
feature_option(TESTING "Build internal testing suite" OFF)
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
feature_option_dependent(DBUS
"Enable support for notifications and power-management features via D-Bus"
"Enable support for notifications and power-management features via D-Bus on Linux"
ON "GUI" OFF
)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
feature_option_dependent(SYSTEMD
"Install systemd service file. Target directory is overridable with `SYSTEMD_SERVICES_INSTALL_DIR` variable"
OFF "NOT GUI" OFF
)
endif()
if (MSVC)
elseif (MSVC)
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
endif()

View File

@@ -276,7 +276,7 @@ struct StructName {};
enum EnumName {};
using SomeList = QList<ClassName>;
typedef QList<ClassName> SomeList;
namespace NamespaceName
{
@@ -318,7 +318,7 @@ The headers should be ordered alphabetically within each group. \
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
One exception is the header containing the library version (for example, QtVersionChecks), this particular header isn't constrained by the aforementioned order.
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
Example:
@@ -331,7 +331,7 @@ Example:
// exceptions, headers containing version number
#include <boost/version.hpp>
#include <libtorrent/version.hpp>
#include <QtVersionChecks>
#include <QtGlobal>
// C++ Standard Library headers
#include <cstdio>
@@ -342,7 +342,7 @@ Example:
// System headers
#ifdef Q_OS_WIN
#include <windows.h>
#include <Windows.h>
#endif
// Boost library headers

View File

@@ -200,7 +200,7 @@ Following these guidelines helps maintainers and the community understand your s
[coding-guidelines-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md
[coding-guidelines-git-commit-message-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md#10-git-commit-message
[commit-message-fix-issue-example-url]: https://github.com/qbittorrent/qBittorrent/commit/c07cd440cd46345297debb47cb260f8688975f50
[forum-url]: https://forum.qbittorrent.org/
[forum-url]: http://forum.qbittorrent.org/
[howto-report-bugs-url]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
[how-to-translate-url]: https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent
[merging-vs-rebasing-url]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing

275
Changelog

File diff suppressed because it is too large Load Diff

26
INSTALL
View File

@@ -3,22 +3,22 @@ qBittorrent - A BitTorrent client in C++ / Qt
1) Install these dependencies:
- Boost >= 1.76
- Boost >= 1.71
- libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.10 - 2.0.x
- libtorrent-rasterbar 1.2.18 - 1.2.x || 2.0.8 - 2.0.x
* By Arvid Norberg, https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 3.0.2
- OpenSSL >= 1.1.1
- Qt 6.5.0 - 6.x
- Qt 5.15.2 - 5.x || 6.2.0 - 6.x
- zlib >= 1.2.11
- CMake >= 3.16
* Compile-time only
- pkg-config *
* Compile-time only on *nix systems
- Python >= 3.7.0
- Python >= 3.5.0
* Optional, run-time only
* Used by the bundled search engine
@@ -28,24 +28,22 @@ Please ensure you are building with an officially supported configuration when r
2a) Compile and install qBittorrent with Qt graphical interface
$ cmake -B build -DCMAKE_BUILD_TYPE=Release
$ cmake --build build
$ cmake --install build
$ ./configure
$ make && make install
$ qbittorrent
will install and execute qBittorrent.
2b) Compile and install qBittorrent without Qt graphical interface
$ cmake -B build -DCMAKE_BUILD_TYPE=Release -DGUI=OFF
$ cmake --build build
$ cmake --install build
$ ./configure --disable-gui
$ make && make install
$ qbittorrent-nox
will install and execute qBittorrent.
DOCUMENTATION:
Please note that there is a "Compilation" section at https://wiki.qbittorrent.org.
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
------------------------------------------
sledgehammer999 <sledgehammer999@qbittorrent.org>

View File

@@ -1,7 +1,8 @@
qBittorrent - A BitTorrent client in Qt
------------------------------------------
[![GitHub Actions CI Status](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml/badge.svg)](https://github.com/qbittorrent/qBittorrent/actions)
[![AppVeyor Status](https://ci.appveyor.com/api/projects/status/github/qbittorrent/qBittorrent?branch=master&svg=true)](https://ci.appveyor.com/project/qbittorrent/qBittorrent)
[![GitHub Actions CI Status](https://github.com/qbittorrent/qBittorrent/workflows/GitHub%20Actions%20CI/badge.svg)](https://github.com/qbittorrent/qBittorrent/actions)
[![Coverity Status](https://scan.coverity.com/projects/5494/badge.svg)](https://scan.coverity.com/projects/5494)
********************************
### Description:
@@ -15,8 +16,15 @@ support as well as many features.
The free [IP to Country Lite database](https://db-ip.com/db/download/ip-to-country-lite) by [DB-IP](https://db-ip.com/) is used for resolving the countries of peers. The database is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).
### Installation:
For installation, follow the instructions from INSTALL file, but simple:
Refer to the [INSTALL](INSTALL) file.
```
./configure
make && make install
qbittorrent
```
will install and execute qBittorrent hopefully without any problem.
### Public key:
Starting from v3.3.4 all source tarballs and binaries are signed.<br />
@@ -29,13 +37,13 @@ For more information please visit:
https://www.qbittorrent.org
or our wiki here:
https://wiki.qbittorrent.org
http://wiki.qbittorrent.org
Use the forum for troubleshooting before reporting bugs:
https://forum.qbittorrent.org
http://forum.qbittorrent.org
Please report any bug (or feature request) to:
https://bugs.qbittorrent.org
http://bugs.qbittorrent.org
Official IRC channel:
[#qbittorrent on irc.libera.chat](ircs://irc.libera.chat:6697/qbittorrent)

4
bootstrap.sh Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
aclocal -I m4
autoconf

348
build-aux/compile Executable file

File diff suppressed because it is too large Load Diff

1665
build-aux/config.guess vendored Executable file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More