You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
123 Commits
release-2.
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
14fc4912e3 | ||
![]() |
ca06f9be5c | ||
![]() |
287ecf165b | ||
![]() |
fdf71c3006 | ||
![]() |
cc6179b26f | ||
![]() |
7765b763f0 | ||
![]() |
84abef1184 | ||
![]() |
0755eccf4f | ||
![]() |
425150cd01 | ||
![]() |
55d1076573 | ||
![]() |
6e74eb45b2 | ||
![]() |
e258a1a2d2 | ||
![]() |
6070fac3f5 | ||
![]() |
ac3a88d3e3 | ||
![]() |
e3360713de | ||
![]() |
6cb6d2724b | ||
![]() |
ff8354b1f6 | ||
![]() |
1a2cb6aee7 | ||
![]() |
25998d69a7 | ||
![]() |
3e55e8dc6e | ||
![]() |
b8b2f96d76 | ||
![]() |
cc609badec | ||
![]() |
a1aa507bdb | ||
![]() |
779b2baa74 | ||
![]() |
58e0d6b11e | ||
![]() |
1827337f90 | ||
![]() |
08044bc47d | ||
![]() |
272852f25b | ||
![]() |
6575866907 | ||
![]() |
816b61da76 | ||
![]() |
d0a6366b35 | ||
![]() |
d4753b2624 | ||
![]() |
323fd791c5 | ||
![]() |
56e45a11a8 | ||
![]() |
f04d912fb6 | ||
![]() |
2985f85f82 | ||
![]() |
49c0e9423e | ||
![]() |
15a4abff5b | ||
![]() |
bd51ffd7ca | ||
![]() |
1288c7092b | ||
![]() |
9650b268b2 | ||
![]() |
30c4c62d2e | ||
![]() |
8b6a5d985f | ||
![]() |
0bd1410b95 | ||
![]() |
f1451dafee | ||
![]() |
74f16c8e76 | ||
![]() |
1b954f157f | ||
![]() |
e8931c5747 | ||
![]() |
31165675b8 | ||
![]() |
4001ed304e | ||
![]() |
e8b3016771 | ||
![]() |
e3e9461901 | ||
![]() |
45c068f0f7 | ||
![]() |
4b2d09a07b | ||
![]() |
2d57d9d32c | ||
![]() |
4a01d01cba | ||
![]() |
98cc53e287 | ||
![]() |
5ad0bf1d34 | ||
![]() |
35a9d30143 | ||
![]() |
6bc0aebe0d | ||
![]() |
c099af380a | ||
![]() |
59651545ae | ||
![]() |
8469570f80 | ||
![]() |
d513b7d0d8 | ||
![]() |
13e06b3444 | ||
![]() |
d6206d91eb | ||
![]() |
cae8a3173d | ||
![]() |
48e6b46967 | ||
![]() |
9c1bc13d6f | ||
![]() |
c15a890952 | ||
![]() |
12b4ee72fa | ||
![]() |
e5290e61ca | ||
![]() |
08cbe38f96 | ||
![]() |
47e337dc5d | ||
![]() |
cfc4e7c8f6 | ||
![]() |
4eb8be372e | ||
![]() |
11f79432b5 | ||
![]() |
ec15e8247d | ||
![]() |
6b4588ef6d | ||
![]() |
ef0a826180 | ||
![]() |
d79f779c0a | ||
![]() |
1dadc08625 | ||
![]() |
5f49af5ade | ||
![]() |
1e67f0afa4 | ||
![]() |
dd9cf6c3ab | ||
![]() |
36483d795e | ||
![]() |
303c209839 | ||
![]() |
6790889cc3 | ||
![]() |
3a24b66adc | ||
![]() |
1a3f5e81e3 | ||
![]() |
818a79c9db | ||
![]() |
93f635f9f4 | ||
![]() |
73ec018732 | ||
![]() |
68832df0c4 | ||
![]() |
ce817836c0 | ||
![]() |
89fbfdbd1b | ||
![]() |
797d89fc3c | ||
![]() |
abc6e1c719 | ||
![]() |
31558aea8d | ||
![]() |
be711920fd | ||
![]() |
5d899bbe7c | ||
![]() |
9c63e418cf | ||
![]() |
984e7c7c7b | ||
![]() |
1ae460bc67 | ||
![]() |
c7ffa9096c | ||
![]() |
01448f4c14 | ||
![]() |
7e8754baf3 | ||
![]() |
8206ec9012 | ||
![]() |
a611361823 | ||
![]() |
59c77a3f9c | ||
![]() |
8ce9649310 | ||
![]() |
fe5ac5d083 | ||
![]() |
8740627c12 | ||
![]() |
c47f2e449b | ||
![]() |
db09e40690 | ||
![]() |
3ca3f91590 | ||
![]() |
ee9a8d0563 | ||
![]() |
3542980e50 | ||
![]() |
f243b8535a | ||
![]() |
7953809024 | ||
![]() |
3ac65a477c | ||
![]() |
00cab62381 | ||
![]() |
ab31300201 |
8
AUTHORS
8
AUTHORS
@@ -3,12 +3,18 @@ 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>
|
||||
|
||||
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
|
||||
@@ -60,11 +66,13 @@ Images Authors:
|
||||
Translations authors:
|
||||
* files: src/lang/*.ts
|
||||
copyright:
|
||||
- Arabic: SDERAWI (abz8868@msn.com) and sn51234 (nesseyan@gmail.com)
|
||||
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
||||
- Bulgarian: Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)
|
||||
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
|
||||
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
||||
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
|
||||
- Croatian: Oliver Mucafir (oliver.untwist@gmail.com)
|
||||
- Czech: Jirka Vilim (web@tets.cz)
|
||||
- Danish: Mathias Nielsen (comoneo@gmail.com)
|
||||
- Dutch: Joost Schipper (heavyjoost@users.sourceforge.net)
|
||||
|
40
Changelog
40
Changelog
@@ -1,3 +1,43 @@
|
||||
* 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)
|
||||
- BUGFIX: Torrent queue position now starts at 1 (closes #581130)
|
||||
- BUGFIX: Fix unicode issue in start seeding after torrent creation code
|
||||
- BUGFIX: Fix torrent error state clearance on resuming
|
||||
- BUGFIX: Fix possible checkbox update in Web UI
|
||||
- COSMETIC: Fix torrent properties layout
|
||||
|
||||
* Wed May 12 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.7
|
||||
- BUGFIX: Fix unicode problem in torrent moving code
|
||||
- BUGFIX: Fix possible initialization problem in Web UI
|
||||
- BUGFIX: Fix torrent moving after completion feature
|
||||
- BUGFIX: Improved empty folder removing code
|
||||
- BUGFIX: Use guid or news url as RSS items identifier (instead of title)
|
||||
- BUGFIX: Fix possible crash in RSS item selection code
|
||||
- BUGFIX: Added support for url encoded ampersands in RSS
|
||||
- COSMETIC: Sort torrent labels in popup menu
|
||||
- I18N: Added Croatian translation
|
||||
|
||||
* Sun Apr 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.6
|
||||
- BUGFIX: Announce to all trackers at once
|
||||
- BUGFIX: Added support for single-thread boost
|
||||
- BUGFIX: Remove old folder when moving a torrent
|
||||
- BUGFIX: Improved reliability of torrent moving
|
||||
- BUGFIX: Stop rechecking torrents when they are moved
|
||||
- BUGFIX: Status filters height stays correct when the visual style changes
|
||||
- I18N: Added Arabic translation
|
||||
|
||||
* Wed Apr 07 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.2.5
|
||||
- BUGFIX: Fix crash when adding a new torrent label
|
||||
- BUGFIX: Fix HTTPS protocol support in torrent/rss downloader
|
||||
|
62
README.os2
Normal file
62
README.os2
Normal file
@@ -0,0 +1,62 @@
|
||||
qBittorrent - A BitTorrent client in Qt4
|
||||
------------------------------------------
|
||||
|
||||
This is the eComStation (OS/2) qBittorrent part of the readme. See also README for more general information.
|
||||
|
||||
|
||||
Building qBittorrent
|
||||
********************
|
||||
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- gcc based build env (recommended gcc v4.4.2 or greater)
|
||||
|
||||
- Qt4 for eCS (OS/2) dev package (see http://svn.netlabs.org/qt4 for more information)
|
||||
|
||||
- libtorrent-rasterbar for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
||||
|
||||
- boost for eCS (OS/2) port (see http://svn.netlabs.org/ports for more information)
|
||||
|
||||
|
||||
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 beginn #####
|
||||
PREFIX = .
|
||||
BINDIR = ./bin
|
||||
INCDIR = ./include
|
||||
LIBDIR = ./lib
|
||||
DATADIR = ./share
|
||||
|
||||
CONFIG += staticlib
|
||||
INCLUDEPATH += x:/trees/libtorrent/trunk/include
|
||||
LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
|
||||
-Lx:/trees/boost/trunk/stage/lib \
|
||||
-Lx:/trees/openssl \
|
||||
-Lx:/extras/lib
|
||||
##### conf.pri content end #####
|
||||
|
||||
Of course all the above path references have to be adjusted to your build env.
|
||||
|
||||
It should now be easy to build qBittorrent:
|
||||
|
||||
Simply type:
|
||||
$ qmake
|
||||
|
||||
Followed by:
|
||||
$ make
|
||||
|
||||
If all works fine you should get a working qbittorrent executable.
|
||||
|
||||
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:
|
||||
#netlabs on irc.freenode.net
|
||||
|
||||
------------------------------------------
|
||||
Silvan Scherrer <silvan.scherrer@aroa.ch>
|
||||
|
||||
|
37
configure
vendored
37
configure
vendored
@@ -355,28 +355,15 @@ 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
|
||||
conf->addLib("-lcrypto");
|
||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
conf->addLib("-lcrypto");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -405,6 +392,16 @@ public:
|
||||
name = result.first().mid(3);
|
||||
// Remove .so
|
||||
name.chop(3);
|
||||
} else {
|
||||
// Fall back to non -mt boost lib
|
||||
filters.clear();
|
||||
filters << "libboost_"+lib+"*.so";
|
||||
result = libDir.entryList(filters, QDir::Files);
|
||||
if(!result.empty()) {
|
||||
name = result.first().mid(3);
|
||||
// Remove .so
|
||||
name.chop(3);
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
@@ -452,11 +449,13 @@ public:
|
||||
// Find library
|
||||
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
|
||||
QStringList required_libs;
|
||||
required_libs
|
||||
#if BOOST_VERSION >= 103500
|
||||
<< "system"
|
||||
required_libs << "system";
|
||||
#endif
|
||||
<< "filesystem" << "thread";
|
||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
// Not required by nox
|
||||
required_libs << "filesystem" << "thread";
|
||||
}
|
||||
QStringList libDirs;
|
||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
||||
foreach(const QString& lib, required_libs) {
|
||||
|
@@ -22,6 +22,16 @@ public:
|
||||
name = result.first().mid(3);
|
||||
// Remove .so
|
||||
name.chop(3);
|
||||
} else {
|
||||
// Fall back to non -mt boost lib
|
||||
filters.clear();
|
||||
filters << "libboost_"+lib+"*.so";
|
||||
result = libDir.entryList(filters, QDir::Files);
|
||||
if(!result.empty()) {
|
||||
name = result.first().mid(3);
|
||||
// Remove .so
|
||||
name.chop(3);
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
@@ -69,11 +79,13 @@ public:
|
||||
// Find library
|
||||
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
|
||||
QStringList required_libs;
|
||||
required_libs
|
||||
#if BOOST_VERSION >= 103500
|
||||
<< "system"
|
||||
required_libs << "system";
|
||||
#endif
|
||||
<< "filesystem" << "thread";
|
||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
// Not required by nox
|
||||
required_libs << "filesystem" << "thread";
|
||||
}
|
||||
QStringList libDirs;
|
||||
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
|
||||
foreach(const QString& lib, required_libs) {
|
||||
|
@@ -13,28 +13,15 @@ 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
|
||||
conf->addLib("-lcrypto");
|
||||
if(conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
conf->addLib("-lcrypto");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
139
src/GUI.cpp
139
src/GUI.cpp
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
BIN
src/Icons/flags/saoudi_arabia.png
Normal file
BIN
src/Icons/flags/saoudi_arabia.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 546 B |
@@ -1,8 +1,9 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P;
|
||||
Comment=V2.2.5
|
||||
Comment=V2.2.9
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[ar]=العميل Bittorrent
|
||||
GenericName[bg]=Торент клиент
|
||||
GenericName[cs]=Bittorrent klient
|
||||
GenericName[de]=Bittorren Client
|
||||
@@ -10,6 +11,7 @@ GenericName[el]=Bittorrent πελάτης
|
||||
GenericName[es]=Cliente Bittorrent
|
||||
GenericName[fi]=Bittorrent-ohjelma
|
||||
GenericName[fr]=Client Bittorrent
|
||||
GenericName[hr]=Bittorrent klijent
|
||||
GenericName[hu]=Bittorrent kliens
|
||||
GenericName[it]=Client Bittorrent
|
||||
GenericName[ja]=Bittorrent クライアント
|
||||
|
BIN
src/Icons/qbittorrent_mac.icns
Normal file
BIN
src/Icons/qbittorrent_mac.icns
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
60
src/Info.plist
Normal file
60
src/Info.plist
Normal 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.9</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>
|
@@ -54,19 +54,21 @@ 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
|
||||
te_translation->append(QString::fromUtf8("<a name='top'></a>"));
|
||||
te_translation->append(tr("I would like to thank the following people who volunteered to translate qBittorrent:")+QString::fromUtf8("<br>"));
|
||||
te_translation->append(QString::fromUtf8(
|
||||
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||
"<i><u>Arabic:</u> SDERAWI (abz8868@msn.com) and sn51234 (nesseyan@gmail.com)<br>\
|
||||
- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||
- <u>Bulgarian:</u> Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)<br>\
|
||||
- <u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\
|
||||
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)<br>\
|
||||
- <u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
|
||||
- <u>Croatian:</u> Oliver Mucafir (oliver.untwist@gmail.com)<br>\
|
||||
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\
|
||||
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
||||
- <u>Dutch:</u> Joost Schipper (heavyjoost@users.sourceforge.net) and Peter Koeleman (peter@peerweb.nl)<br>\
|
||||
|
@@ -5,6 +5,7 @@
|
||||
#include <QHeaderView>
|
||||
#include <QSpinBox>
|
||||
#include <QCheckBox>
|
||||
#include <libtorrent/version.hpp>
|
||||
#include "preferences.h"
|
||||
|
||||
enum AdvSettingsCols {PROPERTY, VALUE};
|
||||
|
4171
src/bittorrent.cpp
4171
src/bittorrent.cpp
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
@@ -135,7 +136,7 @@ public slots:
|
||||
void resumeTorrent(QString hash);
|
||||
void resumeAllTorrents();
|
||||
/* End Web UI */
|
||||
#ifndef LIBTORRENT_0_15
|
||||
#if LIBTORRENT_VERSION_MINOR < 15
|
||||
void saveDHTEntry();
|
||||
#endif
|
||||
void preAllocateAllFiles(bool b);
|
||||
@@ -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;
|
||||
|
@@ -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>
|
||||
@@ -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()) {
|
||||
#ifdef Q_WS_WIN
|
||||
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()) {
|
||||
#ifdef Q_WS_WIN
|
||||
file = file.replace("/", "\\");
|
||||
#endif
|
||||
textInputPath->setText(file);
|
||||
}
|
||||
}
|
||||
|
||||
void createtorrent::on_removeTracker_button_clicked() {
|
||||
@@ -193,14 +202,14 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
|
||||
// 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(branch_path));
|
||||
#ifdef LIBTORRENT_0_15
|
||||
TorrentTempData::setSavePath(hash, QString::fromLocal8Bit(branch_path));
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
// Enable seeding mode (do not recheck the files)
|
||||
TorrentTempData::setSeedingMode(hash, true);
|
||||
#endif
|
||||
@@ -264,7 +273,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;
|
||||
|
@@ -42,7 +42,9 @@ enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
||||
downloadThread::downloadThread(QObject* parent) : QObject(parent) {
|
||||
networkManager = new QNetworkAccessManager(this);
|
||||
connect(networkManager, SIGNAL(finished (QNetworkReply*)), this, SLOT(processDlFinished(QNetworkReply*)));
|
||||
#ifndef QT_NO_OPENSSL
|
||||
connect(networkManager, SIGNAL(sslErrors(QNetworkReply*,QList<QSslError>)), this, SLOT(ignoreSslErrors(QNetworkReply*,QList<QSslError>)));
|
||||
#endif
|
||||
}
|
||||
|
||||
downloadThread::~downloadThread(){
|
||||
@@ -52,7 +54,7 @@ downloadThread::~downloadThread(){
|
||||
}
|
||||
|
||||
void downloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
QString url = reply->url().toString();
|
||||
QString url = reply->url().toEncoded().data();
|
||||
if(reply->error() != QNetworkReply::NoError) {
|
||||
// Failure
|
||||
emit downloadFailure(url, errorCodeToString(reply->error()));
|
||||
@@ -71,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"));
|
||||
}
|
||||
}
|
||||
@@ -215,8 +220,10 @@ QString downloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_OPENSSL
|
||||
void downloadThread::ignoreSslErrors(QNetworkReply* reply,QList<QSslError> errors) {
|
||||
Q_UNUSED(errors)
|
||||
// Ignore all SSL errors
|
||||
reply->ignoreSslErrors();
|
||||
}
|
||||
#endif
|
||||
|
@@ -63,7 +63,9 @@ protected:
|
||||
protected slots:
|
||||
void processDlFinished(QNetworkReply* reply);
|
||||
void checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal);
|
||||
#ifndef QT_NO_OPENSSL
|
||||
void ignoreSslErrors(QNetworkReply*,QList<QSslError>);
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
@@ -125,18 +125,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;
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -2,10 +2,10 @@
|
||||
#define FILESYSTEMWATCHER_H
|
||||
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QDir>
|
||||
|
||||
#ifndef Q_WS_WIN
|
||||
#include <QTimer>
|
||||
#include <QDir>
|
||||
#include <QPointer>
|
||||
#include <QStringList>
|
||||
#include <QSet>
|
||||
@@ -180,6 +180,7 @@ protected slots:
|
||||
}
|
||||
|
||||
void scanNetworkFolders() {
|
||||
#ifndef Q_WS_WIN
|
||||
qDebug("scanNetworkFolders() called");
|
||||
QStringList torrents;
|
||||
// Network folders scan
|
||||
@@ -192,6 +193,7 @@ protected slots:
|
||||
qDebug("The following files are being reported: %s", qPrintable(torrents.join("\n")));
|
||||
emit torrentsAdded(torrents);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
signals:
|
||||
|
11
src/geoip.h
11
src/geoip.h
@@ -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");
|
||||
}
|
||||
}
|
||||
@@ -188,6 +194,7 @@ public:
|
||||
if(iso[1] == 'S') return QIcon(":/Icons/flags/serbia.png");
|
||||
break;
|
||||
case 'S':
|
||||
if(iso[1] == 'A') return QIcon(":/Icons/flags/saoudi_arabia.png");
|
||||
if(iso[1] == 'E') return QIcon(":/Icons/flags/sweden.png");
|
||||
if(iso[1] == 'K') return QIcon(":/Icons/flags/slovakia.png");
|
||||
if(iso[1] == 'G') return QIcon(":/Icons/flags/singapore.png");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/" >
|
||||
<file>geoip/GeoIP.dat</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>geoip/GeoIP.dat</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@@ -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 ¶ms = clientConnection->readAll();
|
||||
if(!params.isEmpty()) {
|
||||
processParams(QString(params).split("\n"));
|
||||
qDebug("Received parameters from another instance");
|
||||
}
|
||||
clientConnection->deleteLater();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
QLocalServer *localServer;
|
||||
Bittorrent *BTSession;
|
||||
|
||||
};
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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()
|
||||
|
@@ -121,6 +121,7 @@
|
||||
<file>Icons/flags/egypt.png</file>
|
||||
<file>Icons/flags/italy.png</file>
|
||||
<file>Icons/flags/south_korea.png</file>
|
||||
<file>Icons/flags/saoudi_arabia.png</file>
|
||||
<file>Icons/flags/bosnia.png</file>
|
||||
<file>Icons/flags/japan.png</file>
|
||||
<file>Icons/flags/malaysia.png</file>
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<file>lang/qbittorrent_sv.qm</file>
|
||||
<file>lang/qbittorrent_pl.qm</file>
|
||||
<file>lang/qbittorrent_it.qm</file>
|
||||
<file>lang/qbittorrent_ar.qm</file>
|
||||
<file>lang/qbittorrent_ko.qm</file>
|
||||
<file>lang/qbittorrent_en.qm</file>
|
||||
<file>lang/qbittorrent_ro.qm</file>
|
||||
@@ -20,6 +21,7 @@
|
||||
<file>lang/qbittorrent_pt_BR.qm</file>
|
||||
<file>lang/qbittorrent_el.qm</file>
|
||||
<file>lang/qbittorrent_ca.qm</file>
|
||||
<file>lang/qbittorrent_hr.qm</file>
|
||||
<file>lang/qbittorrent_sr.qm</file>
|
||||
<file>lang/qbittorrent_hu.qm</file>
|
||||
<file>lang/qbittorrent_da.qm</file>
|
||||
|
BIN
src/lang/qbittorrent_ar.qm
Normal file
BIN
src/lang/qbittorrent_ar.qm
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user