1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-26 06:12:17 +01:00

Compare commits

..

1 Commits

Author SHA1 Message Date
Christophe Dumez
c21f32283e Tagged v2.0.3 release 2009-12-23 08:57:08 +00:00
70 changed files with 3797 additions and 5138 deletions

View File

@@ -57,7 +57,7 @@ Translations authors:
copyright: copyright:
- Brazilian: Nick Marinho (nickmarinho@gmail.com) - Brazilian: Nick Marinho (nickmarinho@gmail.com)
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net) - Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
- Catalan: Francisco Luque Contreras (frannoe@ya.com) - Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com) - Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com) - Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
- Czech: Jirka Vilim (web@tets.cz) - Czech: Jirka Vilim (web@tets.cz)

View File

@@ -1,35 +1,3 @@
* Mon Jan 11 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.7
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
- BUGFIX: Update RSS feed as soon as feed downloader is enabled
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles
- BUGFIX: Fix possible bug when deleting a RSS folder
- BUGFIX: Remove persistant data when a RSS feed is deleted
- BUGFIX: RSS filters are now alphabetically sorted
- BUGFIX: Fix crash when renaming currently displayed RSS filter
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
* Tue Jan 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6
- BUGFIX: Fix detection of invalid torrent files
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop
- BUGFIX: Force data recheck whenever a torrent is moved
- BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder
- COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated
* Thu Dec 31 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.5
- BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces
* Wed Dec 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.4
- BUGFIX: Fix PeerGuardian .p2b binary filter support
- BUGFIX: Fix possible crash when closing a search engine tab
- BUGFIX: Make sure service port does not change
- BUGFIX: Fix possible DHT port saving issue
- BUGFIX: Fix communication between qBittorrent and Web UI (Qt 4.6)
- BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader
- BUGFIX: Fix code for listening on a random port whenever it failed to listen on the one defined
- BUGFIX: Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs
- BUGFIX: Fix global download rate limiting from Web UI
- COSMETIC: Display a disconnected icon in status bar whenever qBittorrent failed to listen on the port defined
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3 * Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
- BUGFIX: Minor cosmetic fix to program preferences - BUGFIX: Minor cosmetic fix to program preferences
- BUGFIX: Fix "Temp path" button in program preferences - BUGFIX: Fix "Temp path" button in program preferences

View File

@@ -157,7 +157,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
// Methods // Methods
int getCurrentTabIndex() const; int getCurrentTabIndex() const;
QPoint screenCenter() const; QPoint screenCenter() const;
TransferListWidget* getTransferList() const { return transferList; }
}; };
#endif #endif

View File

@@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Categories=Qt;Network;P2P; Categories=Qt;Network;P2P;
Comment=V2.0.7 Comment=V2.0.3
Exec=qbittorrent %f Exec=qbittorrent %f
GenericName=Bittorrent client GenericName=Bittorrent client
GenericName[bg]=Торент клиент GenericName[bg]=Торент клиент

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@@ -64,7 +64,7 @@ class about : public QDialog, private Ui::AboutDlg{
te_translation->append(QString::fromUtf8( te_translation->append(QString::fromUtf8(
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\ "<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\ - <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
- <u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\ - <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.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>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\ - <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\

View File

@@ -63,7 +63,7 @@
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4}; enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4};
// Main constructor // Main constructor
Bittorrent::Bittorrent() : preAllocateAll(false), addInPause(false), ratio_limit(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), DHTEnabled(false), current_dht_port(0), queueingEnabled(false), geoipDBLoaded(false), exiting(false) { Bittorrent::Bittorrent() : preAllocateAll(false), addInPause(false), ratio_limit(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), DHTEnabled(false), queueingEnabled(false), geoipDBLoaded(false), exiting(false) {
resolve_countries = false; resolve_countries = false;
// To avoid some exceptions // To avoid some exceptions
fs::path::default_name_check(fs::no_check); fs::path::default_name_check(fs::no_check);
@@ -241,9 +241,9 @@ void Bittorrent::configureSession() {
// Connection // Connection
// * Ports binding // * Ports binding
unsigned short old_listenPort = getListenPort(); unsigned short old_listenPort = getListenPort();
unsigned short new_listenPort = Preferences::getSessionPort(); setListeningPort(Preferences::getSessionPort());
if(old_listenPort != new_listenPort) { unsigned short new_listenPort = getListenPort();
setListeningPort(new_listenPort); if(new_listenPort != old_listenPort) {
addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort))); addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
} }
// * Global download limit // * Global download limit
@@ -346,13 +346,10 @@ void Bittorrent::configureSession() {
if(Preferences::isDHTEnabled()) { if(Preferences::isDHTEnabled()) {
// Set DHT Port // Set DHT Port
if(enableDHT(true)) { if(enableDHT(true)) {
int dht_port; int dht_port = new_listenPort;
if(Preferences::isDHTPortSameAsBT()) if(!Preferences::isDHTPortSameAsBT())
dht_port = 0;
else
dht_port = Preferences::getDHTPort(); dht_port = Preferences::getDHTPort();
setDHTPort(dht_port); setDHTPort(dht_port);
if(dht_port == 0) dht_port = new_listenPort;
addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue")); addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
} else { } else {
addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("red")); addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("red"));
@@ -702,13 +699,11 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
} }
} }
QString savePath = getSavePath(hash); QString savePath = getSavePath(hash);
if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) { qDebug("addMagnetURI: using save_path: %s", savePath.toLocal8Bit().data());
qDebug("addMagnetURI: Temp folder is enabled."); if(defaultTempPath.isEmpty() || (resumed && TorrentPersistentData::isSeed(hash))) {
p.save_path = defaultTempPath.toLocal8Bit().data();
qDebug("addMagnetURI: using save_path: %s", defaultTempPath.toLocal8Bit().data());
} else {
p.save_path = savePath.toLocal8Bit().data(); p.save_path = savePath.toLocal8Bit().data();
qDebug("addMagnetURI: using save_path: %s", savePath.toLocal8Bit().data()); } else {
p.save_path = defaultTempPath.toLocal8Bit().data();
} }
// Preallocate all? // Preallocate all?
if(preAllocateAll) if(preAllocateAll)
@@ -732,13 +727,6 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
return h; return h;
} }
Q_ASSERT(h.hash() == hash); Q_ASSERT(h.hash() == hash);
// If temp path is enabled, move torrent
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
h.move_storage(defaultTempPath);
}
// Connections limit per torrent // Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent()); h.set_max_connections(Preferences::getMaxConnecsPerTorrent());
// Uploads limit per torrent // Uploads limit per torrent
@@ -803,8 +791,6 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
try { try {
// Getting torrent file informations // Getting torrent file informations
t = new torrent_info(file.toLocal8Bit().data()); t = new torrent_info(file.toLocal8Bit().data());
if(!t->is_valid())
throw std::exception();
} catch(std::exception&) { } catch(std::exception&) {
if(!from_url.isNull()) { if(!from_url.isNull()) {
addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red")); addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red"));
@@ -863,13 +849,11 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
} else { } else {
savePath = getSavePath(hash); savePath = getSavePath(hash);
} }
if(!defaultTempPath.isEmpty() && resumed && !TorrentPersistentData::isSeed(hash)) { qDebug("addTorrent: using save_path: %s", savePath.toLocal8Bit().data());
qDebug("addTorrent::Temp folder is enabled."); if(defaultTempPath.isEmpty() || (resumed && TorrentPersistentData::isSeed(hash))) {
p.save_path = defaultTempPath.toLocal8Bit().data();
qDebug("addTorrent: using save_path: %s", defaultTempPath.toLocal8Bit().data());
} else {
p.save_path = savePath.toLocal8Bit().data(); p.save_path = savePath.toLocal8Bit().data();
qDebug("addTorrent: using save_path: %s", savePath.toLocal8Bit().data()); } else {
p.save_path = defaultTempPath.toLocal8Bit().data();
} }
#ifdef LIBTORRENT_0_15 #ifdef LIBTORRENT_0_15
@@ -910,12 +894,6 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
return h; return h;
} }
// If temp path is enabled, move torrent
if(!defaultTempPath.isEmpty() && !resumed) {
qDebug("Temp folder is enabled, moving new torrent to temp folder");
h.move_storage(defaultTempPath);
}
// Connections limit per torrent // Connections limit per torrent
h.set_max_connections(Preferences::getMaxConnecsPerTorrent()); h.set_max_connections(Preferences::getMaxConnecsPerTorrent());
// Uploads limit per torrent // Uploads limit per torrent
@@ -1385,11 +1363,9 @@ void Bittorrent::setDeleteRatio(float ratio) {
// Set DHT port (>= 1000 or 0 if same as BT) // Set DHT port (>= 1000 or 0 if same as BT)
void Bittorrent::setDHTPort(int dht_port) { void Bittorrent::setDHTPort(int dht_port) {
if(dht_port == 0 || dht_port >= 1000) { if(dht_port == 0 || dht_port >= 1000) {
if(dht_port == current_dht_port) return;
struct dht_settings DHTSettings; struct dht_settings DHTSettings;
DHTSettings.service_port = dht_port; DHTSettings.service_port = dht_port;
s->set_dht_settings(DHTSettings); s->set_dht_settings(DHTSettings);
current_dht_port = dht_port;
qDebug("Set DHT Port to %d", dht_port); qDebug("Set DHT Port to %d", dht_port);
} }
} }
@@ -1512,11 +1488,6 @@ void Bittorrent::readAlerts() {
} }
} }
} }
else if (storage_moved_alert* p = dynamic_cast<storage_moved_alert*>(a.get())) {
QTorrentHandle h(p->handle);
if(h.is_valid())
h.force_recheck(); //XXX: Required by libtorrent for now
}
else if (metadata_received_alert* p = dynamic_cast<metadata_received_alert*>(a.get())) { else if (metadata_received_alert* p = dynamic_cast<metadata_received_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
if(h.is_valid()) { if(h.is_valid()) {
@@ -1541,6 +1512,18 @@ void Bittorrent::readAlerts() {
} }
} }
} }
else if (listen_failed_alert* p = dynamic_cast<listen_failed_alert*>(a.get())) {
// Level: fatal
int tried_port = p->endpoint.port();
srand(time(0));
int fallback_port = tried_port;
do {
fallback_port = rand() % 64512 + 1024;
} while(fallback_port == tried_port);
addConsoleMessage(tr("Couldn't listen on port %1, using %2 instead.").arg(QString::number(tried_port)).arg(QString::number(fallback_port)), QString::fromUtf8("red"));
setListeningPort(fallback_port);
//emit portListeningFailure();
}
/*else if (torrent_paused_alert* p = dynamic_cast<torrent_paused_alert*>(a.get())) { /*else if (torrent_paused_alert* p = dynamic_cast<torrent_paused_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
qDebug("Received a torrent_paused_alert for %s", h.hash().toLocal8Bit().data()); qDebug("Received a torrent_paused_alert for %s", h.hash().toLocal8Bit().data());
@@ -1660,7 +1643,6 @@ QHash<QString, TrackerInfos> Bittorrent::getTrackersInfo(QString hash) const{
} }
int Bittorrent::getListenPort() const{ int Bittorrent::getListenPort() const{
qDebug("LISTEN PORT: %d", s->listen_port());
return s->listen_port(); return s->listen_port();
} }

View File

@@ -107,7 +107,6 @@ private:
bool NATPMPEnabled; bool NATPMPEnabled;
bool LSDEnabled; bool LSDEnabled;
bool DHTEnabled; bool DHTEnabled;
int current_dht_port;
bool queueingEnabled; bool queueingEnabled;
QString defaultSavePath; QString defaultSavePath;
QString defaultTempPath; QString defaultTempPath;

View File

@@ -36,7 +36,6 @@
#include <QList> #include <QList>
#include <QPixmap> #include <QPixmap>
#include <libtorrent/bitfield.hpp> #include <libtorrent/bitfield.hpp>
#include <math.h>
using namespace libtorrent; using namespace libtorrent;
#define BAR_HEIGHT 18 #define BAR_HEIGHT 18
@@ -56,46 +55,19 @@ public:
void setProgress(bitfield pieces) { void setProgress(bitfield pieces) {
if(pieces.empty()) { if(pieces.empty()) {
// Empty bar // Empty bar
QPixmap pix = QPixmap(1, 1); pixmap = QPixmap(1, 1);
pix.fill(); QPainter painter(&pixmap);
pixmap = pix; painter.setPen(Qt::white);
painter.drawPoint(0,0);
} else { } else {
int nb_pieces = pieces.size(); pixmap = QPixmap(pieces.size(), 1);
// Reduce the number of pieces before creating the pixmap QPainter painter(&pixmap);
// otherwise it can crash when there are too many pieces for(uint i=0; i<pieces.size(); ++i) {
if(nb_pieces > width()) { if(pieces[i])
int ratio = floor(nb_pieces/(double)width()); painter.setPen(Qt::blue);
QVector<bool> scaled_pieces; else
for(int i=0; i<nb_pieces; i+= ratio) { painter.setPen(Qt::white);
bool have = true; painter.drawPoint(i,0);
for(int j=i; j<qMin(i+ratio, nb_pieces); ++j) {
if(!pieces[i]) { have = false; break; }
}
scaled_pieces << have;
}
QPixmap pix = QPixmap(scaled_pieces.size(), 1);
pix.fill();
QPainter painter(&pix);
for(int i=0; i<scaled_pieces.size(); ++i) {
if(scaled_pieces[i])
painter.setPen(Qt::blue);
else
painter.setPen(Qt::white);
painter.drawPoint(i,0);
}
pixmap = pix;
} else {
QPixmap pix = QPixmap(pieces.size(), 1);
pix.fill();
QPainter painter(&pix);
for(uint i=0; i<pieces.size(); ++i) {
if(pieces[i])
painter.setPen(Qt::blue);
else
painter.setPen(Qt::white);
painter.drawPoint(i,0);
}
pixmap = pix;
} }
} }
update(); update();

View File

@@ -233,7 +233,7 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
} }
event["name"] = QVariant(h.name()); event["name"] = QVariant(h.name());
event["size"] = QVariant(misc::friendlyUnit(h.actual_size())); event["size"] = QVariant(misc::friendlyUnit(h.actual_size()));
event["progress"] = QVariant((double)h.progress()); event["progress"] = QVariant(h.progress());
event["dlspeed"] = QVariant(tr("%1/s", "e.g. 120 KiB/s").arg(misc::friendlyUnit(h.download_payload_rate()))); event["dlspeed"] = QVariant(tr("%1/s", "e.g. 120 KiB/s").arg(misc::friendlyUnit(h.download_payload_rate())));
if(BTSession->isQueueingEnabled()) { if(BTSession->isQueueingEnabled()) {
if(h.queue_position() >= 0) if(h.queue_position() >= 0)

View File

@@ -47,16 +47,10 @@ public:
} }
} }
void itemAboutToBeRemoved(QTreeWidgetItem *item) { void itemRemoved(QTreeWidgetItem *item) {
RssFile* file = mapping.take(item); RssFile* file = mapping.take(item);
if(file->getType() == RssFile::STREAM) { if(file->getType() == RssFile::STREAM)
feeds_items.remove(file->getID()); feeds_items.remove(file->getID());
} else {
QList<RssStream*> feeds = ((RssFolder*)file)->getAllFeeds();
foreach(RssStream* feed, feeds) {
feeds_items.remove(feed->getID());
}
}
} }
bool hasFeed(QString url) const { bool hasFeed(QString url) const {

View File

@@ -67,14 +67,14 @@ public:
foreach(const QString& token, match_tokens) { foreach(const QString& token, match_tokens) {
if(token.isEmpty() || token == "") if(token.isEmpty() || token == "")
continue; continue;
QRegExp reg(token, Qt::CaseInsensitive, QRegExp::Wildcard); QRegExp reg(token, Qt::CaseInsensitive);
if(reg.indexIn(s) < 0) return false; if(reg.indexIn(s) < 0) return false;
} }
// Checking not matching // Checking not matching
QStringList notmatch_tokens = getNotMatchingTokens(); QStringList notmatch_tokens = getNotMatchingTokens();
foreach(const QString& token, notmatch_tokens) { foreach(const QString& token, notmatch_tokens) {
if(token.isEmpty()) continue; if(token.isEmpty()) continue;
QRegExp reg(token, Qt::CaseInsensitive, QRegExp::Wildcard); QRegExp reg(token, Qt::CaseInsensitive);
if(reg.indexIn(s) > -1) return false; if(reg.indexIn(s) > -1) return false;
} }
return true; return true;
@@ -257,7 +257,6 @@ public:
// Restore saved info // Restore saved info
enableDl_cb->setChecked(filters.isDownloadingEnabled()); enableDl_cb->setChecked(filters.isDownloadingEnabled());
fillFiltersList(); fillFiltersList();
filtersList->sortItems(Qt::AscendingOrder);
if(filters.size() > 0) { if(filters.size() > 0) {
// Select first filter // Select first filter
filtersList->setCurrentItem(filtersList->item(0)); filtersList->setCurrentItem(filtersList->item(0));
@@ -268,8 +267,6 @@ public:
} }
~FeedDownloaderDlg() { ~FeedDownloaderDlg() {
if(enableDl_cb->isChecked())
emit filteringEnabled();
// Make sure we save everything // Make sure we save everything
saveCurrentFilterSettings(); saveCurrentFilterSettings();
filters.save(); filters.save();
@@ -377,14 +374,11 @@ protected slots:
QMessageBox::warning(0, tr("Invalid filter name"), tr("This filter name is already in use.")); QMessageBox::warning(0, tr("Invalid filter name"), tr("This filter name is already in use."));
} }
}while(!validated); }while(!validated);
// Save the current filter
saveCurrentFilterSettings();
// Rename the filter // Rename the filter
filters.rename(current_name, new_name); filters.rename(current_name, new_name);
if(selected_filter == current_name) if(selected_filter == current_name)
selected_filter = new_name; selected_filter = new_name;
item->setText(new_name); item->setText(new_name);
filtersList->sortItems(Qt::AscendingOrder);
} }
} }
@@ -438,7 +432,6 @@ protected slots:
} }
}while(!validated); }while(!validated);
QListWidgetItem *it = new QListWidgetItem(filter_name, filtersList); QListWidgetItem *it = new QListWidgetItem(filter_name, filtersList);
filtersList->sortItems(Qt::AscendingOrder);
filtersList->setCurrentItem(it); filtersList->setCurrentItem(it);
//showFilterSettings(it); //showFilterSettings(it);
} }
@@ -494,19 +487,16 @@ protected slots:
// Append file extension // Append file extension
if(!destination.endsWith(".filters")) if(!destination.endsWith(".filters"))
destination += ".filters"; destination += ".filters";
/*if(QFile::exists(destination)) { if(QFile::exists(destination)) {
int ret = QMessageBox::question(0, tr("Overwriting confirmation"), tr("Are you sure you want to overwrite existing file?"), QMessageBox::Yes|QMessageBox::No); int ret = QMessageBox::question(0, tr("Overwriting confirmation"), tr("Are you sure you want to overwrite existing file?"), QMessageBox::Yes|QMessageBox::No);
if(ret != QMessageBox::Yes) return; if(ret != QMessageBox::Yes) return;
}*/ }
if(filters.serialize(destination)) if(filters.serialize(destination))
QMessageBox::information(0, tr("Export successful"), tr("Filters export was successful.")); QMessageBox::information(0, tr("Export successful"), tr("Filters export was successful."));
else else
QMessageBox::warning(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error.")); QMessageBox::warning(0, tr("Export failure"), tr("Filters could not be exported due to an I/O error."));
} }
signals:
void filteringEnabled();
}; };
#undef QHash #undef QHash

View File

@@ -71,7 +71,7 @@ class FilterParserThread : public QThread {
// PeerGuardian p2p file // PeerGuardian p2p file
parseP2PFilterFile(filePath); parseP2PFilterFile(filePath);
} else { } else {
if(filePath.endsWith(".p2b", Qt::CaseInsensitive)) { if(filePath.endsWith(".p2p", Qt::CaseInsensitive)) {
// PeerGuardian p2b file // PeerGuardian p2b file
parseP2BFilterFile(filePath); parseP2BFilterFile(filePath);
} else { } else {

View File

@@ -46,7 +46,7 @@
#include <QTemporaryFile> #include <QTemporaryFile>
HttpConnection::HttpConnection(QTcpSocket *socket, Bittorrent *BTSession, HttpServer *parent) HttpConnection::HttpConnection(QTcpSocket *socket, Bittorrent *BTSession, HttpServer *parent)
: QObject(parent), socket(socket), parent(parent), BTSession(BTSession) : QObject(parent), socket(socket), parent(parent), BTSession(BTSession)
{ {
socket->setParent(this); socket->setParent(this);
connect(socket, SIGNAL(readyRead()), this, SLOT(read())); connect(socket, SIGNAL(readyRead()), this, SLOT(read()));
@@ -370,18 +370,6 @@ void HttpConnection::respondCommand(QString command)
h.file_priority(file_id, priority); h.file_priority(file_id, priority);
} }
} }
if(command == "getGlobalUpLimit") {
generator.setStatusLine(200, "OK");
generator.setContentTypeByExt("html");
generator.setMessage(QString::number(BTSession->getSession()->upload_rate_limit()));
write();
}
if(command == "getGlobalDlLimit") {
generator.setStatusLine(200, "OK");
generator.setContentTypeByExt("html");
generator.setMessage(QString::number(BTSession->getSession()->download_rate_limit()));
write();
}
if(command == "getTorrentUpLimit") { if(command == "getTorrentUpLimit") {
QString hash = parser.post("hash"); QString hash = parser.post("hash");
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);

View File

@@ -60,7 +60,6 @@
<file>Icons/skin/exit.png</file> <file>Icons/skin/exit.png</file>
<file>Icons/skin/delete_all.png</file> <file>Icons/skin/delete_all.png</file>
<file>Icons/skin/splash.png</file> <file>Icons/skin/splash.png</file>
<file>Icons/skin/disconnected.png</file>
<file>Icons/skin/decrease.png</file> <file>Icons/skin/decrease.png</file>
<file>Icons/skin/uploading.png</file> <file>Icons/skin/uploading.png</file>
<file>Icons/skin/filterall.png</file> <file>Icons/skin/filterall.png</file>

View File

@@ -47,7 +47,6 @@ namespace json {
case QVariant::LongLong: case QVariant::LongLong:
case QVariant::UInt: case QVariant::UInt:
case QVariant::ULongLong: case QVariant::ULongLong:
case QMetaType::Float:
return v.value<QString>(); return v.value<QString>();
case QVariant::String: case QVariant::String:
{ {

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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