mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-09 22:37:59 +00:00
- Code optimization using initialization lists
- Removed Traditional Chinese translation because we lost our translator and translation is outdated
This commit is contained in:
parent
c6b25e5f79
commit
6ecb45d661
2
TODO
2
TODO
@ -73,6 +73,7 @@ LANGUAGES UPDATED:
|
|||||||
|
|
||||||
beta5->beta6 changelog:
|
beta5->beta6 changelog:
|
||||||
- FEATURE: Split download tab from GUI class and cleaned up code
|
- FEATURE: Split download tab from GUI class and cleaned up code
|
||||||
|
- FEATURE: A lot of code optimization
|
||||||
- BUGFIX: Made torrent deletion from hard-drive safer
|
- BUGFIX: Made torrent deletion from hard-drive safer
|
||||||
- BUGFIX: Fixed a bug when switching from finished to downloading list
|
- BUGFIX: Fixed a bug when switching from finished to downloading list
|
||||||
- BUGFIX: Showing checking progress for paused torrents too
|
- BUGFIX: Showing checking progress for paused torrents too
|
||||||
@ -81,3 +82,4 @@ beta5->beta6 changelog:
|
|||||||
- BUGFIX: Made finished list context menu more similar to the download list one
|
- BUGFIX: Made finished list context menu more similar to the download list one
|
||||||
- BUGFIX: Fixed Pause/Start action in lists context menus
|
- BUGFIX: Fixed Pause/Start action in lists context menus
|
||||||
- BUGFIX: Display the torrent that are being checked as 'checking' in seeding list
|
- BUGFIX: Display the torrent that are being checked as 'checking' in seeding list
|
||||||
|
- I18N: Removed no longer maintained Traditional chinese translation
|
@ -32,13 +32,10 @@
|
|||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession){
|
FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), nbFinished(0){
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||||
nbFinished = 0;
|
|
||||||
this->BTSession = BTSession;
|
|
||||||
this->parent = parent;
|
|
||||||
connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), this, SLOT(torrentAdded(QString, QTorrentHandle&, bool)));
|
connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), this, SLOT(torrentAdded(QString, QTorrentHandle&, bool)));
|
||||||
finishedListModel = new QStandardItemModel(0,7);
|
finishedListModel = new QStandardItemModel(0,7);
|
||||||
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
||||||
|
@ -34,11 +34,11 @@ using namespace libtorrent;
|
|||||||
class FinishedTorrents : public QWidget, public Ui::seeding {
|
class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
QObject *parent;
|
||||||
bittorrent *BTSession;
|
bittorrent *BTSession;
|
||||||
FinishedListDelegate *finishedListDelegate;
|
FinishedListDelegate *finishedListDelegate;
|
||||||
QStandardItemModel *finishedListModel;
|
QStandardItemModel *finishedListModel;
|
||||||
unsigned int nbFinished;
|
unsigned int nbFinished;
|
||||||
QObject *parent;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
FinishedTorrents(QObject *parent, bittorrent *BTSession);
|
||||||
|
@ -56,7 +56,7 @@ namespace fs = boost::filesystem;
|
|||||||
*****************************************************/
|
*****************************************************/
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent) {
|
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), force_exit(false) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
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)));
|
||||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||||
@ -104,7 +104,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent) {
|
|||||||
// creating options
|
// creating options
|
||||||
options = new options_imp(this);
|
options = new options_imp(this);
|
||||||
connect(options, SIGNAL(status_changed(QString, bool)), this, SLOT(OptionsSaved(QString, bool)));
|
connect(options, SIGNAL(status_changed(QString, bool)), this, SLOT(OptionsSaved(QString, bool)));
|
||||||
force_exit = false;
|
|
||||||
BTSession = new bittorrent();
|
BTSession = new bittorrent();
|
||||||
connect(BTSession, SIGNAL(fullDiskError(QTorrentHandle&)), this, SLOT(fullDiskError(QTorrentHandle&)));
|
connect(BTSession, SIGNAL(fullDiskError(QTorrentHandle&)), this, SLOT(fullDiskError(QTorrentHandle&)));
|
||||||
connect(BTSession, SIGNAL(finishedTorrent(QTorrentHandle&)), this, SLOT(finishedTorrent(QTorrentHandle&)));
|
connect(BTSession, SIGNAL(finishedTorrent(QTorrentHandle&)), this, SLOT(finishedTorrent(QTorrentHandle&)));
|
||||||
|
@ -57,12 +57,11 @@ class about : public QDialog, private Ui::AboutDlg{
|
|||||||
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||||
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
||||||
- <u>Chinese (Simplified):</u> Guo Yue (guoyue0418@hotmail.com)<br>\
|
- <u>Chinese (Simplified):</u> Guo Yue (guoyue0418@hotmail.com)<br>\
|
||||||
- <u>Chinese (Traditional):</u> Jeff Chen (jeff.cn.chen@gmail.com)<br>\
|
|
||||||
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
||||||
- <u>Dutch:</u> Luke Niesink (luke@lukeniesink.net)<br>\
|
- <u>Dutch:</u> Luke Niesink (luke@lukeniesink.net)<br>\
|
||||||
- <u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net)<br>\
|
- <u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net)<br>\
|
||||||
- <u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)<br>\
|
- <u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)<br>\
|
||||||
- <u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)<br>\
|
- <u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||||
- <u>Hungarian:</u> Majoros Péter (majoros.j.p@t-online.hu)<br>\
|
- <u>Hungarian:</u> Majoros Péter (majoros.j.p@t-online.hu)<br>\
|
||||||
- <u>Italian:</u> Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)<br>\
|
- <u>Italian:</u> Mirko Ferrari (mirkoferrari@gmail.com) and Ferraro Luciano (luciano.ferraro@gmail.com)<br>\
|
||||||
- <u>Japanese:</u> Nardog (nardog@e2umail.com)<br>\
|
- <u>Japanese:</u> Nardog (nardog@e2umail.com)<br>\
|
||||||
@ -74,7 +73,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
|||||||
- <u>Russian:</u> Nick Khazov (m2k3d0n at users.sourceforge.net)<br>\
|
- <u>Russian:</u> Nick Khazov (m2k3d0n at users.sourceforge.net)<br>\
|
||||||
- <u>Slovak:</u> helix84<br>\
|
- <u>Slovak:</u> helix84<br>\
|
||||||
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)<br>\
|
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)<br>\
|
||||||
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
|
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
|
||||||
- <u>Turkish:</u> Erdem Bingöl (erdem84@gmail.com)<br>\
|
- <u>Turkish:</u> Erdem Bingöl (erdem84@gmail.com)<br>\
|
||||||
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));
|
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));
|
||||||
te_translation->append(tr("Please contact me if you would like to translate qBittorrent into your own language."));
|
te_translation->append(tr("Please contact me if you would like to translate qBittorrent into your own language."));
|
||||||
|
@ -42,10 +42,9 @@
|
|||||||
#define ETAS_MAX_VALUES 8
|
#define ETAS_MAX_VALUES 8
|
||||||
|
|
||||||
// Main constructor
|
// Main constructor
|
||||||
bittorrent::bittorrent() {
|
bittorrent::bittorrent() : timerScan(0), DHTEnabled(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);
|
||||||
timerScan = 0;
|
|
||||||
// Supported preview extensions
|
// Supported preview extensions
|
||||||
// XXX: A bit dirty to do it this way (use mime types?)
|
// XXX: A bit dirty to do it this way (use mime types?)
|
||||||
supported_preview_extensions << "AVI" << "DIVX" << "MPG" << "MPEG" << "MPE" << "MP3" << "OGG" << "WMV" << "WMA" << "RMV" << "RMVB" << "ASF" << "MOV" << "WAV" << "MP2" << "SWF" << "AC3" << "OGM" << "MP4" << "FLV" << "VOB" << "QT" << "MKV" << "AIF" << "AIFF" << "AIFC" << "MID" << "MPG" << "RA" << "RAM" << "AU" << "M4A" << "FLAC" << "M4P" << "3GP" << "AAC" << "RM" << "SWA" << "MPC" << "MPP";
|
supported_preview_extensions << "AVI" << "DIVX" << "MPG" << "MPEG" << "MPE" << "MP3" << "OGG" << "WMV" << "WMA" << "RMV" << "RMVB" << "ASF" << "MOV" << "WAV" << "MP2" << "SWF" << "AC3" << "OGM" << "MP4" << "FLV" << "VOB" << "QT" << "MKV" << "AIF" << "AIFF" << "AIFC" << "MID" << "MPG" << "RA" << "RAM" << "AU" << "M4A" << "FLAC" << "M4P" << "3GP" << "AAC" << "RM" << "SWA" << "MPC" << "MPP";
|
||||||
@ -57,8 +56,6 @@ bittorrent::bittorrent() {
|
|||||||
s->start_lsd();
|
s->start_lsd();
|
||||||
s->start_natpmp();
|
s->start_natpmp();
|
||||||
s->start_upnp();
|
s->start_upnp();
|
||||||
// DHT (Trackerless), disabled until told otherwise
|
|
||||||
DHTEnabled = false;
|
|
||||||
// Enabling metadata plugin
|
// Enabling metadata plugin
|
||||||
s->add_extension(&create_metadata_plugin);
|
s->add_extension(&create_metadata_plugin);
|
||||||
timerAlerts = new QTimer();
|
timerAlerts = new QTimer();
|
||||||
|
@ -40,10 +40,10 @@ class bittorrent : public QObject{
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
session *s;
|
session *s;
|
||||||
bool DHTEnabled;
|
|
||||||
QString scan_dir;
|
QString scan_dir;
|
||||||
QTimer *timerScan;
|
QTimer *timerScan;
|
||||||
QTimer *timerAlerts;
|
QTimer *timerAlerts;
|
||||||
|
bool DHTEnabled;
|
||||||
downloadThread *downloader;
|
downloadThread *downloader;
|
||||||
QStringList supported_preview_extensions;
|
QStringList supported_preview_extensions;
|
||||||
QString defaultSavePath;
|
QString defaultSavePath;
|
||||||
|
@ -38,9 +38,7 @@ class subDeleteThread : public QThread {
|
|||||||
bool abort;
|
bool abort;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
subDeleteThread(QObject *parent, QString save_path, QStringList files_path) : QThread(parent), save_path(save_path), files_path(files_path){
|
subDeleteThread(QObject *parent, QString save_path, QStringList files_path) : QThread(parent), save_path(save_path), files_path(files_path), abort(false){}
|
||||||
abort = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
~subDeleteThread(){
|
~subDeleteThread(){
|
||||||
abort = true;
|
abort = true;
|
||||||
@ -72,9 +70,7 @@ class deleteThread : public QThread {
|
|||||||
QList<subDeleteThread*> subThreads;
|
QList<subDeleteThread*> subThreads;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
deleteThread(QObject* parent) : QThread(parent){
|
deleteThread(QObject* parent) : QThread(parent), abort(false){}
|
||||||
abort = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
~deleteThread(){
|
~deleteThread(){
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
|
@ -45,9 +45,7 @@ class subDownloadThread : public QThread {
|
|||||||
bool abort;
|
bool abort;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
subDownloadThread(QObject *parent, QString url) : QThread(parent), url(url){
|
subDownloadThread(QObject *parent, QString url) : QThread(parent), url(url), abort(false){}
|
||||||
abort = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
~subDownloadThread(){
|
~subDownloadThread(){
|
||||||
abort = true;
|
abort = true;
|
||||||
@ -146,9 +144,7 @@ class downloadThread : public QThread {
|
|||||||
void downloadFailure(QString url, QString reason);
|
void downloadFailure(QString url, QString reason);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
downloadThread(QObject* parent) : QThread(parent){
|
downloadThread(QObject* parent) : QThread(parent), abort(false){}
|
||||||
abort = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
~downloadThread(){
|
~downloadThread(){
|
||||||
mutex.lock();
|
mutex.lock();
|
||||||
|
@ -33,12 +33,8 @@
|
|||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
|
||||||
DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) {
|
DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession) : parent(parent), BTSession(BTSession), delayedSorting(false), nbTorrents(0) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
this->BTSession = BTSession;
|
|
||||||
this->parent = parent;
|
|
||||||
delayedSorting = false;
|
|
||||||
nbTorrents = 0;
|
|
||||||
// Setting icons
|
// Setting icons
|
||||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||||
|
@ -34,13 +34,13 @@ using namespace libtorrent;
|
|||||||
class DownloadingTorrents : public QWidget, public Ui::downloading{
|
class DownloadingTorrents : public QWidget, public Ui::downloading{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
|
QObject *parent;
|
||||||
bittorrent *BTSession;
|
bittorrent *BTSession;
|
||||||
DLListDelegate *DLDelegate;
|
DLListDelegate *DLDelegate;
|
||||||
QStandardItemModel *DLListModel;
|
QStandardItemModel *DLListModel;
|
||||||
unsigned int nbTorrents;
|
|
||||||
bool delayedSorting;
|
bool delayedSorting;
|
||||||
|
unsigned int nbTorrents;
|
||||||
Qt::SortOrder delayedSortingOrder;
|
Qt::SortOrder delayedSortingOrder;
|
||||||
QObject *parent;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DownloadingTorrents(QObject *parent, bittorrent *BTSession);
|
DownloadingTorrents(QObject *parent, bittorrent *BTSession);
|
||||||
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -122,12 +122,10 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
|
|||||||
locales << "uk_UA";
|
locales << "uk_UA";
|
||||||
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/russia.png"))), QString::fromUtf8("Русский"));
|
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/russia.png"))), QString::fromUtf8("Русский"));
|
||||||
locales << "ru_RU";
|
locales << "ru_RU";
|
||||||
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/japan.png"))), QString::fromUtf8("日本語"));
|
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/japan.png"))), QString::fromUtf8("日本語"));
|
||||||
locales << "ja_JP";
|
locales << "ja_JP";
|
||||||
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/china.png"))), QString::fromUtf8("中文 (简体)"));
|
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/china.png"))), QString::fromUtf8("中文 (简体)"));
|
||||||
locales << "zh_CN";
|
locales << "zh_CN";
|
||||||
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/china_hong_kong.png"))), QString::fromUtf8("中文 (繁體)"));
|
|
||||||
locales << "zh_HK";
|
|
||||||
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/south_korea.png"))), QString::fromUtf8("한글"));
|
combo_i18n->addItem((QIcon(QString::fromUtf8(":/Icons/flags/south_korea.png"))), QString::fromUtf8("한글"));
|
||||||
locales << "ko_KR";
|
locales << "ko_KR";
|
||||||
|
|
||||||
|
@ -31,10 +31,8 @@
|
|||||||
#include <QStandardItemModel>
|
#include <QStandardItemModel>
|
||||||
|
|
||||||
// Constructor
|
// Constructor
|
||||||
properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h): QDialog(parent), h(h){
|
properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h): QDialog(parent), h(h), BTSession(BTSession), changedFilteredfiles(false), hash(h.hash()) {
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
this->BTSession = BTSession;
|
|
||||||
changedFilteredfiles = false;
|
|
||||||
lbl_priorities->setText(tr("Priorities:")+"<ul><li>"+tr("Ignored: file is not downloaded at all")+"</li><li>"+tr("Normal: normal priority. Download order is dependent on availability")+"</li><li>"+tr("High: higher than normal priority. Pieces are preferred over pieces with the same availability, but not over pieces with lower availability")+"</li><li>"+tr("Maximum: maximum priority, availability is disregarded, the piece is preferred over any other piece with lower priority")+"</li></ul>");
|
lbl_priorities->setText(tr("Priorities:")+"<ul><li>"+tr("Ignored: file is not downloaded at all")+"</li><li>"+tr("Normal: normal priority. Download order is dependent on availability")+"</li><li>"+tr("High: higher than normal priority. Pieces are preferred over pieces with the same availability, but not over pieces with lower availability")+"</li><li>"+tr("Maximum: maximum priority, availability is disregarded, the piece is preferred over any other piece with lower priority")+"</li></ul>");
|
||||||
// set icons
|
// set icons
|
||||||
addTracker_button->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/add.png")));
|
addTracker_button->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/add.png")));
|
||||||
@ -66,7 +64,6 @@ properties::properties(QWidget *parent, bittorrent *BTSession, QTorrentHandle &h
|
|||||||
connect(addWS_button, SIGNAL(clicked()), this, SLOT(askWebSeed()));
|
connect(addWS_button, SIGNAL(clicked()), this, SLOT(askWebSeed()));
|
||||||
connect(deleteWS_button, SIGNAL(clicked()), this, SLOT(deleteSelectedUrlSeeds()));
|
connect(deleteWS_button, SIGNAL(clicked()), this, SLOT(deleteSelectedUrlSeeds()));
|
||||||
// get Infos from torrent handle
|
// get Infos from torrent handle
|
||||||
hash = h.hash();
|
|
||||||
fileName->setText(h.name());
|
fileName->setText(h.name());
|
||||||
// Torrent Infos
|
// Torrent Infos
|
||||||
save_path->setText(h.save_path());
|
save_path->setText(h.save_path());
|
||||||
|
@ -36,13 +36,13 @@ class properties : public QDialog, private Ui::properties{
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
private:
|
private:
|
||||||
QTorrentHandle h;
|
QTorrentHandle h;
|
||||||
|
bittorrent *BTSession;
|
||||||
|
bool changedFilteredfiles;
|
||||||
QString hash;
|
QString hash;
|
||||||
PropListDelegate *PropDelegate;
|
PropListDelegate *PropDelegate;
|
||||||
QStandardItemModel *PropListModel;
|
QStandardItemModel *PropListModel;
|
||||||
QTimer *updateInfosTimer;
|
QTimer *updateInfosTimer;
|
||||||
bool has_filtered_files;
|
bool has_filtered_files;
|
||||||
bool changedFilteredfiles;
|
|
||||||
bittorrent *BTSession;
|
|
||||||
QStringList urlSeeds;
|
QStringList urlSeeds;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
16
src/rss.h
16
src/rss.h
@ -59,9 +59,7 @@ class RssItem : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// public constructor
|
// public constructor
|
||||||
RssItem(const QDomElement& properties) {
|
RssItem(const QDomElement& properties) : read(false), downloadLink("none") {
|
||||||
read = false;
|
|
||||||
downloadLink = "none";
|
|
||||||
QDomElement property = properties.firstChild().toElement();
|
QDomElement property = properties.firstChild().toElement();
|
||||||
while(!property.isNull()) {
|
while(!property.isNull()) {
|
||||||
if (property.tagName() == "title")
|
if (property.tagName() == "title")
|
||||||
@ -116,18 +114,18 @@ class RssStream : public QObject{
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
QString title;
|
QString title;
|
||||||
QString alias;
|
|
||||||
QString link;
|
QString link;
|
||||||
QString description;
|
QString description;
|
||||||
QString image;
|
QString image;
|
||||||
QString url;
|
QString url;
|
||||||
|
QString alias;
|
||||||
QString filePath;
|
QString filePath;
|
||||||
QString iconPath;
|
QString iconPath;
|
||||||
QList<RssItem*> listItem;
|
QList<RssItem*> listItem;
|
||||||
QTime lastRefresh;
|
QTime lastRefresh;
|
||||||
bool read;
|
bool read;
|
||||||
bool downloadFailure;
|
|
||||||
bool refreshed;
|
bool refreshed;
|
||||||
|
bool downloadFailure;
|
||||||
bool currently_loading;
|
bool currently_loading;
|
||||||
|
|
||||||
public slots :
|
public slots :
|
||||||
@ -150,13 +148,7 @@ class RssStream : public QObject{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RssStream(QString _url) {
|
RssStream(QString _url): url(_url), alias(""), iconPath(":/Icons/rss.png"), refreshed(false), downloadFailure(false), currently_loading(false) {
|
||||||
url = _url;
|
|
||||||
alias = "";
|
|
||||||
refreshed = false;
|
|
||||||
downloadFailure = false;
|
|
||||||
currently_loading = false;
|
|
||||||
iconPath = ":/Icons/rss.png";
|
|
||||||
qDebug("RSSStream constructed");
|
qDebug("RSSStream constructed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,10 +42,8 @@
|
|||||||
|
|
||||||
#define SEARCHHISTORY_MAXSIZE 50
|
#define SEARCHHISTORY_MAXSIZE 50
|
||||||
|
|
||||||
SearchEngine::SearchEngine(bittorrent *BTSession, QSystemTrayIcon *myTrayIcon, bool systrayIntegration) : QWidget(), systrayIntegration(systrayIntegration){
|
SearchEngine::SearchEngine(bittorrent *BTSession, QSystemTrayIcon *myTrayIcon, bool systrayIntegration) : QWidget(), BTSession(BTSession), myTrayIcon(myTrayIcon), systrayIntegration(systrayIntegration){
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
this->BTSession = BTSession;
|
|
||||||
this->myTrayIcon = myTrayIcon;
|
|
||||||
downloader = new downloadThread(this);
|
downloader = new downloadThread(this);
|
||||||
connect(downloader, SIGNAL(downloadFinished(QString, QString)), this, SLOT(novaUpdateDownloaded(QString, QString)));
|
connect(downloader, SIGNAL(downloadFinished(QString, QString)), this, SLOT(novaUpdateDownloaded(QString, QString)));
|
||||||
connect(downloader, SIGNAL(downloadFailure(QString, QString)), this, SLOT(handleNovaDownloadFailure(QString, QString)));
|
connect(downloader, SIGNAL(downloadFailure(QString, QString)), this, SLOT(handleNovaDownloadFailure(QString, QString)));
|
||||||
|
@ -123,7 +123,6 @@ TRANSLATIONS = $$LANG_PATH/qbittorrent_fr.ts \
|
|||||||
$$LANG_PATH/qbittorrent_uk.ts \
|
$$LANG_PATH/qbittorrent_uk.ts \
|
||||||
$$LANG_PATH/qbittorrent_bg.ts \
|
$$LANG_PATH/qbittorrent_bg.ts \
|
||||||
$$LANG_PATH/qbittorrent_it.ts \
|
$$LANG_PATH/qbittorrent_it.ts \
|
||||||
$$LANG_PATH/qbittorrent_zh_HK.ts \
|
|
||||||
$$LANG_PATH/qbittorrent_sk.ts \
|
$$LANG_PATH/qbittorrent_sk.ts \
|
||||||
$$LANG_PATH/qbittorrent_ro.ts \
|
$$LANG_PATH/qbittorrent_ro.ts \
|
||||||
$$LANG_PATH/qbittorrent_pt.ts \
|
$$LANG_PATH/qbittorrent_pt.ts \
|
||||||
|
Loading…
Reference in New Issue
Block a user