mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 16:37:21 -06:00
Compare commits
16 Commits
release-1.
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d9c81ffa7 | ||
|
|
9b86ea56ab | ||
|
|
a326307b0d | ||
|
|
2e888a1e68 | ||
|
|
2b1755eb2a | ||
|
|
7f3832a73d | ||
|
|
935de375b9 | ||
|
|
b88ea10937 | ||
|
|
9b29302d42 | ||
|
|
e67d3243e8 | ||
|
|
977dba4be6 | ||
|
|
114d96195b | ||
|
|
99786cdf17 | ||
|
|
0ad7781c8b | ||
|
|
dceba7e2e1 | ||
|
|
3a6b5af494 |
14
Changelog
14
Changelog
@@ -1,3 +1,17 @@
|
|||||||
|
* Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4
|
||||||
|
- BUGFIX: Fixed IP filter file parsing on 64bits
|
||||||
|
- BUGFIX: Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog
|
||||||
|
- BUGFIX: Fixed a little bug in search engine plugins helper file
|
||||||
|
- BUGFIX: Fixed compilation problems with Qt 4.3
|
||||||
|
- BUGFIX: Percentages no longer disapear with default cleanlooks style
|
||||||
|
- BUGFIX: Cleanly fixed popup menus position in lists (no more workarounds)
|
||||||
|
- BUGFIX: Fixed memory leak in search engine
|
||||||
|
- BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences
|
||||||
|
- BUGFIX: Display a ratio of 0.0 if total_upload and total_download are both 0
|
||||||
|
- BUGFIX: Remove last separator in top tool bar
|
||||||
|
- BUGFIX: Tuned lists properties to make sure display is correct
|
||||||
|
- COSMETIC: Display date as well as time in log window
|
||||||
|
|
||||||
* Sun Apr 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.3
|
* Sun Apr 5 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.3.3
|
||||||
- BUGFIX: Fixed Web UI torrent upload form
|
- BUGFIX: Fixed Web UI torrent upload form
|
||||||
- BUGFIX: Fixed unicode support in search engine
|
- BUGFIX: Fixed unicode support in search engine
|
||||||
|
|||||||
@@ -48,6 +48,8 @@
|
|||||||
#define F_RATIO 4
|
#define F_RATIO 4
|
||||||
#define F_HASH 5
|
#define F_HASH 5
|
||||||
|
|
||||||
|
#define MAX_RATIO 100.
|
||||||
|
|
||||||
class FinishedListDelegate: public QItemDelegate {
|
class FinishedListDelegate: public QItemDelegate {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ class FinishedListDelegate: public QItemDelegate {
|
|||||||
case F_RATIO:{
|
case F_RATIO:{
|
||||||
QItemDelegate::drawBackground(painter, opt, index);
|
QItemDelegate::drawBackground(painter, opt, index);
|
||||||
double ratio = index.data().toDouble();
|
double ratio = index.data().toDouble();
|
||||||
if(ratio > 100.)
|
if(ratio > MAX_RATIO)
|
||||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::fromUtf8("∞"));
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString::fromUtf8("∞"));
|
||||||
else
|
else
|
||||||
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
QItemDelegate::drawDisplay(painter, opt, opt.rect, QString(QByteArray::number(ratio, 'f', 1)));
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
|||||||
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
||||||
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
||||||
finishedList->setModel(finishedListModel);
|
finishedList->setModel(finishedListModel);
|
||||||
|
finishedList->setRootIsDecorated(false);
|
||||||
|
finishedList->setAllColumnsShowFocus(true);
|
||||||
loadHiddenColumns();
|
loadHiddenColumns();
|
||||||
// Hide hash column
|
// Hide hash column
|
||||||
finishedList->hideColumn(F_HASH);
|
finishedList->hideColumn(F_HASH);
|
||||||
@@ -355,7 +357,7 @@ void FinishedTorrents::forceRecheck(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
void FinishedTorrents::displayFinishedListMenu(const QPoint&){
|
||||||
QMenu myFinishedListMenu(this);
|
QMenu myFinishedListMenu(this);
|
||||||
// Enable/disable pause/start action given the DL state
|
// Enable/disable pause/start action given the DL state
|
||||||
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
QModelIndexList selectedIndexes = finishedList->selectionModel()->selectedIndexes();
|
||||||
@@ -399,8 +401,7 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
|||||||
myFinishedListMenu.addAction(actionBuy_it);
|
myFinishedListMenu.addAction(actionBuy_it);
|
||||||
|
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
myFinishedListMenu.exec(QCursor::pos());
|
||||||
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=Qt;Network;P2P
|
Categories=Qt;Network;P2P
|
||||||
Comment=V1.3.3
|
Comment=V1.3.4
|
||||||
Exec=qbittorrent %f
|
Exec=qbittorrent %f
|
||||||
GenericName=Bittorrent client
|
GenericName=Bittorrent client
|
||||||
GenericName[bg]=Торент клиент
|
GenericName[bg]=Торент клиент
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
@@ -121,7 +121,6 @@
|
|||||||
<addaction name="actionIncreasePriority" />
|
<addaction name="actionIncreasePriority" />
|
||||||
<addaction name="separator" />
|
<addaction name="separator" />
|
||||||
<addaction name="actionExit" />
|
<addaction name="actionExit" />
|
||||||
<addaction name="separator" />
|
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar" />
|
<widget class="QStatusBar" name="statusBar" />
|
||||||
<action name="actionOpen" >
|
<action name="actionOpen" >
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QTime>
|
#include <QDateTime>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QFileSystemWatcher>
|
#include <QFileSystemWatcher>
|
||||||
@@ -52,9 +52,10 @@
|
|||||||
#include <boost/filesystem/exception.hpp>
|
#include <boost/filesystem/exception.hpp>
|
||||||
|
|
||||||
#define MAX_TRACKER_ERRORS 2
|
#define MAX_TRACKER_ERRORS 2
|
||||||
|
#define MAX_RATIO 100.
|
||||||
|
|
||||||
// Main constructor
|
// Main constructor
|
||||||
bittorrent::bittorrent() : DHTEnabled(false), preAllocateAll(false), addInPause(false), maxConnecsPerTorrent(500), maxUploadsPerTorrent(4), max_ratio(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), queueingEnabled(false) {
|
bittorrent::bittorrent() : DHTEnabled(false), preAllocateAll(false), addInPause(false), maxConnecsPerTorrent(500), maxUploadsPerTorrent(4), ratio_limit(-1), UPnPEnabled(false), NATPMPEnabled(false), LSDEnabled(false), queueingEnabled(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);
|
||||||
// Creating bittorrent session
|
// Creating bittorrent session
|
||||||
@@ -124,7 +125,7 @@ void bittorrent::preAllocateAllFiles(bool b) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::deleteBigRatios() {
|
void bittorrent::deleteBigRatios() {
|
||||||
if(max_ratio == -1) return;
|
if(ratio_limit == -1) return;
|
||||||
std::vector<torrent_handle> torrents = getTorrents();
|
std::vector<torrent_handle> torrents = getTorrents();
|
||||||
std::vector<torrent_handle>::iterator torrentIT;
|
std::vector<torrent_handle>::iterator torrentIT;
|
||||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||||
@@ -132,7 +133,8 @@ void bittorrent::deleteBigRatios() {
|
|||||||
if(!h.is_valid()) continue;
|
if(!h.is_valid()) continue;
|
||||||
if(h.is_seed()) {
|
if(h.is_seed()) {
|
||||||
QString hash = h.hash();
|
QString hash = h.hash();
|
||||||
if(getRealRatio(hash) > max_ratio) {
|
float ratio = getRealRatio(hash);
|
||||||
|
if(ratio <= MAX_RATIO && ratio > ratio_limit) {
|
||||||
QString fileName = h.name();
|
QString fileName = h.name();
|
||||||
addConsoleMessage(tr("%1 reached the maximum ratio you set.").arg(fileName));
|
addConsoleMessage(tr("%1 reached the maximum ratio you set.").arg(fileName));
|
||||||
deleteTorrent(hash);
|
deleteTorrent(hash);
|
||||||
@@ -769,7 +771,9 @@ float bittorrent::getRealRatio(QString hash) const{
|
|||||||
Q_ASSERT(h.all_time_download() >= 0);
|
Q_ASSERT(h.all_time_download() >= 0);
|
||||||
Q_ASSERT(h.all_time_upload() >= 0);
|
Q_ASSERT(h.all_time_upload() >= 0);
|
||||||
if(h.all_time_download() == 0) {
|
if(h.all_time_download() == 0) {
|
||||||
return 101;
|
if(h.all_time_upload() == 0)
|
||||||
|
return 0;
|
||||||
|
return 101;
|
||||||
}
|
}
|
||||||
float ratio = (float)h.all_time_upload()/(float)h.all_time_download();
|
float ratio = (float)h.all_time_upload()/(float)h.all_time_download();
|
||||||
Q_ASSERT(ratio >= 0.);
|
Q_ASSERT(ratio >= 0.);
|
||||||
@@ -848,7 +852,7 @@ void bittorrent::addConsoleMessage(QString msg, QColor color) {
|
|||||||
if(consoleMessages.size() > 100) {
|
if(consoleMessages.size() > 100) {
|
||||||
consoleMessages.removeFirst();
|
consoleMessages.removeFirst();
|
||||||
}
|
}
|
||||||
consoleMessages.append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color.name() +QString::fromUtf8("'><i>") + msg + QString::fromUtf8("</i></font>"));
|
consoleMessages.append(QString::fromUtf8("<font color='grey'>")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color.name() +QString::fromUtf8("'><i>") + msg + QString::fromUtf8("</i></font>"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void bittorrent::addPeerBanMessage(QString ip, bool from_ipfilter) {
|
void bittorrent::addPeerBanMessage(QString ip, bool from_ipfilter) {
|
||||||
@@ -856,9 +860,9 @@ void bittorrent::addPeerBanMessage(QString ip, bool from_ipfilter) {
|
|||||||
peerBanMessages.removeFirst();
|
peerBanMessages.removeFirst();
|
||||||
}
|
}
|
||||||
if(from_ipfilter)
|
if(from_ipfilter)
|
||||||
peerBanMessages.append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - ")+tr("<font color='red'>%1</font> <i>was blocked due to your IP filter</i>", "x.y.z.w was blocked").arg(ip));
|
peerBanMessages.append(QString::fromUtf8("<font color='grey'>")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8("</font> - ")+tr("<font color='red'>%1</font> <i>was blocked due to your IP filter</i>", "x.y.z.w was blocked").arg(ip));
|
||||||
else
|
else
|
||||||
peerBanMessages.append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - ")+tr("<font color='red'>%1</font> <i>was banned due to corrupt pieces</i>", "x.y.z.w was banned").arg(ip));
|
peerBanMessages.append(QString::fromUtf8("<font color='grey'>")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8("</font> - ")+tr("<font color='red'>%1</font> <i>was banned due to corrupt pieces</i>", "x.y.z.w was banned").arg(ip));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool bittorrent::isFilePreviewPossible(QString hash) const{
|
bool bittorrent::isFilePreviewPossible(QString hash) const{
|
||||||
@@ -981,19 +985,19 @@ void bittorrent::setGlobalRatio(float ratio) {
|
|||||||
// be automatically deleted
|
// be automatically deleted
|
||||||
void bittorrent::setDeleteRatio(float ratio) {
|
void bittorrent::setDeleteRatio(float ratio) {
|
||||||
if(ratio != -1 && ratio < 1.) ratio = 1.;
|
if(ratio != -1 && ratio < 1.) ratio = 1.;
|
||||||
if(max_ratio == -1 && ratio != -1) {
|
if(ratio_limit == -1 && ratio != -1) {
|
||||||
Q_ASSERT(!BigRatioTimer);
|
Q_ASSERT(!BigRatioTimer);
|
||||||
BigRatioTimer = new QTimer(this);
|
BigRatioTimer = new QTimer(this);
|
||||||
connect(BigRatioTimer, SIGNAL(timeout()), this, SLOT(deleteBigRatios()));
|
connect(BigRatioTimer, SIGNAL(timeout()), this, SLOT(deleteBigRatios()));
|
||||||
BigRatioTimer->start(5000);
|
BigRatioTimer->start(5000);
|
||||||
} else {
|
} else {
|
||||||
if(max_ratio != -1 && ratio == -1) {
|
if(ratio_limit != -1 && ratio == -1) {
|
||||||
delete BigRatioTimer;
|
delete BigRatioTimer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(max_ratio != ratio) {
|
if(ratio_limit != ratio) {
|
||||||
max_ratio = ratio;
|
ratio_limit = ratio;
|
||||||
qDebug("* Set deleteRatio to %.1f", max_ratio);
|
qDebug("* Set deleteRatio to %.1f", ratio_limit);
|
||||||
deleteBigRatios();
|
deleteBigRatios();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class bittorrent : public QObject {
|
|||||||
bool addInPause;
|
bool addInPause;
|
||||||
int maxConnecsPerTorrent;
|
int maxConnecsPerTorrent;
|
||||||
int maxUploadsPerTorrent;
|
int maxUploadsPerTorrent;
|
||||||
float max_ratio;
|
float ratio_limit;
|
||||||
bool UPnPEnabled;
|
bool UPnPEnabled;
|
||||||
bool NATPMPEnabled;
|
bool NATPMPEnabled;
|
||||||
bool LSDEnabled;
|
bool LSDEnabled;
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
|
|||||||
DLListModel->setHeaderData(ETA, Qt::Horizontal, tr("ETA", "i.e: Estimated Time of Arrival / Time left"));
|
DLListModel->setHeaderData(ETA, Qt::Horizontal, tr("ETA", "i.e: Estimated Time of Arrival / Time left"));
|
||||||
DLListModel->setHeaderData(PRIORITY, Qt::Horizontal, tr("Priority"));
|
DLListModel->setHeaderData(PRIORITY, Qt::Horizontal, tr("Priority"));
|
||||||
downloadList->setModel(DLListModel);
|
downloadList->setModel(DLListModel);
|
||||||
|
downloadList->setRootIsDecorated(false);
|
||||||
|
downloadList->setAllColumnsShowFocus(true);
|
||||||
DLDelegate = new DLListDelegate(downloadList);
|
DLDelegate = new DLListDelegate(downloadList);
|
||||||
downloadList->setItemDelegate(DLDelegate);
|
downloadList->setItemDelegate(DLDelegate);
|
||||||
// Hide priority column
|
// Hide priority column
|
||||||
@@ -236,7 +238,7 @@ void DownloadingTorrents::forceRecheck() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
void DownloadingTorrents::displayDLListMenu(const QPoint&) {
|
||||||
QMenu myDLLlistMenu(this);
|
QMenu myDLLlistMenu(this);
|
||||||
// Enable/disable pause/start action given the DL state
|
// Enable/disable pause/start action given the DL state
|
||||||
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
|
QModelIndexList selectedIndexes = downloadList->selectionModel()->selectedIndexes();
|
||||||
@@ -285,8 +287,7 @@ void DownloadingTorrents::displayDLListMenu(const QPoint& pos) {
|
|||||||
myDLLlistMenu.addSeparator();
|
myDLLlistMenu.addSeparator();
|
||||||
myDLLlistMenu.addAction(actionBuy_it);
|
myDLLlistMenu.addAction(actionBuy_it);
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
myDLLlistMenu.exec(QCursor::pos());
|
||||||
myDLLlistMenu.exec(mapToGlobal(pos)+QPoint(10,35));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -578,6 +579,7 @@ void DownloadingTorrents::addTorrent(QString hash) {
|
|||||||
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.));
|
DLListModel->setData(DLListModel->index(row, UPSPEED), QVariant((double)0.));
|
||||||
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0")));
|
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(QString::fromUtf8("0/0")));
|
||||||
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
|
||||||
|
DLListModel->setData(DLListModel->index(row, RATIO), QVariant((double)0.));
|
||||||
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
|
||||||
if(BTSession->isQueueingEnabled())
|
if(BTSession->isQueueingEnabled())
|
||||||
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
|
||||||
|
|||||||
@@ -191,9 +191,9 @@ class FilterParserThread : public QThread {
|
|||||||
if(IPv4) {
|
if(IPv4) {
|
||||||
//IPv4 addresses
|
//IPv4 addresses
|
||||||
IP = strStartIP.split('.');
|
IP = strStartIP.split('.');
|
||||||
address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
IP = strEndIP.split('.');
|
IP = strEndIP.split('.');
|
||||||
address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
// Apply to bittorrent session
|
// Apply to bittorrent session
|
||||||
filter.add_rule(start, last, ip_filter::blocked);
|
filter.add_rule(start, last, ip_filter::blocked);
|
||||||
} else {
|
} else {
|
||||||
@@ -250,9 +250,9 @@ class FilterParserThread : public QThread {
|
|||||||
if(strStartIP.contains(is_ipv4) && strEndIP.contains(is_ipv4)) {
|
if(strStartIP.contains(is_ipv4) && strEndIP.contains(is_ipv4)) {
|
||||||
// IPv4
|
// IPv4
|
||||||
IP = strStartIP.split('.');
|
IP = strStartIP.split('.');
|
||||||
address_v4 start((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
IP = strEndIP.split('.');
|
IP = strEndIP.split('.');
|
||||||
address_v4 last((IP.at(0).toInt() << 24) + (IP.at(1).toInt() << 16) + (IP.at(2).toInt() << 8) + IP.at(3).toInt());
|
address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
|
||||||
// Apply to bittorrent session
|
// Apply to bittorrent session
|
||||||
filter.add_rule(start, last, ip_filter::blocked);
|
filter.add_rule(start, last, ip_filter::blocked);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -103,8 +103,12 @@ void useStyle(QApplication *app, int style){
|
|||||||
app->setStyle(new QWindowsXPStyle());
|
app->setStyle(new QWindowsXPStyle());
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
/*default:
|
default:
|
||||||
app->setStyle(new QPlastiqueStyle());*/
|
if(app->style()->objectName() == "cleanlooks") {
|
||||||
|
// Force our own cleanlooks style
|
||||||
|
qDebug("Forcing our own cleanlooks style");
|
||||||
|
app->setStyle(new QGnomeLookStyle());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -136,9 +136,8 @@ properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h
|
|||||||
updateInfosTimer->start(3000);
|
updateInfosTimer->start(3000);
|
||||||
progressBar = new RealProgressBar(this);
|
progressBar = new RealProgressBar(this);
|
||||||
progressBar->setForegroundColor(Qt::blue);
|
progressBar->setForegroundColor(Qt::blue);
|
||||||
QVBoxLayout *vbox = new QVBoxLayout(this);
|
progressBarVbox = new QVBoxLayout(RealProgressBox);
|
||||||
vbox->addWidget(progressBar);
|
progressBarVbox->addWidget(progressBar);
|
||||||
RealProgressBox->setLayout(vbox);
|
|
||||||
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
progressBarUpdater = new RealProgressBarThread(progressBar, h);
|
||||||
progressBarUpdater->start();
|
progressBarUpdater->start();
|
||||||
// progressBarUpdater->refresh();
|
// progressBarUpdater->refresh();
|
||||||
@@ -153,6 +152,7 @@ properties::~properties(){
|
|||||||
delete PropListModel;
|
delete PropListModel;
|
||||||
delete progressBarUpdater;
|
delete progressBarUpdater;
|
||||||
delete progressBar;
|
delete progressBar;
|
||||||
|
delete progressBarVbox;
|
||||||
}
|
}
|
||||||
|
|
||||||
void properties::addFilesToTree(const torrent_file *root, QStandardItem *parent) {
|
void properties::addFilesToTree(const torrent_file *root, QStandardItem *parent) {
|
||||||
@@ -362,7 +362,7 @@ void properties::getPriorities(QStandardItem *parent, int *priorities) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void properties::displayFilesListMenu(const QPoint& pos){
|
void properties::displayFilesListMenu(const QPoint&){
|
||||||
if(h.get_torrent_info().num_files() == 1) return;
|
if(h.get_torrent_info().num_files() == 1) return;
|
||||||
QMenu myFilesLlistMenu(this);
|
QMenu myFilesLlistMenu(this);
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
@@ -374,8 +374,7 @@ void properties::displayFilesListMenu(const QPoint& pos){
|
|||||||
myFilesLlistMenu.addAction(actionHigh);
|
myFilesLlistMenu.addAction(actionHigh);
|
||||||
myFilesLlistMenu.addAction(actionMaximum);
|
myFilesLlistMenu.addAction(actionMaximum);
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
myFilesLlistMenu.exec(QCursor::pos());
|
||||||
myFilesLlistMenu.exec(mapToGlobal(pos)+QPoint(22,95));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void properties::ignoreSelection(){
|
void properties::ignoreSelection(){
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ class properties : public QDialog, private Ui::properties{
|
|||||||
QStringList urlSeeds;
|
QStringList urlSeeds;
|
||||||
RealProgressBar *progressBar;
|
RealProgressBar *progressBar;
|
||||||
RealProgressBarThread *progressBarUpdater;
|
RealProgressBarThread *progressBarUpdater;
|
||||||
|
QVBoxLayout *progressBarVbox;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void on_okButton_clicked();
|
void on_okButton_clicked();
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ void SearchEngine::on_search_button_clicked(){
|
|||||||
// verify the max size of the history
|
// verify the max size of the history
|
||||||
if(searchHistory.size() > SEARCHHISTORY_MAXSIZE)
|
if(searchHistory.size() > SEARCHHISTORY_MAXSIZE)
|
||||||
searchHistory = searchHistory.mid(searchHistory.size()/2,searchHistory.size()/2);
|
searchHistory = searchHistory.mid(searchHistory.size()/2,searchHistory.size()/2);
|
||||||
|
delete searchCompleter;
|
||||||
searchCompleter = new QCompleter(searchHistory, this);
|
searchCompleter = new QCompleter(searchHistory, this);
|
||||||
searchCompleter->setCaseSensitivity(Qt::CaseInsensitive);
|
searchCompleter->setCaseSensitivity(Qt::CaseInsensitive);
|
||||||
search_pattern->setCompleter(searchCompleter);
|
search_pattern->setCompleter(searchCompleter);
|
||||||
@@ -269,7 +270,7 @@ void SearchEngine::downloadFinished(int exitcode, QProcess::ExitStatus) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
qDebug("Deleting downloadProcess");
|
qDebug("Deleting downloadProcess");
|
||||||
downloaders.removeOne(downloadProcess);
|
downloaders.removeAll(downloadProcess);
|
||||||
delete downloadProcess;
|
delete downloadProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#VERSION: 1.0
|
|
||||||
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions are met:
|
# modification, are permitted provided that the following conditions are met:
|
||||||
#
|
#
|
||||||
@@ -24,6 +22,11 @@
|
|||||||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#VERSION: 1.02
|
||||||
|
|
||||||
|
# Author:
|
||||||
|
# Christophe DUMEZ (chris@qbittorrent.org)
|
||||||
|
|
||||||
import re, htmlentitydefs
|
import re, htmlentitydefs
|
||||||
import urllib2
|
import urllib2
|
||||||
import tempfile
|
import tempfile
|
||||||
@@ -66,7 +69,7 @@ def download_file(url):
|
|||||||
file = os.fdopen(file, "wb")
|
file = os.fdopen(file, "wb")
|
||||||
# Download url
|
# Download url
|
||||||
req = urllib2.Request(url)
|
req = urllib2.Request(url)
|
||||||
response = urllib2.urlopen(url)
|
response = urllib2.urlopen(req)
|
||||||
dat = response.read()
|
dat = response.read()
|
||||||
# Write it to a file
|
# Write it to a file
|
||||||
file.write(dat)
|
file.write(dat)
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ CONFIG += qt \
|
|||||||
network
|
network
|
||||||
|
|
||||||
# Update this VERSION for each release
|
# Update this VERSION for each release
|
||||||
DEFINES += VERSION=\\\"v1.3.3\\\"
|
DEFINES += VERSION=\\\"v1.3.4\\\"
|
||||||
DEFINES += VERSION_MAJOR=1
|
DEFINES += VERSION_MAJOR=1
|
||||||
DEFINES += VERSION_MINOR=3
|
DEFINES += VERSION_MINOR=3
|
||||||
DEFINES += VERSION_BUGFIX=3
|
DEFINES += VERSION_BUGFIX=4
|
||||||
!mac:QMAKE_LFLAGS += -Wl,--as-needed
|
!mac:QMAKE_LFLAGS += -Wl,--as-needed
|
||||||
contains(DEBUG_MODE, 1) {
|
contains(DEBUG_MODE, 1) {
|
||||||
CONFIG += debug
|
CONFIG += debug
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void displayFilesListMenu(const QPoint& pos){
|
void displayFilesListMenu(const QPoint&){
|
||||||
if(nbFiles == 1) return;
|
if(nbFiles == 1) return;
|
||||||
QMenu myFilesLlistMenu(this);
|
QMenu myFilesLlistMenu(this);
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
@@ -302,8 +302,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
|
|||||||
myFilesLlistMenu.addAction(actionHigh);
|
myFilesLlistMenu.addAction(actionHigh);
|
||||||
myFilesLlistMenu.addAction(actionMaximum);
|
myFilesLlistMenu.addAction(actionMaximum);
|
||||||
// Call menu
|
// Call menu
|
||||||
// XXX: why mapToGlobal() is not enough?
|
myFilesLlistMenu.exec(QCursor::pos());
|
||||||
myFilesLlistMenu.exec(mapToGlobal(pos)+QPoint(10,145));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ignoreSelection(){
|
void ignoreSelection(){
|
||||||
|
|||||||
Reference in New Issue
Block a user