`TorrentImpl::isDownloading()` was excessively broad which included unexpected events for the
case here. So use the underlying state directly.
Closes#21788.
PR #21836.
There may be quite a few endpoint names (one for each available network card), and they usually remain unchanged throughout the session, while previously producing such names was performed every time they were accessed. Now they are retrieved from the cache.
PR #21770.
Previously, text color of selected filter items was not applied correctly in all situations, making them difficult to read.
This improves existing styles so that text is always correctly distinguished from the background.
This fixes issue from second post in https://github.com/qbittorrent/qBittorrent/issues/21426
PR #21507.
We're probably stuck offering the duo of RC_1_2 and RC_2_0 for some
time in the future. So hardcode the choices and make the Program Updater
choose the variant the user currently uses.
It does not affect the produced artifacts. The only difference is the
tool itself won't depend on some specific OS image or library version.
PR #20983.
Fixes the download progress calculation for folders with zero size.
Previously, the progress would be Zero. Now, folders with zero size
show 100% progress.
PR #20567.
1. Previously unhandled connections will stay in pending state. It won't
be closed until timeout happened. This may lead to wasting system
resources. Now the (over-limit) connection is actively rejected.
2. When out-of-memory occurs here, reject the new connection instead of
throwing exception and crash.
3. Also clean up some unused bits.
PR #20961.
The version calculation is an estimation and it will drift off after some time. Hopefully the
drift offset won't be noticeable within a few years.
Also switched the user agent to Windows 10 which has the largest portion of users to avoid
standing out from the crowd.
PR #20864.
Restructures the code to separate the basic logic from the logic that depends on the parameters and properties of the torrent being added.
Also fixes "Never show again" checkbox functionality.
PR #20848.
* Simplify nova2dl script
* Use search engine name instead of site URL (like nova2 does)
* Add a way to download torrent using search plugin
PR #20824.
Adds a date column to the built-in search engine to show when a torrent was published/uploaded on the engine site.
When a plugin wants to show a date, it can now add a `pub_date` entry to its result dict. The value format is a unix timestamp (an integer representing seconds since epoch).
Plugins with no date support will keep working.
PR #20703.
Prevents overwriting of the stored layout in case the main window was hidden at startup and
has not been shown since, because incorrect dimensions can be provided by it in this case.
PR #20725.
Closes#20720.
This PR improves touch interaction with table rows that have a context menu. Previously, those rows couldn't be selected or scrolled on mobile. Additionally, this PR modifies the context menu to appear when the user removes their finger/touch, rather than the current behavior of appearing mid-touch. This allows us to only display the context menu if the user's finger remains on the same element, which should significantly reduce erroneous context menu triggering.
Closes#19819.
Closes#19820,
Closes#19823.
PR #20639.
There were a few reports that the user has messed up their browser's language and this PR gives an escape hatch in case the user is unable to configure the browser's language for various reasons.
Example for choosing French: http://127.0.0.1:8080/?lang=fr
PR #20591.
This prevents hitting a TypeError when the category stored in localstorage does not exist. The behavior for a nonexistent category now mirrors that of a nonexistent tag or filter - no option is selected and no torrents are shown.
Closes#20623.
PR #20638.
This PR fixes various accounting issues with the trackers list. Removing a torrent would not update the trackers list, nor would removing a tracker from a torrent. And removing a tracker with a shared host but unique url (e.g. example.com/1 and example.com/2) would erroneously remove the tracker's host from the list.
Closes#20053.
Closes#20054.
PR #20601.
This PR adds support for running multiple concurrent searches in the Web UI. This is already supported in the GUI as well as by the Web API. Behavior mimics the GUI as closely as possible.
All filters and sorting are preserved per-tab, allowing you to apply unique filters and sorts to each of your searches. Row selection is also preserved across tab navigation.
Closes#12840.
PR #20593.
The 'SSL torrent' feature is not standardized. I.e. there are no BEP (BitTorrent Enhancement Proposals) associated with it, so we do not greatly encourage its usage as it will only work with libtorrent clients and derivatives. It will not work with other torrent clients that do not support the libtorrent specific implementation.
This PR aims to provide minimal support for those who need SSL torrents. Furthermore, it is intended that there will be no UI support (nor indication) of adding/creating SSL torrents.
* Prerequisites:
I omit the instructions of creating those files as the intended audience (experts & advanced users) should have no problem with it. All files are as follow:
1. Root (torrent publisher) certificate
2. Root private key
3. A .torrent file created with root certificate
5. Peer certificate (signed by the root certificate)
6. Peer private key
7. Diffie-Hellman parameters file
All files are stored in .pem format.
* Enable SSL torrent protocol in qbt
There are 2 hidden keys to put in qbt config file, under `[BitTorrent]` section:
1. `Session\SSL\Enabled`: set it to `true`.
2. `Session\SSL\Port`: set it to some unused port or omit the key entirely to let qbt pick one for you.
* Add an SSL torrent to qbt
The only way of adding an SSL torrent is via WebAPI. The `/api/v2/torrents/add` endpoint will support 3 additional parameters. You must provide them for an SSL torrent.
1. `ssl_certificate`: Contents of the peer certificate file (in PEM format).
2. `ssl_private_key`: Contents of the peer private key file.
3. `ssl_dh_params`: Contents of the Diffie-Hellman parameters file.
* Change the SSL parameters to a torrent
In case you provided wrong SSL parameters when adding a torrent, there is a new endpoint `/api/v2/torrents/setSSLParameters` that you can update the SSL parameters. The parameters (`ssl_*`) are the same as `/api/v2/torrents/add` endpoint.
* Query the SSL parameters of a torrent
There is a new endpoint `/api/v2/torrents/SSLParameters` that you can query the SSL parameters of a torrent.
References:
* https://www.libtorrent.org/manual-ref.html#ssl-torrents
* https://blog.libtorrent.org/2012/01/bittorrent-over-ssl/
PR #20338.
---------
Co-authored-by: Radu Carpa <radu.carpa@cern.ch>
* Use compiler generated comparison function
* Use designated initializers
* Convert to proper type
* Use reference
* Remove redundant text
The `msg` already contain the text `Reason:` so it isn't needed.
PR #20312.
1. Use proper case folding function instead of `toLower()`.
2. Use locale aware comparison instead of comparing unicode code points.
Now `a` comes before `A` which is the same as the result from QCollator. A nice side effect
is now it properly compares locale specific characters (for example `C`, `Č`).
3. Improve testing. Now the test is runnable and stable on all platforms.
PR #20208.
Add a 'remember choice' button to the WebUI Torrent Deletion dialog that sets the default file deletion setting. The setting is shared with GUI, so if you set it in WebUI and open the Qt app, the 'delete files' checkbox will match WebUI (checked or unchecked).
PR #20150.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
According to https://doc.qt.io/qt-6/qcollator.html#posix-fallback-implementation
The 'POSIX fallback implementation' is only used when ICU is not available. So the correct way is to detect ICU directly and not depend on the OS. The exceptions are macOS and Windows since they support the required functionalities natively.
Closes#20205.
PR #20207.
Sometimes users had not properly configured their system locale and thus
qbt will specify a default locale just in case.
Closes#16127.
Closes#19609.
Closes#19834.
PR #20203.
lukka/run-vcpkg v11.3 has deliberately changed to avoid writing outside of `GITHUB_WORKSPACE`
directory and this conflict with our usage. So ditch it and invoke vcpkg directly.
https://github.com/lukka/run-vcpkg/releases/tag/v11.3
PR #20202.
For GUI and non-daemon console, the legal notice won't ask for user acceptance anymore and only
provide an OK button (or Enter key in console) from now on.
For daemon mode, qbt will print the legal notice and continue to run. It will also notify user
to use command line option `--confirm-legal-notice` to suppress the message. The message will be
printed on every start up unless user specify the command line option once.
PR #20080.
The C libraries is now updated by the OS and therefore there is no
reason to bundle static versions which might be outdated later.
Also enable Control Flow Guard for 3rd party libraries.
`choco install` is slow: A basically simple download and extract operation takes 20sec compared to ~3sec
when done manually. So we add a conditional for it.
Given the amount of PR and compile matrix, the CI cache size limit is
easy to hit. So for now on, only store compile cache for stable branches
to avoid cache thrashing.
The parent widget of lockMenu is going to be used to derive the
transient parent window. Currently the parent widget of lockMenu is
the main window, therefore the main window is also going to be the
transient parent for lockMenu's window handle.
In other words, the "View" menu and "Lock qBittorrent" menu are
going to be considered as siblings by the window manager even though
the latter is nested inside the former.
On platforms like wayland, such popup hierarchies are illegal, popups
must be properly nested. qtwayland works around it, but it also prints
warning messages.
This change makes lockMenu a child of the view menu so they are
properly nested from the window manager point of view.
PR #19967.
Closes#19955.
This suppresses compiler warnings in GHA CI:
>ld: warning: direct access in function 'std::__1::__function::__func<libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&), std::__1::allocator<libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&)>, libtorrent::storage_interface* (libtorrent::storage_params const&, libtorrent::file_pool&)>::target(std::type_info const&) const' from file '/usr/local/lib/libtorrent-rasterbar.a(create_torrent.cpp.o)' to global weak symbol 'typeinfo name for libtorrent::storage_interface* (*)(libtorrent::storage_params const&, libtorrent::file_pool&)' from file 'src/base/libqbt_base.a(mocs_compilation.cpp.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
And also makes the binary a bit smaller.
https://gcc.gnu.org/onlinedocs/gcc-13.2.0/gcc/Code-Gen-Options.html#index-fvisibility
PR #19921.
Here is some benchmark for various archive formats:
```
gz
0m11.384s
0m11.495s
0m11.193s
zip
0m14.159s
0m14.416s
0m13.917s
7z
0m17.569s
0m17.295s
0m18.496s
bz2
0m31.519s
0m28.885s
0m29.510s
```
Looking by compressed size, bz2 is the best. However its decompressing
speed is the slowest. bz2 and gz file size only differs by ~20MB
and this difference is neglectable given the network speed on
Github. So switch to gz format to speed up CI build time.
PR #19867.
Mobile Safari on iOS does report `ios` platform, but iPadOS reports `mac`
instead. It is common sense to check for touch points when this happens
to differentiate Mac and iPad.
PR #19822.
Closes#19057.
---------
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
The overlay scrollbars introduced in Firefox 100 take up no space,
breaking the existing overflow detection.
Add an extra check for `scrollHeight != clientHeight` which is able to
detect an overflow independent of scrollbar style.
PR #19779.
---------
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Otherwise, there is a conflict of run-time libraries used (since Qt DLLs are still use dynamic MSVCRT) that leads to strange errors.
PR #19718.
Closes#19701.
The `repo` value will be used by `git clone` command and therefore the
URL should end with `.git` for repos on Github.
https://pre-commit.com/#repos-repo
PR #19710.
* Use correct pointer type in NSIS scripts
* Only remove qbt specific registry keys when uninstalling or disassociating
* Set .torrent Content Type when associating .torrent format
* Move ".torrent association" functions to Utils::OS class
PR #19709.
Allows you to bring the main window to the front when one or more "Add new torrent" dialogs are open.
Also allows you to minimize/maximize the "Add new torrent" dialog.
PR #19670.
Closes#17919.
Prevents qBittorrent from being failed to start after torrents database metadata is corrupted by one of the first releases of v4.5.x series.
PR #19668.
Closes#19622.
* Fixes a couple of memory leaks (although not dangerous in practice, since we are talking about objects with a lifetime up to the end of the application)
* Fixes heap use after free
PR #19650.
Closes#19632.
Improves "Metadata received" stop condition handling by "Add new torrent" dialog.
The problem is when "Metadata received" stop condition is set the metadata can still be received 0.1 sec before clicking the "OK" button so torrent is actually added with metadata and therefore it cannot respect "Metadata received" stop condition.
The solution is to uncheck "Start torrent" checkbox once metadata is received.
PR #19597.
Closes#19583.
PR #19496.
* Add torrent entry status to represent tracker error
* Add torrent entry status to represent unreachable endpoint
* Display tracker entry next/min announce time
* Reset tracker entries when torrent is stopped
Warning: users are at their own discretion to create .torrent with >= 64 MiB piece size as not
every torrent client supports it.
Larger piece sizes are only available when using libtorrent 2.x. libtorrent 1.x is not
efficient with memory usage and in order to avoid user complaints it is limited to 128 MiB.
Also note that, as of this writing, libtorrent 2.0.9 has an internal limitation that only
allows loading maximum 256 MiB piece size. And therefore > 256 MiB size options are forbidden
for now.
Closes#19527.
PR #19535.
The change is in preparation for adding the possibility to create
torrent files via the API.
Rework TorrentCreatorThread to be a more lightweight QRunnable class.
The parameters are now defined on construction time and are fixed
throughout the lifecycle of the TorrentCreator. The lifecycle of the
object is not bound to the one of QDialog anymore; it is now handled
by the QThreadPool. This will enable easier queueing of multiple torrent
creation jobs without risk of spawning many threads.
PR #19500.
PR #19468.
* Use QHash to map tracker endpoints
* Don't clear numPeers unexpectedly
* Remove outdated tracker entry endpoints
* Move presentation logic from Core to GUI code
* Show all endpoints per tracker in tree structure
---------
Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
Changing the data may affect the layout of the sort/filter model, which in turn may invalidate the indexes previously obtained from selection model before we process them all. Therefore, we must map all the selected indexes to source before start processing them.
PR #19372.
Closes#19359.
`Algorithm::removeIf()` is still valuable as `QHash::removeIf()` predicate require an
iterator or a `std::pair`, which both require more code to unpack the variable and therefore
cumbersome to use.
PR #19353.
This separates browsing context for different origin sites and prevents
leaking data from it.
This header is only present when using built-in WebUI. Alternative WebUI
is not affected.
https://web.dev/why-coop-coep/#coop
PR #19157.
It now guards against reading infinite files such as `/dev/zero`.
And most readings are bound with a (lax) limit.
As a side effect, more checking are done when reading a file and
overall the reading procedure is more robust.
PR #19095.
Since appimage is bundling the libraries it make sense to embed libtorrent statically into qbt binary.
Another side effect is now qbt binary includes debug symbols from libtorrent too (which I consider a good thing for debugging). Previously appimage seems to (unnecessarily) strip the libtorrent debug symbols.
PR #19014.
Since standard library could have platform dependent specialized hashing functions.
Also the main idea is to let `qHash` handle whatever integer type `std::hash` returns and mix it with `seed` accordingly.
PR #18715.
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.
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.
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.
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.
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.
Replace current "Start qBittorrent minimized" option with "Initial window state" that allows to start qBittorrent as "hidden in system tray" while retaining regular "minimize to panel" functionality.
PR #18252.
Closes#487.
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.
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.
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.
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.
Use another workaround to update files tree view
This is alternative approach to #17786. It uses the similar workaround as was used a long time with Qt5 and stoped working with Qt6 so it is adjusted in this PR.
Also this fixes content model resetting handling.
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.
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.
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.
Add a UI option for "Use proxy for hostname lookup" option and plumb
it into libtorrent's settings_pack.proxy_hostnames option. This is
available for SOCKS5 and HTTP proxies, and defaults to true, which
is the previous functionality. Hostname lookups can be forced to be
local by unchecking this option, which can aid compatibility with
certain non-compliant proxy servers.
Closes#17902.
PR #17904.
Co-authored-by: Nathan Lewis <saturn@saturn49.dyndns.org>
This commit introduce color palettes from Primer and make use of it in various widgets.
Primer system is chosen due to well designed and is highly rated on Github (in terms of
Github stars).
https://primer.style/
PR #17798.
When shutting down, instead of waiting for all types of alert from
libtorrent, now it only waits for specific alert types. This potentially
help shorten the shutdown waiting time.
This allows user to drag and drop .torrent files and URL links onto the
main window and will open the respective dialog.
Dropping folders are not supported due to technical reasons.
Closes#6038.
Because sometime (when your save and download path are on different drives, when your disk drive is super busy, ...) move operations can stack up, I add this "Moving" status filter so you can see in a blink of the eye which torrents are in a move state.
PR #17810.
PR #17814.
Closes#17792.
Closes#929.
(Actually it should close all issues about lack of ability to stop torrent after metadata downloaded or after files are initially checked.)
Also makes explicit the temporary start of the torrent in the case when recheck of the stopped torrent is performed.
The lt::status_t::file_exist is returned when lt::move_flags_t::fail_if_exist is used, which means the whole move operation failed. So hanlde this condition correctly (even if the fail_if_exist isn't used in the code base currently).
PR #17853.
There's really nothing to move if the torrent still doesn't have metadata.
Additionally, such torrents in the queue can lead to unexpected behavior
when reloading the torrent after metadata is received.
PR #17823.
Replaced QDesktopServices by native Windows function
to open destination folder due to QDesktopServices issues on Windows.
The issues are described in #17482 and even more detailed in #17025.
Closes#17482.
PR #17723.
The color is either from qbt theme pack or desktop environment.
Note that Windows default theme do not use highlighted text color.
Other themes (either OS default or qbt themes) are closer to native
look when highlighted text color is in action.
* Now it allow user to add tracker to different tier.
* The downloaded trackers are now displayed as is (without modifying).
* Now the dialog remember dialog size and last used URL.
Closes#17692.
PR #17668.
This is a continuation of #17576.
Handles the case when you add hybrid torrent by v1-only magnet link and this torrent is already known by its full hybrid info hash (i.e. by both v1 and v2 info hashes).
libtorrent < 2.0.7 has a bug that add_torrent_alert is posted too early
(before torrent is fully initialized and torrent extensions are created)
so we have to fill initial torrent data in add_torrent_alert handler.
PR #17491.
Now we can write `Version<int, 3, 1>(1)` and provide only 1 parameter
instead of all 3 parameters at once at the constructor. Note that for
this instance of `Version` 3 numbers were specified but only 1 is truly
mandatory.
The added code are required to specify conditions of the template
instantiation for the compiler.
Currently Docker Inc. recommends installing Docker Desktop instead of the CLI.
docker-compose has been deprecated, replaced by docker compose.
PR #17448.
If the "Accept-Encoding" is not manually specified, it will be
automatically set to the supported encodings by QT and the reply data
will also be automatically decompressed in this case. Setting
"Accept-Encoding" manually will disable the "autodecompress" feature
before QT 6.3.0. Although QT 6.3.x has different behaviors, let QT
specify the "Accept-Encoding" and we will always obtain the decompressed
data.
The macro "QT_NO_COMPRESS" defined when QT is compiled will disable
the zlib support. We can manually address this exceptions.
PR #17438.
Sometimes tracker may respond with 0 for num_complete and num_incomplete and we should display that instead of deducing the peer count from peer list. We should only fallback to peer list if tracker does not respond with any information. In such cases num_incomplete and num_complete is set to -1 by libtorrent.
PR #17432.
For non-existent directories (which will be created on demand) `Utils::Fs::freeDiskSpaceOnPath`
will return invalid value so instead query its parent path.
Problem statement: user sees its email address in email notification,
while it is better to have sender field app-personalized, like it did
in Nextcloud: they send notifications from user's email address and
add alias 'Nextcloud' to it.
This patch adds alias 'qBittorrent' to qBittorrent email notifications,
so user sees more user-friendly email notification.
PR #17374.
The graphs are showing 0 for both payload upload & download rate but
torrent statistics aren't, so suppress it manually.
The workaround only applies to paused state for now.
Closes#17294.
Fix PVS-Studio issue "rss_autodownloader.cpp:111: warning: V668
There is no sense in testing the 'm_fileStorage' pointer against null,
as the memory was allocated using the 'new' operator.
The exception will be generated in the case of memory allocation error".
PR #17347.
Since the application icons are already installed in
the global XDG hicolor theme, simply stop installing the 128px one
in the pixmaps location.
PR #17342.
* Downgraded macOS CI to Qt 6.2.0 due to a bug in Qt Test module
* Revised cmake build scripts
* For now, only building via cmake is supported
PR #17338.
1. Initialize Logger class earlier so that it can record messages from other classes (for
debugging purpose).
2. Deprioritize WebUI port adjustment. It is not a high priority in here.
3. Slightly deprioritize file logger initialization.
This is observed by unusual high page faults when the stuttering occurs.
With this workaround, the high page faults still occurs but the GUI remains responsive.
Reduce the total startup time of the application and maintain sufficient responsiveness of the UI during startup due to the following:
1. Load resume data from disk asynchronously in separate thread;
2. Split handling of loaded resume data in chunks;
3. Reduce the number of emitting signals.
PR #16840.
In some unknown way, the one line in Objective-C affects Qt's main
loop causing the crash in QApplication::exec() on processing next
event after that call.
Even crash doesn't happen exactly after this call, it will happen
on application exit. Call stack and disassembly are the same in
all cases.
But running that code in another thread solves the issue.
The goal is to improve responsiveness of qbt when CPU resources are scarce.
Instead of lowering libtorrent threads priority, it is chosen to raise main event loop thread
priority to avoid getting messy with libtorrent internals.
Also on Windows, threads doesn't inherit thread priority from the parent thread and it always
use the default (normal) priority.
PR #17278.
Fix cannot create torrent when the source file is at the root of a
drive.
Fix created torrent cannot be seeded when the source file is at the root
of a drive.
Fix up dd1bd8ad10.
Closes#17279.
Make notifications clickable on Linux by assigning "default" action.
Don't react to unrelated notifications clicked by keeping track of qBittorrent notifications IDs and filter out unrelated ones.
Make D-Bus Notifications interface proxy class to be maintained manually and fix coding style in it.
Closes#9084.
PR #17282.
You can already control the cache size in libtorrent 1.2.x so it doesn't make sense to implement this limit for all use cases. Also there are some downsides to using working set size to limit memory usage such as unresponsive GUI when limit gets hit.
PR #17275.
This isn't necessary since it can cause issues by doing unnecessary reannounce during startup and network address refresh. This impact of this can be great if it happens on a regular basis and if someone has a lot of torrents.
PR #17261.
The port can be optionally specified by appending `:<port>` to the existing SMTP Server field in settings. If no port is specified, then the default port (25 for insecure or 465 for SSL) is used.
Closes#12212.
PR #17157.
Blacklist filtered file names from being downloaded from torrent(s).
Files matching any of the filters in this list will have their priority automatically set to "Do not download".
See Options > Downloads >Do not download.
Closes#3369.
PR #17106.
It uses lupdate directly.
Qt's `qt_add_lupdate()` cmake function doesn't help much.
First of all it is Qt6 only.
Secondly, our project is split into multiple targets but we need all
strings into a single .ts file per language.
Thirdly, it looks like it will skip source files that are added conditionally into the build
via cmake condition checking (eg DBUS source files). We need to gather all strings present
in the source files regardless of the build configuration.
On another note, this is a step towards reducing dependency on qmake/autoconf.
In glob patterns, square brackets have a special meaning, that may be unexpected by the users.
Thus we escape these brackets, so that the only remaining special characters are the * and ? wildcards.
PR #16965.
This patch allows user to switch disk IO type between memory mapped files based type (default in libtorrent 2, and seems causing memory issues) and POSIX-compliant type which is more conservative on memory usage.
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
PR #16895.
When torrent is added without metadata libtorrent doesn't honor "seed mode" and doesn't save it in resume data so when metadata is available torrent will still check file hashes. This patch will add a logic that preserves originally enabled "seed mode" until the metadata is received.
PR #17009.
msys2 was reporting the following error:
```
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp: In member function 'void Application::applyMemoryWorkingSetLimit()':
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp:777:36: error: no matching function for call to 'min(unsigned int, long unsigned int)'
777 | const SIZE_T minSize = std::min((64 * MiB), (maxSize / 2));
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
This is a prerequisite for using boost stacktrace.
Note that this is not the first version that introduces boost stacktrace but the version that
should be stable enough.
PR #16986.
* Improves code readability.
* Improve documentation.
* Fix "docker stop" doesn't terminate qbt gracefully which could lead to
data corruption.
* Provide correct/working bittorrent listening port by default.
* Make use of qbt profile option instead of hacking environment
variables.
* Simplify build steps.
PR #16976.
It uses the latest available version for libtorrent and builds both libtorrent and qBittorrent with Cmake + ninja
The legal notice must be accepted trought an environment variable called LEGAL and passed to docker when the container is run, to set it true one must set "LEGAL=accept"
PR #16828.
Avoid some blocking calls to libtorrent
Under some conditions (when libtorrent is doing heavy work), blocking calls can wait quite a long time, thereby suspending the main application thread. In some cases, we can avoid this, since we have enough data to make the job without call to libtorrent. Although in some cases it may require a little more work to be done in the main thread, but overall responsiveness still benefits greatly in the end, especially when the libtorrent working thread is heavily loaded.
Fix web API returning Not Found instead of Forbidden.
When not having a session the API would return "Not Found" instead of "Forbidden" when trying to access a non-public endpoint.
PR #16866.
This is mainly to avoid dangerous code pattern: getting an iterator on a
temporary object. Previously `data()` returns a const reference so the
code wasn't doing any harm.
This is to allow re-checking of multiple torrents simultaneously. This will benefit users who
have multiple disks or SSD.
Closes#15296.
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
most of the time hash string is not needed and InfoHash is often used as
temporaries for torrent searching in handling of torrent alerts. This
improves the creation time of Infohash
This will allow users to perform action on all torrents with a single click instead of having to select all with ctrl+A or other cumbersome ways. Basically it copies the function found in tracker/category filters.
Closes#13398.
PR #16547.
Currently you can't directly change the priority of a partially completed multi file torrent. You'll have to start downloading those files and then change their priority.
Closes#10994.
Closes#8673.
PR #16546.
This improves readability and may allow users to match log message with
better accuracy.
Now log message is consisted of 2 parts:
The first part is a short sentence describing the event. It should avoid
writing out the specifics of the event as it will be described in the
next part of the message. The sentence should use correct tense of the
event.
The second part consist of `Name: Value` pairs which will provide
sufficient info for the event.
Note that none of the message parts is mandatory, one of them can be
omitted when the resulting log message is clear enough.
PR #16437.
This checks that `category_list[categoryHash].torrents` is truthy before dereferencing it. In some cases the API response will have a torrent in a category that doesn't exist resulting in the check to return `undefined` which is not `null`. This broadens the check so that it will create the category even if null.
PR #16432.
Speedup access to file priorities by avoiding extra blocking call to libtorrent thread.
Improve the Torrent interface by hiding the asynchrony of file priority changes behind the scenes.
PR #16425.
This method takes constant time and is less prone to (CPU) pipeline stalling due to less
computation. Also it is slightly faster than the previous method.
It did not work correctly, since it assumed that 'lt::torrent_plugin' is created at an earlier stage and is able to track all changes in the torrent state, but in reality it turned out that it was created after the torrent moved to the `downloading_metadata` state, so we had to additionally handle it in the constructor.
PR #16121.
qBittorrent is a single-window application.
By marking it as such desktop environments know to not offer to open
a new window for it.
This is a new standard key intruduced in
3ea3bc26e2
PR #15996.
Suppresses the following warning:
qBittorrent/src/base/bittorrent/categoryoptions.cpp: In static member function ‘static BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObject&)’:
qBittorrent/src/base/bittorrent/categoryoptions.cpp:44:59: warning: missing initializer for member ‘BitTorrent::CategoryOptions::DownloadPathOption::path’ [-Wmissing-field-initializers]
44 | options.downloadPath = {downloadPathValue.toBool()};
Change "Incomplete/temp folder" term with "download folder".
Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
For writing, this ensures expire handler won't be executed in a small
time window, that is after `m_socket->write()` and before
`QIODevice::bytesWritten()` signal.
For reading, this let the socket to have the chance to process the
received data instead of dropping it.
PR #15849.
This also suppresses the following clang warning:
warning: definition of implicit copy assignment operator for 'Version<unsigned short, 2>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
Current item priority is compared against new checkbox state. I believe the intention was to check if the priority changes before performing further actions. This PR fixes the issue - compare priority against new value that is about to be set rather then the checkbox state.
PR #15740.
Some linux distros seem to alter TMPDIR environment variable and
therefore hamper qbt ability to find the lock files. So use config
folder instead of TMPDIR folder to create/locate the lock files.
Note that this change will also make qbt become one instance per-user
instead of one instance per-system.
Closes#15646.
Fix improper sorting of the list of files contained by a torrent.
Always load all torrent content data so that the files list can be sorted properly.
Load torrent content only when needed. Don't load the list of files contained by a torrent if the list widget is not visible.
PR #15604.
This functionality wasn't ever correctly implemented and couldn't be
done without considerable effort, so revert it for now.
This reverts commit 4ac25a50ed.
PR #15542.
Previous default was 500MB and it couldn't fit all compile results in
it, enlarge it to 2GB. Note that 2GB isn't the actual size stored on the
server, it will be compressed again by zstd and will be a lot smaller.
Now it builds boost, libtorrent manually and we have control over its
version.
Enable build matrix for libtorrent versions.
Reorganized the folder/file layout in built artifact.
Minimizing columns no longer truncates text from the left, now elides
text from the right for better readability. Done by setting header's
textElideMode to Qt::TextElideRight.
Fix issue #14419.
PR #15366.
Until libtorrent provided an "old_name" field in `file_renamed_alert` we relied
on a workaround with storing old file names to remove empty leftover folders.
PR #15356.
This will save maintenance work on the vcpkg version.
Also a few other improvements:
* Add quotes to path
* Sort command flags
* Avoid switching shell, always use powershell (the default shell)
It is meaningless to build on multiple linux versions as we only depend
on library versions, not OS versions.
Also remove redundant "shell default" section.
Unfortunately Freenode, after a takeover, decided to purge all their databases, thus
deleting all channel and user registrations, without a warning.
So if we're forced to re-register our stuff why not go where the cool kids are at?
Removed these two lines because they haven't been true in a very long time, and is no longer even possible.
```
You can also meet me (sledgehammer_999) on IRC:
`#qbittorrent on irc.freenode.net`
```
Stale bot will mark stale PR with a tag and close them after a specified
interval of time.
* Draft PRs are not subject to this marking.
* PR with an assignee or milestone is not subject to this marking.
Although the detection is working, the error message in autotools is not
perfect, i.e. it would only mention valid range for libtorrent v1 and it
shouldn't be a problem since v2 support isn't fully ready yet.
We can no longer save valid torrent files in the general case, because
for torrents of version 2, we need a full merkle tree to do it, but if
a torrent is added from magnet link, full merkle tree may not be available
even before the end of downloading all the data. Actually, we don't need
the full torrent file for the purposes of resuming the torrent, so we can
allow libtorrent to produce only a minimal part of the metadata as part
complete resume data, but we still want to store it in a separate file,
so we extract the resulting metadata from the complete resume data before
saving and merge it together before loading.
This allows the system to properly encode the '|', instead of passing
the '|' on in the URL, which is not allowed and breaks proxies such as
Authelia.
Then, for the purpose of generalization, I pushed this pattern through
to all places where we join items with a '|'.
This comes with the caveat that when we have individual components which
contain a '|' or any other character that is not allowed per the
HTTP standard, we still like to encode the individual components,
for example in the case of 3 strings, separated by a '|'.
If we don't do this we run into the risk that upon decoding URI finds
'|' in our original strings, which is something we don't want.
For example:
Sender:
````javascript
const arr = ["foo|1", "bar|2"];
const uri = new URI("test.html").setData(arr.join("|"));
````
Then on the receiving window, when it receives the uri and splits it, it
looks like this:
````javascript
const arr = new URI().getData('hashes').split('|');
// arr is now ["foo", "1", "bar", "2"]
````
This is why when we want to send a literal "|" we need to do
`encodeURIComponent` and `decodeURIComponent` manually on each item,
and THEN we join.
For example:
Sender:
````javascript
const arr = ["foo|1", "bar|2"];
const uri = new URI("test.html").setData(arr.map(encodeURIComponent).join("|"));
````
Receiver:
````javascript
const arr = new URI().getData('hashes').split('|').map(decodeURIComponent);
// arr is now ["foo|1", "bar|2"]
````
We don't need to with hashes as they are HEX, so no risk of any weird
characters in there.
Those strings sometimes are quite long and having a tooltip would
save the action of resizing the column width to see the full message.
The WebUI already has it done for all columns.
This also suppress the compiler warning:
src/base/bittorrent/torrentimpl.cpp:228:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
Both `lt::create_torrent` constructor and `lt::create_torrent::generate()`
can throw an exception so we need to handle it to prevent the app from crashing.
The issue was resolved by using QAction::toggled signal instead of
QAction::triggered. In QT 5.15+ the latter signal causes a QMenu
to close, whereas the former does not. Closes#13492.
- warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
Caused by mismatch between size_type of std and Qt containers. It is safe to cast to int as all of those containers hold low number of objects.
When restoring from tray icon, although the window manager shows qbt
window but qbt itself didn't handle the event correctly, i.e. the
`show()` was missing and thus qbt did nothing and the window is blank.
Note that at this point the `visible` property is `false`.
After invoking `show()` qbt will start showing the contents and also
fire another showEvent where `visible` property is `true` and here is where
qbt should handle preparations for the window.
Fix#9510.
- update vcpkg to latest commit (includes updated libtorrent port)
- drop custom libtorrent port
- restore AppleClang workaround in the workflow file
- include install_manifest.txt in uploaded artifacts
- update actions to latest versions
- fix typos
This is to suppress the following compilation warnings:
base/bittorrent/magneturi.cpp: In constructor ‘BitTorrent::MagnetUri::MagnetUri(const QString&)’:
base/bittorrent/magneturi.cpp:87:60: warning: missing initializer for member ‘BitTorrent::TrackerEntry::message’ [-Wmissing-field-initializers]
87 | m_trackers.append({QString::fromStdString(tracker)});
If torrent failed to write, it stops downloading and goes to
"upload mode" instead of errored state so it just keeps seeding.
Now qBittorrent indicates this state as "errored" and allows
the user to manually bring the torrent out of this state.
Line 32
Changing "zumindest" to "mindestens".
I even would go further to change the line into "[...] Windows 7 oder höher." ("[...] Windows 7 or higher."), as this seems to make more sense and we wouldn't have the hassle of discussing whether "zumindest" or "mindestens" fits better.
If you insist on a comment:
It is quite a cosmetic change, and a personal opinion as well. Imo "mindestens" fits more to the theme of general use - "zumindest" can be used in special places, as it isn't that common in e.g. regular conversations. What comes to my mind is "Best before", which is "Mindestens haltbar bis". It would be unusual to use "Zumindest haltbar bis". 😄
Finally it is up to you what to change.
CC: @schnurlos
Additionally I fixed line 10, where no need of a double-"mit" was.
Plus line 34, as requested!
Now the comparison function/class should be constructed before usage.
This change also make it easier to plug in into various containers which
will require a compare function type (such as std::set).
This reverts commit 435bb34435.
To achieve what the reverted commit wants, the timing
would need to be taken iteratively rather that cumulatively
fixes#14735
Don't clamp elapsed time of SpeedPlotView::Averager on resolution. Since
it may cause minor discrepencies across different Averagers with
different resolution for same speed update.
Regarding this license clarification there are 3 commits of interest
(commits A, B, C). Before commit A the COPYING file contained only the
text of the GPLv2 license, while all source files had a license block
at the top saying that they are under the terms of "GPLv2 or later". With
commit A there was a temporary change to GPLv3. The COPYING file contained
only the text of the GPLv3 license, while all source files had a license
block at the top saying that they are under the terms of "GPLv3 or later".
Then with commit B the COPYING file and the license block of the source
files was reverted to their state before commit A. Afterwards, with
commit C a license summary(or clarification) block was put at the top of
the COPYING file. This block indicated that the license was GPLv2 without
having the "or later" clause and it also included the OpenSSL exception.
However, the license block of each source file continued to contain the
"or later" clause which was not removed. The same license block continues
to exist in all current source files. Thus it is concluded that the ommision
of the "or later" clause with commit C in the COPYING file was accidental.
OR ALTERNATIVELY (OR IN ADDITION)
At the time commit C was made Christophe Dumez was not the sole contributor.
There is no record that the other contributors agreed with the supposed
GPLv2 only change or that there was a Contributor License Agreement,
transfering their rights to him. Thus making his license change decision
invalid/void/illegal.
Commit A: 54f9375b32
Commit B: 8df61db644
Commit C: 9835af4962
Implement ResumeDataStorage class as base for all "resume data" storages.
Implement BencodeResumeDataStorage class and put all existing logic of
"resume data" loading/saving there.
Now it follows closely the definition of wildcard for glob patterns.
The backslash (\) character is not an escape char in this context.
In order to match one of the special characters, place it in square
brackets (for example, [?]).
Define "torrent ID" concept, which is either a SHA1 hash for torrents of version 1,
or a SHA256 hash (truncated to SHA1 hash length) for torrents of version 2.
Add support for native libtorrent2 info hashes.
Pass application directory as PDB search path in SymInitialize.
Otherwise it searches in application working directory so when you
run qBittorrent with working directory other than its installation
one it can't find qbittorent.pdb file and produces broken stacktrace.
Previously SpeedPlotView assumed speed is updated per second but the
default value was 1500ms and that can be further changed by the
user, this caused a lot of duplicate data in the calculation of the
graph points. Now Averager averages based on the target duration, resolution
and also takes into account when actually data has arrived.
Also improved resolution of 6-hour graph, previously it was same as 12-hour graph
These files were created and edited in their entirety in commit 8db4bde15d
As far as I can tell they were almost entirety rewritten from their original state.
The old copyright attribution is restored and the new author is added too.
Originally, it was just a wrapper for libtorrent::torrent_handle class, so it mimicked its name.
It was then transformed into a more complex aggregate, but the name was retained (just by inertia).
Unlike libtorrent::torrent_handle class in whose name "handle" means the pattern used,
it does not matter for qBittorrent classes and just eats up space in the source code.
The basic idea is we create a version header template at
"src/base/version.h.in" and the build systems are expected to replace
strings that are enclosed with @ symbols and generate
"src/base/version.h" for other source files to consume/include.
Previously it only handle the case of failed lookup, now it discard
invalid values when deserializing the database from disk.
Also checks whether the data is convertible to the intended type.
This applies to "About Dialog", "Ban List Options Dialog", "Download From URL Dialog", "IP Subnet
Whitelist Options Dialog", "Search Plugin Select Dialog", "Search Plugin Source Dialog",
"Statistics Dialog", "Speed Limit Dialog" and "Torrent Options Dialog".
Also unifies storing the dialog size under the key "Size".
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
Move files/folders renaming functions to core classes.
Query file/folder for renaming by its current path.
Add ability to rename content folders from WebAPI/WebUI.
Fortunately, serializing to JSON limits the data types to a very small
subset and thus we are able to implement the comparison without much
hassle.
Fix up cba8d83b21.
Another idea would be manually define a custom comparison function for
QVariant. However, having the function would be excessive due to its
limited usage count, also note that we are already casting
various QVariant to its underlying type in existing code.
The default version is so outdated that it needs to rebuild many
dependencies. Now we bump it to the latest version so that it can use
prebuilt packages.
As referenced in https://github.com/qbittorrent/qBittorrent/pull/13615
and suggested by @glassez
- Use the word qBittorrent when it is mentioned for the first time within a string.
- If the string contains other references to qBittorrent, then use it (rather than repeating qBittorrent).
Line 24 is the updated Dutch translation for the recently updated English source string (may 2020)
In libtorrent 2.0, the `connection_type` was changed to a flag type and
hence it cannot be used in a switch statement directly. Also our use of
`connection_type` is limited so that a single equality comparison
would cover all of our use cases.
description:File a bug report to help improve qBittorrent user experience.
body:
- type:markdown
attributes:
value:|
#### ADVISORY
"We do not support any versions older than the current release series"
"We do not support any 3rd party/forked versions e.g. `portableapps`/`Enhanced Edition`etc."
"Please post all details in **English**."
#### Prerequisites before submitting an issue!
- Read the issue reporting section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good bug report with the required information.
- Verify that the issue is not fixed and is reproducible in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (currently only on **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Check the **[frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues)** to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.
- If relevant to issue/when asked, the qBittorrent preferences file, qBittorrent.log & watched_folders.json (if using "Watched Folders" feature) must be provided.
See **[Where does qBittorrent save its settings?](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings)**
- type:textarea
attributes:
label:qBittorrent & operating system versions
description:|
Qt and libtorrent-rasterbar versions are required when: 1. You are using linux. 2. You are not using an official build downloaded from our website.
Example of preferred formatting:
qBittorrent: 4.3.7 x64
Operating system: Windows 10 Pro 21H1/2009 x64
Qt: 5.15.2
libtorrent-rasterbar: 1.2.14
placeholder:|
qBittorrent:
Operating system:
Qt:
libtorrent-rasterbar:
validations:
required:true
- type:textarea
attributes:
label:What is the problem?
description:Please add the "crash report" (if encountered) or give a clear and concise description of problem.
validations:
required:true
- type:textarea
attributes:
label:Steps to reproduce
description:Please provide reliable steps to reproduce the problem.
placeholder:|
1. First step
2. Second step
3. and so on...
validations:
required:false
- type:textarea
attributes:
label:Additional context
description:Add screenshots etc. (Anything that will provide more context about the problem)
validations:
required:false
- type:textarea
attributes:
label:Log(s) & preferences file(s)
description:|
Add these files: qBittorrent preferences file, qBittorrent.log & watched_folders.json (if using "Watched Folders" feature).
See **[Where does qBittorrent save its settings?](https://github.com/qbittorrent/qBittorrent/wiki/Frequently-Asked-Questions#Where_does_qBittorrent_save_its_settings)**
#### Note: It's the user's responsibility to redact any sensitive information
description:Suggest a new feature or enhancement for qBittorrent.
labels:["Feature request"]
body:
- type:markdown
attributes:
value:|
#### ADVISORY
"Please post all details in **English**."
#### Prerequisites before submitting a feature request!
- Read the feature request section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good feature request with the required information.
- Verify that the feature being requested is not available in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional but recommended) Verify that the feature being requested is not available in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Search the issue tracker with the **[feature request filter](https://github.com/qbittorrent/qBittorrent/issues?q=is%3Aopen+is%3Aissue+label%3A%22Feature+request%22)** for similar feature requests (including closed ones) to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.
- type:textarea
attributes:
label:Suggestion
validations:
required:false
- type:textarea
attributes:
label:Use case
validations:
required:false
- type:textarea
attributes:
label:Extra info/examples/attachments
description:Add screenshots etc. (Anything that will give us more context about what is being requested!)
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."
days-before-stale:-1# avoid marking issues
days-before-pr-stale:60
days-before-close:-1# avoid closing issues
days-before-pr-close:7
exempt-all-pr-assignees:true# avoid stale for all PR with assignees
exempt-all-pr-milestones:true# avoid stale for all PR with milestones
# only allow specific build for coverity scan, others will stop
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$libt_branch" = "RC_1_2" -a "$gui" = "true" -a "$build_system" = "qmake" ]; then exit ; fi
- shopt -s expand_aliases
- alias make="colormake -j2"# Using nprocs/2 sometimes may fail (gcc is killed by system)
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.
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.
# version requirements - older versions may work, but you are on your own
set(CMAKE_FIND_PACKAGE_PREFER_CONFIGON)
set(minBoostVersion1.76)
# version requirements
set(minQt6Version6.5.0)
set(requiredBoostVersion1.40)
set(minOpenSSLVersion3.0.2)
set(requiredQtVersion5.9.0)
set(minLibtorrent1Version1.2.19)
set(requiredOpenSSLVersion1.0)
set(minLibtorrentVersion2.0.10)
set(requiredLibtorrentVersion1.2.0)
set(minZlibVersion1.2.11)
set(requiredZlibVersion1.2.5.2)
# features (some are platform-specific)
include(FeatureSummary)
include(FeatureOptionsSetup)
feature_option(STACKTRACE"Enable stacktraces"ON)
feature_option(GUI"Build GUI application"ON)
feature_option(WEBUI"Enables built-in HTTP server for headless use"ON)
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_NAMESTREQUAL"Linux")
feature_option_dependent(DBUS
"Enables support for notifications and power-management features on Linux via D-Bus"
ON"GUI"OFF
)
feature_option_dependent(SYSTEMD
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
OFF"NOT GUI"OFF
)
elseif(MSVC)
feature_option(MSVC_RUNTIME_DYNAMIC"Use MSVC dynamic runtime library (-MD) instead of static (-MT)"ON)
endif()
set(QBT_VER_STATUS"alpha1"CACHESTRING"Project status version. Should be empty for release builds.")
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)
All new code **must** follow the following coding guidelines.
# Coding Guidelines
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes.
All new code **must** follow the following coding guidelines.
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes. \
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style.
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style. \
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder.
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder. \
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
### Table Of Contents
## Table Of Contents
* [1. New lines & curly braces](#1-new-lines--curly-braces)
* [1. New lines & curly braces](#1-new-lines--curly-braces)
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
@@ -29,11 +32,13 @@ For programming languages other than C++ (e.g. JavaScript) used in this reposito
### a. Function blocks, class/struct definitions, namespaces
#### a. Function blocks, class/struct definitions, namespaces ####
```c++
```c++
int myFunction(int a)
int myFunction(int a)
{
{
@@ -43,7 +48,7 @@ int myFunction(int a)
void myFunction() {} // empty body
void myFunction() {} // empty body
MyClass::MyClass(int *parent)
MyClass::MyClass(int *parent)
: m_parent(parent)
: m_parent {parent}
{
{
// initialize
// initialize
}
}
@@ -79,17 +84,21 @@ namespace Name
}
}
```
```
#### b. Other code blocks ####
### b. Other code blocks
```c++
```c++
if (condition) {
if (condition)
{
// code
// code
}
}
for (int a = 0; a < b; ++b) {
for (int a = 0; a < b; ++b)
{
// code
// code
}
}
switch (a) {
switch (a)
{
case 1:
case 1:
// blah
// blah
case 2:
case 2:
@@ -97,17 +106,25 @@ case 2:
default:
default:
// blah
// blah
}
}
{
// code
}
```
```
#### c. Blocks in switch's case labels ####
### c. Blocks in switch's case labels
```c++
```c++
switch (var) {
switch (var)
case 1: {
{
case 1:
{
// declare local variables
// declare local variables
// code
// code
}
}
break;
break;
case 2: {
case 2:
{
// declare local variables
// declare local variables
// code
// code
}
}
@@ -117,22 +134,29 @@ default:
}
}
```
```
#### d. If-else statements ####
### d. If-else statements
The `else if`/`else` must be on their own lines:
The `else if`/`else` must be on their own lines:
```c++
```c++
if (condition) {
if (condition)
{
// code
// code
}
}
else if (condition) {
else if (condition)
{
// code
// code
}
}
else {
else
{
// code
// code
}
}
```
```
#### e. Single statement if blocks ####
### e. Single statement if blocks
Most single statement if blocks should look like this:
Most single statement if blocks should look like this:
```c++
```c++
if (condition)
if (condition)
a = a + b;
a = a + b;
@@ -141,19 +165,23 @@ if (condition)
One acceptable exception to this can be `return`, `break` or `continue` statements,
One acceptable exception to this can be `return`, `break` or `continue` statements,
provided that the test condition isn't very long and its body statement occupies only one line.
provided that the test condition isn't very long and its body statement occupies only one line.
However you can still choose to use the first rule.
However you can still choose to use the first rule.
```c++
```c++
if (a > 0) return;
if (a > 0) return;
while (p) {
while (p)
{
// ...
// ...
if (!b) continue;
if (!b) continue;
}
}
```
```
#### f. Acceptable conditions to omit braces ####
### f. Acceptable conditions to omit braces
When the conditional statement in `if`/`else` has only one line and its body occupy only one line,
When the conditional statement in `if`/`else` has only one line and its body occupy only one line,
this also applies to loops statements.
this also applies to loops statements. \
Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces.
Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces.
```c++
```c++
if (a < b) // conditional statement
if (a < b) // conditional statement
do(a); // body
do(a); // body
@@ -165,21 +193,27 @@ else if (a > b)
else
else
do(c);
do(c);
if (a < b) {
if (a < b)
{
do(a);
do(a);
}
}
else if (a > b) { // curly braces required here, then all branches should also add them
else if (a > b)
{
// curly braces required here, then all branches should also add them
do(b);
do(b);
do(d);
do(d);
}
}
else {
else
{
do(c);
do(c);
}
}
```
```
#### g. Brace enclosed initializers ####
### g. Brace enclosed initializers
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions. \
But you must insert a space between the variable name and initializer.
But you must insert a space between the variable name and initializer.
```c++
```c++
Class obj {}; // empty
Class obj {}; // empty
Class obj {expr};
Class obj {expr};
@@ -187,28 +221,33 @@ Class obj {expr1, /*...,*/ exprN};
QVariantMap map {{"key1", 5}, {"key2", 10}};
QVariantMap map {{"key1", 5}, {"key2", 10}};
```
```
### 2. Indentation ###
## 2. Indentation
4 spaces.
4 spaces.
### 3. File encoding and line endings ###
## 3. File encoding and line endings
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
### 4. Initialization lists ###
## 4. Initialization lists
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
```c++
```c++
myClass::myClass(int a, int b, int c, int d)
myClass::myClass(int a, int b, int c, int d)
: m_a(a)
: m_a {a}
, m_b(b)
, m_b {b}
, m_c(c)
, m_c {c}
, m_d(d)
, m_d {d}
{
{
// code
// code
}
}
```
```
### 5. Enums ###
## 5. Enums
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++
```c++
enum Days
enum Days
{
{
@@ -222,11 +261,14 @@ enum Days
};
};
```
```
### 6. Names ###
## 6. Names
All names should be camelCased.
All names should be camelCased.
#### a. Type names and namespaces ####
### a. Type names and namespaces
Type names and namespaces start with Upper case letter (except POD types).
Type names and namespaces start with Upper case letter (except POD types).
```c++
```c++
class ClassName {};
class ClassName {};
@@ -234,21 +276,25 @@ struct StructName {};
enum EnumName {};
enum EnumName {};
typedef QList<ClassName> SomeList;
using SomeList = QList<ClassName>;
namespace NamespaceName
namespace NamespaceName
{
{
}
}
```
```
#### b. Variable names ####
### b. Variable names
Variable names start with lower case letter.
Variable names start with lower case letter.
```c++
```c++
int myVar;
int myVar;
```
```
#### c. Private member variable names ####
### c. Private member variable names
Private member variable names start with lower case letter and should have ```m_``` prefix.
Private member variable names start with lower case letter and should have ```m_``` prefix.
```c++
```c++
class MyClass
class MyClass
{
{
@@ -256,23 +302,26 @@ class MyClass
}
}
```
```
### 7. Header inclusion order ###
## 7. Header inclusion order
The headers should be placed in the following group order:
1. Module header (in .cpp)
2. C++ Standard Library headers
3. System headers
4. Boost library headers
5. Libtorrent headers
6. Qt headers
7. qBittorrent's own headers, starting from the *base* headers.
The headers should be ordered alphabetically within each group.
The headers should be placed in the following group order:
If there are conditionals for the same header group, then put them at the bottom of the respective group.
1. Module header (in .cpp)
2. C++ Standard Library headers
3. System headers
4. Boost library headers
5. Libtorrent headers
6. Qt headers
7. qBittorrent's own headers, starting from the *base* headers.
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.
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, QtGlobal), this particular header isn't constrained by the aforementioned order.
One exception is the header containing the library version (for example, QtVersionChecks), this particular header isn't constrained by the aforementioned order.
Example:
Example:
```c++
```c++
// file: examplewidget.cpp
// file: examplewidget.cpp
@@ -282,7 +331,7 @@ Example:
// exceptions, headers containing version number
// exceptions, headers containing version number
#include <boost/version.hpp>
#include <boost/version.hpp>
#include <libtorrent/version.hpp>
#include <libtorrent/version.hpp>
#include <QtGlobal>
#include <QtVersionChecks>
// C++ Standard Library headers
// C++ Standard Library headers
#include <cstdio>
#include <cstdio>
@@ -293,7 +342,7 @@ Example:
// System headers
// System headers
#ifdef Q_OS_WIN
#ifdef Q_OS_WIN
#include <Windows.h>
#include <windows.h>
#endif
#endif
// Boost library headers
// Boost library headers
@@ -322,8 +371,10 @@ Example:
#include "ui_examplewidget.h"
#include "ui_examplewidget.h"
```
```
### 8. Include guard ###
## 8. Include guard
`#pragma once` should be used instead of "include guard" in new code:
`#pragma once` must be used instead of a "classic include guard":
```c++
```c++
// examplewidget.h
// examplewidget.h
@@ -338,75 +389,77 @@ class ExampleWidget : public QWidget
```
```
### 9. Misc ###
## 9. Misc
* Line breaks for long lines with operation:
* Line breaks for long lines with operation:
```c++
```c++
a += "b"
a += "b"
+ "c"
+ "c"
+ "d";
+ "d";
```
```
* **auto** keyword
* **auto** keyword
We allow the use of the **auto** keyword only where it is strictly necessary
We allow the use of the **auto** keyword only where it is strictly necessary (for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code. \
(for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code.
Declarations for which one can gather enough information about the object interface (type) from its name or the usage pattern (an iterator or a loop variable are good examples of clear patterns) or the right part of the expression nicely fit here.
Declarations for which one can gather enough information about the object interface (type) from its name
or the usage pattern (an iterator or a loop variable are good examples of clear patterns)
When weighing whetherto use an auto-typed variable please think about potential reviewers of your code, who will read it as a plain diff (on github.com, for instance). \
or the right part of the expression nicely fit here.<br/>
Please make sure that such reviewers can understand the code completely and without excessive effort.
<br/>
When weighing whether to use an auto-typed variable please think about potential reviewers of your code,
Some valid use cases:
who will read it as a plain diff (on github.com, for instance). Please make sure that such reviewers can
understand the code completely and without excessive effort.<br/>
* Container iteration and casts:
<br/>
Some valid use cases:
```c++
```c++
template <typename List>
template <typename List>
void doSomethingWithList(const List &list)
void doSomethingWithList(const List &list)
{
{
foreach (const auto &item, list)
foreach (const auto &item, list) {
{
// we don't know item type here so we use 'auto' keyword
// we don't know item type here so we use 'auto' keyword
// do something with item
// do something with item
}
}
}
}
for (auto it = container.begin(), end = container.end(); it != end; ++it) {
for (auto it = container.begin(), end = container.end(); it != end; ++it)
// we don't need to know the exact iterator type,
{
// because all iterators have the same interface
// we don't need to know the exact iterator type,
}
// because all iterators have the same interface
}
auto spinBox = static_cast<QSpinBox*>(sender());
auto spinBox = static_cast<QSpinBox*>(sender());
// we know the variable type based on the right-hand expression
// we know the variable type based on the right-hand expression
```
```
* Notice the spaces in the following specific situations:
* Notice the spaces in the following specific situations:
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
for (int a = 0; a < b; ++b) {
```c++
}
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
// Range-based for loop, spaces before and after the colon
a += 20;
for (auto i : container) {
a = (b <= MAX_B ? b : MAX_B);
}
++a;
--b;
// Derived class, spaces before and after the colon
for (int a = 0; a < b; ++b)
class Derived : public Base
{
{
}
};
// Range-based for loop, spaces before and after the colon
```
for (auto i : container)
{
}
// Derived class, spaces before and after the colon
class Derived : public Base
{
};
```
* Prefer pre-increment, pre-decrement operators
* Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // Yes
```c++
i++, j--; // No
++i, --j; // yes
```
i++, j--; // no
```
* private/public/protected must not be indented
* private/public/protected must not be indented
@@ -414,7 +467,8 @@ i++, j--; // No
* Method definitions aren't allowed in header files
* Method definitions aren't allowed in header files
### 10. Git commit message ###
## 10. Git commit message
1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals)
1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals)
2. Separate subject from body with a blank line
2. Separate subject from body with a blank line
3. Capitalize the subject line
3. Capitalize the subject line
@@ -424,6 +478,7 @@ i++, j--; // No
7. Use the body to explain what and why vs. how
7. Use the body to explain what and why vs. how
8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`)
8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`)
### 11. Not covered above ###
## 11. Not covered above
If something isn't covered above, just follow the same style the file you are editing has.
If something isn't covered above, just follow the same style the file you are editing has. \
*This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.*
*This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.*
* [Before submitting an enhancement/feature request](#before-submitting-an-enhancementfeature-request)
* [Before submitting an enhancement/feature request](#before-submitting-an-enhancementfeature-request)
* [Steps to ensure a good enhancement/feature suggestion](#steps-to-ensure-a-good-enhancementfeature-suggestion)
* [Steps to ensure a good enhancement/feature suggestion](#steps-to-ensure-a-good-enhancementfeature-suggestion)
***[Opening a pull request](#opening-a-pull-request)**
***[Opening a pull request](#opening-a-pull-request)**
* [Must read](#must-read)
* [Good to know](#good-to-know)
# Bug reporting etiquette
# Bug reporting etiquette
@@ -31,7 +23,7 @@ Read the respective section to find out more.
***Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
***Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
* Harsh words or threats won't help your situation. Your complaint will (very likely) be **ignored.** :fearful:
# Submitting an issue/bug report
# Submitting an issue/bug report
@@ -47,7 +39,7 @@ Developers and contributors are not supposed to deal with issues for which littl
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
Requiring people to investigate as much as possible before opening an issue avoids burdening the project with invalid issues or issues unrelated to qBittorrent.
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
@@ -194,28 +186,26 @@ Following these guidelines helps maintainers and the community understand your s
# Opening a pull request
# Opening a pull request
### Must read
* Consult [coding guidelines][coding-guidelines-url] first. If you are working on translation/i18n, read ["How to translate qBittorrent"][how-to-translate-url].
*Read our [**coding guidelines**][coding-guidelines-url]. There are some scripts to help you: [uncrustify script][uncrustify-script-url], [astyle script][astyle-script-url], [(related thread)][coding-guidelines-thread-url].
*Keep your git commit history clean.
* Keep the title **short** and provide a **clear** description about what your pull request does.
* Refer to the section about ["Git commit messages"][coding-guidelines-git-commit-message-url] in the coding guidelines.
* Provide **screenshots** for UI related changes.
* When merge conflicts arise, do `git rebase <target_branch_name>` and fix the conflicts, don't do `git pull`. Here is a good explanation: [merging-vs-rebasing][merging-vs-rebasing-url].
* Keep your git commit history **clean** and **precise.** Refer to the section about "Git commit messages" in the [**coding guidelines**][coding-guidelines-url].
* Keep pull request title concise and provide motivation and "what it does" in the pull request description area. Make it easy to read and understand.
*If your commit fixes a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here][commit-message-fix-issue-example-url].
*Provide screenshots for UI related changes.
* If your commit addresses a reported issue (for example issue #8454), append the following text to the commit body `Closes #8454.`. Example [commit][commit-message-fix-issue-example-url].
* Search [pull request list][pull-request-list-url] first. Others might have already implemented your idea (or got rejected already).
### Good to know
***Search** pull request history! Others might have already implemented your idea and it is waiting to be merged (or got rejected already). Save your precious time by doing a search first.
* When resolving merge conflicts, do `git rebase <target_branch_name>`, don't do `git pull`. Then you can start fixing the conflicts. Here is a good explanation: [link][merging-vs-rebasing-url].
- WEBUI: Fix empty selection in language combobox (Chocobo1)
- WEBUI: Store WebUI port setting in human readable number (Chocobo1)
- WEBUI: Add support for exporting .torrent (Tom Piccirello)
- WEBUI: WebAPI: Add endpoint to set speed limit mode (glassez)
- WEBUI: Improve progress bar rendering (Mike Lei)
- WEBUI: Add transfer list refresh interval settings (summer)
- WEBUI: Use natural sort (Chocobo1)
- WEBUI: Apply i18n translation only to built-in WebUI (Chocobo1)
- WEBUI: Alert when HTTPS settings are incomplete (Chocobo1)
- WEBUI: Handle drag and drop events (Chocobo1)
- WEBUI: Fix wrong behavior for shutdown action (Chocobo1)
- WEBUI: Don't disable combobox for file priority (Chocobo1)
- RSS: Increase limit of maximum number of articles per feed (summer)
- WINDOWS: Fix `Open destination folder` delay on Windows (Andrew)
- WINDOWS: NSIS: Update Russian, Estonian, Japanese, Dutch, Portuguese BR, German and Indonesian translations (Andrei Stepanov, Priit Uring, maboroshin, Thomas De Rocker, Ícaro, schnurlos, Faisal A. F. Rahman)
- LINUX: Mark as single window app in .desktop file (Nicolas Fella)
- LINUX: Add Dockerfile (Amanuense-del-diavolo, Tom Piccirello, Chocobo1)
- LINUX: Remove option of using icons from system theme (now-im)
- MACOS: Fix wrong background color in properties widget (NotTsunami)
- OTHER: Binary distributions of qbittorrent are GPLv3+ licensed (sledgehammer999)
Tue Aug 30 2022 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.4.5
* Be careful: another library (the one used by rTorrent) uses a similar name
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.0
- OpenSSL >= 3.0.2
- Qt >= 5.9.0
- Qt 6.5.0 - 6.x
- zlib >= 1.2.5.2
- zlib >= 1.2.11
- pkg-config (compile-time only)
- CMake >= 3.16
* Compile-time only
- Python >= 3.5.0 (optional, runtime only)
- Python >= 3.7.0
* Required by the internal search engine
* Optional, run-time only
* Used by the bundled search engine
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.
Please ensure you are building with an officially supported configuration when reporting bugs.
2a) Compile and install qBittorrent with Qt graphical interface
2a) Compile and install qBittorrent with Qt graphical interface
$ ./configure
$ cmake -B build -DCMAKE_BUILD_TYPE=Release
$ make && make install
$ cmake --build build
$ cmake --install build
$ qbittorrent
$ qbittorrent
will install and execute qBittorrent.
will install and execute qBittorrent.
2b) Compile and install qBittorrent without Qt graphical interface
2b) Compile and install qBittorrent without Qt graphical interface
[](https://github.com/qbittorrent/qBittorrent/actions)
[](https://github.com/qbittorrent/qBittorrent/actions)
@@ -17,15 +15,8 @@ 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/).
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:
### 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:
### Public key:
Starting from v3.3.4 all source tarballs and binaries are signed.<br />
Starting from v3.3.4 all source tarballs and binaries are signed.<br />
@@ -38,16 +29,16 @@ For more information please visit:
https://www.qbittorrent.org
https://www.qbittorrent.org
or our wiki here:
or our wiki here:
http://wiki.qbittorrent.org
https://wiki.qbittorrent.org
Use the forum for troubleshooting before reporting bugs:
Use the forum for troubleshooting before reporting bugs:
http://forum.qbittorrent.org
https://forum.qbittorrent.org
Please report any bug (or feature request) to:
Please report any bug (or feature request) to:
http://bugs.qbittorrent.org
https://bugs.qbittorrent.org
You can also meet me (sledgehammer_999) on IRC:
Official IRC channel:
`#qbittorrent on irc.freenode.net`
[#qbittorrent on irc.libera.chat](ircs://irc.libera.chat:6697/qbittorrent)
# Check if already in >= C++14 mode because of the flags returned by one of the above packages
TMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=""
AC_MSG_CHECKING([if compiler defaults to C++14 or later mode])
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([yes])
QBT_CXX14_FOUND="yes"],
[AC_MSG_RESULT([no])
QBT_CXX14_FOUND="no"])
# In case of no, check if the compiler can support at least C++14
# and if yes, enable it leaving a warning to the user
AS_IF([test "x$QBT_CXX14_FOUND" = "xno"],
[AC_MSG_CHECKING([if compiler supports C++14])
CXXFLAGS="-std=c++14"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C++14 is disabled by the set compiler flags])
# prepend the flag so it won't override conflicting user defined flags
CXXFLAGS="-std=c++14 $TMP_CXXFLAGS"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
[AC_MSG_RESULT([no])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++14"
AC_MSG_WARN([C++14 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
[AC_MSG_RESULT([yes])
AC_MSG_ERROR([The compiler supports C++14 but the user or a dependency has explicitly enabled a lower mode.])])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A compiler supporting C++14 is required.])])
])
CXXFLAGS="$TMP_CXXFLAGS"
# These are required because autoconf doesn't expand these **particular**
# vars automatically. And qmake cannot autoexpand them.
AX_DEFINE_DIR([EXPAND_PREFIX], [prefix])
AX_DEFINE_DIR([EXPAND_BINDIR], [bindir])
AX_DEFINE_DIR([EXPAND_DATADIR], [datadir])
AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
extract() {
if [[ -z "$*" ]]; then
echo "Input string required"
return 1
fi
# BSD sed needs an actual newline character in the substitute command
new_line='
'
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.