Due to a bug in Qt 5.8 (QTBUG-58706) QTcpServer tries to use HTTP proxy
when it is set as default app proxy (for instance via "http_proxy"
environment variable) and this breaks the server. So we disable any proxy
in it.
torrentcontentmodel: Use a variable to store filesCount
optionsdlg: add fallthrough comment to suppress warning
speedPlotview: initialize member
misc: fix wrong type used, add spaces
A small fix belonging to #2531.
During the sorting empty QDateTime values are shuffled around due to
unstable sort in QSortFilterProxyModel (see #2526 and #2158), causing
the transfer list items to constantly change order.
Fixed by using an already existing correct comparison (with a torrent
hash fallback).
If libtorrent include directory not in the compiler search path, we have
to pass it to all qbt targets, because session.h includes
libtorrent/version.hpp
With pkg-config we can get a list of Boost components from Libtorrent
dependencies and make qBittorrent depend only on these libraries in
turn. For Windows user may provide a custom list via
LibtorrentRasterbar_CUSTOM_BOOST_DEPENDENCIES variable or use generic
list which consists of date_time, system, chrono, random, thread. As a
note: in case of using fully C++11 build, the actual list contains only
boost system library.
Count matched function names, and if there are no, point out to the user
that the stacktrace is useless. If not all stactrace elements contain
function names, suggest user that installing debug packages may improve
the stacktrace usefulness.
An icon which is loaded from SVG file can be rendered in any size and
resolutions natively. We were generating 16x16, 24x24, and 32x32
pixmaps, and not appending but creating new icon. Therefore for SVG
icons we effectively were reducing their quality.
If icon already contains 7 (or more) sizes (16 to 256 px) we do not
resize it anymore.
If removing of added torrents is enabled and dialog for adding torrents
is disabled, file guard was assuming that torrent is added successfully.
And that can be not the case if a user trying to add a broken torrent
file (or not a torrent file at all). Then this file gets deleted always.
Fix this by checking result of addTorrent_impl().
moc from Qt4 ignores Q_ENUMS when it is behind #if QT_VERSION check.
Therefore moc entries for enum in TorrentFileGuard were not generated
and the setting was not saving/loading. This closes#6103, #5451
The QTBUG-52633 results in food of network interface changed events, libtorrent IP
rebind calls and flood in the qBt log. The work around is the check not only for
interface name, but for IP address on that interface before triggering the libtorrent rebind.
On macOS 10.12 Sierra, Apple changed the behaviour of CFPreferencesSetValue()
truncating data after a null character. https://bugreports.qt.io/browse/QTBUG-56344
Due to this, we have to move from native plist to IniFormat.
Since Apple made difficult for users to set PATH and /usr/bin/python
is almost unusable, I simply add /usr/local/bin before default PATH
to pick up Homebrew Python.
The original code accumulates all the <td> texts between the description
link and the number of seeders into self.current_item["size"]:
<td>248.72</td><td> MB<td> => "248.72 MB".
ExtraTorrents changed the table design, added the Added column and joined
the number and its unit:
<td>8d</td><td>248.72 MB</td> => "8d 248.72 MB"
This commit stores only the last <td> text in self.current_item["size"].
Adds log messages for a number of situations where sending an email will silently fail, in particular when attempting to create an unencrypted connection to an SMTP server that requires SSL
If tooltip text contains an empty HTML body, Qt still shows it as an
empty rectangle. Thus, output HTML tags only if we are within the
image region, and return true empty string if we are at the borders.
In addition to the current tooltip, which shows color legend, if user
holds the Shift key during hovering we show another tooltip which
contains a table of contents for the piece under the moue cursor. The
table lists file sizes and names. If the cursor points to a part of a
file which spans several pieces, those pieces are highlighted.
Add /query/getLog and /query/getPeerLog to respectively retrieve
the main log and the peer log.
GET /query/getLog
Params:
- normal (bool): include normal messages (default true)
- info (bool): include info messages (default true)
- warning (bool): include warning messages (default true)
- critical (bool): include critical messages (default true)
- last_known_id (int): exclude messages with id <= 'last_known_id'
GET /query/getPeerLog
Params:
- last_known_id (int): exclude messages with id <= 'last_known_id'
The file guard object has to be initialised in this case too because it
is accessed when dialog gets accepted or cancelled. Initialise it with
empty path.
Some browsers do not download files, intended for immediate opening,
into a temporary directory, and thus a regular download directories
accumulate those unneeded files.
The option allows qBittorrent to clean after itself and delete those
files whether they were succesfully added or not (user-selectable
policy).
Stick the '*' and '&' symbols to the variable name if there is one.
Also fix empty function bodies collapse option: replace it with the
eat_blanks_before_close_brace setting.
1. Extract "transaction" support for QSettings into separate class
TransactionalSettings.
2. Define macrto with explicit name for the case when this "transaction"
support is needed.
3. A bit optimize QHash <-> QSettings copying: replace assign with
insert() and remove repetitive key lookups.
4. In save() check dirty status before getting the lock too.
The changes from items 1 and 2 make text more structured and the logic
of the SettingsStorage class gets separated from the implementation level
task of guarding the settings serialization. The changes in 3 and 4 do not
make the app much faster, but neither make any harm to the code readability.
Uncrustify inserts line break between an access specifier and "slots".
However, it keeps these words combinations if "Q_SLOTS" is used.
Its built-in parser classifies "Q_SLOTS" as WORD token, thus let's add
"slots" to that class.
Add helper function to initialize shutdown message.
Group similar functions together.
Merge shutdown() function into its only caller.
Add override keyword
gui/mainwindow.ui: Warning: The name 'actionExecutionLogs' (QAction) is already in use, defaulting to 'actionExecutionLogs1'.
gui/mainwindow.ui: Warning: action `actionSearch_engine' not declared
gui/mainwindow.ui: Warning: action `actionRSS_Reader' not declared
Qt resource is innitialized by a static object constructor (see
https://wiki.qt.io/QtResources). When we put resources into a static
library, the linker removes that static objects and thus the resources
themselves. To correct that we append resources to the main executable
sources list. This is done via custom function qbt_target_sources which
knows where to read the executable' name.
Both download handlers (in the tab and widget classes) convert model
index into an URL, set row color, and call download function.
Make the download button handler (in the SearchWidget class) call the
slot of the SearchTab class.
Since we already have searchtab.ui, let's set up all the widgets there.
Additionally, save a bit of vertical space by putting results label in
a row with the filter widgets.
Qt returns "Brazil" as country of QLocale("pt") instead of "Portugal". This conflicts with QLocale("pt_BR").
Rename the pt.ts to pt_PT and put a language mapping in tx's config for that locale.
Closes#4776.
Fixup of 1c25603686.
The following settings default are different between DEs, so they must set explicitly:
movement, flow, isWarpping, resizeMode, viewMode
Shorten text in "Libraries" tab, to avoid About dialog being too wide
Make QLabels in Libraries tab selectable
Use QGroupBox in "Author" tabs
Rename "Thanks to" to "Special Thanks"
Rename "Translation" to "Translators"
Remove borders in "Thanks to", "Translation", "License" tabs
If we don't have enough permissions, libtorrent will spew a pretty useless, irrelevant and almost wrong message: "Failed to load the torrent: torrent file is not a dictionary"
Add a new column to peers list that shows list of files which are
downloaded right now from a peer. The column is empty if we do not
download anything from the given peer.
Fixed the spinner in the WebUI upload page. Modified height of the WebUI download page.
Fixed all the JavaScript functions for download and upload pages.
- if [ "$qt" = 4 ]; then qbtconf="$qbtconf --with-qt4" ; fi
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ; fi
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# setup virtual display for after_success target
if [ "$gui" = true ]; then export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ; fi ;
fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then qbtconf="$qbtconf --disable-qt-dbus" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 5 ]; then qbtconf="$qbtconf --with-qt4=no" ; fi
# Print settings
# print settings
- echo $lt_branch
- echo $gui
- echo $ltconf
- echo $qbtconf
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ccache -V && ccache --show-stats && ccache --zero-stats ; fi
install:
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" != "dist" ]; then cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" != "dist" ]; then cd libtorrent && ./autotool.sh && ./configure $ltconf && make install && cd "$TRAVIS_BUILD_DIR" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update > /dev/null && brew install colormake libtorrent-rasterbar; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 4 ]; then brew install qt; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ] && [ "$qt" = 5 ]; then brew install qt5 && brew link --force qt5; fi
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 instead.
**Note:** I will now 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 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.
### 1. Curly braces ###
#### a. Function blocks, class/struct definitions, namespaces ####
@@ -27,8 +29,10 @@ class MyOtherClass
{
public:
//code
protected:
//code
private:
//code
};
@@ -85,10 +89,14 @@ default:
}
```
#### d. single-line blocks (lambdas, initializer lists etc.) ####
#### d. Brace enclosed initializers ####
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
But you must insert a space between the variable name and initializer.
```c++
{} // empty - space before {
{ body } // spaces around { and before }
Class obj {}; // empty
Class obj {expr};
Class obj {expr1, /*...,*/ exprN};
QVariantMap map {{"key1", 5}, {"key2", 10}};
```
### 2. If blocks ###
@@ -130,14 +138,14 @@ However, there are cases where curly braces for single statement if blocks **sho
Generally it will depend on the particular piece of code and would be determined on how readable that piece of code is. **If in doubt** always use braces if one of the above exceptions applies.
### 3. Indentation###
### 3. Indentation###
4 spaces.
### 4. File encoding and line endings.###
### 4. File encoding and line endings.###
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
### 5. Initialization lists.###
### 5. 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.
```c++
myClass::myClass(int a, int b, int c, int d)
@@ -150,7 +158,7 @@ myClass::myClass(int a, int b, int c, int d)
}
```
### 6. Enums.###
### 6. Enums.###
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++
enum Days
@@ -165,17 +173,17 @@ enum Days
};
```
### 7. Names.###
### 7. Names.###
All names should be camelCased.
#### a. Type names and namespaces ####
Type names and namespaces start with Upper case letter (except POD types).
```c++
class ClassName {}
class ClassName {};
struct StructName {}
struct StructName {};
enum EnumName {}
enum EnumName {};
typedef QList<ClassName> SomeList;
@@ -199,7 +207,40 @@ class MyClass
}
```
### 8. Misc.###
### 8. Header inclusion order. ###
The headers should be placed in the following order:
1. Module header (in .cpp)
2. System/Qt/Boost etc. headers (splitted in subcategories if you have many).
3. Application headers, starting from *Base* headers.
The headers should be ordered alphabetically within each group (subgroup).<br/>
<br/>
Example:
```c++
// examplewidget.cpp
#include "examplewidget.h"
#include <cmath>
#include <cstdio>
#include <QDateTime>
#include <QList>
#include <QString>
#include <QUrl>
#include <libtorrent/version.hpp>
#include "base/bittorrent/session.h"
#include "base/bittorrent/infohash.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "ui_examplewidget.h"
```
### 9. Misc. ###
* Line breaks for long lines with operation:
@@ -209,11 +250,51 @@ a += "b"
+ "d";
```
* **auto** keyword
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.
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.<br/>
<br/>
When weighing whether to 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). Please make sure that such reviewers can
understand the code completely and without excessive effort.<br/>
<br/>
Some valid use cases:
```c++
template <typename List>
void doSomethingWithList(const List &list)
{
foreach (const auto &item, list) {
// we don't know item type here so we use 'auto' keyword
// do something with item
}
}
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
}
auto spinBox = static_cast<QSpinBox*>(sender());
// we know the variable type based on the right-hand expression
```
* Space around operations eg `a = b + c` or `a=b+c`:
Before and after the assignment there should be a space. One exception could be: for loops.
Before and after the assignment and other binary (and ternary) operators there should be a space.<br/>
There should not be a space between increment/decrement and its operand.<br/>
Some valid use cases:
```c++
for (int a=0; a<b; ++b) {
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
b--;
for (int a = 0; a < b; ++b) {
// code
}
```
@@ -223,5 +304,5 @@ for (int a=0; a<b; ++b) {
* Method definitions aren't allowed in header files
###8. Not covered above###
### 10. Not covered above###
If something isn't covered above, just follow the same style the file you are editing has. If that particular detail isn't present in the file you are editing, then use whatever the rest of the project uses.
* If you aren't sure, you can ask on the [**forum**](http://forum.qbittorrent.org) or read our [**wiki**](http://wiki.qbittorrent.org) first.
* Do a quick **search**. Others might already reported the issue.
* Write in **English**!
* Provide **version** information: (You can find version numbers at menu `Help -> About -> Libraries`)
```
qBittorrent:
Qt:
libtorrent:
boost:
OS version:
```
* Provide **steps** to reproduce the problem, it will be easier to pinpoint the fault.
* **Screenshots**! A screenshot is worth a thousand words. just upload it. [(How?)](https://help.github.com/articles/file-attachments-on-issues-and-pull-requests)
### Good to know
* **Be patient**. The dev team is small and resource limited. Devs finding their free time, analyzing the problem and fixing the issue, it all takes time. :clock3:
* If you can code, why not become a **contributor** by fixing the issue and open a pull request? :wink:
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) to be **ignored**. :fearful:
# Opening a pull request
### Must read
* Read our [**coding guidelines**](https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md). There are some scripts to help you: [uncrustify script](https://raw.githubusercontent.com/qbittorrent/qBittorrent/master/uncrustify.cfg), [astyle script](https://gist.github.com/Chocobo1/539cee860d1eef0acfa6), [(related thread)](https://github.com/qbittorrent/qBittorrent/issues/2192).
* Keep the title **short** and provide a **clear** description about what your pull request does.
* Provide **screenshots** for UI related changes.
* Keep your git commit history **clean** and **precise**. Commits like `xxx fixup` should not appear.
* If your commit fix a reported issue (for example #4134), add the following message to the commit `Closes #4134.`. Example [here](https://github.com/qbittorrent/qBittorrent/commit/a74bac20c4e8de9776bf9bb77fdc7526135d1988).
### Good to know
* **Search** pull request history! Others might already implemented your idea and 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](https://www.atlassian.com/git/tutorials/merging-vs-rebasing).
- FEATURE: Indicate bitness in stackstrace and about dialog. Closes #6172. (sledgehammer999)
- BUGFIX: Fix incomplete type compile error with Qt4 (Chocobo1)
- BUGFIX: Fix compile error: ‘escape’ is not a member of ‘Qt’ (Chocobo1)
- BUGFIX: Use system locale to format dates/time/etc (sledgehammer999)
- BUGFIX: Follow http user-agent format (Chocobo1)
- BUGFIX: Fix cancel "Set location" causes files move to installation dir. (Chocobo1)
- WEBUI: Improve performance of updating 'progress' column (buinsky)
- WEBUI: Implement statistics window in web UI (FranciscoPombal)
- WEBUI: fixed "remaining" column in WebUI (FranciscoPombal)
- WEBUI: Set HttpOnly attribute to SID cookie (Chocobo1)
- WEBUI: Fire up the timer to clean inactive sessions (Chocobo1)
- WEBUI: Set cookie SID value to empty on logout (Chocobo1)
- WINDOWS: Make the installer DPI aware (regs01)
- WINDOWS: Set exit code to 0 on install/uninstall success. Fixes problem with silent installations. (Chocobo1)
- WINDOWS: The 64-bit installer refuses to install on 32-bit systems. (sledgehammer999)
- WINDOWS: The 64-bit installer uses the correct "Program Files" now. Detection will not work if you install on top of previous installer. (sledgehammer999)
- WINDOWS: Fix running the uninstaller if the user chose a different path in the installer. Closes #6080. (sledgehammer999)
- LINUX: Add keywords to the .desktop file. (sledgehammer999)
- LINUX: Update stuff in appdata.xml and run 'appstream-utl upgrade' on it. (sledgehammer999)
- OTHER: Replace rand() by a true uniform distribution generator (Chocobo1)
- OTHER: Change our user-agent format as indicated earlier in the news section (Chocobo1)
- OTHER: cmake: fix OSX bundle creation (evsh)
* Fri Mar 03 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.11
- FEATURE: Always show progress and remaining bytes for unselected files. (sledgehammer999)
- FEATURE: Allow to change priority for unselected files through the combobox like it is done via the context menu. (sledgehammer999)
- FEATURE: Remove settings to exchange trackers. It wasn't used by non-libtorrent clients. Also it has a privacy risk and you might be DDoSing someone. (sledgehammer999)
- FEATURE: Put temp files in .qBittorrent directory. Closes #4462. (Chocobo1)
- FEATURE: Use the numbers from tracker scrape response. Closes #5048, #6117. (Chocobo1)
- FEATURE: Implement category filter widget. Show categories in tree mode when subcategories are enabled. (glassez)
- FEATURE: Allow to toggle columns in searchtab (thalieht)
- FEATURE: PeerList: allow to hide zero values for the "uploaded" and "downloaded" columns (thalieht)
- FEATURE: Display more information in tracker tab (ngosang)
- FEATURE: Use Ctrl+F to search torrents. Closes #5797. (Tim Delaney)
- FEATURE: Transferlist: add hotkeys for double click and recheck selected torrents (thalieht)
- BUGFIX: Sort torrent names case insensitively. (Yez Ezey)
- BUGFIX: Fix mistake in getting values for sorting in TransferList widget. (Anton Lashkov)
- BUGFIX: Fix memory leaks. (dzmat, Chocobo1)
- WEBUI: Fix webui port overflow. (thalieht)
- WEBUI: Changed meaning of the value of the 'dl_limit', 'up_limit', 'alt_dl_limit' and 'alt_up_limit' tokens. The value is expressed in bytes and not in KiB. (sledgehammer999)
- BUGFIX: Don't recheck twice after 'Force Recheck' with 'Recheck torrents on completion' enabled. Closes #4274. (sledgehammer999)
- BUGFIX: Don't apply some settings again if they weren't changed. Closes #4278. (sledgehammer999)
- BUGFIX: Update ISO 3166 country codes. Closes #3942. (Chocobo1)
- BUGFIX: Fix moving torrents to Temp after app restart. Closes #4434. (glassez)
- BUGFIX: Fix crash in favicon code due to null pointer dereference. (glassez)
- BUGFIX: Move the 'qBittorrent-resume' file even when no magnets were recovered. Also make sure to rename it with a unique name. Closes #4334. (sledgehammer999)
- BUGFIX: Don't add the watch folder before the user closes the Preferences window. (sledgehammer999)
- BUGFIX: Remove watch folders permanently only if the user accepts the Preferences dialog. (sledgehammer999)
- BUGFIX: Better handling of cookies in the download manager (glassez)
- BUGFIX: Use the download manager for RSS, the program updater and the dns updater. (glassez)
- OSX: Set qBittorrent as default torrent app in Mac OS (dmitry.viktorov)
- OTHER: Fix lrelease version due to the default Qt5 build (Fabio Alessandro Locati)
- OTHER: Indicate to the user that he's going to download the new version. Indicate from the installer that the old version was detected and no settings will be deleted. Closes #4320. (sledgehammer999)
@@ -13,7 +14,7 @@ out there. qBittorrent is fast, stable and provides unicode
support as well as many features.
This product includes GeoLite data created by MaxMind, available from
http://maxmind.com/
https://www.maxmind.com/
### Installation:
For installation, follow the instructions from INSTALL file, but simple:
@@ -26,6 +27,13 @@ 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 />
The key currently used is 4096R/[5B7CC9A2](https://pgp.mit.edu/pks/lookup?op=get&search=0x6E4A2D025B7CC9A2) with fingerprint `D8F3DA77AAC6741053599C136E4A2D025B7CC9A2`.<br />
You can also download it from [here](https://github.com/qbittorrent/qBittorrent/raw/master/5B7CC9A2.asc).<br />
**PREVIOUSLY** the following key was used to sign the v3.3.4 source tarballs and v3.3.4 Windows installer **only**: 4096R/[520EC6F6](https://pgp.mit.edu/pks/lookup?op=get&search=0xA1ACCAE4520EC6F6) with fingerprint `F4A5FD201B117B1C2AB590E2A1ACCAE4520EC6F6`.<br />
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangStringinst_requires_64bit${LANG_DUTCH}"This installer works only in 64-bit Windows versions."
;------------------------------------
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.