Qt translations have to be compiled in a shared library or executable,
and since we use static libraries for the components, webui translation
files have to be compiled into the main executable.
1. Use FeatureSummary module to show configuration results.
2. Invert option()/find_package() relationship: instead of
calling find_package(... REQUIRED) when option is set, rely on optional
find package call and PackageName_FOUND variable.
3. Refactor handling options that result in simple preprocessor defines
(actually copy the snippet from libtorrent) so that everything is done
in a single function call.
4. Populate target properties in order to get rid of
include_directories() calls.
The warnings are emitted when compiling on msys2, mingw
The warning was:
gui/torrentcontentmodel.cpp:135:33: warning: missing initializer for
member '_SHFILEINFOW::iIcon' [-Wmissing-field-initializers]
..\..\qBittorrent\src\app\stacktrace_win.h:141:30: warning: missing
initializer for member '_IMAGEHLP_LINE64::Key'
[-Wmissing-field-initializers]
Old v3.3.x format had a number at the end indicating the queue position.
The naming scheme was '<infohash>.fastresume.<queueposition>'.
However, QSaveFile, which uses QTemporaryFile internally, might leave
non-commited files behind eg after a crash. These files have the
naming scheme '<infohash>.fastresume.XXXXXX' where each X is a random
character. We try to detect the latter and remove it without "migrating"
the fastresume to the new saving system.
Enable backtrace stuff only if GNU C library used, because current
backtrace implementation based on <execinfo.h> , which is not a
part of standard C library, it is a GNU extension.
This will be usefull when building with custom POSIX-compilant C
library (like musl) and no <execinfo.h> available.
Note: configure script will detect presence of <execinfo.h> and
enable/disable feature depending on it.
Feature is enabled by default.
Need to split arguments manually because QProcess::startDetached(QString)
will strip off empty parameters.
E.g. `python.exe "1" "" "3"` will become `python.exe "1" "3"`.
Closes#8454.
Using iostream usually adds a lot of other operators (<<, endl), whereas
*printf takes only 1 function call.
Also use qUtf8Printable whenever possible.
Stops temporary containers being created needlessly due to API misuse.
For example, it’s common for developers to assume QHash::values() and
QHash::keys() are free and abuse them, failing to realize their
implementation internally actually iterates the whole container, allocates
memory, and fills a new QList.
Added a removeIf generic algorithm, similar to std ones. We can't use std
algorithms with Qt dictionaries because Qt iterators have different
behavior from the std ones.
Found using clazy.
Avoid temporary string allocations. They are only used to convert to
something else.
QString::xxxRef() returns a QStringRef. QStringRef avoids the memory
allocation and reference counting overhead of a standard QString by simply
referencing a part of the original string.