1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-14 11:52:15 +02:00

Compare commits

...

108 Commits

Author SHA1 Message Date
Christophe Dumez
e9da810eae Tagged v2.2.10 release 2010-06-23 08:03:05 +00:00
Christophe Dumez
9a40d7037d Set release date 2010-06-23 07:56:51 +00:00
Christophe Dumez
db29364346 Remove old code 2010-06-22 21:32:26 +00:00
Christophe Dumez
57d5a739ed Bump to v2.2.10 2010-06-22 19:26:54 +00:00
Christophe Dumez
c66df12f8c Several OS/2 fixes by Silvan Scherrer 2010-06-22 19:23:28 +00:00
Christophe Dumez
6a8f568d74 Fix "add extension to incomplete files" feature 2010-06-22 18:42:37 +00:00
Christophe Dumez
56c20b1cc4 Fix tab icon in log viewer 2010-06-22 18:16:29 +00:00
Christophe Dumez
0de843911d Improved "delete torrents once they reach a given ratio"
Fix button order in exit confirmation dialog
2010-06-22 17:50:36 +00:00
Christophe Dumez
5a58ace305 Set "Add" button as default in torrent addition dialog 2010-06-22 12:00:18 +00:00
Christophe Dumez
b8f30381c9 BUGFIX: Free disk space calculation now works if destination folder does n
ot exist
2010-06-22 11:55:18 +00:00
Christophe Dumez
1197c544aa BUGFIX: Use busy cursor for search plugin updates 2010-06-22 09:59:11 +00:00
Christophe Dumez
4faaf2b642 COSMETIC: Display "Alternative speed limits" button as pressed when enabled 2010-06-21 22:41:38 +00:00
Christophe Dumez
b9f22ef490 Updated Changelog 2010-06-21 22:10:33 +00:00
Christophe Dumez
c3e9e85d21 Use checkable actions instead of check/uncheck icons to avoid issues on systems
disabling menu icons (e.g. Recent Gnome)
2010-06-21 22:09:41 +00:00
Christophe Dumez
1f99a3817f Update language files 2010-06-21 14:22:24 +00:00
Christophe Dumez
0daa61be6c Updated Changelog 2010-06-21 14:13:31 +00:00
Christophe Dumez
9216bb850a Improved ETA display (more user friendly) 2010-06-21 14:11:47 +00:00
Christophe Dumez
2706efdb3c Another moc bug workaround 2010-06-20 17:37:00 +00:00
Christophe Dumez
7a8089fa82 Improved torrent creator tool behavior during creation process 2010-06-17 17:53:55 +00:00
Christophe Dumez
8415449ecd Updated Changelog 2010-06-17 11:52:59 +00:00
Christophe Dumez
1603faf873 Fix web UI in qBittorrent nox 2010-06-17 11:49:13 +00:00
Christophe Dumez
54f1294ef5 Fix possible compilation issue with Qt 4.7git 2010-06-17 11:08:44 +00:00
Christophe Dumez
91068ac17b Fix another unicode issue in torrent creator 2010-06-17 08:51:18 +00:00
Christophe Dumez
4169ae176f Fix font issue in search engine (closes #594200) 2010-06-14 15:44:05 +00:00
Christophe Dumez
b2beabd8df Fix registry access on 64bits windows 2010-06-14 12:52:50 +00:00
Christophe Dumez
8ec109e079 Fix crash with empty state file 2010-06-14 09:14:20 +00:00
Christophe Dumez
0c8464e0c8 Fix crash on Startup with libtorrent v0.15 2010-06-14 08:53:38 +00:00
Christophe Dumez
042cbc73ec 2010-06-14 08:15:36 +00:00
Christophe Dumez
609eb5f518 Another compilation fix on Mac 2010-06-13 16:32:34 +00:00
Christophe Dumez
3500553b15 Fix compilation on Mac 2010-06-13 16:28:36 +00:00
Christophe Dumez
ca06f9be5c Updated czech translation 2010-06-13 11:43:53 +00:00
Christophe Dumez
287ecf165b Updated Changelog 2010-06-13 11:42:08 +00:00
Christophe Dumez
fdf71c3006 Updated German translation 2010-06-13 11:40:17 +00:00
Christophe Dumez
cc6179b26f Updated Changelog 2010-06-13 09:45:34 +00:00
Christophe Dumez
7765b763f0 Fix bundle identifier 2010-06-13 09:41:14 +00:00
Christophe Dumez
84abef1184 Bump to v2.2.9 2010-06-13 09:29:54 +00:00
Christophe Dumez
0755eccf4f Fix Info.plist file 2010-06-13 09:26:30 +00:00
Christophe Dumez
425150cd01 Fix mime type 2010-06-13 09:15:08 +00:00
Christophe Dumez
55d1076573 Several language files updates 2010-06-13 08:40:26 +00:00
Christophe Dumez
6e74eb45b2 Update Serbian and Croatian translations 2010-06-12 08:21:43 +00:00
Christophe Dumez
e258a1a2d2 Updated Changelog 2010-06-10 19:57:13 +00:00
Christophe Dumez
6070fac3f5 Fix window hiding issue (closes #589070) 2010-06-10 19:42:54 +00:00
Christophe Dumez
ac3a88d3e3 Added debug output 2010-06-10 12:52:41 +00:00
Christophe Dumez
e3360713de Fix typo 2010-06-10 09:04:52 +00:00
Christophe Dumez
6cb6d2724b Mac fixes 2010-06-09 22:19:19 +00:00
Christophe Dumez
ff8354b1f6 Fix typo in plist file 2010-06-09 15:52:56 +00:00
Christophe Dumez
1a2cb6aee7 Disable systray icon on Mac 2010-06-09 15:48:20 +00:00
Christophe Dumez
25998d69a7 Fix typo 2010-06-09 15:20:14 +00:00
Christophe Dumez
3e55e8dc6e Vavious Mac related changes by Mirco Chinelli 2010-06-09 15:18:52 +00:00
Christophe Dumez
b8b2f96d76 Comment useless pri import 2010-06-09 14:47:26 +00:00
Christophe Dumez
cc609badec Fix compilation on Windows 2010-06-09 14:40:42 +00:00
Christophe Dumez
a1aa507bdb Fix race condition allowing to run multiple instances at the same time (closes #286968) 2010-06-09 10:12:15 +00:00
Christophe Dumez
779b2baa74 Fix error in project file 2010-06-09 08:52:56 +00:00
Christophe Dumez
58e0d6b11e Updated changelog 2010-06-09 07:39:38 +00:00
Christophe Dumez
1827337f90 Unified toolbar and title on Mac 2010-06-09 07:38:25 +00:00
Christophe Dumez
08044bc47d Updated spanish and catalan translations 2010-06-09 07:31:37 +00:00
Christophe Dumez
272852f25b Delete qApp on exit on Win32 2010-06-09 06:43:17 +00:00
Christophe Dumez
6575866907 Forgot to commit those files 2010-06-08 22:33:53 +00:00
Christophe Dumez
816b61da76 Updated Arabic translation 2010-06-08 20:24:45 +00:00
Christophe Dumez
d0a6366b35 Updated Hungarian and Finnish translations 2010-06-08 18:29:37 +00:00
Christophe Dumez
d4753b2624 Fix encoding in peer list 2010-06-08 17:30:15 +00:00
Christophe Dumez
323fd791c5 Better Mac integration 2010-06-08 15:23:11 +00:00
Christophe Dumez
56e45a11a8 Updated swedish translation 2010-06-08 15:05:28 +00:00
Christophe Dumez
f04d912fb6 Updated Ukrainian translation 2010-06-08 14:47:57 +00:00
Christophe Dumez
2985f85f82 Updated Slovak translation 2010-06-08 11:40:52 +00:00
Christophe Dumez
49c0e9423e Updated language files 2010-06-08 10:05:32 +00:00
Christophe Dumez
15a4abff5b Update to Mootools v1.2.4 (Web UI)
Fix Web UI javascript error in Internet Explorer
Fix another encoding problem in Web UI
2010-06-07 13:34:12 +00:00
Christophe Dumez
bd51ffd7ca Fix msvc compilation warnings 2010-06-07 09:50:14 +00:00
Christophe Dumez
1288c7092b Use libtorrent version.hpp instead of our own DEFINE 2010-06-07 08:47:56 +00:00
Christophe Dumez
9650b268b2 BUGFIX: Fix Web UI authentication with Opera Browser 2010-06-06 20:51:43 +00:00
Christophe Dumez
30c4c62d2e Fix encoding problem in search engine 2010-06-06 15:39:58 +00:00
Christophe Dumez
8b6a5d985f Updated language files 2010-06-06 15:36:14 +00:00
Christophe Dumez
0bd1410b95 Fix file encoding problem 2010-06-06 15:33:23 +00:00
Christophe Dumez
f1451dafee Fix another unicode problem 2010-06-06 13:55:47 +00:00
Christophe Dumez
74f16c8e76 Fix several remaining unicode issues 2010-06-06 13:23:39 +00:00
Christophe Dumez
1b954f157f Fix variable name conflict 2010-06-06 10:10:14 +00:00
Christophe Dumez
e8931c5747 Fix compilation and execution with msvc 2010-06-06 09:55:02 +00:00
Christophe Dumez
31165675b8 Fixes to last commit 2010-06-05 19:17:49 +00:00
Christophe Dumez
4001ed304e Several msvc 9.0 related fixes 2010-06-05 13:33:25 +00:00
Christophe Dumez
e8b3016771 Fix some other unicode issues 2010-06-04 16:41:47 +00:00
Christophe Dumez
e3e9461901 Display paths with '\' separator on Win32 2010-06-03 20:56:54 +00:00
Christophe Dumez
45c068f0f7 Updated Changelog 2010-06-03 19:47:34 +00:00
Christophe Dumez
4b2d09a07b Fix a lot of String encoding issues on non-unicode systems
Renaming a folder causes the old folder to be removed
Fix some path separator issues on Win32
Fix file/folder opening in file browser on Win32
2010-06-03 19:41:32 +00:00
Christophe Dumez
2d57d9d32c Fix default save path on Windows 2010-06-02 22:33:20 +00:00
Christophe Dumez
4a01d01cba Fix issue with torrentdownloads.net Website 2010-06-02 22:31:44 +00:00
Christophe Dumez
98cc53e287 Improved column visibility patch 2010-06-02 13:52:03 +00:00
Christophe Dumez
5ad0bf1d34 Search requests can now be cancelled on Win32 2010-06-02 13:38:09 +00:00
Christophe Dumez
35a9d30143 Fix minimize to tray feature on Win32 2010-06-02 09:16:31 +00:00
Christophe Dumez
6bc0aebe0d Remember if the window was maximized on exit 2010-06-02 08:28:33 +00:00
Christophe Dumez
c099af380a Fix column null width when toggling column visibility (Win32) 2010-06-02 08:13:33 +00:00
Christophe Dumez
59651545ae Better Python detection using windows registry (Win32)
Propose to install python if missing (Win32)
2010-06-01 22:36:34 +00:00
Christophe Dumez
8469570f80 BUGFIX: Disable torrent addition dialog as a default 2010-06-01 16:32:50 +00:00
Christophe Dumez
d513b7d0d8 Changed Window title on Mac and Windows 2010-06-01 16:13:51 +00:00
Christophe Dumez
13e06b3444 Fix encoding in Web UI on non-unicode systems 2010-06-01 14:31:28 +00:00
Christophe Dumez
d6206d91eb Link dynamically against OpenSSL 2010-06-01 13:53:06 +00:00
Christophe Dumez
cae8a3173d Fix torrent availability computation (closes #587337) 2010-05-31 14:26:56 +00:00
Christophe Dumez
48e6b46967 Only check for file association once (Win32)
Magnet link association (Win32)
2010-05-31 12:25:58 +00:00
Christophe Dumez
9c1bc13d6f Updated language files 2010-05-30 21:50:59 +00:00
Christophe Dumez
c15a890952 Check for file association on startup and ask the user if he wants to (Win32 only)
Added an executable icon on Win32
2010-05-30 21:34:15 +00:00
Christophe Dumez
12b4ee72fa Updated language files 2010-05-30 18:36:11 +00:00
Christophe Dumez
e5290e61ca Updated Changelog 2010-05-30 17:54:04 +00:00
Christophe Dumez
08cbe38f96 Updated AUTHORS 2010-05-30 17:50:55 +00:00
Christophe Dumez
47e337dc5d Fix torrent download on win32 (all seems functional now). 2010-05-30 17:23:41 +00:00
Christophe Dumez
cfc4e7c8f6 Fix Geoip database embedding
Fix Geoip path issue on Win32
2010-05-30 15:19:40 +00:00
Christophe Dumez
4eb8be372e Detect Python interpreter on Windows (the search engine is now working!) 2010-05-30 14:46:47 +00:00
Christophe Dumez
11f79432b5 Windows execution fixes (it runs now!) 2010-05-30 11:36:56 +00:00
Christophe Dumez
ec15e8247d Windows compilation Fix 2010-05-28 20:39:41 +00:00
Christophe Dumez
6b4588ef6d Mac compilation Fix 2010-05-25 18:20:53 +00:00
141 changed files with 12677 additions and 8929 deletions

View File

@@ -3,12 +3,19 @@ Author:
Contributors:
* Stefanos Antaris <santaris@csd.auth.gr>
* Mohammad Dib <mdib@qbittorrent.org>
* Mirco Chinelli <infinity89@fastwebmail.it>
* Ishan Arora <ishan@qbittorrent.org>
* Arnaud Demaizière <arnaud@qbittorrent.org>
* Grigis Gaëtan <cipher16@gmail.com>
* Christian Kandeler <zambesi@users.sourceforge.net>
* Silvan Scherrer <silvan.scherrer@aroa.ch>
Code from other projects:
* files src/qtsingleapp/*
copyright: Nokia Corporation
license: LGPL
* files src/ico.cpp src/ico.h
copyright: Malte Starostik <malte@kde.org>
license: LGPL

View File

@@ -1,3 +1,26 @@
* Wed Jun 23 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.10
- BUGFIX: Fix Web UI in qBittorrent nox version
- BUGFIX: Improved ETA display (more user friendly)
- BUGFIX: Fix possible compilation errors with libtorrent v0.15
- BUGFIX: Fix minor issues in torrent creation tool
- BUGFIX: Use checkable actions to avoid issues on systems hiding menu icons (e.g. recent Gnome)
- BUGFIX: Use busy cursor for search plugin updates
- BUGFIX: Free disk space calculation now works if destination folder does not exist
- BUGFIX: Fix "append .!qB extension to incomplete files" feature
- BUGFIX: Several OS/2 fixes by Silvan Scherrer
- COSMETIC: Display "Alternative speed limits" button as pressed when enabled
* Sun Jun 13 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.9
- FEATURE: Official support for Win32 platform
- FEATURE: Better integration with Mac OS
- BUGFIX: Fix torrent availability computation (closes #587337)
- BUGFIX: Disable torrent addition dialog as a default
- BUGFIX: Fix Web UI authentication with Opera Browser
- BUGFIX: Fix Javascript error in Web UI when using IE
- BUGFIX: Fix a lot of encoding problems on non UTF-8 systems
- BUGFIX: Fix race condition allowing to run multiple instances (closes #286968)
- BUGFIX: Fix window hiding problem when having a modal window (closes #589070)
* Mon May 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.8
- BUGFIX: ETA for finished torrent is now 0 instead of Infinite (closes #583704)
- BUGFIX: Fix sorting of ETA column when having infinite values (closes #583347)

15
configure vendored
View File

@@ -355,27 +355,12 @@ public:
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString adv_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
return false;
for(int n = 0; n < incs.count(); ++n)
conf->addIncludePath(incs[n]);
//if(!libs.isEmpty())
// conf->addLib(libs);
if(conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other)) {
//printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
//else
conf->addDefine("LIBTORRENT_0_15");
}
// Get linking parameters
//QStringList params;
//QByteArray staticlibs;
//params << "--static" << "--libs" << "libtorrent-rasterbar";
//conf->doCommand("pkg-config", params, &staticlibs);
//conf->addLib(staticlibs.trimmed());
//libcrypto
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addLib("-lcrypto");
}

View File

@@ -13,27 +13,12 @@ public:
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString adv_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
return false;
for(int n = 0; n < incs.count(); ++n)
conf->addIncludePath(incs[n]);
//if(!libs.isEmpty())
// conf->addLib(libs);
if(conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other)) {
//printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
//else
conf->addDefine("LIBTORRENT_0_15");
}
// Get linking parameters
//QStringList params;
//QByteArray staticlibs;
//params << "--static" << "--libs" << "libtorrent-rasterbar";
//conf->doCommand("pkg-config", params, &staticlibs);
//conf->addLib(staticlibs.trimmed());
//libcrypto
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
conf->addLib("-lcrypto");
}

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,6 @@ class Bittorrent;
class QTimer;
class downloadFromURL;
class SearchEngine;
class QLocalServer;
class QCloseEvent;
class RSSImp;
class QShortcut;
@@ -70,6 +69,7 @@ public:
// Methods
int getCurrentTabIndex() const;
TransferListWidget* getTransferList() const { return transferList; }
QMenu* getTrayIconMenu();
public slots:
void trackerAuthenticationRequired(QTorrentHandle& h);
@@ -88,8 +88,6 @@ protected slots:
void on_actionWebsite_triggered() const;
void on_actionBugReport_triggered() const;
void on_actionShow_console_triggered();
void readParamsOnSocket();
void acceptConnection();
void balloonClicked();
void writeSettings();
void readSettings();
@@ -111,6 +109,7 @@ protected slots:
void on_actionOpen_triggered();
void updateGUI();
void loadPreferences(bool configure_session=true);
void processParams(const QString& params);
void processParams(const QStringList& params);
void addTorrent(QString path);
void addUnauthenticatedTracker(const QPair<QTorrentHandle,QString> &tracker);
@@ -144,7 +143,7 @@ private:
QPointer<downloadFromURL> downloadFromURLDialog;
QPointer<QSystemTrayIcon> systrayIcon;
QPointer<QTimer> systrayCreator;
QMenu *myTrayIconMenu;
QPointer<QMenu> myTrayIconMenu;
TransferListWidget *transferList;
TransferListFiltersWidget *transferListFilters;
PropertiesWidget *properties;
@@ -164,8 +163,6 @@ private:
SearchEngine *searchEngine;
// RSS
QPointer<RSSImp> rssWidget;
// Misc
QLocalServer *localServer;
};
#endif

View File

@@ -1,6 +1,6 @@
[Desktop Entry]
Categories=Qt;Network;P2P;
Comment=V2.2.8
Comment=V2.2.10
Exec=qbittorrent %f
GenericName=Bittorrent client
GenericName[ar]=العميل Bittorrent

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 80 KiB

60
src/Info.plist Normal file
View File

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>torrent</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>qbittorrentDocument</string>
<key>CFBundleTypeName</key>
<string>BitTorrent Document</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>application/x-bittorrent</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
<key>LSHandlerRank</key>
<string>Owner</string>
<key>LSItemContentTypes</key>
<array>
<string>org.bittorrent.torrent</string>
</array>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>magnet</string>
</array>
<key>CFBundleURLName</key>
<string>BitTorrent Magnet URL</string>
</dict>
</array>
<key>CFBundleIconFile</key>
<string>qbittorrent_mac.icns</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleGetInfoString</key>
<string>2.2.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleExecutable</key>
<string>qbittorrent</string>
<key>CFBundleIdentifier</key>
<string>org.qbittorrent</string>
<key>NOTE</key>
<string>This file was generated by Qt/QMake.</string>
</dict>
</plist>

View File

@@ -54,8 +54,8 @@ class about : public QDialog, private Ui::AboutDlg{
te_thanks->append(QString::fromUtf8("<a name='top'></a>"));
te_thanks->append(QString::fromUtf8("<ul><li>I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.</li>"));
te_thanks->append(QString::fromUtf8("<li>I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated</li>"));
te_thanks->append(QString::fromUtf8("<li>I also want to thank Jeffery Fernandez (jeffery@qbittorrent.org), project consultant, for his help and support since the beginning of this project.</li>"));
te_thanks->append(QString::fromUtf8("<li>I am grateful to Peter Koeleman (peter@qbittorrent.org) for working on qBittorrent port to Windows.</li>"));
te_thanks->append(QString::fromUtf8("<li>I also want to thank Στέφανος Αντάρης (santaris@csd.auth.gr) and Mirco Chinelli (infinity89@fastwebmail.it) for working on Mac OS X packaging.</li>"));
te_thanks->append(QString::fromUtf8("<li>I am grateful to Peter Koeleman (peter@qbittorrent.org) and Mohammad Dib (mdib@qbittorrent.org) for working on qBittorrent port to Windows.</li>"));
te_thanks->append(QString::fromUtf8("<li>Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.</li></ul><br><br>"));
te_thanks->scrollToAnchor(QString::fromUtf8("top"));
// Translation

View File

@@ -5,6 +5,7 @@
#include <QHeaderView>
#include <QSpinBox>
#include <QCheckBox>
#include <libtorrent/version.hpp>
#include "preferences.h"
enum AdvSettingsCols {PROPERTY, VALUE};

File diff suppressed because it is too large Load Diff

View File

@@ -43,6 +43,7 @@
#include <QPointer>
#include <QTimer>
#include <libtorrent/version.hpp>
#include <libtorrent/session.hpp>
#include <libtorrent/ip_filter.hpp>
#include "qtorrenthandle.h"
@@ -63,7 +64,7 @@ public:
QString name_or_url;
QString last_message;
unsigned long num_peers;
#ifndef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR < 15
bool verified;
uint fail_count;
#endif
@@ -74,13 +75,13 @@ public:
Q_ASSERT(!name_or_url.isEmpty());
last_message = b.last_message;
num_peers = b.num_peers;
#ifndef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR < 15
verified = b.verified;
fail_count = b.fail_count;
#endif
}
TrackerInfos(QString name_or_url): name_or_url(name_or_url), last_message(""), num_peers(0) {
#ifndef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR < 15
fail_count = 0;
verified = false;
#endif
@@ -117,6 +118,9 @@ public:
bool useTemporaryFolder() const;
QString getDefaultSavePath() const;
ScanFoldersModel* getScanFoldersModel() const;
#if LIBTORRENT_VERSION_MINOR < 15
void saveDHTEntry();
#endif
public slots:
QTorrentHandle addTorrent(QString path, bool fromScanDir = false, QString from_url = QString(), bool resumed = false);
@@ -135,9 +139,6 @@ public slots:
void resumeTorrent(QString hash);
void resumeAllTorrents();
/* End Web UI */
#ifndef LIBTORRENT_0_15
void saveDHTEntry();
#endif
void preAllocateAllFiles(bool b);
void saveFastResumeData();
void enableIPFilter(QString filter);
@@ -163,7 +164,7 @@ public slots:
void setAppendLabelToSavePath(bool append);
void appendLabelToTorrentSavePath(QTorrentHandle h);
void changeLabelInTorrentSavePath(QTorrentHandle h, QString old_label, QString new_label);
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
void appendqBextensionToTorrent(QTorrentHandle h, bool append);
void setAppendqBExtension(bool append);
#endif
@@ -249,7 +250,7 @@ private:
bool queueingEnabled;
bool appendLabelToSavePath;
bool torrentExport;
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
bool appendqBExtension;
#endif
QString defaultSavePath;

View File

@@ -37,6 +37,7 @@
#include <boost/filesystem/fstream.hpp>
#include <boost/bind.hpp>
#include <libtorrent/version.hpp>
#include <libtorrent/entry.hpp>
#include <libtorrent/bencode.hpp>
#include <libtorrent/torrent_info.hpp>
@@ -67,7 +68,7 @@ createtorrent::createtorrent(QWidget *parent): QDialog(parent){
setAttribute(Qt::WA_DeleteOnClose);
setModal(true);
creatorThread = new torrentCreatorThread(this);
connect(creatorThread, SIGNAL(creationSuccess(QString, const char*)), this, SLOT(handleCreationSuccess(QString, const char*)));
connect(creatorThread, SIGNAL(creationSuccess(QString, QString)), this, SLOT(handleCreationSuccess(QString, QString)));
connect(creatorThread, SIGNAL(creationFailure(QString)), this, SLOT(handleCreationFailure(QString)));
connect(creatorThread, SIGNAL(updateProgress(int)), this, SLOT(updateProgressBar(int)));
path::default_name_check(no_check);
@@ -80,14 +81,22 @@ createtorrent::~createtorrent() {
void createtorrent::on_addFolder_button_clicked(){
QString dir = QFileDialog::getExistingDirectory(this, tr("Select a folder to add to the torrent"), QDir::homePath(), QFileDialog::ShowDirsOnly);
if(!dir.isEmpty())
if(!dir.isEmpty()) {
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
dir = dir.replace("/", "\\");
#endif
textInputPath->setText(dir);
}
}
void createtorrent::on_addFile_button_clicked(){
QString file = QFileDialog::getOpenFileName(this, tr("Select a file to add to the torrent"), QDir::homePath());
if(!file.isEmpty())
if(!file.isEmpty()) {
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
file = file.replace("/", "\\");
#endif
textInputPath->setText(file);
}
}
void createtorrent::on_removeTracker_button_clicked() {
@@ -179,28 +188,41 @@ void createtorrent::on_createButton_clicked(){
} else {
return;
}
// Disable dialog
setEnabled(false);
// Set busy cursor
setCursor(QCursor(Qt::WaitCursor));
// Actually create the torrent
QStringList url_seeds = allItems(URLSeeds_list);
QString comment = txt_comment->toPlainText();
creatorThread->create(input, destination, trackers, url_seeds, comment, check_private->isChecked(), getPieceSize());
}
void createtorrent::handleCreationFailure(QString msg) {
// Enable dialog
setEnabled(true);
// Remove busy cursor
setCursor(QCursor(Qt::ArrowCursor));
QMessageBox::information(0, tr("Torrent creation"), tr("Torrent creation was unsuccessful, reason: %1").arg(msg));
}
void createtorrent::handleCreationSuccess(QString path, const char* branch_path) {
void createtorrent::handleCreationSuccess(QString path, QString branch_path) {
// Enable Dialog
setEnabled(true);
// Remove busy cursor
setCursor(QCursor(Qt::ArrowCursor));
if(checkStartSeeding->isChecked()) {
// Create save path temp data
boost::intrusive_ptr<torrent_info> t;
try {
t = new torrent_info(path.toLocal8Bit().data());
t = new torrent_info(path.toUtf8().data());
} catch(std::exception&) {
QMessageBox::critical(0, tr("Torrent creation"), tr("Created torrent file is invalid. It won't be added to download list."));
return;
}
QString hash = misc::toQString(t->info_hash());
TorrentTempData::setSavePath(hash, QString::fromLocal8Bit(branch_path));
#ifdef LIBTORRENT_0_15
TorrentTempData::setSavePath(hash, branch_path);
#if LIBTORRENT_VERSION_MINOR > 14
// Enable seeding mode (do not recheck the files)
TorrentTempData::setSeedingMode(hash, true);
#endif
@@ -210,6 +232,18 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
close();
}
void createtorrent::on_cancelButton_clicked() {
// End torrent creation thread
if(creatorThread->isRunning()) {
creatorThread->abortCreation();
creatorThread->terminate();
// Wait for termination
creatorThread->wait();
}
// Close the dialog
reject();
}
void createtorrent::updateProgressBar(int progress) {
progressBar->setValue(progress);
}
@@ -264,7 +298,7 @@ void torrentCreatorThread::run() {
// Set qBittorrent as creator and add user comment to
// torrent_info structure
t.set_creator(creator_str);
t.set_comment((const char*)comment.toLocal8Bit());
t.set_comment((const char*)comment.toUtf8());
// Is private ?
t.set_priv(is_private);
if(abort) return;
@@ -272,7 +306,7 @@ void torrentCreatorThread::run() {
ofstream out(complete(path((const char*)save_path.toLocal8Bit())), std::ios_base::binary);
bencode(std::ostream_iterator<char>(out), t.generate());
emit updateProgress(100);
emit creationSuccess(save_path, full_path.branch_path().string().c_str());
emit creationSuccess(save_path, QString::fromUtf8(full_path.branch_path().string().c_str()));
}
catch (std::exception& e){
emit creationFailure(QString::fromUtf8(e.what()));

View File

@@ -58,13 +58,14 @@ class torrentCreatorThread : public QThread {
}
void create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size);
void sendProgressSignal(int progress);
void abortCreation() { abort = true; }
protected:
void run();
signals:
void creationFailure(QString msg);
void creationSuccess(QString path, const char* branch_path);
void creationSuccess(QString path, QString branch_path);
signals:
void updateProgress(int progress);
@@ -87,6 +88,7 @@ class createtorrent : public QDialog, private Ui::createTorrentDialog{
public slots:
void updateProgressBar(int progress);
void on_cancelButton_clicked();
protected slots:
void on_createButton_clicked();
@@ -97,7 +99,7 @@ class createtorrent : public QDialog, private Ui::createTorrentDialog{
void on_addURLSeed_button_clicked();
void on_removeURLSeed_button_clicked();
void handleCreationFailure(QString msg);
void handleCreationSuccess(QString path, const char* branch_path);
void handleCreationSuccess(QString path, QString branch_path);
};
#endif

View File

@@ -73,24 +73,27 @@ void downloadThread::processDlFinished(QNetworkReply* reply) {
}
// Success
QString filePath;
QTemporaryFile tmpfile;
tmpfile.setAutoRemove(false);
if (tmpfile.open()) {
filePath = tmpfile.fileName();
QTemporaryFile *tmpfile = new QTemporaryFile;
tmpfile->setAutoRemove(false);
if (tmpfile->open()) {
filePath = tmpfile->fileName();
qDebug("Temporary filename is: %s", qPrintable(filePath));
if(reply->open(QIODevice::ReadOnly)) {
// TODO: Support GZIP compression
tmpfile.write(reply->readAll());
tmpfile->write(reply->readAll());
reply->close();
tmpfile.close();
tmpfile->close();
delete tmpfile;
// Send finished signal
emit downloadFinished(url, filePath);
} else {
// Error when reading the request
tmpfile.close();
tmpfile->close();
delete tmpfile;
emit downloadFailure(url, tr("I/O Error"));
}
} else {
delete tmpfile;
emit downloadFailure(url, tr("I/O Error"));
}
}

View File

@@ -84,6 +84,7 @@ void engineSelectDlg::dropEvent(QDropEvent *event) {
qDebug("dropped %s", qPrintable(file));
file = file.replace("file://", "");
if(file.startsWith("http://", Qt::CaseInsensitive) || file.startsWith("https://", Qt::CaseInsensitive) || file.startsWith("ftp://", Qt::CaseInsensitive)) {
setCursor(QCursor(Qt::WaitCursor));
downloader->downloadUrl(file);
continue;
}
@@ -108,6 +109,7 @@ void engineSelectDlg::dragEnterEvent(QDragEnterEvent *event) {
void engineSelectDlg::on_updateButton_clicked() {
// Download version file from update server on sourceforge
setCursor(QCursor(Qt::WaitCursor));
downloader->downloadUrl(QString(UPDATE_URL)+"versions.txt");
}
@@ -125,18 +127,17 @@ void engineSelectDlg::toggleEngineState(QTreeWidgetItem *item, int) {
void engineSelectDlg::displayContextMenu(const QPoint&) {
QMenu myContextMenu(this);
QModelIndex index;
// Enable/disable pause/start action given the DL state
QList<QTreeWidgetItem *> items = pluginsTree->selectedItems();
bool has_enable = false, has_disable = false;
QTreeWidgetItem *item;
foreach(item, items) {
QString id = item->text(ENGINE_ID);
if(supported_engines->value(id)->isEnabled() and !has_disable) {
if(supported_engines->value(id)->isEnabled() && !has_disable) {
myContextMenu.addAction(actionDisable);
has_disable = true;
}
if(!supported_engines->value(id)->isEnabled() and !has_enable) {
if(!supported_engines->value(id)->isEnabled() && !has_enable) {
myContextMenu.addAction(actionEnable);
has_enable = true;
}
@@ -350,8 +351,10 @@ void engineSelectDlg::askForPluginUrl() {
QString url = QInputDialog::getText(this, tr("New search engine plugin URL"),
tr("URL:"), QLineEdit::Normal,
"http://", &ok);
if (ok && !url.isEmpty())
if (ok && !url.isEmpty()) {
setCursor(QCursor(Qt::WaitCursor));
downloader->downloadUrl(url);
}
}
void engineSelectDlg::askForLocalPlugin() {
@@ -396,6 +399,7 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file) {
if(isUpdateNeeded(plugin_name, version)) {
qDebug("Plugin: %s is outdated", qPrintable(plugin_name));
// Downloading update
setCursor(QCursor(Qt::WaitCursor));
downloader->downloadUrl(UPDATE_URL+plugin_name+".py");
//downloader->downloadUrl(UPDATE_URL+plugin_name+".png");
updated = true;
@@ -414,6 +418,7 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file) {
}
void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
setCursor(QCursor(Qt::ArrowCursor));
qDebug("engineSelectDlg received %s", qPrintable(url));
if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){
// Icon downloaded
@@ -455,6 +460,7 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
}
void engineSelectDlg::handleDownloadFailure(QString url, QString reason) {
setCursor(QCursor(Qt::ArrowCursor));
if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){
qDebug("Could not download favicon: %s, reason: %s", qPrintable(url), qPrintable(reason));
return;

View File

@@ -29,6 +29,7 @@
*/
#include <libtorrent/version.hpp>
#include "eventmanager.h"
#include "bittorrent.h"
#include "scannedfoldersmodel.h"
@@ -60,7 +61,7 @@ QList<QVariantMap> EventManager::getPropTrackersInfo(QString hash) const {
tracker["url"] = tracker_url;
TrackerInfos data = trackers_data.value(tracker_url, TrackerInfos(tracker_url));
QString error_message = data.last_message.trimmed();
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
if(it->verified) {
tracker["status"] = tr("Working");
} else {
@@ -104,7 +105,7 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
int i=0;
for(fi=t.begin_files(); fi != t.end_files(); fi++) {
QVariantMap file;
QString path = QDir::cleanPath(misc::toQString(fi->path.string()));
QString path = QDir::cleanPath(misc::toQStringU(fi->path.string()));
QString name = path.split('/').last();
file["name"] = name;
file["size"] = misc::friendlyUnit((double)fi->size);
@@ -131,7 +132,11 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
if(m.contains("temp_path"))
Preferences::setTempPath(m["temp_path"].toString());
if(m.contains("scan_dirs") && m.contains("download_in_scan_dirs")) {
QVariantList download_at_path = m["download_in_scan_dirs"].toList();
QVariantList download_at_path_tmp = m["download_in_scan_dirs"].toList();
QList<bool> download_at_path;
foreach(QVariant var, download_at_path_tmp) {
download_at_path << var.toBool();
}
QStringList old_folders = Preferences::getScanDirs();
QStringList new_folders = m["scan_dirs"].toStringList();
if(download_at_path.size() == new_folders.size()) {
@@ -147,7 +152,7 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
foreach(const QString &new_folder, new_folders) {
// Update new folders
if(!old_folders.contains(new_folder)) {
BTSession->getScanFoldersModel()->addPath(new_folder, download_at_path.at(i).toBool());
BTSession->getScanFoldersModel()->addPath(new_folder, download_at_path.at(i));
}
++i;
}
@@ -165,7 +170,7 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
Preferences::setMaxActiveTorrents(m["max_active_torrents"].toInt());
if(m.contains("max_active_uploads"))
Preferences::setMaxActiveUploads(m["max_active_uploads"].toInt());
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
if(m.contains("incomplete_files_ext"))
Preferences::useIncompleteFilesExtension(m["incomplete_files_ext"].toBool());
#endif
@@ -256,7 +261,11 @@ QVariantMap EventManager::getGlobalPreferences() const {
data["temp_path_enabled"] = Preferences::isTempPathEnabled();
data["temp_path"] = Preferences::getTempPath();
data["scan_dirs"] = Preferences::getScanDirs();
data["download_in_scan_dirs"] = Preferences::getDownloadInScanDirs();
QVariantList var_list;
foreach(bool b, Preferences::getDownloadInScanDirs()) {
var_list << b;
}
data["download_in_scan_dirs"] = var_list;
data["export_dir_enabled"] = Preferences::isTorrentExportEnabled();
data["export_dir"] = Preferences::getExportDir();
data["preallocate_all"] = Preferences::preAllocateAllFiles();
@@ -264,7 +273,7 @@ QVariantMap EventManager::getGlobalPreferences() const {
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();
data["max_active_torrents"] = Preferences::getMaxActiveTorrents();
data["max_active_uploads"] = Preferences::getMaxActiveUploads();
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
data["incomplete_files_ext"] = Preferences::useIncompleteFilesExtension();
#endif
// Connection

View File

@@ -297,7 +297,7 @@ protected slots:
default_path = QDir::homePath();
}
QString dir = QFileDialog::getExistingDirectory(this, tr("Choose save path"), QDir::homePath());
if(!dir.isNull() and QDir(dir).exists()) {
if(!dir.isNull() && QDir(dir).exists()) {
savepath_line->setText(dir);
}
}

View File

@@ -68,13 +68,19 @@ protected:
// Create geoip folder is necessary
QDir gfolder(geoipFolder(false));
if(!gfolder.exists()) {
if(!gfolder.mkpath(geoipFolder(false))) return;
if(!gfolder.mkpath(geoipFolder(false))) {
std::cerr << "Failed to create geoip folder at " << qPrintable(geoipFolder(false)) << std::endl;
return;
}
}
// Remove destination files
if(QFile::exists(geoipDBpath(false)))
QFile::remove(geoipDBpath(false));
// Copy from executable to hard disk
QFile::copy(geoipDBpath(true), geoipDBpath(false));
qDebug("%s -> %s", qPrintable(geoipDBpath(true)), qPrintable(geoipDBpath(false)));
if(!QFile::copy(geoipDBpath(true), geoipDBpath(false))) {
std::cerr << "ERROR: Failed to copy geoip.dat from executable to hard disk" << std::endl;
}
qDebug("Local Geoip database was updated");
}
}

View File

@@ -1,5 +1,5 @@
<RCC>
<qresource prefix="/" >
<file>geoip/GeoIP.dat</file>
</qresource>
</RCC>
<RCC>
<qresource>
<file>geoip/GeoIP.dat</file>
</qresource>
</RCC>

View File

@@ -33,12 +33,10 @@
#include <QObject>
#include <QCoreApplication>
#include <QLocalServer>
#include <QLocalSocket>
#include "preferences.h"
#include "bittorrent.h"
class HeadlessLoader: QObject {
class HeadlessLoader: public QObject {
Q_OBJECT
public:
@@ -52,20 +50,6 @@ public:
BTSession->startUpTorrents();
// Process command line parameters
processParams(torrentCmdLine);
// Use a tcp server to allow only one instance of qBittorrent
localServer = new QLocalServer();
const QString &uid = QString::number(getuid());
#ifdef Q_WS_X11
if(QFile::exists(QDir::tempPath()+QDir::separator()+QString("qBittorrent-")+uid)) {
// Socket was not closed cleanly
std::cerr << "Warning: Local domain socket was not closed cleanly, deleting file..." << std::endl;
QFile::remove(QDir::tempPath()+QDir::separator()+QString("qBittorrent-")+uid);
}
#endif
if (!localServer->listen("qBittorrent-"+uid)) {
std::cerr << "Couldn't create socket, single instance mode won't work..." << std::endl;
}
connect(localServer, SIGNAL(newConnection()), this, SLOT(acceptConnection()));
// Display some information to the user
std::cout << std::endl << "******** " << qPrintable(tr("Information")) << " ********" << std::endl;
std::cout << qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(Preferences::getWebUiPort()))) << std::endl;
@@ -77,7 +61,6 @@ public:
}
~HeadlessLoader() {
delete localServer;
delete BTSession;
}
@@ -92,6 +75,10 @@ public slots:
std::cout << qPrintable(msg) << std::endl;
}
void processParams(const QString& params_str) {
processParams(params_str.split(" ", QString::SkipEmptyParts));
}
// As program parameters, we can get paths or urls.
// This function parse the parameters and call
// the right addTorrent function, considering
@@ -99,7 +86,6 @@ public slots:
void processParams(const QStringList& params) {
foreach(QString param, params) {
param = param.trimmed();
if(param.startsWith("--")) continue;
if(param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
BTSession->downloadFromUrl(param);
}else{
@@ -112,26 +98,7 @@ public slots:
}
}
void acceptConnection() {
QLocalSocket *clientConnection = localServer->nextPendingConnection();
connect(clientConnection, SIGNAL(disconnected()), this, SLOT(readParamsOnSocket()));
qDebug("accepted connection from another instance");
}
void readParamsOnSocket() {
QLocalSocket *clientConnection = static_cast<QLocalSocket*>(sender());
if(clientConnection) {
const QByteArray &params = clientConnection->readAll();
if(!params.isEmpty()) {
processParams(QString(params).split("\n"));
qDebug("Received parameters from another instance");
}
clientConnection->deleteLater();
}
}
private:
QLocalServer *localServer;
Bittorrent *BTSession;
};

View File

@@ -155,7 +155,7 @@ void HttpConnection::respond() {
qDebug("client IP: %s (%d failed attempts)", qPrintable(peer_ip), nb_fail+1);
// Return unauthorized header
generator.setStatusLine(401, "Unauthorized");
generator.setValue("WWW-Authenticate", "Digest realm=\""+QString(QBT_REALM)+"\", nonce=\""+parent->generateNonce()+"\", algorithm=\"MD5\", qop=\"auth\"");
generator.setValue("WWW-Authenticate", "Digest realm=\""+QString(QBT_REALM)+"\", nonce=\""+parent->generateNonce()+"\", opaque=\""+parent->generateNonce()+"\", stale=\"false\", algorithm=\"MD5\", qop=\"auth\"");
write();
return;
}
@@ -237,6 +237,7 @@ void HttpConnection::respond() {
QFile file(url);
if(!file.open(QIODevice::ReadOnly))
{
qDebug("File %s was not found!", qPrintable(url));
respondNotFound();
return;
}

View File

@@ -39,7 +39,8 @@ void HttpResponseGenerator::setMessage(const QByteArray message)
void HttpResponseGenerator::setMessage(const QString message)
{
setMessage(message.QString::toLocal8Bit());
// This must be UTF-8!
setMessage(message.toUtf8());
}
void HttpResponseGenerator::stripMessage()

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

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