You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-11-14 03:17:38 +01:00
Compare commits
1 Commits
release-2.
...
release-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c1ca776be3 |
2
AUTHORS
2
AUTHORS
@@ -12,7 +12,7 @@ Contributors:
|
|||||||
* Silvan Scherrer <silvan.scherrer@aroa.ch>
|
* Silvan Scherrer <silvan.scherrer@aroa.ch>
|
||||||
|
|
||||||
Code from other projects:
|
Code from other projects:
|
||||||
* files src/qtsingleapp/* src/lineedit/*
|
* files src/qtsingleapp/*
|
||||||
copyright: Nokia Corporation
|
copyright: Nokia Corporation
|
||||||
license: LGPL
|
license: LGPL
|
||||||
|
|
||||||
|
|||||||
53
Changelog
53
Changelog
@@ -1,56 +1,7 @@
|
|||||||
* Sun Oct 17 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.6
|
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
||||||
- BUGFIX: Fix "torrent seeding after creation" feature
|
|
||||||
- BUGFIX: The properties panel data would sometimes not match the selected torrent
|
|
||||||
- BUGFIX: Fix detection of files at final destination when temp dir is used
|
|
||||||
- BUGFIX: Fix moving of a torrent to an unexisting directory
|
|
||||||
|
|
||||||
* Tue Oct 12 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.5
|
|
||||||
- BUGFIX: Remember torrent completion date correctly
|
|
||||||
- BUGFIX: Fix feature to keep incomplete torrents in a separate folder
|
|
||||||
- BUGFIX: Fix display of URL seeds in the UI
|
|
||||||
- BUGFIX: Improved peer hostname resolution with caching
|
|
||||||
- BUGFIX: Piece availability/downloaded widgets performance improvement
|
|
||||||
|
|
||||||
* Fri Oct 1 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.4
|
|
||||||
- BUGFIX: Clean program exit on system shutdown/logout
|
|
||||||
- BUGFIX: Fix possible search engine plugin update
|
|
||||||
|
|
||||||
* Tue Sep 28 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.3
|
|
||||||
- BUGFIX: Fix encoding issue in command line parameters processing
|
|
||||||
- BUGFIX: Fix possible crash when changing the save path in addition dialog
|
|
||||||
- BUGFIX: Fix wrong mapping to source model
|
|
||||||
|
|
||||||
* Sun Sep 26 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.2
|
|
||||||
- BUGFIX: Fix display of torrent content in addition dialog
|
|
||||||
- BUGFIX: Really fix manual editing of save path in torrent addition dialog
|
|
||||||
|
|
||||||
* Sun Sep 26 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.1
|
|
||||||
- I18N: Updated Arabic translation
|
|
||||||
- I18N: Fixes to German translation
|
|
||||||
- BUGFIX: Save path can now be edited in torrent addition dialog
|
|
||||||
- BUGFIX: Fix save path encoding on non-utf8 systems
|
|
||||||
- BUGFIX: Fix saving to drive root on Windows
|
|
||||||
- BUGFIX: OGV can now be previewed
|
|
||||||
- BUGFIX: Maximum download limit is now 10MB/s
|
|
||||||
- BUGFIX: Fix 'download in scan dir' persistence
|
|
||||||
- BUGFIX: Add .torrent extension only when missing (torrent creator)
|
|
||||||
- BUGFIX: Fix possible issue with temporary download path persistence
|
|
||||||
- BUGFIX: Added support for | (OR) operator in RSS feed downloader
|
|
||||||
- BUGFIX: Fix Web UI for spanish users
|
|
||||||
- BUGFIX: Fix locale switching from Web UI
|
|
||||||
- BUGFIX: Use AND operator for torrentdownloads.net searches
|
|
||||||
- BUGFIX: Limit torrent addition dialog width to fit the screen
|
|
||||||
- COSMETIC: Fix progress bars style on Windows
|
|
||||||
|
|
||||||
* Tue Aug 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.0
|
|
||||||
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
- FEATURE: Added actions to "Move to top/bottom" of priority queue
|
||||||
- FEATURE: Auto-Shutdown on downloads completion
|
- FEATURE: Added Auto-Shutdown on downloads completion feature
|
||||||
- FEATURE: Email notification on download completion
|
|
||||||
- FEATURE: Added button to password-lock the UI
|
|
||||||
- FEATURE: Added label-level Pause/Resume/Delete actions
|
- 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
|
* 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)
|
- FEATURE: Simplified torrent root folder renaming/truncating (< v2.3.0 is no longer forward compatible)
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
/*
|
|
||||||
-----BEGIN QCMOD-----
|
|
||||||
name: libboost
|
|
||||||
arg: with-qtsingleapplication=[system|shipped], Use the shipped qtsingleapplication library or the system one
|
|
||||||
-----END QCMOD-----
|
|
||||||
*/
|
|
||||||
class qc_qtsingleapplication : public ConfObj
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
qc_qtsingleapplication(Conf *c) : ConfObj(c) {}
|
|
||||||
QString name() const { return "qtsingleapplication library"; }
|
|
||||||
QString shortname() const { return "qtsingleapplication"; }
|
|
||||||
|
|
||||||
bool exec(){
|
|
||||||
QString s;
|
|
||||||
s = conf->getenv("QC_WITH_QTSINGLEAPPLICATION");
|
|
||||||
if(s.compare("system", Qt::CaseInsensitive) == 0) {
|
|
||||||
// System
|
|
||||||
conf->addDefine("USE_SYSTEM_QTSINGLEAPPLICATION");
|
|
||||||
printf(" [system] ");
|
|
||||||
} else {
|
|
||||||
printf(" [shipped] ");
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
128
src/GUI.cpp
128
src/GUI.cpp
@@ -34,7 +34,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFileSystemWatcher>
|
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
@@ -42,7 +41,6 @@
|
|||||||
#include <QClipboard>
|
#include <QClipboard>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QScrollBar>
|
|
||||||
|
|
||||||
#include "GUI.h"
|
#include "GUI.h"
|
||||||
#include "transferlistwidget.h"
|
#include "transferlistwidget.h"
|
||||||
@@ -71,8 +69,6 @@
|
|||||||
#include "qmacapplication.h"
|
#include "qmacapplication.h"
|
||||||
void qt_mac_set_dock_menu(QMenu *menu);
|
void qt_mac_set_dock_menu(QMenu *menu);
|
||||||
#endif
|
#endif
|
||||||
#include "lineedit.h"
|
|
||||||
#include "sessionapplication.h"
|
|
||||||
|
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
@@ -87,11 +83,9 @@ using namespace libtorrent;
|
|||||||
// Constructor
|
// Constructor
|
||||||
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), force_exit(false) {
|
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), force_exit(false) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
ui_locked = Preferences::isUILocked();
|
|
||||||
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION)));
|
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION)));
|
||||||
displaySpeedInTitle = Preferences::speedInTitleBar();
|
displaySpeedInTitle = Preferences::speedInTitleBar();
|
||||||
// Clean exit on log out
|
|
||||||
connect(static_cast<SessionApplication*>(qApp), SIGNAL(sessionIsShuttingDown()), this, SLOT(deleteBTSession()));
|
|
||||||
// Setting icons
|
// Setting icons
|
||||||
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png")));
|
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png")));
|
||||||
actionOpen->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/open.png")));
|
actionOpen->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/open.png")));
|
||||||
@@ -113,11 +107,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
|
|||||||
actionSet_global_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
|
actionSet_global_upload_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/seeding.png")));
|
||||||
actionSet_global_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/download.png")));
|
actionSet_global_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/download.png")));
|
||||||
actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qb_question.png")));
|
actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/qb_question.png")));
|
||||||
actionLock_qBittorrent->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/encrypted32.png")));
|
|
||||||
lockMenu = new QMenu();
|
|
||||||
QAction *defineUiLockPasswdAct = lockMenu->addAction(tr("Set the password..."));
|
|
||||||
connect(defineUiLockPasswdAct, SIGNAL(triggered()), this, SLOT(defineUILockPassword()));
|
|
||||||
actionLock_qBittorrent->setMenu(lockMenu);
|
|
||||||
prioSeparator = toolBar->insertSeparator(actionDecreasePriority);
|
prioSeparator = toolBar->insertSeparator(actionDecreasePriority);
|
||||||
prioSeparator2 = menu_Edit->insertSeparator(actionDecreasePriority);
|
prioSeparator2 = menu_Edit->insertSeparator(actionDecreasePriority);
|
||||||
prioSeparator->setVisible(false);
|
prioSeparator->setVisible(false);
|
||||||
@@ -160,13 +149,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
|
|||||||
connect(transferList, SIGNAL(torrentStatusUpdate(uint,uint,uint,uint,uint)), this, SLOT(updateNbTorrents(uint,uint,uint,uint,uint)));
|
connect(transferList, SIGNAL(torrentStatusUpdate(uint,uint,uint,uint,uint)), this, SLOT(updateNbTorrents(uint,uint,uint,uint,uint)));
|
||||||
vboxLayout->addWidget(tabs);
|
vboxLayout->addWidget(tabs);
|
||||||
|
|
||||||
// Name filter
|
|
||||||
search_filter = new LineEdit();
|
|
||||||
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)));
|
|
||||||
|
|
||||||
// Transfer list slots
|
// Transfer list slots
|
||||||
connect(actionStart, SIGNAL(triggered()), transferList, SLOT(startSelectedTorrents()));
|
connect(actionStart, SIGNAL(triggered()), transferList, SLOT(startSelectedTorrents()));
|
||||||
connect(actionStart_All, SIGNAL(triggered()), transferList, SLOT(startAllTorrents()));
|
connect(actionStart_All, SIGNAL(triggered()), transferList, SLOT(startAllTorrents()));
|
||||||
@@ -178,6 +160,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
|
|||||||
|
|
||||||
// Configure BT session according to options
|
// Configure BT session according to options
|
||||||
loadPreferences(false);
|
loadPreferences(false);
|
||||||
|
// Resume unfinished torrents
|
||||||
|
BTSession->startUpTorrents();
|
||||||
|
// Add torrent given on command line
|
||||||
|
processParams(torrentCmdLine);
|
||||||
|
|
||||||
// Start connection checking timer
|
// Start connection checking timer
|
||||||
guiUpdater = new QTimer(this);
|
guiUpdater = new QTimer(this);
|
||||||
@@ -218,23 +204,10 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
|
|||||||
}while(transferListFilters->getStatusFilters()->verticalScrollBar()->sliderPosition() > 0);
|
}while(transferListFilters->getStatusFilters()->verticalScrollBar()->sliderPosition() > 0);
|
||||||
transferListFilters->getStatusFilters()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
transferListFilters->getStatusFilters()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
|
||||||
if(ui_locked) {
|
if(Preferences::startMinimized()) {
|
||||||
hide();
|
|
||||||
} else {
|
|
||||||
if(Preferences::startMinimized())
|
|
||||||
showMinimized();
|
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
|
|
||||||
processParams(torrentCmdLine);
|
|
||||||
|
|
||||||
qDebug("GUI Built");
|
qDebug("GUI Built");
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
if(!Preferences::neverCheckFileAssoc() && !Preferences::isFileAssocOk()) {
|
if(!Preferences::neverCheckFileAssoc() && !Preferences::isFileAssocOk()) {
|
||||||
@@ -252,16 +225,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), for
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::deleteBTSession() {
|
|
||||||
guiUpdater->stop();
|
|
||||||
status_bar->stopTimer();
|
|
||||||
if(BTSession) {
|
|
||||||
delete BTSession;
|
|
||||||
BTSession = 0;
|
|
||||||
}
|
|
||||||
QTimer::singleShot(0, this, SLOT(close()));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
GUI::~GUI() {
|
GUI::~GUI() {
|
||||||
qDebug("GUI destruction");
|
qDebug("GUI destruction");
|
||||||
@@ -272,20 +235,14 @@ GUI::~GUI() {
|
|||||||
#endif
|
#endif
|
||||||
// Async deletion of Bittorrent session as early as possible
|
// Async deletion of Bittorrent session as early as possible
|
||||||
// in order to speed up exit
|
// in order to speed up exit
|
||||||
session_proxy sp;
|
session_proxy sp = BTSession->asyncDeletion();
|
||||||
if(BTSession)
|
|
||||||
sp = BTSession->asyncDeletion();
|
|
||||||
// Some saving
|
// Some saving
|
||||||
properties->saveSettings();
|
properties->saveSettings();
|
||||||
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tab_changed(int)));
|
disconnect(tabs, SIGNAL(currentChanged(int)), this, SLOT(tab_changed(int)));
|
||||||
// Delete other GUI objects
|
// Delete other GUI objects
|
||||||
if(executable_watcher)
|
|
||||||
delete executable_watcher;
|
|
||||||
delete status_bar;
|
delete status_bar;
|
||||||
delete search_filter;
|
|
||||||
delete transferList;
|
delete transferList;
|
||||||
delete guiUpdater;
|
delete guiUpdater;
|
||||||
delete lockMenu;
|
|
||||||
if(createTorrentDlg)
|
if(createTorrentDlg)
|
||||||
delete createTorrentDlg;
|
delete createTorrentDlg;
|
||||||
if(console)
|
if(console)
|
||||||
@@ -320,8 +277,10 @@ GUI::~GUI() {
|
|||||||
delete switchTransferShortcut;
|
delete switchTransferShortcut;
|
||||||
delete switchRSSShortcut;
|
delete switchRSSShortcut;
|
||||||
// Delete BTSession objects
|
// Delete BTSession objects
|
||||||
qDebug("Deleting BTSession");
|
|
||||||
delete BTSession;
|
delete BTSession;
|
||||||
|
// Deleting remaining top level widgets
|
||||||
|
qDebug("Deleting remaining top level widgets");
|
||||||
|
|
||||||
// May freeze for a few seconds after the next line
|
// May freeze for a few seconds after the next line
|
||||||
// because the Bittorrent session proxy will
|
// because the Bittorrent session proxy will
|
||||||
// actually be deleted now and destruction
|
// actually be deleted now and destruction
|
||||||
@@ -329,35 +288,6 @@ GUI::~GUI() {
|
|||||||
qDebug("Exiting GUI destructor...");
|
qDebug("Exiting GUI destructor...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::defineUILockPassword() {
|
|
||||||
QString old_pass_md5 = Preferences::getUILockPasswordMD5();
|
|
||||||
if(old_pass_md5.isNull()) old_pass_md5 = "";
|
|
||||||
bool ok = false;
|
|
||||||
QString new_clear_password = QInputDialog::getText(this, tr("UI lock password"), tr("Please type the UI lock password:"), QLineEdit::Password, old_pass_md5, &ok);
|
|
||||||
if(ok) {
|
|
||||||
if(new_clear_password != old_pass_md5) {
|
|
||||||
Preferences::setUILockPassword(new_clear_password);
|
|
||||||
}
|
|
||||||
QMessageBox::information(this, tr("Password update"), tr("The UI lock password has been successfully updated"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GUI::on_actionLock_qBittorrent_triggered() {
|
|
||||||
// Check if there is a password
|
|
||||||
if(Preferences::getUILockPasswordMD5().isEmpty()) {
|
|
||||||
// Ask for a password
|
|
||||||
bool ok = false;
|
|
||||||
QString clear_password = QInputDialog::getText(this, tr("UI lock password"), tr("Please type the UI lock password:"), QLineEdit::Password, "", &ok);
|
|
||||||
if(!ok) return;
|
|
||||||
Preferences::setUILockPassword(clear_password);
|
|
||||||
}
|
|
||||||
// Lock the interface
|
|
||||||
ui_locked = true;
|
|
||||||
Preferences::setUILocked(true);
|
|
||||||
myTrayIconMenu->setEnabled(false);
|
|
||||||
hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
void GUI::displayRSSTab(bool enable) {
|
void GUI::displayRSSTab(bool enable) {
|
||||||
if(enable) {
|
if(enable) {
|
||||||
// RSS tab
|
// RSS tab
|
||||||
@@ -599,41 +529,10 @@ void GUI::setTabText(int index, QString text) const {
|
|||||||
tabs->setTabText(index, text);
|
tabs->setTabText(index, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GUI::unlockUI() {
|
|
||||||
bool ok = false;
|
|
||||||
QString clear_password = QInputDialog::getText(this, tr("UI lock password"), tr("Please type the UI lock password:"), QLineEdit::Password, "", &ok);
|
|
||||||
if(!ok) return false;
|
|
||||||
QString real_pass_md5 = Preferences::getUILockPasswordMD5();
|
|
||||||
QCryptographicHash md5(QCryptographicHash::Md5);
|
|
||||||
md5.addData(clear_password.toLocal8Bit());
|
|
||||||
QString password_md5 = md5.result().toHex();
|
|
||||||
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
|
// Toggle Main window visibility
|
||||||
void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
||||||
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
if(e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
||||||
if(isHidden()) {
|
if(isHidden()) {
|
||||||
if(ui_locked) {
|
|
||||||
// Ask for UI lock password
|
|
||||||
if(!unlockUI())
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
show();
|
show();
|
||||||
if(isMinimized()) {
|
if(isMinimized()) {
|
||||||
if(isMaximized()) {
|
if(isMaximized()) {
|
||||||
@@ -679,7 +578,7 @@ void GUI::closeEvent(QCloseEvent *e) {
|
|||||||
e->accept();
|
e->accept();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(settings.value(QString::fromUtf8("Preferences/General/ExitConfirm"), true).toBool() && BTSession && BTSession->hasActiveTorrents()) {
|
if(settings.value(QString::fromUtf8("Preferences/General/ExitConfirm"), true).toBool() && BTSession->hasActiveTorrents()) {
|
||||||
if(e->spontaneous() || force_exit) {
|
if(e->spontaneous() || force_exit) {
|
||||||
if(!isVisible())
|
if(!isVisible())
|
||||||
show();
|
show();
|
||||||
@@ -923,7 +822,6 @@ void GUI::loadPreferences(bool configure_session) {
|
|||||||
BTSession->addConsoleMessage(tr("Options were saved successfully."));
|
BTSession->addConsoleMessage(tr("Options were saved successfully."));
|
||||||
#ifndef Q_WS_MAC
|
#ifndef Q_WS_MAC
|
||||||
const bool newSystrayIntegration = Preferences::systrayIntegration();
|
const bool newSystrayIntegration = Preferences::systrayIntegration();
|
||||||
actionLock_qBittorrent->setEnabled(newSystrayIntegration);
|
|
||||||
if(newSystrayIntegration != (systrayIcon!=0)) {
|
if(newSystrayIntegration != (systrayIcon!=0)) {
|
||||||
if(newSystrayIntegration) {
|
if(newSystrayIntegration) {
|
||||||
// create the trayicon
|
// create the trayicon
|
||||||
@@ -952,8 +850,6 @@ void GUI::loadPreferences(bool configure_session) {
|
|||||||
toolBar->setVisible(true);
|
toolBar->setVisible(true);
|
||||||
toolBar->layout()->setSpacing(7);
|
toolBar->layout()->setSpacing(7);
|
||||||
} else {
|
} else {
|
||||||
// Clear search filter before hiding the top toolbar
|
|
||||||
search_filter->clear();
|
|
||||||
toolBar->setVisible(false);
|
toolBar->setVisible(false);
|
||||||
}
|
}
|
||||||
const uint new_refreshInterval = Preferences::getRefreshInterval();
|
const uint new_refreshInterval = Preferences::getRefreshInterval();
|
||||||
@@ -1136,8 +1032,6 @@ QMenu* GUI::getTrayIconMenu() {
|
|||||||
myTrayIconMenu->addAction(actionPause_All);
|
myTrayIconMenu->addAction(actionPause_All);
|
||||||
myTrayIconMenu->addSeparator();
|
myTrayIconMenu->addSeparator();
|
||||||
myTrayIconMenu->addAction(actionExit);
|
myTrayIconMenu->addAction(actionExit);
|
||||||
if(ui_locked)
|
|
||||||
myTrayIconMenu->setEnabled(false);
|
|
||||||
return myTrayIconMenu;
|
return myTrayIconMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
src/GUI.h
12
src/GUI.h
@@ -57,8 +57,6 @@ class about;
|
|||||||
class createtorrent;
|
class createtorrent;
|
||||||
class downloadFromURL;
|
class downloadFromURL;
|
||||||
class HidableTabWidget;
|
class HidableTabWidget;
|
||||||
class LineEdit;
|
|
||||||
class QFileSystemWatcher;
|
|
||||||
|
|
||||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -71,7 +69,6 @@ public:
|
|||||||
QWidget* getCurrentTabWidget() const;
|
QWidget* getCurrentTabWidget() const;
|
||||||
TransferListWidget* getTransferList() const { return transferList; }
|
TransferListWidget* getTransferList() const { return transferList; }
|
||||||
QMenu* getTrayIconMenu();
|
QMenu* getTrayIconMenu();
|
||||||
PropertiesWidget *getProperties() const { return properties; }
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||||
@@ -80,7 +77,6 @@ public slots:
|
|||||||
void downloadFromURLList(const QStringList& urls);
|
void downloadFromURLList(const QStringList& urls);
|
||||||
void updateAltSpeedsBtn(bool alternative);
|
void updateAltSpeedsBtn(bool alternative);
|
||||||
void updateNbTorrents(unsigned int nb_downloading, unsigned int nb_seeding, unsigned int nb_active, unsigned int nb_inactive, unsigned int nb_paused);
|
void updateNbTorrents(unsigned int nb_downloading, unsigned int nb_seeding, unsigned int nb_active, unsigned int nb_inactive, unsigned int nb_paused);
|
||||||
void deleteBTSession();
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
// GUI related slots
|
// GUI related slots
|
||||||
@@ -101,10 +97,6 @@ protected slots:
|
|||||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||||
void createSystrayDelayed();
|
void createSystrayDelayed();
|
||||||
void tab_changed(int);
|
void tab_changed(int);
|
||||||
void on_actionLock_qBittorrent_triggered();
|
|
||||||
void defineUILockPassword();
|
|
||||||
bool unlockUI();
|
|
||||||
void notifyOfUpdate(QString);
|
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
void createKeyboardShortcuts();
|
void createKeyboardShortcuts();
|
||||||
void displayTransferTab() const;
|
void displayTransferTab() const;
|
||||||
@@ -138,7 +130,6 @@ protected:
|
|||||||
void displaySearchTab(bool enable);
|
void displaySearchTab(bool enable);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QFileSystemWatcher *executable_watcher;
|
|
||||||
// Bittorrent
|
// Bittorrent
|
||||||
Bittorrent *BTSession;
|
Bittorrent *BTSession;
|
||||||
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
||||||
@@ -159,8 +150,6 @@ private:
|
|||||||
PropertiesWidget *properties;
|
PropertiesWidget *properties;
|
||||||
bool displaySpeedInTitle;
|
bool displaySpeedInTitle;
|
||||||
bool force_exit;
|
bool force_exit;
|
||||||
bool ui_locked;
|
|
||||||
LineEdit *search_filter;
|
|
||||||
// Keyboard shortcuts
|
// Keyboard shortcuts
|
||||||
QShortcut *switchSearchShortcut;
|
QShortcut *switchSearchShortcut;
|
||||||
QShortcut *switchSearchShortcut2;
|
QShortcut *switchSearchShortcut2;
|
||||||
@@ -171,7 +160,6 @@ private:
|
|||||||
QAction *prioSeparator2;
|
QAction *prioSeparator2;
|
||||||
QSplitter *hSplitter;
|
QSplitter *hSplitter;
|
||||||
QSplitter *vSplitter;
|
QSplitter *vSplitter;
|
||||||
QMenu *lockMenu;
|
|
||||||
// Search
|
// Search
|
||||||
QPointer<SearchEngine> searchEngine;
|
QPointer<SearchEngine> searchEngine;
|
||||||
// RSS
|
// RSS
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB |
@@ -1,6 +1,6 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Categories=Qt;Network;P2P;
|
Categories=Qt;Network;P2P;
|
||||||
Comment=V2.4.6
|
Comment=V2.4.0
|
||||||
Exec=qbittorrent %f
|
Exec=qbittorrent %f
|
||||||
GenericName=Bittorrent client
|
GenericName=Bittorrent client
|
||||||
GenericName[ar]=العميل Bittorrent
|
GenericName[ar]=العميل Bittorrent
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
@@ -47,7 +47,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleGetInfoString</key>
|
<key>CFBundleGetInfoString</key>
|
||||||
<string>2.4.6</string>
|
<string>2.4.0</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<!DOCTYPE RCC><RCC version="1.0">
|
|
||||||
<qresource>
|
|
||||||
<file>gpl.html</file>
|
|
||||||
</qresource>
|
|
||||||
</RCC>
|
|
||||||
|
|
||||||
436
src/about_imp.h
436
src/about_imp.h
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -200,9 +200,6 @@ protected slots:
|
|||||||
void takeETASamples();
|
void takeETASamples();
|
||||||
void exportTorrentFiles(QString path);
|
void exportTorrentFiles(QString path);
|
||||||
void saveTempFastResumeData();
|
void saveTempFastResumeData();
|
||||||
void sendNotificationEmail(QTorrentHandle h);
|
|
||||||
void autoRunExternalProgram(QTorrentHandle h, bool async=true);
|
|
||||||
void cleanUpAutoRunProcess(int);
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void addedTorrent(QTorrentHandle& h);
|
void addedTorrent(QTorrentHandle& h);
|
||||||
|
|||||||
@@ -191,7 +191,6 @@ void createtorrent::on_createButton_clicked(){
|
|||||||
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), last_path, tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
|
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), last_path, tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
|
||||||
if(!destination.isEmpty()) {
|
if(!destination.isEmpty()) {
|
||||||
settings.setValue("CreateTorrent/last_save_path", misc::removeLastPathPart(destination));
|
settings.setValue("CreateTorrent/last_save_path", misc::removeLastPathPart(destination));
|
||||||
if(!destination.toUpper().endsWith(".TORRENT"))
|
|
||||||
destination += QString::fromUtf8(".torrent");
|
destination += QString::fromUtf8(".torrent");
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
@@ -220,22 +219,16 @@ void createtorrent::handleCreationSuccess(QString path, QString branch_path) {
|
|||||||
// Remove busy cursor
|
// Remove busy cursor
|
||||||
setCursor(QCursor(Qt::ArrowCursor));
|
setCursor(QCursor(Qt::ArrowCursor));
|
||||||
if(checkStartSeeding->isChecked()) {
|
if(checkStartSeeding->isChecked()) {
|
||||||
QString root_folder;
|
|
||||||
// Create save path temp data
|
// Create save path temp data
|
||||||
boost::intrusive_ptr<torrent_info> t;
|
boost::intrusive_ptr<torrent_info> t;
|
||||||
try {
|
try {
|
||||||
t = new torrent_info(path.toUtf8().data());
|
t = new torrent_info(path.toUtf8().data());
|
||||||
root_folder = misc::truncateRootFolder(t);
|
|
||||||
} catch(std::exception&) {
|
} catch(std::exception&) {
|
||||||
QMessageBox::critical(0, tr("Torrent creation"), tr("Created torrent file is invalid. It won't be added to download list."));
|
QMessageBox::critical(0, tr("Torrent creation"), tr("Created torrent file is invalid. It won't be added to download list."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QString hash = misc::toQString(t->info_hash());
|
QString hash = misc::toQString(t->info_hash());
|
||||||
QString save_path = branch_path;
|
TorrentTempData::setSavePath(hash, branch_path);
|
||||||
if(!root_folder.isEmpty()) {
|
|
||||||
save_path = QDir(save_path).absoluteFilePath(root_folder);
|
|
||||||
}
|
|
||||||
TorrentTempData::setSavePath(hash, save_path);
|
|
||||||
#if LIBTORRENT_VERSION_MINOR > 14
|
#if LIBTORRENT_VERSION_MINOR > 14
|
||||||
// Enable seeding mode (do not recheck the files)
|
// Enable seeding mode (do not recheck the files)
|
||||||
TorrentTempData::setSeedingMode(hash, true);
|
TorrentTempData::setSeedingMode(hash, true);
|
||||||
@@ -291,7 +284,8 @@ void torrentCreatorThread::run() {
|
|||||||
char const* creator_str = "qBittorrent "VERSION;
|
char const* creator_str = "qBittorrent "VERSION;
|
||||||
try {
|
try {
|
||||||
file_storage fs;
|
file_storage fs;
|
||||||
path full_path = complete(path(input_path.toUtf8().constData()));
|
file_pool fp;
|
||||||
|
path full_path = complete(path(input_path.toLocal8Bit().data()));
|
||||||
// Adding files to the torrent
|
// Adding files to the torrent
|
||||||
add_files(fs, full_path, file_filter);
|
add_files(fs, full_path, file_filter);
|
||||||
if(abort) return;
|
if(abort) return;
|
||||||
@@ -316,7 +310,7 @@ void torrentCreatorThread::run() {
|
|||||||
t.set_priv(is_private);
|
t.set_priv(is_private);
|
||||||
if(abort) return;
|
if(abort) return;
|
||||||
// create the torrent and print it to out
|
// create the torrent and print it to out
|
||||||
ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary);
|
ofstream out(complete(path((const char*)save_path.toLocal8Bit())), std::ios_base::binary);
|
||||||
bencode(std::ostream_iterator<char>(out), t.generate());
|
bencode(std::ostream_iterator<char>(out), t.generate());
|
||||||
emit updateProgress(100);
|
emit updateProgress(100);
|
||||||
emit creationSuccess(save_path, QString::fromUtf8(full_path.branch_path().string().c_str()));
|
emit creationSuccess(save_path, QString::fromUtf8(full_path.branch_path().string().c_str()));
|
||||||
|
|||||||
@@ -60,34 +60,31 @@ public:
|
|||||||
pix.fill();
|
pix.fill();
|
||||||
pixmap = pix;
|
pixmap = pix;
|
||||||
} else {
|
} else {
|
||||||
const qulonglong nb_pieces = pieces.size();
|
const int nb_pieces = pieces.size();
|
||||||
// Reduce the number of pieces before creating the pixmap
|
// Reduce the number of pieces before creating the pixmap
|
||||||
// otherwise it can crash when there are too many pieces
|
// otherwise it can crash when there are too many pieces
|
||||||
const uint w = width();
|
if(nb_pieces > width()) {
|
||||||
if(nb_pieces > w) {
|
const int ratio = floor(nb_pieces/(double)width());
|
||||||
const uint ratio = floor(nb_pieces/(double)w);
|
std::vector<bool> scaled_pieces;
|
||||||
bitfield scaled_pieces(ceil(nb_pieces/(double)ratio), false);
|
std::vector<bool> scaled_downloading;
|
||||||
bitfield scaled_downloading(ceil(nb_pieces/(double)ratio), false);
|
for(int i=0; i<nb_pieces; i+= ratio) {
|
||||||
uint scaled_index = 0;
|
|
||||||
for(qulonglong i=0; i<nb_pieces; i+= ratio) {
|
|
||||||
bool have = true;
|
bool have = true;
|
||||||
for(qulonglong j=i; j<qMin(i+ratio, nb_pieces); ++j) {
|
for(int j=i; j<qMin(i+ratio, nb_pieces); ++j) {
|
||||||
if(!pieces[i]) { have = false; break; }
|
if(!pieces[i]) { have = false; break; }
|
||||||
}
|
}
|
||||||
|
scaled_pieces.push_back(have);
|
||||||
if(have) {
|
if(have) {
|
||||||
scaled_pieces.set_bit(scaled_index);
|
scaled_downloading.push_back(false);
|
||||||
} else {
|
} else {
|
||||||
bool downloading = false;
|
bool downloading = false;
|
||||||
for(qulonglong j=i; j<qMin(i+ratio, nb_pieces); ++j) {
|
for(int j=i; j<qMin(i+ratio, nb_pieces); ++j) {
|
||||||
if(downloading_pieces[i]) { downloading = true; break; }
|
if(downloading_pieces[i]) { downloading = true; break; }
|
||||||
}
|
}
|
||||||
if(downloading)
|
scaled_downloading.push_back(downloading);
|
||||||
scaled_downloading.set_bit(scaled_index);
|
|
||||||
}
|
}
|
||||||
++scaled_index;
|
|
||||||
}
|
}
|
||||||
QPixmap pix = QPixmap(scaled_pieces.size(), 1);
|
QPixmap pix = QPixmap(scaled_pieces.size(), 1);
|
||||||
//pix.fill();
|
pix.fill();
|
||||||
QPainter painter(&pix);
|
QPainter painter(&pix);
|
||||||
for(uint i=0; i<scaled_pieces.size(); ++i) {
|
for(uint i=0; i<scaled_pieces.size(); ++i) {
|
||||||
if(scaled_pieces[i]) {
|
if(scaled_pieces[i]) {
|
||||||
@@ -104,7 +101,7 @@ public:
|
|||||||
pixmap = pix;
|
pixmap = pix;
|
||||||
} else {
|
} else {
|
||||||
QPixmap pix = QPixmap(pieces.size(), 1);
|
QPixmap pix = QPixmap(pieces.size(), 1);
|
||||||
//pix.fill();
|
pix.fill();
|
||||||
QPainter painter(&pix);
|
QPainter painter(&pix);
|
||||||
for(uint i=0; i<pieces.size(); ++i) {
|
for(uint i=0; i<pieces.size(); ++i) {
|
||||||
if(pieces[i]) {
|
if(pieces[i]) {
|
||||||
|
|||||||
@@ -270,7 +270,6 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
|
|||||||
// Backup in case install fails
|
// Backup in case install fails
|
||||||
QFile::copy(dest_path, dest_path+".bak");
|
QFile::copy(dest_path, dest_path+".bak");
|
||||||
misc::safeRemove(dest_path);
|
misc::safeRemove(dest_path);
|
||||||
misc::safeRemove(dest_path+"c");
|
|
||||||
update = true;
|
update = true;
|
||||||
}
|
}
|
||||||
// Copy the plugin
|
// Copy the plugin
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
//#include "proplistdelegate.h"
|
//#include "proplistdelegate.h"
|
||||||
#include "torrentpersistentdata.h"
|
#include "torrentpersistentdata.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTranslator>
|
|
||||||
|
|
||||||
EventManager::EventManager(QObject *parent, Bittorrent *BTSession)
|
EventManager::EventManager(QObject *parent, Bittorrent *BTSession)
|
||||||
: QObject(parent), BTSession(BTSession)
|
: QObject(parent), BTSession(BTSession)
|
||||||
@@ -125,20 +124,8 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
|||||||
|
|
||||||
void EventManager::setGlobalPreferences(QVariantMap m) const {
|
void EventManager::setGlobalPreferences(QVariantMap m) const {
|
||||||
// UI
|
// UI
|
||||||
if(m.contains("locale")) {
|
if(m.contains("locale"))
|
||||||
QString locale = m["locale"].toString();
|
Preferences::setLocale(m["locale"].toString());
|
||||||
if(Preferences::getLocale() != locale) {
|
|
||||||
QTranslator *translator = new QTranslator;
|
|
||||||
if(translator->load(QString::fromUtf8(":/lang/qbittorrent_") + locale)){
|
|
||||||
qDebug("%s locale recognized, using translation.", qPrintable(locale));
|
|
||||||
}else{
|
|
||||||
qDebug("%s locale unrecognized, using default (en_GB).", qPrintable(locale));
|
|
||||||
}
|
|
||||||
qApp->installTranslator(translator);
|
|
||||||
}
|
|
||||||
|
|
||||||
Preferences::setLocale(locale);
|
|
||||||
}
|
|
||||||
// Downloads
|
// Downloads
|
||||||
if(m.contains("save_path"))
|
if(m.contains("save_path"))
|
||||||
Preferences::setSavePath(m["save_path"].toString());
|
Preferences::setSavePath(m["save_path"].toString());
|
||||||
@@ -176,16 +163,6 @@ void EventManager::setGlobalPreferences(QVariantMap m) const {
|
|||||||
}
|
}
|
||||||
if(m.contains("export_dir"))
|
if(m.contains("export_dir"))
|
||||||
Preferences::setExportDir(m["export_dir"].toString());
|
Preferences::setExportDir(m["export_dir"].toString());
|
||||||
if(m.contains("mail_notification_enabled"))
|
|
||||||
Preferences::setMailNotificationEnabled(m["mail_notification_enabled"].toBool());
|
|
||||||
if(m.contains("mail_notification_email"))
|
|
||||||
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"))
|
if(m.contains("preallocate_all"))
|
||||||
Preferences::preAllocateAllFiles(m["preallocate_all"].toBool());
|
Preferences::preAllocateAllFiles(m["preallocate_all"].toBool());
|
||||||
if(m.contains("queueing_enabled"))
|
if(m.contains("queueing_enabled"))
|
||||||
@@ -288,11 +265,6 @@ QVariantMap EventManager::getGlobalPreferences() const {
|
|||||||
data["download_in_scan_dirs"] = var_list;
|
data["download_in_scan_dirs"] = var_list;
|
||||||
data["export_dir_enabled"] = Preferences::isTorrentExportEnabled();
|
data["export_dir_enabled"] = Preferences::isTorrentExportEnabled();
|
||||||
data["export_dir"] = Preferences::getExportDir();
|
data["export_dir"] = Preferences::getExportDir();
|
||||||
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["preallocate_all"] = Preferences::preAllocateAllFiles();
|
||||||
data["queueing_enabled"] = Preferences::isQueueingSystemEnabled();
|
data["queueing_enabled"] = Preferences::isQueueingSystemEnabled();
|
||||||
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();
|
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
|
|
||||||
QStringList getNotMatchingTokens() const {
|
QStringList getNotMatchingTokens() const {
|
||||||
QString notmatching = this->value("not", "").toString();
|
QString notmatching = this->value("not", "").toString();
|
||||||
return notmatching.split(QRegExp("[\\s|]"));
|
return notmatching.split(" ");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString getNotMatchingTokens_str() const {
|
QString getNotMatchingTokens_str() const {
|
||||||
|
|||||||
508
src/gpl.html
508
src/gpl.html
File diff suppressed because it is too large
Load Diff
@@ -109,7 +109,7 @@ QString HttpConnection::translateDocument(QString data) {
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
do {
|
do {
|
||||||
found = false;
|
found = false;
|
||||||
QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),%µ&\\-\\.]+)\\)"));
|
QRegExp regex(QString::fromUtf8("_\\(([\\w\\s?!:\\/\\(\\),µ&\\-\\.]+)\\)"));
|
||||||
i = regex.indexIn(data, i);
|
i = regex.indexIn(data, i);
|
||||||
if(i >= 0) {
|
if(i >= 0) {
|
||||||
//qDebug("Found translatable string: %s", regex.cap(1).toUtf8().data());
|
//qDebug("Found translatable string: %s", regex.cap(1).toUtf8().data());
|
||||||
@@ -161,7 +161,7 @@ void HttpConnection::respond() {
|
|||||||
write();
|
write();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Client successfully authenticated, reset number of failed attempts
|
// Client sucessfuly authenticated, reset number of failed attempts
|
||||||
parent->resetNbFailedAttemptsForIp(peer_ip);
|
parent->resetNbFailedAttemptsForIp(peer_ip);
|
||||||
QString url = parser.url();
|
QString url = parser.url();
|
||||||
// Favicon
|
// Favicon
|
||||||
|
|||||||
@@ -153,7 +153,6 @@
|
|||||||
<file>Icons/oxygen/cookies.png</file>
|
<file>Icons/oxygen/cookies.png</file>
|
||||||
<file>Icons/oxygen/network-server.png</file>
|
<file>Icons/oxygen/network-server.png</file>
|
||||||
<file>Icons/oxygen/unsubscribe16.png</file>
|
<file>Icons/oxygen/unsubscribe16.png</file>
|
||||||
<file>Icons/oxygen/encrypted32.png</file>
|
|
||||||
<file>Icons/oxygen/list-add.png</file>
|
<file>Icons/oxygen/list-add.png</file>
|
||||||
<file>Icons/oxygen/edit-paste.png</file>
|
<file>Icons/oxygen/edit-paste.png</file>
|
||||||
<file>Icons/oxygen/folder-remote.png</file>
|
<file>Icons/oxygen/folder-remote.png</file>
|
||||||
|
|||||||
@@ -132,7 +132,6 @@ namespace json {
|
|||||||
tmp += c;
|
tmp += c;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!tmp.isEmpty()) couples << tmp;
|
|
||||||
foreach(QString couple, couples) {
|
foreach(QString couple, couples) {
|
||||||
QStringList parts = couple.split(":");
|
QStringList parts = couple.split(":");
|
||||||
if(parts.size() != 2) continue;
|
if(parts.size() != 2) continue;
|
||||||
|
|||||||
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
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
Binary file not shown.
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
Reference in New Issue
Block a user