1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-09 18:32:15 +02:00

Compare commits

...

23 Commits

Author SHA1 Message Date
Christophe Dumez
7c490fcb39 tagged v1.4.0rc1 2009-07-27 02:50:32 +00:00
Christophe Dumez
83a798b07e - Updated Portuguese and Brazilian translations 2009-07-27 01:57:40 +00:00
Christophe Dumez
baee85684c - Updated romanian translation 2009-07-25 16:14:53 +00:00
Christophe Dumez
88afb0f0e7 - Updated Chinese Translation 2009-07-25 13:32:08 +00:00
Christophe Dumez
6f212f18f5 - Updated Russian translation 2009-07-25 12:07:13 +00:00
Christophe Dumez
f04e600340 - Updated Turkish translation 2009-07-25 08:46:07 +00:00
Christophe Dumez
5140886567 - Updated slovak translation 2009-07-24 13:24:10 +00:00
Christophe Dumez
0aa59694fd - Updated Czech translation 2009-07-24 11:29:45 +00:00
Christophe Dumez
66d31b5ca1 - Updated Finnish translation 2009-07-24 11:16:41 +00:00
Christophe Dumez
47135932a4 - Updated Finnish translation 2009-07-24 09:16:26 +00:00
Christophe Dumez
40d0e44f15 - Bump to rc1 2009-07-24 08:32:51 +00:00
Christophe Dumez
16c30a2f10 - Updated language files 2009-07-24 08:16:40 +00:00
Christophe Dumez
7f2639fcbd - Remember visual indexes of columns in transfer lists 2009-07-24 05:53:35 +00:00
Christophe Dumez
8ad987a672 - Save properties window size, position, columns width and restore them
- Set a minimum default width for NAME column in properties
2009-07-24 03:35:55 +00:00
Christophe Dumez
b24194068a - Fixed possible overflow in progress calculation in arborescence.h 2009-07-24 03:00:11 +00:00
Christophe Dumez
f4e9b00ce3 - Fixed a small typo 2009-07-24 02:40:36 +00:00
Christophe Dumez
5c0a24d58b - Fixed "infos" -> "info" typo in torrent properties
- Updated language files
- Updated French translation
2009-07-23 14:15:27 +00:00
Christophe Dumez
c4aa23c86b - Fixed torrent creation (closes #402025) 2009-07-23 09:11:05 +00:00
Christophe Dumez
96911a2c48 - Fixed broken icon for Website link 2009-07-15 11:13:52 +00:00
Christophe Dumez
85abb80f43 - Updated TODO 2009-07-15 11:02:56 +00:00
Christophe Dumez
2372f434cf Fixed a small bug in new DHT port setting code 2009-07-14 08:06:55 +00:00
Christophe Dumez
ee6bc3c2e9 - FEATURE: Allow to set a different port for DHT (UDP) than the one used for
Bittorrent
2009-07-14 07:50:00 +00:00
Christophe Dumez
b6c6637c3b Made IP filter more robust 2009-07-14 06:49:16 +00:00
69 changed files with 3943 additions and 10150 deletions

View File

@@ -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
View File

@@ -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

View File

@@ -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");
}

View File

@@ -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"));
}

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);
};

View File

@@ -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;
}

View File

@@ -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