1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-16 20:32:23 +02:00

Compare commits

..

280 Commits

Author SHA1 Message Date
sledgehammer999
c0ccf28d2c Bump to v3.2.5 2015-10-31 15:28:35 +02:00
sledgehammer999
9ff617a644 Update Changelog. 2015-10-31 15:24:25 +02:00
Vladimir Golovnev (Glassez)
0fbdc6471c Fix DownloadedPiecesBar::bitfieldToFloatVector(). 2015-10-29 23:30:19 +02:00
Vladimir Golovnev (Glassez)
1ecdcfc29c Fix PieceAvailabilityBar::intToFloatVector(). Closes #3937. 2015-10-29 23:30:13 +02:00
sledgehammer999
522ff3b611 Merge pull request #3920 from Gelmir/qt5fix
Fix Qt5 build
2015-10-11 16:26:52 -05:00
Nick Tiskov
edac24ecca Fix Qt5 build 2015-10-11 15:55:07 +03:00
sledgehammer999
6bbc26e613 Bump to v3.2.4 2015-10-10 14:59:56 +03:00
sledgehammer999
ca5f184c3d Update Changelog. 2015-10-09 17:55:50 +03:00
sledgehammer999
47078d31c1 Fix broken .desktop file icon for some locales. See #3905. 2015-10-09 17:54:57 +03:00
sledgehammer999
a42bca6098 Update Changelog. 2015-10-09 17:28:56 +03:00
sledgehammer999
ade4c44aad New translation: Esperanto
Also re-run lupdate.
2015-10-09 17:18:27 +03:00
sledgehammer999
fdbf8e8b6e Sync translations from Transifex and run lupdate. 2015-10-09 17:06:14 +03:00
sledgehammer999
a9f14a8408 Fix Qt5 nox build on non-Windows. 2015-10-09 16:54:43 +03:00
sledgehammer999
73e5bdc5b5 Bump WebUI API_VERSION. 2015-10-09 16:50:33 +03:00
sledgehammer999
c18a56769d Optimize text color for dark themes v2. Closes #3815. 2015-10-09 02:09:28 +03:00
sledgehammer999
291d006740 Fix Konqueror detection in Plasma (KDE5)
(manual backport from master)
2015-10-08 00:53:21 +03:00
Chocobo1
3693b34c2c Fix potential crash when memory allocation failed. Closes #3877. 2015-10-05 19:56:57 +03:00
sledgehammer999
ad5dd8391a Add forum link in README. Closes #3853. 2015-10-04 22:36:22 +03:00
sledgehammer999
e77e90e8d2 Fix broken donation link. Closes #3771. 2015-10-04 22:36:11 +03:00
sledgehammer999
e828b3a398 Fix python detection when the 'Anaconda' software is installed. Closes #3731. 2015-10-04 12:14:36 +03:00
netswap
f31bdc1fc4 Added letters
The letter "p" was missing in "Dateiverknüpfung" in line 47 & 49
2015-10-04 11:40:25 +03:00
sledgehammer999
81912736ed Merge pull request #3230 from Chocobo1/rss_sort_v320
Sort labels in RSS Downloader dialog
2015-10-04 03:18:22 -05:00
Chocobo1
176dd0bee8 Sort labels in RSS Downloader dialog, closes #3140. 2015-10-04 15:12:01 +08:00
ngosang
bbcfa5aae7 Fix RSS crash when deleting RSS feeds. Closes #997, #2152, #2461, #3718, #3747, #3766, #3806, #3814, #3829 and #3846. 2015-09-24 01:08:28 +03:00
ngosang
2990492506 [RSS] Removes refresh message when adding a new feed 2015-09-18 02:13:02 +03:00
Casey Bodley
9d7c7c51ca webui: add save_path to /query/torrents
Signed-off-by: Casey Bodley <cbodley@gmail.com>
2015-09-18 01:52:45 +03:00
sledgehammer999
2dd65b9eb9 Partial backport of cf3a87ed55. 2015-09-18 01:38:11 +03:00
Nick Tiskov
c8b74215c0 Fix: Adding RSS rule with a new label doesn't add this label to UI. 2015-09-18 01:07:59 +03:00
Nick Tiskov
87092e2716 Fix: Label changes to first item in RSS rule list are forgotten, because checkRegex calls updateMustLineValidity, which saves the rule before new label can be applied. 2015-09-18 01:07:48 +03:00
sledgehammer999
bf3cbfc608 Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473. 2015-09-16 22:02:13 +03:00
sledgehammer999
ddde91dbb9 Merge pull request #3798 from jsayol/patch-2
Backporting #3765 to v3_2_x branch
2015-09-16 03:36:35 -05:00
jsayol
93173fadeb Backporting #3765 to v3_2_x branch 2015-09-16 07:26:27 +07:00
sledgehammer999
4eb6e74dd6 Show current label in the torrent context menu. Closes #3776. 2015-09-16 02:49:50 +03:00
sledgehammer999
3f9e528633 Optimize text color for dark themes. Closes #3633. 2015-09-15 23:30:42 +03:00
sledgehammer999
0501971e82 Sync translations from Transifex and run lupdate. 2015-09-15 23:19:01 +03:00
sledgehammer999
6b4aad8a83 Try to avoid loading a corrupted configuration file. Also log errors encountered while saving/loading the configuration. Closes #3503. 2015-09-14 02:36:36 +03:00
sledgehammer999
80de35c5ee Sync translations from Transifex and run lupdate. 2015-09-04 23:28:24 +03:00
sledgehammer999
a7528ec27a Fix typos. Make ìTP untranslatable. Use American variation of words. Closes #3654. 2015-09-04 23:11:10 +03:00
ngosang
ab49c80247 Fix RSS panel position not saved 2015-09-04 21:55:04 +03:00
ngosang
0ec35a24e0 [RSS] Handle more types of RSS feeds 2015-09-03 01:32:18 +03:00
ngosang
600aa61095 [RSS] Simplify string translation 2015-09-03 01:32:09 +03:00
ngosang
5db783cb7f [RSS] Allow multiple selection in RSS torrents list 2015-09-03 01:32:00 +03:00
ngosang
1a653829b8 [RSS] Don't hide the elements in Unread list when clicked 2015-09-03 01:31:47 +03:00
ngosang
7d1e2944ab [RSS] More precise message and code simplification in RSS feeds deletion 2015-09-03 01:31:36 +03:00
ngosang
7cecad4e82 [RSS] Improve error handling when a RSS feed doesn't contain torrents 2015-09-03 01:31:27 +03:00
ngosang
6dc82df368 [RSS] Fix contextual menu in RSS torrents list 2015-09-03 01:26:00 +03:00
ngosang
fcb22eb568 [RSS] Trim elements text in RSS articles 2015-09-03 01:25:45 +03:00
ngosang
82866605b4 [RSS] Handle magnet links as torrents instead of news URLs. Closes #3560 2015-09-03 01:25:35 +03:00
sledgehammer999
a78cd3d2ac Try to download favicon.png when the download of favicon.ico fails
Manual backport of 3889b4c101
2015-09-03 01:23:00 +03:00
Gabriele
2e08b365a2 configure: don't depend on GNU sed
Closes #3169.
2015-08-30 21:57:13 +03:00
sledgehammer999
9eca9585a0 Merge pull request #3277 from Chocobo1/path
Fix wrong default download directory in Windows
2015-08-30 12:36:00 -05:00
Chocobo1
e29a714da4 Move option "Confirm torrent deletion" to Behavior page 2015-08-30 20:19:49 +03:00
Chocobo1
e3f6cea95c Follow project coding style. Issue #2192. 2015-08-30 20:19:37 +03:00
sledgehammer999
ddbdeb1f89 Merge pull request #3715 from Chocobo1/moveOpt_v32x
Move option "Ignore transfer limits on local network" to Speed page
2015-08-30 11:16:38 -05:00
Chocobo1
9471d17a65 Fix wrong default download directory in Windows. Closes #2625. 2015-08-31 00:03:33 +08:00
Chocobo1
5e457353e5 Move option "Ignore transfer limits on local network" to Speed page 2015-08-31 00:00:18 +08:00
ngosang
81089945ae Change Queue buttons order in the Toolbar (GUI & Web UI) 2015-08-30 15:20:56 +03:00
Fabio Alessandro Locati
b305b8d8c5 Fix minimum libtorrent-rasterbar version
as title
2015-08-30 15:20:40 +03:00
sledgehammer999
a8603d66dc Update ax_boost_base.m4 to fix ppc64le detection. 2015-08-30 04:51:28 +03:00
sledgehammer999
fda3704a03 Fix dolphin detection for KDE5. 2015-08-30 04:44:38 +03:00
sledgehammer999
6258dee96b Fix a bug with highlighting selected file on Windows. Closes #3185. 2015-08-30 04:44:32 +03:00
sledgehammer999
6334144f81 Merge pull request #3705 from pmzqla/select-destination-3_2_x
Select the file of single file torrents when opening destination folder
2015-08-29 20:31:24 -05:00
Gabriele
4696fbff4a Select the file of single file torrents when opening destination folder
Also, add the support for Nautilus (Gnome 3), Caja and Nemo.

Backport of #2544.
2015-08-29 20:58:39 +02:00
sledgehammer999
8679b70b4c Backport fix for crash when invalid favicon is downloaded. Closes #3632. 2015-08-26 20:38:27 +03:00
sledgehammer999
56beb0ddce Write BOM to german.nsi. Closes #3574, #3566 2015-08-05 23:26:26 +03:00
sledgehammer999
8bf23e8087 Bump to v3.2.3 2015-08-02 16:18:04 +03:00
sledgehammer999
6bdfe77c80 Update Changelog. 2015-08-02 16:14:54 +03:00
Gabriele
15c785d298 searchengine: remove size constraints to search button 2015-08-02 15:29:57 +03:00
Gabriele
577582ee0b searchengine: use kill() instead of terminate() on Windows 2015-08-02 15:29:48 +03:00
Gabriele
60ab8f87e9 searchengine: use a single string for the search results number label 2015-08-02 15:29:35 +03:00
Gabriele
4420ae1996 searchengine: don't use strings to determine the status of search processes
'&' symbols are dynamically added to strings, making comparisons
unreliable.
2015-08-02 15:29:03 +03:00
Gabriele
778046439c searchengine: drop unused flag and related code 2015-08-02 15:28:53 +03:00
Gabriele
be47c35cba searchengine: fix crash when closing tab with running search
If a tab is closed, the search process gets terminated. This can take
a while and by the time searchFinished() is executed, activeSearchTab
is null, leading to a crash. Fix this by waiting for the process to
terminate and make sure activeSearchTab is not null when used.
2015-08-02 15:28:37 +03:00
Gabriele
a51a855870 Follow project coding style. Issue #2192. 2015-08-02 15:27:16 +03:00
sledgehammer999
6fc3c04dca Bump to v3.2.2 2015-08-01 20:18:10 +03:00
sledgehammer999
ae150b25ae Update Changelog. 2015-08-01 20:09:10 +03:00
sledgehammer999
36ddf0fd2f Use correct status icon for Travis CI. Closes #3534. 2015-08-01 20:09:04 +03:00
sledgehammer999
06d59cab2d Fix previous commit. Use correct locale name. 2015-08-01 20:08:26 +03:00
sledgehammer999
8f519d00e7 New translation: Slovenian
Also re-run lupdate.
2015-08-01 19:33:55 +03:00
sledgehammer999
ce58a3fd4b Sync translations from Transifex and run lupdate. 2015-08-01 19:13:30 +03:00
sledgehammer999
303dbd7dbe Bump minimum libtorrent version required to 1.0.6/0.16.19. 2015-08-01 18:53:57 +03:00
Vladimir Golovnev (Glassez)
c9abcbfbd4 Fix HTTP header parsing. Closes #3511. 2015-08-01 18:45:27 +03:00
sledgehammer999
baab8ddf75 Remove obsolete Boost configurations. 2015-08-01 18:45:08 +03:00
Chocobo1
982d4a685a Fix warnings by qmake -Wall, cleanups 2015-08-01 18:44:55 +03:00
Chocobo1
52ff7a92fb Add path to openssl, cleanups 2015-08-01 18:44:41 +03:00
Chocobo1
8a4a3b33f8 Update .gitignore 2015-08-01 18:44:23 +03:00
Chocobo1
aec4f1d343 Fix '&' character in label name becomes accelerator key, closes #3454. 2015-08-01 18:44:02 +03:00
ngosang
32ea862584 [Web UI] Fix friendlyUnit() implementation. Related to #2719 2015-08-01 18:42:06 +03:00
ngosang
9f1bd86c47 Improve Python detection 2015-08-01 18:35:49 +03:00
sledgehammer999
d2853b3a98 [webui] Fix ugly 'C++' wrapping in About dialog. 2015-08-01 18:29:20 +03:00
Gabriele
64cf3afe67 Add count of unread items to RSS tab label
Closes #2681.
2015-08-01 18:21:42 +03:00
sledgehammer999
7729035598 Merge pull request #3522 from Chocobo1/travis_v320
Migrate TravisCI to container-based infrastructure
2015-07-30 19:32:06 +03:00
Chocobo1
021cf9fb65 Migrate TravisCI to container-based infrastructure 2015-07-30 23:28:41 +08:00
sledgehammer999
c2e9ce5966 Sync translations from Transifex and run lupdate. 2015-07-25 03:22:01 +03:00
ngosang
75e4a004f7 [Web UI] Massive increase in performance. 2015-07-25 03:17:02 +03:00
sledgehammer999
ac60072ded Fix installing search plugin by drag-n-dropping file. 2015-07-22 23:24:35 +03:00
sledgehammer999
9cac51d9b0 Fix installing search plugin from local file. 2015-07-22 23:24:28 +03:00
sledgehammer999
14d590b3be Fix segfault on Linux due to early initialization of global var.
misc::pythonVersion() gets called before the Logger is initialized.

Conflicts:
	src/searchengine/engineselectdlg.cpp
2015-07-22 23:24:21 +03:00
sledgehammer999
86d1dc300c Improve checks for python. Print python version and path to log.
Conflicts:
	src/core/misc.cpp
	src/core/utils/misc.h
	src/gui/mainwindow.cpp
2015-07-22 23:24:13 +03:00
ngosang
6787623ff3 [search engine] Fix cpu_count in old Python versions 2015-07-21 22:03:10 +03:00
sledgehammer999
636ff89e23 Fixup previous commits on python search. 2015-07-21 22:02:52 +03:00
sledgehammer999
568950e63e Don't use list of versions for the Python fallback detection on Windows
Always pick the newest versions among those installed.
2015-07-21 22:02:36 +03:00
sledgehammer999
b3b973d54b Don't specify the Python version required in the notification
Both python2 and python3 are supported.
2015-07-21 22:01:29 +03:00
sledgehammer999
ff64a79594 Update link to the Windows Python installer
From v2.7.3 to v3.4.3.

Conflicts:
	src/gui/mainwindow.cpp
2015-07-21 22:00:27 +03:00
sledgehammer999
26b635ca33 Show notification if Python is not found and a search is started
Also, don't bother starting a search if it's known that Python is
not available.
2015-07-21 21:57:38 +03:00
Gabriele
7e63908977 Use python3 and python2 instead of python on Linux
Prefer python3 over python2 when both are available.

Both python2 and python3 should always exists.
More info at: http://legacy.python.org/dev/peps/pep-0394/

Conflicts:
	src/core/utils/misc.h
	src/searchengine/supportedengines.h
2015-07-21 21:54:18 +03:00
sledgehammer999
5c9ce2952b Static order of items in the transferlist menu.
Conflicts:
	src/gui/transferlistwidget.cpp
2015-07-21 21:39:24 +03:00
ngosang
6ca7ff0e25 [Web UI] Changes in Force Resume icon and menu order 2015-07-21 21:27:43 +03:00
ngosang
3091c30ff6 Changes in Force Resume icon and menu order
Conflicts:
	src/gui/transferlistwidget.cpp
2015-07-21 21:27:16 +03:00
ngosang
1086b940a2 Minor changes in Preview File dialog 2015-07-21 21:17:39 +03:00
sledgehammer999
9465f358c4 Fix compiler warning for unused variable. 2015-07-21 21:17:24 +03:00
Chocobo1
f8cb9d09f6 Fix localhost address (::ffff:127.0.0.1) is not recognized when connecting to WebUI 2015-07-21 21:17:13 +03:00
sledgehammer999
01d8b24982 Update Changelog. 2015-07-19 19:27:54 +03:00
ngosang
b7604b1c82 [Web UI] Open external links in a new window/tab 2015-07-19 19:01:27 +03:00
ngosang
4da4457f5f [Web UI] Fix sort by queue number 2015-07-19 19:01:13 +03:00
sledgehammer999
858909bf19 Fix previous commit on DHT announce. 2015-07-19 18:40:36 +03:00
sledgehammer999
d3bdb52b8f Merge pull request #3462 from Chocobo1/announce_v320
DHT announce
2015-07-19 18:22:11 +03:00
sledgehammer999
d804445de7 Merge pull request #3459 from ngosang/webui_trackmenu320
[Web UI] Torrent download from hash. Closes #1173
2015-07-19 16:25:00 +03:00
sledgehammer999
5187899d7e Merge pull request #3460 from ngosang/webui_addtrackers32x
[Web UI] Fix empty trackers addition
2015-07-19 16:24:31 +03:00
Chocobo1
67ad8ef7d6 Change DHT announce actions, see #3431. 2015-07-19 21:17:09 +08:00
sledgehammer999
cbd9ccef17 Switch to libtorrent git repository
Fix missing variable when compiling for coverity scan
2015-07-19 16:16:05 +03:00
sledgehammer999
d6420e6876 Update settings for Coverity Scan. 2015-07-19 16:15:13 +03:00
Chocobo1
f76b1eb2fb Hookup to Coverity Scan, Closes #2601 2015-07-19 16:15:02 +03:00
Gabriele
e474f53910 Allow to copy all the trackers with a keyboard shortcut
If multiple trackers are selected, Ctrl+C will copy only one of them
while the context menu will copy all of them. Fix this inconsistency.

Closes #2675.
2015-07-19 16:09:02 +03:00
ngosang
ccac6cb5a9 [search engine] Remove the word 'torrent' in ExtraTorrent results 2015-07-19 16:08:53 +03:00
DoumanAsh
92bb94ecca Search status uses tab's status 2015-07-19 16:08:44 +03:00
DoumanAsh
b286351305 Replace indent to 4 spaces 2015-07-19 16:08:35 +03:00
sledgehammer999
3873a36338 Fix printing of the copyright symbol in the About dialog. 2015-07-19 16:08:26 +03:00
Oleh Prypin
f989708e31 Implement an option to disable confirmation of torrent recheck
Conflicts:
	src/gui/transferlistwidget.cpp
2015-07-19 16:08:17 +03:00
sledgehammer999
2dbeda5985 Update color scheme of completed.png icon. 2015-07-19 16:08:08 +03:00
ngosang
9d5d1dfea8 [Web UI] Fix API Content Types. Closes #3393
Conflicts:
	src/core/http/types.h
	src/webui/webapplication.cpp
2015-07-19 16:07:59 +03:00
ngosang
3738302a3c Increase API_VERSION
Conflicts:
	src/webui/webapplication.cpp
2015-07-19 16:07:50 +03:00
ngosang
7f58ff4c8f [Web UI] New option Web UI port UPNP. Closes #3358 2015-07-19 16:07:42 +03:00
ngosang
4c079ede83 [Web UI] Fix an error in Content tab when the torrent doesn't have metadata
Conflicts:
	src/webui/btjson.cpp
2015-07-19 16:07:33 +03:00
ngosang
1ee91ddb13 [Web UI] Fix empty trackers addition 2015-07-19 14:26:31 +02:00
ngosang
03fd0a36a6 [Web UI] Torrent download from hash. Closes #1173 2015-07-19 14:04:48 +02:00
ngosang
266c96f03b [Web UI] Ports between 1 and 65535 as in the GUI. Closes #1602 2015-07-19 14:36:54 +03:00
sledgehammer999
a088657619 Merge pull request #3403 from ngosang/32x_fixrename
Fix torrent renaming. Closes #3398
2015-07-12 12:37:02 +03:00
ngosang
7c164dfcb9 Fix torrent renaming. Closes #3398 2015-07-12 09:38:25 +02:00
sledgehammer999
20f4b95180 Bump to v3.2.1 2015-07-11 17:37:47 +03:00
sledgehammer999
8ac4cccc25 Update Changelog. 2015-07-11 17:31:39 +03:00
sledgehammer999
d990af4a79 Sync translations from Transifex and run lupdate. 2015-07-11 17:26:32 +03:00
sledgehammer999
8e73c262f9 Merge pull request #3378 from ngosang/webuialter320
[Web UI] Fix alternative global rate limits. Closes #3359
2015-07-09 01:38:23 +03:00
ngosang
7804faa34d [Web UI] Additional checks in Options dialog 2015-07-09 00:18:47 +02:00
ngosang
0bb0a5ea13 [Web UI] Reorder Options dialog code 2015-07-09 00:07:56 +02:00
ngosang
d5b9e3449b [Web UI] Fix alternative global rate limits. 2015-07-08 23:51:42 +02:00
sledgehammer999
753b33b8a3 Update Changelog. 2015-07-08 19:09:59 +03:00
ngosang
eb12d63d2d [search engine] Fix Python 2 implementation of Torrentz 2015-07-08 18:29:44 +03:00
sledgehammer999
b21ab50221 Merge pull request #3350 from ngosang/torrent_creator320
Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator
2015-07-04 03:22:51 +03:00
ngosang
34f89d3174 Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator 2015-07-04 01:53:19 +02:00
sledgehammer999
54227c20ff Sync translations from Transifex and run lupdate. 2015-07-04 02:02:07 +03:00
sledgehammer999
515c578188 Add unicodestrings.h to core.pri
Conflicts:
	src/core/core.pri
2015-07-04 01:55:43 +03:00
sledgehammer999
74bba9ecfe Partially revert fec6c8af2 and split the Chinese locales into 3.
Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong).
Closes #3262.
2015-07-04 01:55:34 +03:00
sledgehammer999
41e052498b Fix Properties bar size when started minimized to tray. Closes #3206. 2015-07-04 01:55:24 +03:00
ngosang
3a51c5bf85 Fix column sort in search engine. Closes #2621 2015-07-04 01:55:15 +03:00
ngosang
cad542f3f4 [Web UI] Don't update the tabs if tab's panel is collapsed 2015-07-04 01:55:06 +03:00
ngosang
54a444d37f [Web UI] Add Web Seeds (HTTP Sources) tab 2015-07-04 01:54:57 +03:00
sledgehammer999
1c5e6980e8 Don't use a default upload limit. Closes #3275. 2015-07-04 01:20:59 +03:00
Chocobo1
8b7d995447 Mention github contributors in thanks.html 2015-07-04 01:19:58 +03:00
Chocobo1
0b83ea9fcf Move translators & thanks to its own file
Add HTML header & cleanup
2015-07-04 01:19:39 +03:00
Chocobo1
04e582793e Fix compilation on MSVC2013 by moving unicode strings to
"unicodestrings.h". Closes #3059.

Conflicts:
	src/core/misc.cpp
	src/gui/addnewtorrentdialog.cpp
	src/gui/options_imp.cpp
	src/gui/properties/propertieswidget.cpp
	src/gui/transferlistdelegate.cpp
2015-07-04 01:19:10 +03:00
ngosang
07e2e88e79 Cosmetics changes in search engine
Conflicts:
	src/searchengine/engineselectdlg.cpp
2015-07-04 01:02:51 +03:00
Chocobo1
e120a6764b Better message for users 2015-07-04 00:58:36 +03:00
Chocobo1
c4a311cc09 Capitalize menu item, missed in 98a4b8c. 2015-07-04 00:57:31 +03:00
ngosang
278872eb12 Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040
Conflicts:
	src/webui/webapplication.cpp
2015-07-04 00:53:14 +03:00
ngosang
c3d9321865 [Web UI] Add new options
Conflicts:
	src/webui/prefjson.cpp
2015-07-04 00:50:24 +03:00
sledgehammer999
882f5e325a Follow project coding style. Issue #2192. - prefjson.cpp 2015-07-04 00:45:42 +03:00
ngosang
bf7bec61c2 [search engine] Update TorrentReactor 2015-07-04 00:42:07 +03:00
ngosang
72af954b65 [search engine] Update ExtraTorrent 2015-07-04 00:41:09 +03:00
Chocobo1
514abca0ea Add connectionsLimit() back
Conflicts:
	src/gui/properties/propertieswidget.cpp
2015-07-04 00:40:47 +03:00
Chocobo1
643224800f Preserve plain text formatting 2015-07-04 00:29:35 +03:00
Chocobo1
8e25ec7dbf Force set "plain text" format to reduce attack vector. 2015-07-04 00:29:20 +03:00
Chocobo1
07b36f313b Allow wordWrap for "Save Path" & "Comment" 2015-07-04 00:29:01 +03:00
Chocobo1
34d2bdadc0 Change Comment field from QTextBrowser to QLabel
Conflicts:
	src/gui/properties/propertieswidget.cpp
2015-07-04 00:28:40 +03:00
Chocobo1
92ef98080b Reorder layout in information box 2015-07-04 00:25:52 +03:00
ngosang
34bf09b539 [search engine] Update Torrentz 2015-07-04 00:21:31 +03:00
ngosang
06f46eae24 [search engine] Update BTDigg 2015-07-04 00:20:36 +03:00
ngosang
ae5b2fa4a4 [search engine] Update KickassTorrents 2015-07-04 00:20:09 +03:00
ngosang
9b7c2e669e [search engine] Fix novaprinter.py version number 2015-07-04 00:19:51 +03:00
Vladimir Golovnev (Glassez)
e6e087d391 Fix ugly 'C++' wrapping in About dialog. 2015-07-04 00:19:10 +03:00
sledgehammer999
bf6b723206 Merge pull request #3103 from heirecka/v3_2_x
Add missing QDataStream include
2015-06-30 22:01:49 +03:00
Chocobo1
0bce0fc6c1 Update disk space label after changing partition, closes #3309.
Conflicts:
	src/gui/addnewtorrentdialog.cpp
2015-06-28 15:23:51 +03:00
sledgehammer999
4d913d123c Partially revert 75979cc4d5.
Fixes Linux issue for when the theme doesn't have a corresponding icon.
2015-06-21 01:00:03 +03:00
sledgehammer999
a00bbf349a Minimize to tray only if the relevant option is enabled. 2015-06-20 23:35:11 +03:00
sledgehammer999
c61566d133 Merge pull request #2791 from pmzqla/file-priority
Increase priority value of "High"
2015-06-20 21:13:03 +03:00
ngosang
a675a13587 [Web UI] Tabs indentation replaced with spaces 2015-06-20 19:33:43 +03:00
ngosang
ebe0e7bb71 [Web UI] Reorder the tabs/groups in Options window 2015-06-20 19:33:31 +03:00
ngosang
e30df4ed70 [Web UI] Option to hide Top Toolbar 2015-06-20 19:33:19 +03:00
ngosang
9dcb9848ae [Web UI] Changes in menus to keep the client's style 2015-06-20 19:33:06 +03:00
Chocobo1
7034d14eba Use warning message box instead of critical 2015-06-20 18:59:08 +03:00
Chocobo1
08c8b6f77d Don't close downloadFromURL dialog when showing empty url warning 2015-06-20 18:59:02 +03:00
Mayank Asthana
be91f749ee Download-from-URL textbox changes focus on tab key 2015-06-20 18:45:00 +03:00
sledgehammer999
4ec2a37f5d Delete tempfile when downloading favicon.ico. Closes #3257. 2015-06-20 18:17:13 +03:00
ngosang
cc471dbd3c [Web UI] Remove DHT port setting. Closes #3225 2015-06-20 18:16:42 +03:00
sledgehammer999
ab62cbdf3f Merge pull request #3213 from Chocobo1/props_widget_v320
Revamp general tab info
2015-06-20 16:56:00 +03:00
Chocobo1
cd708bb665 Add functionality to new data fields, cleanups 2015-06-20 20:39:19 +08:00
sledgehammer999
c1a47279af Merge pull request #3229 from Chocobo1/dev6_v320
Fix potential out-of-bound access in misc::friendlyUnit()
2015-06-20 02:49:10 +03:00
sledgehammer999
fec6c8af27 Rename Chinese translation files. Closes #2936. 2015-06-17 23:08:14 +03:00
Chocobo1
fc605b119e Webui: add delay in shutdown command in order to send out response msg 2015-06-17 23:08:09 +03:00
Chocobo1
7892f37d3e Fix potential out-of-bound access of units[i] 2015-06-17 08:10:25 +08:00
Chocobo1
26cb71458d Simplify code 2015-06-17 08:09:47 +08:00
sledgehammer999
069bd05d37 Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. 2015-06-15 00:53:34 +03:00
sledgehammer999
c4f043a14d New translation: Indonesian. 2015-06-14 23:51:14 +03:00
sledgehammer999
16b9a28531 Sync translations from Transifex and run lupdate. 2015-06-14 23:47:45 +03:00
sledgehammer999
1da29a450c Merge pull request #3212 from Chocobo1/opt_ip_filter_tracker_v32x
Add checkbox option for IpFilterTrackers.
2015-06-14 20:23:14 +03:00
sledgehammer999
9095545425 Merge pull request #3214 from Chocobo1/move_stats_v320
Revamp menu items
2015-06-14 20:22:19 +03:00
Chocobo1
01dbc01635 Improve ratio calculation formula. Closes #3096. 2015-06-14 20:12:19 +03:00
Chocobo1
bd7fd47d9f Resave in Qt Designer 2015-06-14 20:09:39 +08:00
Chocobo1
429dad3f70 Remove menu items: "Visit Website" and "Report a Bug".
Many issues opened on github should be asked on forum first, and the links are already present in "About" window.
2015-06-14 20:08:47 +08:00
Chocobo1
ca70f2ce5c Rename "Execution Log" to "Log".
Rename "When Downloads Done" to "On Downloads Done".
2015-06-14 20:08:05 +08:00
Chocobo1
98a4b8c199 Move statistics from Tools to View
Reorder & add separators in Help menu
Rename `Auto-Shutdown on downloads completion` to `When downloads done`
Capitalize menu items, modify accelerator
2015-06-14 20:07:58 +08:00
Chocobo1
6dd94ccc1d Add new data fields, capitialize labels, cleanups 2015-06-14 19:34:46 +08:00
Chocobo1
e83a8393a4 Add a parameter to QString(time_t t) 2015-06-14 19:33:54 +08:00
Chocobo1
8fa79a0690 Add checkbox option for IpFilterTrackers. 2015-06-14 19:05:26 +08:00
sledgehammer999
0423a28f30 Add translator to credits. 2015-06-14 12:29:30 +03:00
sledgehammer999
18f32fae90 Merge pull request #3182 from ngosang/typo_revision_32x
Changes in typography (v3_2_x)
2015-06-13 22:07:22 +03:00
sledgehammer999
057b998e0f Merge pull request #2966 from pmzqla/sort-eta
Fix sorting torrents by ETA
2015-06-13 22:01:24 +03:00
sledgehammer999
855ac43aca Merge pull request #3184 from ngosang/AnnounceToAllTrackers_32x
Change default preferences (v3_2_x)
2015-06-13 21:40:37 +03:00
ngosang
5a6302af59 changes in typography 2015-06-13 20:17:37 +02:00
sledgehammer999
174861274b Merge pull request #2958 from Chocobo1/neg_loop
Fix potential negative loop bound
2015-06-13 21:01:00 +03:00
sledgehammer999
718983a4d6 Merge pull request #3180 from ngosang/cppcheck_fixes_32x
Cppcheck: scope reduction & unused variables (v3_2_x)
2015-06-13 20:19:40 +03:00
sledgehammer999
a77e550bf9 Merge pull request #3202 from DoumanAsh/py3_remove_cache_3_2_x
3_2_x mapping: [search engine] Remove python3 cache during updateNova()
2015-06-13 09:26:49 +03:00
DoumanAsh
aac6a4526c 3_2_x mapping: [search engine] Remove python3 cache during updateNova() 2015-06-13 08:46:52 +03:00
who-me
23842a8ec3 Update qBittorrent.appdata.xml
Usage of the <updatecontact/> breaks validation. The correct tag is <update_contact/> as per info on this page:
http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-update_contact
2015-06-13 02:28:49 +03:00
DoumanAsh
422db313de [search engine] Update Legit Torrent to remove sgmllib 2015-06-13 02:28:49 +03:00
sledgehammer999
07bbe70baf Merge pull request #3181 from ngosang/user-agent_32x
Changes in User-Agent (v3_2_x)
2015-06-13 02:26:10 +03:00
sledgehammer999
f46eafc9fd Merge pull request #3178 from ngosang/search_version_32x
[Search engine] Show the version of search engines (v3_2_x)
2015-06-13 02:23:53 +03:00
sledgehammer999
86df2520ad Fix python detection from reigstry when multiple versions are installed. Update fallback mechanism for newer versions. 2015-06-13 02:19:12 +03:00
Gabriele
640e0ea34d Update matching RSS articles while editing rules
Save the rules as soon as they are edited so that the matching
articles tree is immediately updated.

Closes #2829.
2015-06-13 02:19:12 +03:00
ngosang
cd03c511a5 Minor fixes in search engines 2015-06-13 02:19:11 +03:00
ngosang
98533ede13 [search engine] Add Demonoid search engine 2015-06-13 02:19:11 +03:00
DoumanAsh
09dedd0f22 [search engine] Final enhancements. 2015-06-13 02:19:10 +03:00
DoumanAsh
639f5b2d20 [search engine] Cosmetic update TorrentReactor 2015-06-13 02:19:09 +03:00
DoumanAsh
e758f4ec26 [search engine] re-factoring of code 2015-06-13 02:19:09 +03:00
DoumanAsh
aae1a3564d [search engine] engines update 2015-06-13 02:19:08 +03:00
DoumanAsh
68e29df2ae [search engine] Nova2 multiprocessing 2015-06-13 02:19:08 +03:00
DoumanAsh
183643d77b Exception free retrieve_url()
Set 2 second timeout and handle any possible connection error
Return empty string to engine in case of connection exception
2015-06-13 02:19:07 +03:00
DoumanAsh
d8838363b8 Aborting search engine process during closure. Close #2671 2015-06-13 02:19:07 +03:00
Chocobo1
a0877fd57c Use AllUppercase for label text 2015-06-13 02:19:07 +03:00
Gabriele
271b37885f Allow to Open files from the properties pane by pressing "Enter"
Allow to open only one file at a time and ignore keypresses when
multiple items are selected.
2015-06-13 02:18:08 +03:00
Chocobo1
00b32a0996 Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. 2015-06-13 02:18:07 +03:00
Chocobo1
75979cc4d5 Enable to choose dark/light tray icons on all platforms. 2015-06-13 02:18:07 +03:00
LazyBui
cf41f41b16 Making alternate download/upload configuration behave like global download/upload configuration so as to allow boundless down/up 2015-06-13 02:18:06 +03:00
ngosang
12ad2c7368 Fix Start Minimized checkbox in Options 2015-06-13 02:18:06 +03:00
Chocobo1
86b21dacfd Set default focus to no button in exit confirm box 2015-06-13 02:18:06 +03:00
Chocobo1
7ce343c28f Set default focus to ok button in add new torrent dlg 2015-06-13 02:18:05 +03:00
Chocobo1
fc3e85f449 Set default focus to cancel button in delete confirm dlg, closes #3085 2015-06-13 02:18:05 +03:00
Chocobo1
fb32408ba1 Change option text "Confirmation on exit when torrents are active" 2015-06-13 02:18:04 +03:00
ngosang
32eec624a1 Make strings translatable in seach engine 2015-06-13 02:18:04 +03:00
ngosang
8122ae4739 Disable Auto piece size when creating a new torrent 2015-06-13 02:18:03 +03:00
ngosang
49cce9b2fc Change width of columns in search tab. Closes #764 2015-06-13 02:18:03 +03:00
ngosang
bded737c3c Web UI: Display wasted data with friendly units. Closes #2994 2015-06-13 02:18:02 +03:00
ngosang
a94b317150 Web UI: New config - Global maximum number of upload slots 2015-06-13 02:18:02 +03:00
ngosang
6d34f86c51 Web UI: Fix Max connections and Time active in transfer information 2015-06-13 02:18:01 +03:00
ngosang
6dfd962a13 Web UI: Minor changes in style 2015-06-13 02:18:01 +03:00
ngosang
89cfd41c5f Web UI: Complete translatable strings 2015-06-13 02:18:00 +03:00
ngosang
9fbd19b2ca Web UI: Changes in title bar 2015-06-13 02:18:00 +03:00
ngosang
1577a366e0 [search engine] Improve torrentz engine to return more results 2015-06-13 02:17:59 +03:00
ngosang
19506ea323 [search engine] Fix thepiratebay. Closes #3012 2015-06-13 02:17:59 +03:00
ngosang
b0d321d729 Web UI: Fix resumeAll and pauseAll. Closes #3016 2015-06-13 02:17:59 +03:00
ngosang
a63648b769 Web UI: Fix login and logout relative URLs 2015-06-13 02:16:06 +03:00
Chocobo1
cfe5f8e518 Fix wrong path for icons.qrc 2015-06-13 02:15:54 +03:00
ngosang
56f842dd6d Change default preferences 2015-06-12 01:58:51 +02:00
ngosang
95c8d078f1 Changes in User-Agent 2015-06-12 01:21:26 +02:00
ngosang
4b3d3f6ea6 Cppcheck: scope reduction & unused variables 2015-06-12 01:04:16 +02:00
ngosang
d783787ceb [Search engine] Show the version of search engines 2015-06-12 00:02:04 +02:00
Heiko Becker
1ef9a1151d Add missing QDataStream include
Fixes building with Qt 5.5.0-beta.
2015-05-26 13:36:30 +02:00
sledgehammer999
baa586a6f7 Update Copyright year. 2015-05-13 23:25:38 +03:00
sledgehammer999
c0454fbd02 Fix typo in configure script. 2015-05-13 23:04:46 +03:00
LazyBui
03fb897717 Removing the confusion caused by moving GeoIP code/.dat to a different directory 2015-05-13 23:00:33 +03:00
Gabriele
43cd295b0c configure: don't fail when $CPPFLAGS starts with a white space 2015-05-11 19:05:25 +03:00
sledgehammer999
80b2d00c7a Correctly detect FreeBSD when configuring.
Thanks to yurivict for helping.
Closes #2962.
2015-05-11 00:49:26 +03:00
sledgehammer999
83e4059cea Fix configure typo. 2015-05-11 00:49:16 +03:00
David Christenson
92a250cdb3 Fix variable names
Change undeclared identifiers `running_` and `paramsQueue_` to their
proper names.
2015-05-10 17:56:10 +03:00
Gabriele
1a52368f79 Fix sorting torrents by ETA
Closes #2965.
2015-05-10 14:34:41 +02:00
Chocobo1
cbc0e2527a Fix potential negative loop bound.
QTorrentHandle::num_files() could return -1 in these cases.
2015-05-10 15:16:37 +08:00
sledgehammer999
52f8f9beb4 Bump to 3.2.0 2015-05-10 04:20:19 +03:00
sledgehammer999
3f110dabed Update Transifex config file. 2015-05-10 04:20:06 +03:00
Gabriele
5af4dde3f3 Increase priority value of "High"
It was observed that setting the priority of a file to High has almost
no effect, so increase its value.
2015-03-27 17:55:50 +01:00
Gabriele
10880e10f1 Use enums instead of values when dealing with file priorities 2015-03-27 17:43:14 +01:00
365 changed files with 106224 additions and 188470 deletions

View File

@@ -1,30 +1,18 @@
language: cpp
os:
- linux
- osx
osx_image: xcode7
env:
matrix:
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
#- lt_branch=dist gui=true
#- lt_branch=dist gui=false
- lt_branch=RC_1_0 gui=true qt=4
- lt_branch=RC_1_0 gui=true qt=5
- lt_branch=RC_1_0 gui=false qt=4
- lt_branch=RC_1_0 gui=false qt=5
- lt_branch=RC_0_16 gui=true
- lt_branch=RC_0_16 gui=false
- lt_branch=RC_1_0 gui=true
- lt_branch=RC_1_0 gui=false
global:
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
- coverity_branch: coverity_scan
matrix:
exclude:
- os: linux
env: lt_branch=RC_1_0 gui=true qt=5
- os: linux
env: lt_branch=RC_1_0 gui=false qt=5
branches:
except:
- search_encoding_windows
@@ -37,7 +25,6 @@ notifications:
# container-based builds
sudo: false
# TODO: osx builder does not enable cache yet, see: https://github.com/travis-ci/travis-ci/issues/4011
cache:
directories:
- $HOME/.ccache
@@ -47,75 +34,63 @@ addons:
project:
name: "qbittorrent/qBittorrent"
description: "Build submitted via Travis CI"
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf && echo QMAKE_CC=$CC >> conf.pri && echo QMAKE_CXX=$CXX >> conf.pri"
build_command_prepend: "./bootstrap.sh && ./configure $qbtconf"
build_command: make
branch_pattern: $coverity_branch
notification_email: sledgehammer999@qbittorrent.org
apt:
sources:
# sources list: https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
- ubuntu-toolchain-r-test
- boost-latest
packages:
# packages list: https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
- autoconf
- automake
- colormake
- g++-4.8
- libssl-dev
- libboost1.55-dev
- libboost-system1.55-dev
- libboost-dev
- libboost-system-dev
- libgeoip-dev
- libqt4-dev
# Uncomment when Travis upgraded "Ubuntu 12.04 LTS" to a newer version whose repo will have a more up-to-date libtorrent package
#- libtorrent-rasterbar6
#- libboost-filesystem-dev
before_install:
# Only allow specific build for coverity scan, others will stop
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [ "$TRAVIS_OS_NAME" = "linux" -a "$lt_branch" = "RC_1_0" -a "$gui" = true ]; then exit ; fi
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ] && ! [[ "$lt_branch" == "RC_1_0" && "$gui" == "true" ]]; then exit ; fi
- shopt -s expand_aliases
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CC=gcc-4.8 CXX=g++-4.8 ; fi
- if [ "$TRAVIS_BRANCH" != "$coverity_branch" -a "$TRAVIS_OS_NAME" = "linux" ]; then dpkg-query -L ccache && export PATH="/usr/lib/ccache/:$PATH" ; fi
- if ! [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then dpkg-query -L ccache && export PATH="/usr/lib/ccache/:$PATH" ; fi
- alias make="colormake -j3" # Using nprocs/2 sometimes may fail (gcc is killed by system)
- libt_path="$HOME/libt_install"
- qbt_path="$HOME/qbt_install"
- ltconf="$ltconf --prefix="$libt_path" --disable-geoip"
- qbtconf="$qbtconf --prefix="$qbt_path" --with-qt4 PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
- ltconf="$ltconf --prefix="$libt_path" --with-libgeoip=system"
- qbtconf="$qbtconf --prefix="$qbt_path" PKG_CONFIG_PATH="$libt_path/lib/pkgconfig":$PKG_CONFIG_PATH"
# Options for specific branches
- if [[ "$lt_branch" == "RC_0_16" ]]; then qbtconf="$qbtconf --with-libtorrent-rasterbar0.16" ; fi
# Also setup a virtual display for after_success target when gui == true
- if [ "$gui" = false ]; then qbtconf="$qbtconf --disable-gui" ;
elif [ "$TRAVIS_OS_NAME" = "linux" ]; 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
- 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
- if ! $gui; then qbtconf="$qbtconf --disable-gui" ; else 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
# 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
- ccache -V && ccache --show-stats && ccache --zero-stats
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
- if ! [ "$lt_branch" == "dist" ]; then cd "$HOME" && pwd && git clone --depth 1 https://github.com/arvidn/libtorrent.git --branch $lt_branch --single-branch ; fi
- if ! [ "$lt_branch" == "dist" ]; then cd libtorrent && ./autotool.sh && ./configure $ltconf && make install && cd "$TRAVIS_BUILD_DIR" ; fi
script:
- if [ "$TRAVIS_BRANCH" = "$coverity_branch" ]; then exit ; fi # Skip usual build when running coverity scan
- ./bootstrap.sh && ./configure $qbtconf
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then echo QMAKE_CC=$CC >> conf.pri && echo QMAKE_CXX=$CXX >> conf.pri ; fi
- make && make install
- make install
after_success:
- if [ "$gui" = true ]; then qbt_exe="qbittorrent" ; else qbt_exe="qbittorrent-nox" ; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cd "$qbt_path/bin" && export LD_PRELOAD="$libt_path/lib/libtorrent-rasterbar.so:$LD_PRELOAD" ; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd "src/$qbt_exe.app/Contents/MacOS" ; fi
- ./$qbt_exe --version
- cd "$qbt_path/bin"
- export LD_PRELOAD="$libt_path/lib/libtorrent-rasterbar.so:$LD_PRELOAD"
- if $gui ; then ./qbittorrent --version ; else ./qbittorrent-nox --version ; fi
after_script:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ccache --show-stats ; fi
- ccache --show-stats

View File

@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
[qbittorrent.qbittorrent_v3_3_x]
[qbittorrent.qbittorrent_v3_2_x]
file_filter = src/lang/qbittorrent_<lang>.ts
source_file = src/lang/qbittorrent_en.ts
source_lang = en

View File

@@ -10,20 +10,18 @@ int myFunction(int a)
//code
}
void myFunction() {} // empty body
MyClass::MyClass(int *parent)
myClass::myClass(int *parent)
: m_parent(parent)
{
//initialize
//initialiaze
}
int MyClass::myMethod(int a)
int myClass::myMethod(int a)
{
//code
}
class MyOtherClass
class myOtherClass
{
public:
//code
@@ -33,18 +31,10 @@ private:
//code
};
namespace Name
namespace id
{
//code
}
// Lambdas
[](int arg1, int arg2) -> bool { return arg1 < arg2; }
[this](int arg)
{
this->acc += arg;
}
```
#### b. Other code blocks ####
@@ -85,12 +75,6 @@ default:
}
```
#### d. single-line blocks (lambdas, initializer lists etc.) ####
```c++
{} // empty - space before {
{ body } // spaces around { and before }
```
### 2. If blocks ###
#### a. Multiple tests ####
```c++
@@ -135,16 +119,16 @@ Generally it will depend on the particular piece of code and would be determined
### 4. 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 speficic files need other encodings/line endings.
### 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.
Initialization lists should be vertical. This will allow for more easily readable diffs. The inilization 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)
: m_a(a)
, m_b(b)
, m_c(c)
, m_d(d)
: priv_a(a)
, priv_b(b)
, priv_c(c)
, priv_d(d)
{
//code
}
@@ -153,7 +137,7 @@ myClass::myClass(int a, int b, int c, int d)
### 6. Enums.###
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++
enum Days
enum days
{
Monday,
Tuesday,
@@ -165,41 +149,7 @@ enum Days
};
```
### 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 {}
struct StructName {}
enum EnumName {}
typedef QList<ClassName> SomeList;
namespace NamespaceName
{
}
```
#### b. Variable names ####
Variable names start with lower case letter.
```c++
int myVar;
```
#### c. Private member variable names ####
Private member variable names start with lower case letter and should have ```m_``` prefix.
```c++
class MyClass
{
int m_myVar;
}
```
### 8. Misc.###
### 7. Misc.###
* Line breaks for long lines with operation:

View File

@@ -1,36 +0,0 @@
# Filing an issue
### Must read
* 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
* **Patience**. 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://gist.github.com/sledgehammer999/1cb1d9224d7fec8fa632), [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).

232
Changelog
View File

@@ -1,78 +1,162 @@
* Tue Dec 08 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.1
- FEATURE: New "Set as default label" option in Add torrent dialog. (takiz)
- FEATURE: Support wildcards for filtering torrent list and torrent content (vlakoff)
- BUGFIX: Fix -1 is displayed instead of the infinity symbol (Chocobo1)
- BUGFIX: Fix scan dirs settings saving. Closes #4254, #4239, #4187. (glassez)
- BUGFIX: Exported torrents now use name instead of hash. Closes #4205. (glassez)
- BUGFIX: Improve upgrade to v3.3.0. Now undownloaded magnets will be migrated too. Fixes #4195. (glassez)
- BUGFIX: Fix wrong encoding for listen failed error message. (glassez)
- BUGFIX: Fix RSS not automarking articles as read. (glassez)
- BUGFIX: Fix possible deadlock during application exit. (sledgehammer999)
- WEBUI: Cookies support on WebUI when downloading torrent from a URL. (Naikel Aparicio)
- WEBUI: Modified download and upload windows to allow autocompletion of browsers. (Naikel Aparicio)
- WEBUI: Fixed the spinner in the WebUI upload page. (Naikel Aparicio)
- WEBUI: Modified height of the WebUI download page. (Naikel Aparicio)
- WEBUI: Fixed all the JavaScript functions for download and upload pages. (Naikel Aparicio)
- WEBUI: Add seeds tab to WebUI (buinsky)
- WEBUI: Bump WebUI API_VERSION.
- COSMETIC: Cleanup "Trackers", "Peers", "HTTP Sources", "Speed" and "Content" page layout (Chocobo1)
- COSMETIC: Reduce mainwindow border width (Chocobo1)
- COSMETIC: Use QLineEdit built-in ClearButton (Qt5 only) (Chocobo1)
- COSMETIC: Change text description for half-open connection (Chocobo1)
- OTHER: Change update URL to FossHub. Closes #4188. (sledgehammer999)
* Sat Oct 31 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.5
- BUGFIX: Fix difficult to reproduce crash. (glassez)
- OTHER: Fix Windows' Qt5 build. (Gelmir)
* Sun Nov 29 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.0
- FEATURE: Huge core code refactoring. Problems with labels, temp folders etc should be eliminated. Smoother UI should be observed too. (glassez)
- FEATURE: Speed graph (Anton Lashkov)
- FEATURE: Add multiple peers in Peers addition dialog. Closes #1563, #2245, #3133, #1419, #3287, #1419 (ngosang)
- FEATURE: Allow to copy all peers with a keyboard shortcut (ngosang)
- FEATURE: Use GeoIP2 database, allows for country resolution of IPv6 peers. It is no longer embedded in the program but downloaded and updated monthly. (glassez)
- FEATURE: Add more "Run External Program" parameters, closes #3053, #238, #1291, #1522. (Chocobo1, glassez)
- FEATURE: Add an option to allow the use of proxies only for torrents. Closes #2701. (pmzqla)
- FEATURE: Detect network interface state changes. It should detect VPN connection resets. (Pawel Polewicz)
- FEATURE: Switch to using c++11 (glassez)
- FEATURE: Automatically add trackers to new downloads. (ngosang)
- FEATURE: You can now choose the path to download for watched folders. (dsimakov, sledgehammer999)
- FEATURE: Switch to Qt5 by default.
- BUGFIX: Fix progress calculation in Content tab. Closes #2639 Closes #2752 (ngosang)
- BUGFIX: Fix label filter. Closes #3429. (glassez)
- BUGFIX: Fix "Run External Program Launches too Early" issue, closes #2107. (Chocobo1)
- BUGFIX: Don't remove torrent contents parent folder, even it is empty. Closes #2244. (Chocobo1)
- BUGFIX: Always apply filter for manually banned IPs. Related #3988. (sledgehammer999)
- BUGFIX: Fix reporting of tracker status. Closes #3101. (sledgehammer999)
- BUGFIX: Don't connect to "any interface" when the configured network interface is missing. Closes #3943, #2741, #1159, #844 and #143. (sledgehammer999)
- BUGFIX: Fix reordering of first column with Qt5. Closes #2835. (sledgehammer999)
- COSMETIC: Add back "qBittorrent" in program updater title, closes #3549. (Chocobo1)
- COSMETIC: Use infinity symbol rather than -1 for nb_connections (pmzqla)
- COSMETIC: Move uTP options to it's own section (Chocobo1)
- COSMETIC: Fix availability bar & progress bar height being too small on high DPI displays (Chocobo1)
- COSMETIC: Fix availability label & progress label clipped on high DPI displays, closes #3237. (Chocobo1)
- COSMETIC: Add tooltips/legend for availability bar & progress bar (Chocobo1)
- COSMETIC: Use theme color for background in PropertiesWidget (Chocobo1)
- COSMETIC: Replace horizontal line with border in bottom panel (Chocobo1)
- COSMETIC: Various visual changes in the side panel. (Chocobo1)
- COSMETIC: Use thin border for transfer list (Chocobo1)
- COSMETIC: Make URL in "Add Torrent File..." clickable. Closes #3928. (Chocobo1)
- COSMETIC: New view for errored torrents. (sledgehammer999)
- WEBUI: Add information in General tab (ngosang)
- WEBUI: Reorder "Super seeding mode" option in right click menu (ngosang)
- WEBUI: Clean up JavaScript code (ngosang)
- WEBUI: Added labels support. #648 (Felipe Barriga Richards, ngosnag)
- WEBUI: Fix accessing the WebUI through IPv6 (ngosang)
- WEBUI: Bump WebUI API_VERSION to 6.
- WEBUI: Change selected color to differentiate from the progressbar. (Daniel Peukert, ngosang)
- SEARCH: Add "Copy description page URL" button in search tab. Closes #2371. (pmzqla)
- SEARCH: Add https_proxy env variable. This forces Python to use the HTTP proxy for HTTPS connections. (pmzqla)
- SEARCH: Detect new plugin URL from clipboard (ngosang)
- SEARCH: Update Torrentz trackers (ngosang)
- WINDOWS: Fix german translation of the installer (netswap)
- NOX: Don't ask the user questions in nox build when in non-interactive mode. Closes #3875. (sledgehammer999)
- OTHER: Fixed typos, spelling correction (dartraiden)
- OTHER: Fix need for restart to enable/disable peer countries resolution. (glassez)
- OTHER: Unload the GeoIP db when disabled. (sledgehammer999)
- OTHER: Reduce max value of "Disk cache size" to 1536MB for 32bit. Closes to #4028. (Chocobo1)
- OTHER: Make "Download in sequential order" and "Download first and last piece first" options independent. (glassez)
* Sat Oct 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.4
- FEATURE: Select the file of single file torrents when opening destination folder (pmzqla)
- BUGFIX: Fix crash with invalid favicon. Closes #3632. (glassez)
- BUGFIX: Try to download favicon.png when the download of favicon.ico fails (pmzqla)
- BUGFIX: Try to avoid loading a corrupted configuration file. Also log errors encountered while saving/loading the configuration. Closes #3503. (sledgehammer999)
- BUGFIX: Allow adding torrent link from Torcache (jsayol)
- BUGFIX: Don't limit the number of torrents that can be announced to the tracker/dht/lsd. Closes #3473. (sledgehammer999)
- BUGFIX: Fix potential crash when memory allocation failed. Closes #3877. (Chocobo1)
- COSMETIC: Change Queue buttons order in the Toolbar (GUI & Web UI) (ngosang)
- COSMETIC: Move option "Ignore transfer limits on local network" to Speed page (Chocobo1)
- COSMETIC: Move option "Confirm torrent deletion" to Behavior page (Chocobo1)
- COSMETIC: Fix typos. Make `μTP` untranslatable. Use American variation of words. Closes #3654. (sledgehammer999)
- COSMETIC: Optimize text color for dark themes. Closes #3633 and #3815. (sledgehammer999)
- COSMETIC: Show current label in the torrent context menu. Closes #3776. (sledgehammer999)
- WEBUI: Add save_path to /query/torrents (Casey Bodley)
- WEBUI: Bump API_VERSION to 5
- SEARCH: Fix python detection when the 'Anaconda' software is installed. Closes #3731. (sledgehammer999)
- RSS: Handle magnet links as torrents instead of news URLs. Closes #3560 (ngosang)
- RSS: Trim elements text in RSS articles (ngosang)
- RSS: Fix contextual menu in RSS torrents list (ngosang)
- RSS: Improve error handling when a RSS feed doesn't contain torrents (ngosang)
- RSS: More precise message and code simplification in RSS feeds deletion (ngosang)
- RSS: Don't hide the elements in Unread list when clicked (ngosang)
- RSS: Allow multiple selection in RSS torrents list (ngosang)
- RSS: Simplify string translation (ngosang)
- RSS: Handle more types of RSS feeds (ngosang)
- RSS: Fix RSS panel position not saved (ngosang)
- RSS: Fix forgetting label changes to first item in RSS rule list. (Gelmir)
- RSS: Add label to UI when a new one is creating during rule addition. (Gelmir)
- RSS: Removes refresh message when adding a new feed (ngosang)
- RSS: Fix RSS crash when deleting RSS feeds. Closes #997, #2152, #2461, #3718, #3747, #3766, #3806, #3814, #3829 and #3846. (ngosang)
- RSS: Sort labels in RSS Downloader dialog, closes #3140. (Chocobo1)
- WINDOWS: Correctly show german letters in the installer. Closes #3574, #3566. (sledgehammer999)
- WINDOWS: Fix file selection on Explorer when the filename contains weird characters. Closes #3185. (sledgehammer999)
- WINDOWS: Fix wrong default download directory in Windows. Closes #2625. (Chocobo1)
- WINDOWS: Fix German translation of the installer. (netswap)
- LINUX: Fix broken .desktop file icon for some locales. See #3905. (sledgehammer999)
- OTHER: Fix ppc64le detection during configure (sledgehammer999)
- OTHER: Don't use sed in configure. Closes #3169. (pmzqla)
- OTHER: Fix broken donation link. Closes #3771. (sledgehammer999)
- OTHER: Add forum link in README. Closes #3853. (sledgehammer999)
- OTHER: New translation: Esperanto
- OTHER: Fix Qt5 nox build on non-Windows. (sledgehammer999)
* Sun Aug 02 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.3
- BUGFIX: Fix crash when closing a search tab while search is running (pmzqla)
- SEARCH: Other minor search fixes and improvements (pmzqla)
* Sat Aug 01 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.2
- FEATURE: Allow to force reannounce DHT too (Chocobo1)
- FEATURE: Implement an option to disable confirmation of torrent recheck (blaxspirit)
- FEATURE: Allow to copy all the trackers with a keyboard shortcut (pmzqla)
- BUGFIX: Fix torrent renaming. Closes #3398 (ngosang)
- BUGFIX: Fix localhost address (::ffff:127.0.0.1) is not recognized when connecting to WebUI (Chocobo1)
- BUGFIX: Fix '&' character in label name becomes accelerator key, closes #3454. (Chocobo1)
- BUGFIX: Fix HTTP header parsing when torrent filename contains a semicolon. Closes #3511.
- BUGFIX: Fix installing search plugin from local file. (sledgehammer999)
- BUGFIX: Fix installing search plugin by drag-n-dropping file. (sledgehammer999)
- COSMETIC: Update color scheme of completed.png icon. (sledgehammer999)
- COSMETIC: Fix printing of the copyright symbol in the About dialog. (sledgehammer999)
- COSMETIC: Minor changes in Preview File dialog (ngosang)
- COSMETIC: Add Force Resume icon (ngosang)
- COSMETIC: Add count of unread items to RSS tab label (pmzqla)
- WEBUI: Ports between 1 and 65535 as in the GUI. Closes #1602 (ngosang)
- WEBUI: Fix an error in Content tab when the torrent doesn't have metadata (ngosang)
- WEBUI: New option Web UI port UPNP. Closes #3358 (ngosang)
- WEBUI: Fix API Content Types. Closes #3393 (ngosang)
- WEBUI: Fix empty trackers addition (ngosang)
- WEBUI: Torrent download from hash. Closes #1173 (ngosang)
- WEBUI: Fix sort by queue number (ngosang)
- WEBUI: Open external links in a new window/tab (ngosang)
- WEBUI: Massive increase in performance. (ngosang)
- SEARCH: Search status per tab (DoumanAsh)
- SEARCH: Remove the word 'torrent' in ExtraTorrent results (ngosang)
- SEARCH: Prefer python3 over python2 on Linux and OS X (pmzqla)
- SEARCH: Show notification if Python is not found and a search is started (pmzqla)
- SEARCH: Update link to the Windows Python installer (pmzqla)
- SEARCH: Improve checks for python. Print python version and path to log. (sledgehammer999)
- SEARCH: Improve Python detection (ngosang)
- OTHER: Improvements on the build system (Chocobo1)
- OTHER: Bump minimum libtorrent version required to 1.0.6/0.16.19. (sledgehammer999)
- OTHER: New translation: Slovenian
* Sat Jul 11 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.1
- FEATURE: Change default preferences (ngosang)
- FEATURE: Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. (Chocobo1)
- FEATURE: Allow to Open files from the properties pane by pressing "Enter" (pmzqla)
- FEATURE: Add checkbox option for IpFilterTrackers. (Chocobo1)
- FEATURE: Download-from-URL textbox change focus on tab key (Mayank Asthana)
- FEATURE: Increase priority value of "High" (pmzqla)
- FEATURE: Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator (ngosang)
- BUGFIX: Disable Auto piece size when creating a new torrent (ngosang)
- BUGFIX: Set default focus to cancel button in delete confirm dlg, closes #3085 (Chocobo1)
- BUGFIX: Set default focus to ok button in add new torrent dlg (Chocobo1)
- BUGFIX: Set default focus to no button in exit confirm box (Chocobo1)
- BUGFIX: Fix Start Minimized checkbox in Options (ngosang)
- BUGFIX: Remove limits on alternative speeds setting (LazyBui)
- BUGFIX: Fix sorting torrents by ETA (pmzqla)
- BUGFIX: Improve ratio calculation formula. Closes #3096. (Chocobo1)
- BUGFIX: Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. (sledgehammer999)
- BUGFIX: Delete tempfile when downloading favicon.ico. Closes #3257. (sledgehammer999)
- BUGFIX: Don't close downloadFromURL dialog when showing empty url warning (Chocobo1)
- BUGFIX: Minimize to tray only if the relevant option is enabled. (sledgehammer999)
- BUGFIX: Update disk space label after changing partition, closes #3309. (Chocobo1)
- BUGFIX: Don't use a default upload limit. Closes #3275. (sledgehammer999)
- BUGFIX: Fix Properties bar size when started minimized to tray. Closes #3206. (sledgehammer999)
- COSMETIC: Change option text "Confirmation on exit when torrents are active" (Chocobo1)
- COSMETIC: Enable to choose dark/light tray icons on all platforms. (Chocobo1)
- COSMETIC: Use AllUppercase for label text (Chocobo1)
- COSMETIC: changes in typography (ngosang)
- COSMETIC: Menu revamp (Chocobo1)
- COSMETIC: Revamp general tab info (Chocobo1)
- COSMETIC: Better update message for users (Chocobo1)
- COSMETIC: Fix ugly 'C++' wrapping in About dialog. (glassez)
- WEBUI: Fix login and logout relative URLs (ngosang)
- WEBUI: Fix resumeAll and pauseAll. Closes #3016 (ngosang)
- WEBUI: Changes in title bar (ngosang)
- WEBUI: Complete translatable strings (ngosang)
- WEBUI: Minor changes in style (ngosang)
- WEBUI: Fix Max connections and Time active in transfer information (ngosang)
- WEBUI: New config - Global maximum number of upload slots (ngosang)
- WEBUI: Display wasted data with friendly units. Closes #2994 (ngosang)
- WEBUI: add delay in shutdown command in order to send out response msg (Chocobo1)
- WEBUI: Option to hide Top Toolbar (ngosang)
- WEBUI: Reorder the tabs/groups in Options window (ngosang)
- WEBUI: Add new options (ngosang)
- WEBUI: Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040 (ngosang)
- WEBUI: Add Web Seeds (HTTP Sources) tab (ngosang)
- WEBUI: Don't update the tabs if tab's panel is collapsed (ngosang)
- WEBUI: Fix alternative global rate limits. (ngosang)
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
- SEARCH: Improve torrentz engine to return more results (ngosang)
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
- SEARCH: Make strings translatable in seach engine (ngosang)
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
- SEARCH: Perform searches in parallel (DoumanAsh)
- SEARCH: Add Demonoid search engine (ngosang)
- SEARCH: Minor fixes in search engines (ngosang)
- SEARCH: Show the version of search engines (ngosang)
- SEARCH: Update Legit Torrent to remove sgmllib (DoumanAsh)
- SEARCH: Update KickassTorrents (ngosang)
- SEARCH: Update BTDigg (ngosang)
- SEARCH: Update Torrentz (ngosang)
- SEARCH: Update ExtraTorrent (ngosang)
- SEARCH: Update TorrentReactor (ngosang)
- SEARCH: Fix Python 2 implementation of Torrentz (ngosang)
- SEARCH: Cosmetic changes in search engine (ngosang)
- SEARCH: Fix column sort in search engine. Closes #2621 (ngosang)
- RSS: Update matching RSS articles while editing rules (pmzqla)
- WINDOWS: Fix python detection from registry when multiple versions are installed (sledgehammer999)
- LINUX: Fixes Linux issue for when the theme doesn't have a corresponding icon. (sledgehammer999)
- OTHER: Correctly detect FreeBSD when configuring. (sledgehammer999, yurivict)
- OTHER: Add translator to credits.
- OTHER: New translation: Indonesian.
- OTHER: Split Chinese locales into Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). (sledgehammer999)
* Sun May 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.0
- FEATURE: Show actual protocol for listen success/failure in the log. Needs libtorrent v1.0.0 (Gelmir)

10
INSTALL
View File

@@ -14,11 +14,15 @@ qBittorrent - A BitTorrent client in C++ / Qt4
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 1.0.6)
- libtorrent-rasterbar by Arvid Norberg (>= 0.16.19 OR >= 1.0.6)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost >= 1.35.x (libboost-system)
- libboost 1.34.x (libboost-filesystem°) + libasio
or
- libboost >= 1.35.x (libboost-system, libboost-filesystem°)
°libboost-filesystem is not needed if libtorrent-rasterbar >= v0.16.x is used
- python >= 2.3 (needed by search engine)
* Run time only dependency
@@ -40,7 +44,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= v1.0.6)
- libtorrent-rasterbar by Arvid Norberg (>= 0.16.19 OR >= v1.0.6)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.

View File

@@ -1,7 +1,7 @@
qBittorrent - A BitTorrent client in Qt
------------------------------------------
[![Build Status](https://travis-ci.org/qbittorrent/qBittorrent.svg?branch=master)](https://travis-ci.org/qbittorrent/qBittorrent)
[![Build Status](https://travis-ci.org/qbittorrent/qBittorrent.svg?branch=v3_2_x)](https://travis-ci.org/qbittorrent/qBittorrent)
[![Coverity Status](https://scan.coverity.com/projects/5494/badge.svg)](https://scan.coverity.com/projects/5494)
********************************
### Description:

View File

@@ -26,7 +26,7 @@ How to build
First you need to create the conf.pri file in the same dir as this readme.os2 is.
the conf.pri file has the following content:
##### conf.pri content begin #####
##### conf.pri content beginn #####
BINDIR = ./bin
INCDIR = ./include
LIBDIR = ./lib

597
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -12,11 +12,23 @@ AM_INIT_AUTOMAKE
# Define --wth-* and --enable-* arguments
AC_ARG_WITH(qt4,
[AS_HELP_STRING([--with-qt4],
[Compile using Qt4 (default=no)])],
AC_ARG_WITH(qt5,
[AS_HELP_STRING([--with-qt5],
[Compile using Qt5 (default=no)])],
[],
[with_qt4=no])
[with_qt5=no])
AC_ARG_WITH(libtorrent-rasterbar0.16,
[AS_HELP_STRING([--with-libtorrent-rasterbar0.16],
[Compile using libtorrent-rasterbar 0.16.x series (default=no)])],
[],
[with_libtorrent_rasterbar0_16=no])
AC_ARG_WITH(geoip-database-embedded,
[AS_HELP_STRING([--with-geoip-database-embedded],
[Embed the GeoIP database in the qBittorrent executable (please follow instructions in src/gui/geoip/README) (default=no)])],
[],
[with_geoip_database_embedded=no])
AC_ARG_WITH(qtsingleapplication,
[AS_HELP_STRING([--with-qtsingleapplication=@<:@system|shipped@:>@],
@@ -95,6 +107,7 @@ AS_CASE(["x$enable_gui"],
["xno"],
[AC_MSG_RESULT([no])
enable_qt_dbus=[no]
enable_geoip_database=[no]
QBT_ADD_CONFIG="$QBT_ADD_CONFIG nogui"],
[AC_MSG_RESULT([$enable_gui])
AC_MSG_ERROR([Unknown option "$enable_gui". Use either "yes" or "no".])])
@@ -121,16 +134,16 @@ AS_CASE(["x$enable_webui"],
[AC_MSG_RESULT([$enable_webui])
AC_MSG_ERROR([Unknown option "$enable_webui". Use either "yes" or "no".])])
AC_MSG_CHECKING([whether Qt4 should be enabled])
AS_CASE(["x$with_qt4"],
AC_MSG_CHECKING([whether Qt5 should be enabled])
AS_CASE(["x$with_qt5"],
["xno"],
[AC_MSG_RESULT([no])
FIND_QT5()],
FIND_QT4()],
["xyes"],
[AC_MSG_RESULT([yes])
FIND_QT4()],
[AC_MSG_RESULT([$with_qt4])
AC_MSG_ERROR([Unknown option "$with_qt4". Use either "yes" or "no".])])
FIND_QT5()],
[AC_MSG_RESULT([$with_qt5])
AC_MSG_ERROR([Unknown option "$with_qt5". Use either "yes" or "no".])])
AS_IF([test "x$QT_QMAKE" = "x"],
[AC_MSG_ERROR([Could not find qmake])
])
@@ -168,6 +181,34 @@ AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
AC_MSG_CHECKING([whether to compile using libtorrent-rasterbar 0.16.x])
AS_CASE(["x$with_libtorrent_rasterbar0_16"],
["xno"],
[AC_MSG_RESULT([no])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.0.6],
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])],
["xyes"],
[AC_MSG_RESULT([yes])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 0.16.19],
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])],
[AC_MSG_RESULT([$with_libtorrent_rasterbar0_16])
AC_MSG_ERROR([Unknown option "$with_libtorrent_rasterbar0_16". Use either "yes" or "no".])])
AC_MSG_CHECKING([whether to embed the GeoIP database])
AS_CASE(["x$with_geoip_database_embedded"],
["xno"],
[AC_MSG_RESULT([no])
QBT_REMOVE_DEFINES="$QBT_REMOVE_DEFINES WITH_GEOIP_EMBEDDED"],
["xyes"],
[AC_MSG_RESULT([yes])
QBT_ADD_DEFINES="$QBT_ADD_DEFINES WITH_GEOIP_EMBEDDED"],
[AC_MSG_RESULT([$with_geoip_database_embedded])
AC_MSG_ERROR([Unknown option "$with_geoip_database_embedded". Use either "yes" or "no".])])
AC_MSG_CHECKING([which qtsingleapplication to use])
AS_CASE(["x$with_qtsingleapplication"],
["xshipped"],
@@ -179,7 +220,7 @@ AS_CASE(["x$with_qtsingleapplication"],
[AC_MSG_RESULT([$with_qtsingleapplication])
AC_MSG_ERROR([Unknown option "$with_qtsingleapplication". Use either "system" or "shipped".])])
AS_IF([test "x$with_qt4" = "xyes"],
AS_IF([test "x$with_qt5" = "xno"],
[AC_MSG_CHECKING([which qjson to use])
AS_CASE(["x$with_qjson"],
["xshipped"],
@@ -196,11 +237,6 @@ AS_IF([test "x$with_qt4" = "xyes"],
AC_MSG_ERROR([Unknown option "$with_qjson". Use either "system" or "shipped".])])
])
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.0.6],
[CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])
PKG_CHECK_MODULES(zlib,
[zlib],
[CPPFLAGS="$zlib_CFLAGS $CPPFLAGS"

2
dist/mac/Info.plist vendored
View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.3.1</string>
<string>3.2.5</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>

View File

@@ -11,7 +11,7 @@ TRANSLATORS:
5. Save the files with utf8 encoding and BOM.
6. Submit your changes: 1) as a pull request to the official git repo or
2) open an issue to the bugtracker and attach them or 3) via email or
4)the same way you provide the translations for qbt itself
4)the same way you provide the tranlations for qbt itself
PACKAGERS:
@@ -41,10 +41,7 @@ installer-translations
translations
qt_ar.qm
...
(all the .qm files found in the 'translations' folder of your Qt install. Those files differ between Qt4 and Qt5.
If you want to distribute Qt4 translations it is better to use the ones found in this repo under the path "dist/qt-translations".
They contain extra languages not distributed via the official qt4 sources.
Don't forget to edit the filelist in installer.nsi + uninstaller.nsi to include all your .qm files.)
(all the .qm files found in dist/qt-translations in every source release)
qt_zh_TW.qm
installer.nsi
license.txt

View File

@@ -3,7 +3,7 @@
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_GERMAN} "qBittorrent (erforderlich)"
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen"
LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung am Desktop erstellen"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_GERMAN} "Eintrag im Startmenü erstellen"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
@@ -38,7 +38,7 @@ LangString remove_conf ${LANG_GERMAN} "Einstellungsdateien entfernen"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_GERMAN} "Regel in der Windows Firewall entfernen"
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_GERMAN} "Entferne Regel aus der Windows Firewall"
LangString remove_firewallinfo ${LANG_GERMAN} "Entferne Regel in der Windows Firewall"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_GERMAN} "Torrents und zwischengespeicherte Daten entfernen"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."

View File

@@ -31,13 +31,13 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
File "qbittorrent.pdb"
File "qt.conf"
File /oname=translations\qt_ar.qm "translations\qt_ar.qm"
File /oname=translations\qt_bg.qm "translations\qt_bg.qm"
File /oname=translations\qt_ca.qm "translations\qt_ca.qm"
File /oname=translations\qt_cs.qm "translations\qt_cs.qm"
File /oname=translations\qt_da.qm "translations\qt_da.qm"
File /oname=translations\qt_de.qm "translations\qt_de.qm"
File /oname=translations\qt_en.qm "translations\qt_en.qm"
File /oname=translations\qt_es.qm "translations\qt_es.qm"
File /oname=translations\qt_fa.qm "translations\qt_fa.qm"
File /oname=translations\qt_eu.qm "translations\qt_eu.qm"
File /oname=translations\qt_fi.qm "translations\qt_fi.qm"
File /oname=translations\qt_fr.qm "translations\qt_fr.qm"
File /oname=translations\qt_gl.qm "translations\qt_gl.qm"
@@ -47,15 +47,17 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
File /oname=translations\qt_ja.qm "translations\qt_ja.qm"
File /oname=translations\qt_ko.qm "translations\qt_ko.qm"
File /oname=translations\qt_lt.qm "translations\qt_lt.qm"
File /oname=translations\qt_nl.qm "translations\qt_nl.qm"
File /oname=translations\qt_pl.qm "translations\qt_pl.qm"
File /oname=translations\qt_pt.qm "translations\qt_pt.qm"
File /oname=translations\qt_pt_BR.qm "translations\qt_pt_BR.qm"
File /oname=translations\qt_ru.qm "translations\qt_ru.qm"
File /oname=translations\qt_sk.qm "translations\qt_sk.qm"
File /oname=translations\qt_sl.qm "translations\qt_sl.qm"
File /oname=translations\qt_sk.qm "translations\qt_sk.qm"
File /oname=translations\qt_sv.qm "translations\qt_sv.qm"
File /oname=translations\qt_tr.qm "translations\qt_tr.qm"
File /oname=translations\qt_uk.qm "translations\qt_uk.qm"
File /oname=translations\qt_zh_CN.qm "translations\qt_zh_CN.qm"
File /oname=translations\qt_zh_TW.qm "translations\qt_zh_TW.qm"
File /oname=translations\qt_zh_TW.qm "translations\qt_zh_TW.qm"
; Write the installation path into the registry
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"

View File

@@ -19,7 +19,7 @@ XPStyle on
!define CSIDL_APPDATA '0x1A' ;Application Data path
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
!define PROG_VERSION "3.3.1"
!define PROG_VERSION "3.2.5"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)

View File

@@ -6,12 +6,13 @@
Delete "$INSTDIR\qbittorrent.pdb"
Delete "$INSTDIR\qt.conf"
Delete "$INSTDIR\translations\qt_ar.qm"
Delete "$INSTDIR\translations\qt_bg.qm"
Delete "$INSTDIR\translations\qt_ca.qm"
Delete "$INSTDIR\translations\qt_cs.qm"
Delete "$INSTDIR\translations\qt_da.qm"
Delete "$INSTDIR\translations\qt_de.qm"
Delete "$INSTDIR\translations\qt_en.qm"
Delete "$INSTDIR\translations\qt_es.qm"
Delete "$INSTDIR\translations\qt_eu.qm"
Delete "$INSTDIR\translations\qt_fa.qm"
Delete "$INSTDIR\translations\qt_fi.qm"
Delete "$INSTDIR\translations\qt_fr.qm"
@@ -22,15 +23,18 @@
Delete "$INSTDIR\translations\qt_ja.qm"
Delete "$INSTDIR\translations\qt_ko.qm"
Delete "$INSTDIR\translations\qt_lt.qm"
Delete "$INSTDIR\translations\qt_nl.qm"
Delete "$INSTDIR\translations\qt_pl.qm"
Delete "$INSTDIR\translations\qt_pt.qm"
Delete "$INSTDIR\translations\qt_pt_BR.qm"
Delete "$INSTDIR\translations\qt_ru.qm"
Delete "$INSTDIR\translations\qt_sk.qm"
Delete "$INSTDIR\translations\qt_sl.qm"
Delete "$INSTDIR\translations\qt_sv.qm"
Delete "$INSTDIR\translations\qt_tr.qm"
Delete "$INSTDIR\translations\qt_uk.qm"
Delete "$INSTDIR\translations\qt_zh_CN.qm"
Delete "$INSTDIR\translations\qt_zh_TW.qm"
Delete "$INSTDIR\translations\qt_zh_TW.qm"
Delete "$INSTDIR\uninst.exe"
; Remove directories used

View File

@@ -111,7 +111,7 @@ To install QBittorrent, do the following:
=============
Please create bugreports at http://svn.netlabs.org/qtapps
Only bug reports with a reproducible bug are accepted. :-)
Only bug reports with a reproducable bug are accepted. :-)
5. CREDITS

View File

@@ -54,7 +54,7 @@ AS_IF([test "x$QT_QMAKE" != "x"],
# Sets the HAVE_QTDBUS variable to true or false.
# --------------------------------------
AC_DEFUN([FIND_QTDBUS],
[AS_IF([test "x$with_qt4" = "xno"],
[AS_IF([test "x$with_qt5" = "xyes"],
[AC_MSG_CHECKING([for Qt5DBus >= 5.2.0])
PKG_CHECK_EXISTS([Qt5DBus >= 5.2.0],
[AC_MSG_RESULT([found])

View File

@@ -10,9 +10,7 @@ exists($$OUT_PWD/../conf.pri) {
}
LIBS += -framework Carbon -framework IOKit
# C++11 support
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
CONFIG += c++11
QT_LANG_PATH = ../dist/qt-translations
DIST_PATH = ../dist/mac
@@ -58,3 +56,6 @@ QMAKE_BUNDLE_DATA += qt_translations
ICON = $$DIST_PATH/qbittorrent_mac.icns
QMAKE_INFO_PLIST = $$DIST_PATH/Info.plist
DEFINES += WITH_GEOIP_EMBEDDED
message("On Mac OS X, GeoIP database must be embedded.")

View File

@@ -1,6 +1,3 @@
# C++11 support
lessThan(QT_MAJOR_VERSION, 5): QMAKE_CXXFLAGS += -std=c++11
exists(conf.pri) {
# to the conf.pri goes all system dependent stuff
include(conf.pri)
@@ -16,4 +13,8 @@ LIBS += \
RC_FILE = qbittorrent_os2.rc
# LIBTORRENT DEFINES
DEFINES += WITH_SHIPPED_GEOIP_H
DEFINES += BOOST_ASIO_DYN_LINK
DEFINES += WITH_GEOIP_EMBEDDED
message("On eCS(OS/2), GeoIP database must be embedded.")

View File

@@ -27,6 +27,3 @@ strace_win {
}
SOURCES += $$PWD/main.cpp
# upgrade code
HEADERS += $$PWD/upgrade.h

File diff suppressed because it is too large Load Diff

View File

@@ -50,17 +50,10 @@ QT_END_NAMESPACE
typedef QtSingleCoreApplication BaseApplication;
#endif
#include "base/utils/misc.h"
#ifndef DISABLE_WEBUI
class WebUI;
#endif
namespace BitTorrent
{
class TorrentHandle;
}
class Application : public BaseApplication
{
Q_OBJECT
@@ -84,8 +77,6 @@ protected:
private slots:
void processMessage(const QString &message);
void torrentFinished(BitTorrent::TorrentHandle *const torrent);
void allTorrentsFinished();
void cleanup();
#if (!defined(DISABLE_GUI) && defined(Q_OS_WIN))
void shutdownCleanup(QSessionManager &manager);
@@ -96,7 +87,6 @@ private:
#ifndef DISABLE_GUI
QPointer<MainWindow> m_window;
ShutdownAction m_shutdownAct;
#endif
#ifndef DISABLE_WEBUI
@@ -109,7 +99,6 @@ private:
void initializeTranslation();
void processParams(const QStringList &params);
void sendNotificationEmail(BitTorrent::TorrentHandle *const torrent);
};
#endif // APPLICATION_H

View File

@@ -33,7 +33,6 @@
#include <QScopedPointer>
#ifndef DISABLE_GUI
// GUI-only includes
#include <QFont>
#include <QMessageBox>
#include <QPainter>
@@ -42,19 +41,14 @@
#include <QSplashScreen>
#ifdef QBT_STATIC_QT
#include <QtPlugin>
#ifdef QBT_USES_QT5
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
Q_IMPORT_PLUGIN(QICOPlugin)
#else
Q_IMPORT_PLUGIN(qico)
#endif
#endif // QBT_STATIC_QT
#else
// NoGUI-only includes
#else // DISABLE_GUI
#include <cstdio>
#ifdef Q_OS_UNIX
#include "unistd.h"
#endif
#endif // DISABLE_GUI
#ifdef Q_OS_UNIX
@@ -72,10 +66,9 @@ Q_IMPORT_PLUGIN(qico)
#include <cstdlib>
#include <iostream>
#include "application.h"
#include "base/utils/misc.h"
#include "base/preferences.h"
#include "upgrade.h"
#include "misc.h"
#include "preferences.h"
#include "logger.h"
// Signal handlers
#if defined(Q_OS_UNIX) || defined(STACKTRACE_WIN)
@@ -127,11 +120,13 @@ QBtCommandLineParameters parseCommandLine();
// Main
int main(int argc, char *argv[])
{
//Initialize logger singleton here to avoid threading issues
Logger::instance()->addMessage(QObject::tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(VERSION));
// We must save it here because QApplication constructor may change it
bool isOneArg = (argc == 2);
// Create Application
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
QString appId = QLatin1String("qBittorrent-") + misc::getUserIDString();
QScopedPointer<Application> app(new Application(appId, argc, argv));
const QBtCommandLineParameters params = parseCommandLine();
@@ -181,16 +176,8 @@ int main(int argc, char *argv[])
if (!qputenv("QBITTORRENT", QByteArray(VERSION)))
std::cerr << "Couldn't set environment variable...\n";
#ifndef DISABLE_GUI
if (!userAgreesWithLegalNotice())
return EXIT_SUCCESS;
#else
if (!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout))
&& !userAgreesWithLegalNotice())
return EXIT_SUCCESS;
#endif
// Check if qBittorrent is already running for this user
if (app->isRunning()) {
@@ -204,20 +191,12 @@ int main(int argc, char *argv[])
#endif
qDebug("qBittorrent is already running for this user.");
Utils::Misc::msleep(300);
misc::msleep(300);
app->sendParams(params.torrents);
return EXIT_SUCCESS;
}
#ifndef DISABLE_GUI
if (!upgrade()) return EXIT_FAILURE;
#else
if (!upgrade(!params.shouldDaemonize
&& isatty(fileno(stdin))
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
#endif
srand(time(0));
#ifdef DISABLE_GUI
if (params.shouldDaemonize) {
@@ -419,7 +398,7 @@ void displayUsage(const QString& prg_name)
#else
QMessageBox msgBox(QMessageBox::Information, QObject::tr("Help"), makeUsage(prg_name), QMessageBox::Ok);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.move(misc::screenCenter(&msgBox));
msgBox.exec();
#endif
}
@@ -431,7 +410,7 @@ void displayBadArgMessage(const QString& message)
QMessageBox msgBox(QMessageBox::Critical, QObject::tr("Bad command line"),
message + QLatin1Char('\n') + help, QMessageBox::Ok);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.move(misc::screenCenter(&msgBox));
msgBox.exec();
#else
std::cerr << qPrintable(QObject::tr("Bad command line: "));
@@ -463,7 +442,7 @@ bool userAgreesWithLegalNotice()
msgBox.addButton(QObject::tr("Cancel"), QMessageBox::RejectRole);
QAbstractButton *agree_button = msgBox.addButton(QObject::tr("I Agree"), QMessageBox::AcceptRole);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
msgBox.move(misc::screenCenter(&msgBox));
msgBox.exec();
if (msgBox.clickedButton() == agree_button) {
// Save the answer

View File

@@ -1,177 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#ifndef UPGRADE_H
#define UPGRADE_H
#include <libtorrent/lazy_entry.hpp>
#include <libtorrent/entry.hpp>
#include <libtorrent/bencode.hpp>
#include <QString>
#include <QDir>
#include <QFile>
#ifndef DISABLE_GUI
#include <QMessageBox>
#endif
#include "base/logger.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "base/qinisettings.h"
bool userAcceptsUpgrade()
{
#ifdef DISABLE_GUI
std::cout << std::endl << "*** " << qPrintable(QObject::tr("Upgrade")) << " ***" << std::endl;
char ret = '\0';
do {
std::cout << qPrintable(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. You will not be able to use an older version than v3.3.0 again. Continue? [y/n]")) << std::endl;
ret = getchar(); // Read pressed key
}
while ((ret != 'y') && (ret != 'Y') && (ret != 'n') && (ret != 'N'));
if ((ret == 'y') || (ret == 'Y'))
return true;
#else
QMessageBox msgBox;
msgBox.setText(QObject::tr("You updated from an older version that saved things differently. You must migrate to the new saving system. If you continue, you will not be able to use an older version than v3.3.0 again."));
msgBox.setWindowTitle(QObject::tr("Upgrade"));
msgBox.addButton(QMessageBox::Abort);
msgBox.addButton(QMessageBox::Ok);
msgBox.setDefaultButton(QMessageBox::Abort);
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Misc::screenCenter(&msgBox));
if (msgBox.exec() == QMessageBox::Ok)
return true;
#endif
return false;
}
bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent, int &maxPrio)
{
QFile file1(filepath);
if (!file1.open(QIODevice::ReadOnly))
return false;
QByteArray data = file1.readAll();
file1.close();
libtorrent::lazy_entry fastOld;
libtorrent::error_code ec;
libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
if ((fastOld.type() != libtorrent::lazy_entry::dict_t) && !ec) return false;
libtorrent::entry fastNew;
fastNew = fastOld;
int priority = fastOld.dict_find_int_value("qBt-queuePosition");
if (priority > maxPrio)
maxPrio = priority;
fastNew["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
fastNew["qBt-tempPathDisabled"] = false;
QFile file2(QString("%1.%2").arg(filepath).arg(priority > 0 ? priority : 0));
QVector<char> out;
libtorrent::bencode(std::back_inserter(out), fastNew);
if (file2.open(QIODevice::WriteOnly)) {
if (file2.write(&out[0], out.size()) == out.size()) {
Utils::Fs::forceRemove(filepath);
return true;
}
}
return false;
}
bool upgrade(bool ask = true)
{
QIniSettings *oldResumeSettings = new QIniSettings("qBittorrent", "qBittorrent-resume");
QString oldResumeFilename = oldResumeSettings->fileName();
QVariantHash oldResumeData = oldResumeSettings->value("torrents").toHash();
delete oldResumeSettings;
if (oldResumeData.isEmpty())
Utils::Fs::forceRemove(oldResumeFilename);
QString backupFolderPath = Utils::Fs::expandPathAbs(Utils::Fs::QDesktopServicesDataLocation() + "BT_backup");
QDir backupFolderDir(backupFolderPath);
QStringList backupFiles = backupFolderDir.entryList(QStringList() << QLatin1String("*.fastresume"), QDir::Files, QDir::Unsorted);
if (backupFiles.isEmpty() && oldResumeData.isEmpty()) return true;
if (ask && !userAcceptsUpgrade()) return false;
int maxPrio = 0;
QRegExp rx(QLatin1String("^([A-Fa-f0-9]{40})\\.fastresume$"));
foreach (QString backupFile, backupFiles) {
if (rx.indexIn(backupFile) != -1) {
if (upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile), oldResumeData[rx.cap(1)].toHash(), maxPrio))
oldResumeData.remove(rx.cap(1));
else
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent with hash: %1").arg(rx.cap(1)), Log::WARNING);
}
else {
Logger::instance()->addMessage(QObject::tr("Couldn't migrate torrent. Invalid fastresume file name: %1").arg(backupFile), Log::WARNING);
}
}
foreach (const QString &hash, oldResumeData.keys()) {
QVariantHash oldTorrent = oldResumeData[hash].toHash();
if (oldTorrent.value("is_magnet", false).toBool()) {
libtorrent::entry resumeData;
resumeData["qBt-magnetUri"] = Utils::String::toStdString(oldTorrent.value("magnet_uri").toString());
resumeData["qBt-paused"] = false;
resumeData["qBt-forced"] = false;
resumeData["qBt-savePath"] = Utils::String::toStdString(oldTorrent.value("save_path").toString());
resumeData["qBt-ratioLimit"] = Utils::String::toStdString(QString::number(oldTorrent.value("max_ratio", -2).toReal()));
resumeData["qBt-label"] = Utils::String::toStdString(oldTorrent.value("label").toString());
resumeData["qBt-name"] = Utils::String::toStdString(oldTorrent.value("name").toString());
resumeData["qBt-seedStatus"] = oldTorrent.value("seed").toBool();
resumeData["qBt-tempPathDisabled"] = false;
QString filename = QString("%1.fastresume.%2").arg(hash).arg(++maxPrio);
QString filepath = backupFolderDir.absoluteFilePath(filename);
QFile resumeFile(filepath);
QVector<char> out;
libtorrent::bencode(std::back_inserter(out), resumeData);
if (resumeFile.open(QIODevice::WriteOnly))
resumeFile.write(&out[0], out.size());
}
}
if (!oldResumeData.isEmpty())
QFile(oldResumeFilename).rename(oldResumeFilename + ".bak");
return true;
}
#endif // UPGRADE_H

View File

@@ -1,86 +0,0 @@
HEADERS += \
$$PWD/types.h \
$$PWD/tristatebool.h \
$$PWD/filesystemwatcher.h \
$$PWD/qinisettings.h \
$$PWD/logger.h \
$$PWD/preferences.h \
$$PWD/iconprovider.h \
$$PWD/http/irequesthandler.h \
$$PWD/http/connection.h \
$$PWD/http/requestparser.h \
$$PWD/http/responsegenerator.h \
$$PWD/http/server.h \
$$PWD/http/types.h \
$$PWD/http/responsebuilder.h \
$$PWD/net/dnsupdater.h \
$$PWD/net/downloadmanager.h \
$$PWD/net/downloadhandler.h \
$$PWD/net/geoipmanager.h \
$$PWD/net/portforwarder.h \
$$PWD/net/reverseresolution.h \
$$PWD/net/smtp.h \
$$PWD/net/private/geoipdatabase.h \
$$PWD/bittorrent/infohash.h \
$$PWD/bittorrent/session.h \
$$PWD/bittorrent/sessionstatus.h \
$$PWD/bittorrent/cachestatus.h \
$$PWD/bittorrent/magneturi.h \
$$PWD/bittorrent/torrentinfo.h \
$$PWD/bittorrent/torrenthandle.h \
$$PWD/bittorrent/peerinfo.h \
$$PWD/bittorrent/trackerentry.h \
$$PWD/bittorrent/tracker.h \
$$PWD/bittorrent/torrentcreatorthread.h \
$$PWD/bittorrent/private/speedmonitor.h \
$$PWD/bittorrent/private/bandwidthscheduler.h \
$$PWD/bittorrent/private/filterparserthread.h \
$$PWD/bittorrent/private/statistics.h \
$$PWD/utils/fs.h \
$$PWD/utils/gzip.h \
$$PWD/utils/misc.h \
$$PWD/utils/string.h \
$$PWD/unicodestrings.h \
$$PWD/torrentfilter.h \
$$PWD/scanfoldersmodel.h
SOURCES += \
$$PWD/tristatebool.cpp \
$$PWD/filesystemwatcher.cpp \
$$PWD/logger.cpp \
$$PWD/preferences.cpp \
$$PWD/iconprovider.cpp \
$$PWD/http/connection.cpp \
$$PWD/http/requestparser.cpp \
$$PWD/http/responsegenerator.cpp \
$$PWD/http/server.cpp \
$$PWD/http/responsebuilder.cpp \
$$PWD/net/dnsupdater.cpp \
$$PWD/net/downloadmanager.cpp \
$$PWD/net/downloadhandler.cpp \
$$PWD/net/geoipmanager.cpp \
$$PWD/net/portforwarder.cpp \
$$PWD/net/reverseresolution.cpp \
$$PWD/net/smtp.cpp \
$$PWD/net/private/geoipdatabase.cpp \
$$PWD/bittorrent/infohash.cpp \
$$PWD/bittorrent/session.cpp \
$$PWD/bittorrent/sessionstatus.cpp \
$$PWD/bittorrent/cachestatus.cpp \
$$PWD/bittorrent/magneturi.cpp \
$$PWD/bittorrent/torrentinfo.cpp \
$$PWD/bittorrent/torrenthandle.cpp \
$$PWD/bittorrent/peerinfo.cpp \
$$PWD/bittorrent/trackerentry.cpp \
$$PWD/bittorrent/tracker.cpp \
$$PWD/bittorrent/torrentcreatorthread.cpp \
$$PWD/bittorrent/private/speedmonitor.cpp \
$$PWD/bittorrent/private/bandwidthscheduler.cpp \
$$PWD/bittorrent/private/filterparserthread.cpp \
$$PWD/bittorrent/private/statistics.cpp \
$$PWD/utils/fs.cpp \
$$PWD/utils/gzip.cpp \
$$PWD/utils/misc.cpp \
$$PWD/utils/string.cpp \
$$PWD/torrentfilter.cpp \
$$PWD/scanfoldersmodel.cpp

View File

@@ -1,64 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#include "cachestatus.h"
using namespace BitTorrent;
CacheStatus::CacheStatus(const libtorrent::cache_status &nativeStatus)
: m_nativeStatus(nativeStatus)
{
}
int CacheStatus::totalUsedBuffers() const
{
return m_nativeStatus.total_used_buffers;
}
qreal CacheStatus::readRatio() const
{
if (m_nativeStatus.blocks_read > 0)
return (static_cast<qreal>(m_nativeStatus.blocks_read_hit) / m_nativeStatus.blocks_read);
else
return -1;
}
int CacheStatus::jobQueueLength() const
{
return m_nativeStatus.job_queue_length;
}
int CacheStatus::averageJobTime() const
{
return m_nativeStatus.average_job_time;
}
qlonglong CacheStatus::queuedBytes() const
{
return m_nativeStatus.queued_bytes;
}

View File

@@ -1,53 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#ifndef BITTORRENT_CACHESTATUS_H
#define BITTORRENT_CACHESTATUS_H
#include <libtorrent/disk_io_thread.hpp>
#include <QtGlobal>
namespace BitTorrent
{
class CacheStatus
{
public:
CacheStatus(const libtorrent::cache_status &nativeStatus);
int totalUsedBuffers() const;
qreal readRatio() const;
int jobQueueLength() const;
int averageJobTime() const;
qlonglong queuedBytes() const;
private:
libtorrent::cache_status m_nativeStatus;
};
}
#endif // BITTORRENT_CACHESTATUS_H

View File

@@ -1,98 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#include <QHash>
#include "infohash.h"
using namespace BitTorrent;
InfoHash::InfoHash()
: m_valid(false)
{
}
InfoHash::InfoHash(const libtorrent::sha1_hash &nativeHash)
: m_valid(true)
, m_nativeHash(nativeHash)
{
char out[(libtorrent::sha1_hash::size * 2) + 1];
libtorrent::to_hex((char const*)&m_nativeHash[0], libtorrent::sha1_hash::size, out);
m_hashString = QString(out);
}
InfoHash::InfoHash(const QString &hashString)
: m_valid(false)
, m_hashString(hashString)
{
QByteArray raw = m_hashString.toLatin1();
if (raw.size() == 40)
m_valid = libtorrent::from_hex(raw.constData(), 40, (char*)&m_nativeHash[0]);
}
InfoHash::InfoHash(const InfoHash &other)
: m_valid(other.m_valid)
, m_nativeHash(other.m_nativeHash)
, m_hashString(other.m_hashString)
{
}
bool InfoHash::isValid() const
{
return m_valid;
}
InfoHash::operator libtorrent::sha1_hash() const
{
return m_nativeHash;
}
InfoHash::operator QString() const
{
return m_hashString;
}
bool InfoHash::operator==(const InfoHash &other) const
{
return (m_nativeHash == other.m_nativeHash);
}
bool InfoHash::operator!=(const InfoHash &other) const
{
return (m_nativeHash != other.m_nativeHash);
}
uint qHash(const InfoHash &key, uint seed)
{
return qHash(static_cast<QString>(key), seed);
}

View File

@@ -1,93 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#include <libtorrent/bencode.hpp>
#include <libtorrent/error_code.hpp>
#include <libtorrent/magnet_uri.hpp>
#include "base/utils/string.h"
#include "magneturi.h"
namespace libt = libtorrent;
using namespace BitTorrent;
MagnetUri::MagnetUri(const QString &url)
: m_valid(false)
, m_url(url)
{
if (url.isEmpty()) return;
libt::error_code ec;
libt::parse_magnet_uri(url.toUtf8().constData(), m_addTorrentParams, ec);
if (ec) return;
m_valid = true;
m_hash = m_addTorrentParams.info_hash;
m_name = Utils::String::fromStdString(m_addTorrentParams.name);
foreach (const std::string &tracker, m_addTorrentParams.trackers)
m_trackers.append(Utils::String::fromStdString(tracker));
foreach (const std::string &urlSeed, m_addTorrentParams.url_seeds)
m_urlSeeds.append(QUrl(urlSeed.c_str()));
}
bool MagnetUri::isValid() const
{
return m_valid;
}
InfoHash MagnetUri::hash() const
{
return m_hash;
}
QString MagnetUri::name() const
{
return m_name;
}
QList<TrackerEntry> MagnetUri::trackers() const
{
return m_trackers;
}
QList<QUrl> MagnetUri::urlSeeds() const
{
return m_urlSeeds;
}
QString MagnetUri::url() const
{
return m_url;
}
libtorrent::add_torrent_params MagnetUri::addTorrentParams() const
{
return m_addTorrentParams;
}

View File

@@ -1,68 +0,0 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*/
#ifndef BITTORRENT_MAGNETURI_H
#define BITTORRENT_MAGNETURI_H
#include <QString>
#include <QList>
#include <QUrl>
#include <libtorrent/add_torrent_params.hpp>
#include "infohash.h"
#include "trackerentry.h"
namespace BitTorrent
{
class MagnetUri
{
public:
explicit MagnetUri(const QString &url = QString());
bool isValid() const;
InfoHash hash() const;
QString name() const;
QList<TrackerEntry> trackers() const;
QList<QUrl> urlSeeds() const;
QString url() const;
libtorrent::add_torrent_params addTorrentParams() const;
private:
bool m_valid;
QString m_url;
InfoHash m_hash;
QString m_name;
QList<TrackerEntry> m_trackers;
QList<QUrl> m_urlSeeds;
libtorrent::add_torrent_params m_addTorrentParams;
};
}
#endif // BITTORRENT_MAGNETURI_H

File diff suppressed because it is too large Load Diff

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