1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-23 22:32:16 +02:00

Compare commits

..

22 Commits

Author SHA1 Message Date
Christophe Dumez
fa9c319f5b Tagged v2.4.0rc3 release 2010-08-23 19:47:49 +00:00
Christophe Dumez
eb54d81c5e Bump to rc3 2010-08-23 19:42:33 +00:00
Christophe Dumez
431d2f082c FEATURE: Detect executable updates in order to advise the user to restart 2010-08-23 19:42:15 +00:00
Christophe Dumez
a0ff0cdc7e UI lock related cosmetic changes 2010-08-23 16:12:17 +00:00
Christophe Dumez
fb91558261 Updated Portuguese and Brazilian translations 2010-08-23 15:46:06 +00:00
Christophe Dumez
fc2a47ca31 Updated Spanish and Catalan translation 2010-08-23 06:07:52 +00:00
Christophe Dumez
dcccbaad59 UI Lock also lock the tray icon menu 2010-08-22 19:08:15 +00:00
Christophe Dumez
99d040de3f Updated Serbian translation 2010-08-22 18:52:54 +00:00
Christophe Dumez
ee30a75b57 Fix compilation warning 2010-08-22 18:11:19 +00:00
Christophe Dumez
8c001aa478 Force progress update of paused torrents too 2010-08-22 16:55:57 +00:00
Christophe Dumez
849bc11a01 Updated Simplified Chinese translation 2010-08-22 14:27:47 +00:00
Christophe Dumez
5024e0b092 Updated Traditional Chinese translation 2010-08-22 12:53:16 +00:00
Christophe Dumez
d93447489b Clear search filter before hiding the top toolbar 2010-08-22 08:54:33 +00:00
Christophe Dumez
33988e70ab Updated Czech translation 2010-08-22 08:38:56 +00:00
Christophe Dumez
d2b41d70c8 Safer error detection 2010-08-21 20:22:59 +00:00
Christophe Dumez
8e1e51d268 Bump to rc2 2010-08-21 20:16:26 +00:00
Christophe Dumez
53500ea005 Force progress update on torrent pausing 2010-08-21 20:12:16 +00:00
Christophe Dumez
e048389dea Attempt to improve error detection 2010-08-21 09:08:12 +00:00
Christophe Dumez
fa7b1a205d Updated Slovak translation 2010-08-20 20:39:21 +00:00
Christophe Dumez
7dd6b7e9bb Updated Ukrainian translation 2010-08-20 14:37:30 +00:00
Christophe Dumez
78b96accda Fix "Seed until ratio reaches x.x" feature 2010-08-20 14:17:46 +00:00
Christophe Dumez
73d0e2568a Updated Web UI to reflect the autorun changes 2010-08-20 14:02:40 +00:00
54 changed files with 3051 additions and 2747 deletions

View File

@@ -6,6 +6,7 @@
- FEATURE: Added label-level Pause/Resume/Delete actions
- FEATURE: Torrents can now be filtered by name
- FEATURE: Run external program on torrent completion
- FEATURE: Detect executable updates in order to advise the user to restart
* Tue Jul 27 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.3.0
- FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible)

View File

@@ -34,6 +34,7 @@
#endif
#include <QFileDialog>
#include <QFileSystemWatcher>
#include <QMessageBox>
#include <QTimer>
#include <QDesktopServices>
@@ -157,7 +158,8 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
// Name filter
search_filter = new LineEdit();
toolBar->addWidget(search_filter);
QAction *separatorBFSearch = toolBar->insertSeparator(actionLock_qBittorrent);
toolBar->insertWidget(separatorBFSearch, search_filter);
search_filter->setFixedWidth(200);
connect(search_filter, SIGNAL(textChanged(QString)), transferList, SLOT(applyNameFilter(QString)));
@@ -219,6 +221,11 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
showMinimized();
}
// Start watching the executable for updates
executable_watcher = new QFileSystemWatcher();
connect(executable_watcher, SIGNAL(fileChanged(QString)), this, SLOT(notifyOfUpdate(QString)));
executable_watcher->addPath(qApp->applicationFilePath());
// Resume unfinished torrents
BTSession->startUpTorrents();
// Add torrent given on command line
@@ -256,6 +263,8 @@ GUI::~GUI() {
properties->saveSettings();
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tab_changed(int)));
// Delete other GUI objects
if(executable_watcher)
delete executable_watcher;
delete status_bar;
delete search_filter;
delete transferList;
@@ -328,6 +337,7 @@ void GUI::on_actionLock_qBittorrent_triggered() {
// Lock the interface
ui_locked = true;
Preferences::setUILocked(true);
myTrayIconMenu->setEnabled(false);
hide();
}
@@ -583,12 +593,21 @@ bool GUI::unlockUI() {
if(real_pass_md5 == password_md5) {
ui_locked = false;
Preferences::setUILocked(false);
myTrayIconMenu->setEnabled(true);
return true;
}
QMessageBox::warning(this, tr("Invalid password"), tr("The password is invalid"));
return false;
}
void GUI::notifyOfUpdate(QString) {
// Show restart message
status_bar->showRestartRequired();
// Delete the executable watcher
delete executable_watcher;
executable_watcher = 0;
}
// Toggle Main window visibility
void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
@@ -916,6 +935,8 @@ void GUI::loadPreferences(bool configure_session) {
toolBar->setVisible(true);
toolBar->layout()->setSpacing(7);
} else {
// Clear search filter before hiding the top toolbar
search_filter->clear();
toolBar->setVisible(false);
}
const uint new_refreshInterval = Preferences::getRefreshInterval();
@@ -1098,6 +1119,8 @@ QMenu* GUI::getTrayIconMenu() {
myTrayIconMenu->addAction(actionPause_All);
myTrayIconMenu->addSeparator();
myTrayIconMenu->addAction(actionExit);
if(ui_locked)
myTrayIconMenu->setEnabled(false);
return myTrayIconMenu;
}

View File

@@ -58,6 +58,7 @@ class createtorrent;
class downloadFromURL;
class HidableTabWidget;
class LineEdit;
class QFileSystemWatcher;
class GUI : public QMainWindow, private Ui::MainWindow{
Q_OBJECT
@@ -102,6 +103,7 @@ protected slots:
void on_actionLock_qBittorrent_triggered();
void defineUILockPassword();
bool unlockUI();
void notifyOfUpdate(QString);
// Keyboard shortcuts
void createKeyboardShortcuts();
void displayTransferTab() const;
@@ -135,6 +137,7 @@ protected:
void displaySearchTab(bool enable);
private:
QFileSystemWatcher *executable_watcher;
// Bittorrent
Bittorrent *BTSession;
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?

View File

@@ -203,7 +203,7 @@ bool Bittorrent::isPexEnabled() const {
}
void Bittorrent::processBigRatios() {
if(ratio_limit <= 0) return;
if(ratio_limit < 0) return;
qDebug("Process big ratios...");
std::vector<torrent_handle> torrents = s->get_torrents();
std::vector<torrent_handle>::iterator torrentIT;
@@ -833,7 +833,7 @@ QTorrentHandle Bittorrent::addMagnetUri(QString magnet_uri, bool resumed) {
qDebug("Resuming magnet URI: %s", qPrintable(hash));
// Load metadata
if(QFile::exists(torrentBackup.path()+QDir::separator()+hash+QString(".torrent")))
return addTorrent(torrentBackup.path()+QDir::separator()+hash+QString(".torrent"), false, false, true);
return addTorrent(torrentBackup.path()+QDir::separator()+hash+QString(".torrent"), false, QString(), true);
} else {
qDebug("Adding new magnet URI");
}
@@ -1530,7 +1530,7 @@ void Bittorrent::saveTempFastResumeData() {
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
try {
if(!h.is_valid() || !h.has_metadata() || h.is_seed() || h.is_paused()) continue;
if(!h.is_valid() || !h.has_metadata() /*|| h.is_seed() || h.is_paused()*/) continue;
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking) continue;
qDebug("Saving fastresume data for %s", qPrintable(h.name()));
h.save_resume_data();
@@ -1838,7 +1838,7 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
// Torrents will a ratio superior to the given value will
// be automatically deleted
void Bittorrent::setMaxRatio(float ratio) {
if(ratio <= 0) ratio = -1.;
if(ratio < 0) ratio = -1.;
if(ratio_limit == -1 && ratio != -1) {
Q_ASSERT(!BigRatioTimer);
BigRatioTimer = new QTimer(this);
@@ -2357,13 +2357,13 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
}
else if (fastresume_rejected_alert* p = dynamic_cast<fastresume_rejected_alert*>(a.get())) {
QTorrentHandle h(p->handle);
if(h.is_valid()){
if(h.is_valid()) {
qDebug("/!\\ Fast resume failed for %s, reason: %s", qPrintable(h.name()), p->message().c_str());
#if LIBTORRENT_VERSION_MINOR < 15
QString msg = QString::fromLocal8Bit(p->message().c_str());
if(msg.contains("filesize", Qt::CaseInsensitive) && msg.contains("mismatch", Qt::CaseInsensitive)) {
if(msg.contains("filesize", Qt::CaseInsensitive) && msg.contains("mismatch", Qt::CaseInsensitive) && TorrentPersistentData::isSeed(h.hash()) && h.has_missing_files()) {
#else
if(p->error.value() == 134) {
if(p->error.value() == 134 && TorrentPersistentData::isSeed(h.hash()) && h.has_missing_files()) {
#endif
const QString hash = h.hash();
// Mismatching file size (files were probably moved
@@ -2606,9 +2606,9 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
filters << "*.torrent";
const QStringList torrents_on_hd = torrentBackup.entryList(filters, QDir::Files, QDir::Unsorted);
foreach(QString hash, torrents_on_hd) {
qDebug("found torrent with hash: %s on hard disk", qPrintable(hash));
hash.chop(8); // remove trailing .torrent
if(!known_torrents.contains(hash)) {
qDebug("found torrent with hash: %s on hard disk", qPrintable(hash));
std::cerr << "ERROR Detected!!! Adding back torrent " << qPrintable(hash) << " which got lost for some reason." << std::endl;
addTorrent(torrentBackup.path()+QDir::separator()+hash+".torrent", false, QString(), true);
}

View File

@@ -169,6 +169,10 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
Preferences::setMailNotificationEmail(m["mail_notification_email"].toString());
if(m.contains("mail_notification_smtp"))
Preferences::setMailNotificationSMTP(m["mail_notification_smtp"].toString());
if(m.contains("autorun_enabled"))
Preferences::setAutoRunEnabled(m["autorun_enabled"].toBool());
if(m.contains("autorun_program"))
Preferences::setAutoRunProgram(m["autorun_program"].toString());
if(m.contains("preallocate_all"))
Preferences::preAllocateAllFiles(m["preallocate_all"].toBool());
if(m.contains("queueing_enabled"))
@@ -274,6 +278,8 @@ QVariantMap EventManager::getGlobalPreferences() const {
data["mail_notification_enabled"] = Preferences::isMailNotificationEnabled();
data["mail_notification_email"] = Preferences::getMailNotificationEmail();
data["mail_notification_smtp"] = Preferences::getMailNotificationSMTP();
data["autorun_enabled"] = Preferences::isAutoRunEnabled();
data["autorun_program"] = Preferences::getAutoRunProgram();
data["preallocate_all"] = Preferences::preAllocateAllFiles();
data["queueing_enabled"] = Preferences::isQueueingSystemEnabled();
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();

View File

@@ -109,7 +109,7 @@ QString HttpConnection::translateDocument(QString data) {
bool found = false;
do {
found = false;
QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),µ&\\-\\.]+)\\)"));
QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),%µ&\\-\\.]+)\\)"));
i = regex.indexIn(data, i);
if(i >= 0) {
//qDebug("Found translatable string: %s", regex.cap(1).toUtf8().data());

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 one or more lines are too long

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

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

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -3055,6 +3055,10 @@ Do you want to install it now?</source>
<source>Global Upload Speed Limit</source>
<translation>Globalni limit brzine slanja</translation>
</message>
<message>
<source>qBittorrent needs to be restarted</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TorrentFilesModel</name>

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

View File

@@ -5135,6 +5135,10 @@ Do you want to install it now?</source>
<source>Click to enable alternative speed limits</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>qBittorrent needs to be restarted</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TorrentFilesModel</name>

View File

@@ -5443,6 +5443,10 @@ Do you want to install it now?</source>
<source>Click to enable alternative speed limits</source>
<translation>Kliknij, aby włączyć alternatywne limity prędkości</translation>
</message>
<message>
<source>qBittorrent needs to be restarted</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TorrentFilesModel</name>

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More