You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
23 Commits
release-1.
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c490fcb39 | ||
![]() |
83a798b07e | ||
![]() |
baee85684c | ||
![]() |
88afb0f0e7 | ||
![]() |
6f212f18f5 | ||
![]() |
f04e600340 | ||
![]() |
5140886567 | ||
![]() |
0aa59694fd | ||
![]() |
66d31b5ca1 | ||
![]() |
47135932a4 | ||
![]() |
40d0e44f15 | ||
![]() |
16c30a2f10 | ||
![]() |
7f2639fcbd | ||
![]() |
8ad987a672 | ||
![]() |
b24194068a | ||
![]() |
f4e9b00ce3 | ||
![]() |
5c0a24d58b | ||
![]() |
c4aa23c86b | ||
![]() |
96911a2c48 | ||
![]() |
85abb80f43 | ||
![]() |
2372f434cf | ||
![]() |
ee6bc3c2e9 | ||
![]() |
b6c6637c3b |
@@ -5,6 +5,7 @@
|
||||
- FEATURE: Resizing a column in a search results tab affects all tabs
|
||||
- FEATURE: Search results tab columns are now remembered upon startup
|
||||
- FEATURE: Added right click menu in search engine to clear completion history
|
||||
- FEATURE: Allow to set a different port for DHT (UDP) than the one used for Bittorrent
|
||||
- BUGFIX: Provide more helpful explanation when an I/O error occured
|
||||
- BUGFIX: Stop enforcing UTF-8 and use system locale instead
|
||||
- COSMETIC: Redesigned program preferences
|
||||
|
25
TODO
25
TODO
@@ -1,27 +1,2 @@
|
||||
See https://blueprints.launchpad.net/qbittorrent/
|
||||
|
||||
// TODO in v1.4.0
|
||||
- Display peers information (disabled as a default)
|
||||
- Automatically move torrent to another directory on completion (disabled as a default)
|
||||
- Rework program preferences (make easier)
|
||||
- Provide better errors messages to make debugging easier
|
||||
|
||||
// translations done in v1.3.0
|
||||
- Romanian
|
||||
- Russian
|
||||
- Hungarian
|
||||
- German
|
||||
- Chinese (traditional)
|
||||
- Chinese (simplified)
|
||||
- Italian
|
||||
- Swedish
|
||||
- Turkish
|
||||
- French
|
||||
- Slovak
|
||||
- Czech
|
||||
- Korean
|
||||
- Portuguese
|
||||
- Brazilian
|
||||
- Greek
|
||||
- Bulgarian
|
||||
- Finnish
|
||||
|
@@ -182,6 +182,23 @@ bool FinishedTorrents::loadColWidthFinishedList(){
|
||||
finishedList->header()->resizeSection(i, width_list.at(i).toInt());
|
||||
}
|
||||
loadLastSortedColumn();
|
||||
QVariantList visualIndexes = settings.value(QString::fromUtf8("FinishedListVisualIndexes"), QVariantList()).toList();
|
||||
if(visualIndexes.size() != finishedListModel->columnCount()-1) {
|
||||
qDebug("Corrupted values for download list columns sizes");
|
||||
return false;
|
||||
}
|
||||
bool change = false;
|
||||
do {
|
||||
change = false;
|
||||
for(int i=0;i<visualIndexes.size(); ++i) {
|
||||
int new_visual_index = visualIndexes.at(finishedList->header()->logicalIndex(i)).toInt();
|
||||
if(i != new_visual_index) {
|
||||
qDebug("Moving column from %d to %d", finishedList->header()->logicalIndex(i), new_visual_index);
|
||||
finishedList->header()->moveSection(i, new_visual_index);
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
}while(change);
|
||||
qDebug("Finished list columns width loaded");
|
||||
return true;
|
||||
}
|
||||
@@ -229,6 +246,11 @@ void FinishedTorrents::saveColWidthFinishedList() const{
|
||||
}
|
||||
}
|
||||
settings.setValue("FinishedListColsWidth", new_width_list.join(" "));
|
||||
QVariantList visualIndexes;
|
||||
for(int i=0; i<nbColumns; ++i) {
|
||||
visualIndexes.append(finishedList->header()->visualIndex(i));
|
||||
}
|
||||
settings.setValue(QString::fromUtf8("FinishedListVisualIndexes"), visualIndexes);
|
||||
qDebug("Finished list columns width saved");
|
||||
}
|
||||
|
||||
|
11
src/GUI.cpp
11
src/GUI.cpp
@@ -105,7 +105,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
actionDownload_from_URL->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/url.png")));
|
||||
actionOptions->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/settings.png")));
|
||||
actionAbout->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/info.png")));
|
||||
actionWebsite->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/qbittorrent32.png")));
|
||||
actionWebsite->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png")));
|
||||
actionBugReport->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/bug.png")));
|
||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||
@@ -990,7 +990,7 @@ void GUI::configureSession(bool deleteOptions) {
|
||||
BTSession->setListeningPortsRange(options->getPorts());
|
||||
unsigned short new_listenPort = BTSession->getListenPort();
|
||||
if(new_listenPort != old_listenPort) {
|
||||
BTSession->addConsoleMessage(tr("qBittorrent is bind to port: %1", "e.g: qBittorrent is bind to port: 1666").arg( misc::toQString(new_listenPort)));
|
||||
BTSession->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
|
||||
QPair<int, int> limits = options->getGlobalBandwidthLimits();
|
||||
@@ -1079,9 +1079,12 @@ void GUI::configureSession(bool deleteOptions) {
|
||||
// * DHT
|
||||
if(options->isDHTEnabled()) {
|
||||
// Set DHT Port
|
||||
BTSession->setDHTPort(new_listenPort);
|
||||
BTSession->setDHTPort(options->getDHTPort());
|
||||
if(BTSession->enableDHT(true)) {
|
||||
BTSession->addConsoleMessage(tr("DHT support [ON], port: %1").arg(new_listenPort), QString::fromUtf8("blue"));
|
||||
int dht_port = new_listenPort;
|
||||
if(options->getDHTPort())
|
||||
dht_port = options->getDHTPort();
|
||||
BTSession->addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
|
||||
} else {
|
||||
BTSession->addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("red"));
|
||||
}
|
||||
|
@@ -51,6 +51,8 @@ class torrent_file {
|
||||
torrent_file(torrent_file *parent, QString path, bool dir, size_type size=0, int index=-1, float progress=0., int priority=1): parent(parent), is_dir(dir), size(size), progress(progress), priority(priority), index(index){
|
||||
qDebug("created a file with index %d", index);
|
||||
rel_path = QDir::cleanPath(path);
|
||||
Q_ASSERT(progress >= 0.);
|
||||
Q_ASSERT(progress <= 1.);
|
||||
if(parent) {
|
||||
parent->updateProgress();
|
||||
parent->updatePriority(priority);
|
||||
@@ -75,8 +77,8 @@ class torrent_file {
|
||||
progress = 0.;
|
||||
return;
|
||||
}
|
||||
float wanted = 0.;
|
||||
float done = 0.;
|
||||
double wanted = 0.;
|
||||
double done = 0.;
|
||||
foreach(const torrent_file *child, children) {
|
||||
wanted += child->getSize();
|
||||
done += child->getSize()*child->getProgress();
|
||||
@@ -205,13 +207,13 @@ class arborescence {
|
||||
} else {
|
||||
// XXX: Will crash if there is no file in torrent
|
||||
qDebug("one file in the torrent, setting it as root with index 0");
|
||||
root = new torrent_file(0, misc::toQString(t.name()), false, fi->size, 0, ((float)fp[0])/t.file_at(0).size, prioritiesTab[0]);
|
||||
root = new torrent_file(0, misc::toQString(t.name()), false, fi->size, 0, ((double)fp[0])/t.file_at(0).size, prioritiesTab[0]);
|
||||
return;
|
||||
}
|
||||
int i = 0;
|
||||
while(fi != t.end_files()) {
|
||||
QString path = QDir::cleanPath(misc::toQString(fi->path.string()));
|
||||
addFile(path, fi->size, i, ((float)fp[i])/t.file_at(i).size, prioritiesTab[i]);
|
||||
addFile(path, fi->size, i, ((double)fp[i])/t.file_at(i).size, prioritiesTab[i]);
|
||||
fi++;
|
||||
++i;
|
||||
}
|
||||
|
@@ -1072,9 +1072,9 @@ void bittorrent::saveTrackerFile(QString hash) {
|
||||
tracker_file.close();
|
||||
}
|
||||
|
||||
// Set DHT port (>= 1000)
|
||||
// Set DHT port (>= 1000 or 0 if same as BT)
|
||||
void bittorrent::setDHTPort(int dht_port) {
|
||||
if(dht_port >= 1000) {
|
||||
if(dht_port == 0 or dht_port >= 1000) {
|
||||
struct dht_settings DHTSettings;
|
||||
DHTSettings.service_port = dht_port;
|
||||
s->set_dht_settings(DHTSettings);
|
||||
|
@@ -184,7 +184,6 @@ void createtorrent::on_createButton_clicked(){
|
||||
|
||||
void createtorrent::handleCreationFailure(QString msg) {
|
||||
QMessageBox::information(0, tr("Torrent creation"), tr("Torrent creation was unsuccessful, reason: %1").arg(msg));
|
||||
hide();
|
||||
}
|
||||
|
||||
void createtorrent::handleCreationSuccess(QString path, const char* branch_path) {
|
||||
@@ -205,7 +204,7 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
|
||||
emit torrent_to_seed(path);
|
||||
}
|
||||
QMessageBox::information(0, tr("Torrent creation"), tr("Torrent was created successfully:")+" "+path);
|
||||
hide();
|
||||
close();
|
||||
}
|
||||
|
||||
void createtorrent::updateProgressBar(int progress) {
|
||||
@@ -228,8 +227,12 @@ void torrentCreatorThread::create(QString _input_path, QString _save_path, QStri
|
||||
start();
|
||||
}
|
||||
|
||||
void sendProgressUpdateSignal(int i, int num, QDialog *parent){
|
||||
((createtorrent*)parent)->updateProgressBar((int)(i*100./(float)num));
|
||||
void sendProgressUpdateSignal(int i, int num, torrentCreatorThread *parent){
|
||||
parent->sendProgressSignal((int)(i*100./(float)num));
|
||||
}
|
||||
|
||||
void torrentCreatorThread::sendProgressSignal(int progress) {
|
||||
emit updateProgress(progress);
|
||||
}
|
||||
|
||||
void torrentCreatorThread::run() {
|
||||
@@ -254,15 +257,13 @@ void torrentCreatorThread::run() {
|
||||
}
|
||||
if(abort) return;
|
||||
// calculate the hash for all pieces
|
||||
set_piece_hashes(t, full_path.branch_path(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), parent));
|
||||
set_piece_hashes(t, full_path.branch_path(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this));
|
||||
// Set qBittorrent as creator and add user comment to
|
||||
// torrent_info structure
|
||||
t.set_creator(creator_str);
|
||||
t.set_comment((const char*)comment.toLocal8Bit());
|
||||
// Is private ?
|
||||
if(is_private){
|
||||
t.set_priv(true);
|
||||
}
|
||||
t.set_priv(is_private);
|
||||
if(abort) return;
|
||||
// create the torrent and print it to out
|
||||
ofstream out(complete(path((const char*)save_path.toLocal8Bit())), std::ios_base::binary);
|
||||
|
@@ -57,6 +57,7 @@ class torrentCreatorThread : public QThread {
|
||||
wait();
|
||||
}
|
||||
void create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size);
|
||||
void sendProgressSignal(int progress);
|
||||
|
||||
protected:
|
||||
void run();
|
||||
@@ -64,6 +65,8 @@ class torrentCreatorThread : public QThread {
|
||||
signals:
|
||||
void creationFailure(QString msg);
|
||||
void creationSuccess(QString path, const char* branch_path);
|
||||
|
||||
signals:
|
||||
void updateProgress(int progress);
|
||||
};
|
||||
|
||||
|
@@ -738,6 +738,11 @@ void DownloadingTorrents::saveColWidthDLList() const{
|
||||
}
|
||||
}
|
||||
settings.setValue(QString::fromUtf8("DownloadListColsWidth"), new_width_list.join(QString::fromUtf8(" ")));
|
||||
QVariantList visualIndexes;
|
||||
for(int i=0; i<nbColumns; ++i) {
|
||||
visualIndexes.append(downloadList->header()->visualIndex(i));
|
||||
}
|
||||
settings.setValue(QString::fromUtf8("DownloadListVisualIndexes"), visualIndexes);
|
||||
qDebug("Download list columns width saved");
|
||||
}
|
||||
|
||||
@@ -758,6 +763,23 @@ bool DownloadingTorrents::loadColWidthDLList() {
|
||||
for(unsigned int i=0; i<listSize; ++i) {
|
||||
downloadList->header()->resizeSection(i, width_list.at(i).toInt());
|
||||
}
|
||||
QVariantList visualIndexes = settings.value(QString::fromUtf8("DownloadListVisualIndexes"), QVariantList()).toList();
|
||||
if(visualIndexes.size() != DLListModel->columnCount()-1) {
|
||||
qDebug("Corrupted values for download list columns sizes");
|
||||
return false;
|
||||
}
|
||||
bool change = false;
|
||||
do {
|
||||
change = false;
|
||||
for(int i=0;i<visualIndexes.size(); ++i) {
|
||||
int new_visual_index = visualIndexes.at(downloadList->header()->logicalIndex(i)).toInt();
|
||||
if(i != new_visual_index) {
|
||||
qDebug("Moving column from %d to %d", downloadList->header()->logicalIndex(i), new_visual_index);
|
||||
downloadList->header()->moveSection(i, new_visual_index);
|
||||
change = true;
|
||||
}
|
||||
}
|
||||
}while(change);
|
||||
qDebug("Download list columns width loaded");
|
||||
return true;
|
||||
}
|
||||
|
@@ -191,8 +191,12 @@ class FilterParserThread : public QThread {
|
||||
if(IPv4) {
|
||||
//IPv4 addresses
|
||||
IP = strStartIP.split('.');
|
||||
if(IP.size() != 4)
|
||||
throw exception();
|
||||
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('.');
|
||||
if(IP.size() != 4)
|
||||
throw exception();
|
||||
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
|
||||
filter.add_rule(start, last, ip_filter::blocked);
|
||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user