mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
commit
c44efbd965
@ -178,11 +178,11 @@ QString Application::fileLoggerPath() const
|
|||||||
QVariant(specialFolderLocation(SpecialFolder::Data) + LOG_FOLDER)).toString();
|
QVariant(specialFolderLocation(SpecialFolder::Data) + LOG_FOLDER)).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::setFileLoggerPath(const QString &value)
|
void Application::setFileLoggerPath(const QString &path)
|
||||||
{
|
{
|
||||||
if (m_fileLogger)
|
if (m_fileLogger)
|
||||||
m_fileLogger->changePath(value);
|
m_fileLogger->changePath(path);
|
||||||
settings()->storeValue(KEY_FILELOGGER_PATH, value);
|
settings()->storeValue(KEY_FILELOGGER_PATH, path);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Application::isFileLoggerBackup() const
|
bool Application::isFileLoggerBackup() const
|
||||||
|
@ -180,7 +180,7 @@ namespace
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
T operator()(T val)
|
T operator()(T val) const
|
||||||
{
|
{
|
||||||
return val <= m_limit ? m_ret : val;
|
return val <= m_limit ? m_ret : val;
|
||||||
}
|
}
|
||||||
|
@ -316,7 +316,7 @@ namespace BitTorrent
|
|||||||
bool isTrackerFilteringEnabled() const;
|
bool isTrackerFilteringEnabled() const;
|
||||||
void setTrackerFilteringEnabled(bool enabled);
|
void setTrackerFilteringEnabled(bool enabled);
|
||||||
QStringList bannedIPs() const;
|
QStringList bannedIPs() const;
|
||||||
void setBannedIPs(const QStringList &list);
|
void setBannedIPs(const QStringList &newList);
|
||||||
|
|
||||||
void startUpTorrents();
|
void startUpTorrents();
|
||||||
TorrentHandle *findTorrent(const InfoHash &hash) const;
|
TorrentHandle *findTorrent(const InfoHash &hash) const;
|
||||||
|
@ -74,6 +74,7 @@ AddTorrentData::AddTorrentData()
|
|||||||
: resumed(false)
|
: resumed(false)
|
||||||
, disableTempPath(false)
|
, disableTempPath(false)
|
||||||
, sequential(false)
|
, sequential(false)
|
||||||
|
, firstLastPiecePriority(false)
|
||||||
, hasSeedStatus(false)
|
, hasSeedStatus(false)
|
||||||
, skipChecking(false)
|
, skipChecking(false)
|
||||||
, hasRootFolder(true)
|
, hasRootFolder(true)
|
||||||
@ -1655,7 +1656,7 @@ void TorrentHandle::handleMetadataReceivedAlert(libt::metadata_received_alert *p
|
|||||||
m_speedMonitor.reset();
|
m_speedMonitor.reset();
|
||||||
m_session->handleTorrentPaused(this);
|
m_session->handleTorrentPaused(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If first/last piece priority was specified when adding this torrent, we can set it
|
// If first/last piece priority was specified when adding this torrent, we can set it
|
||||||
// now that we have metadata:
|
// now that we have metadata:
|
||||||
if (m_needsToSetFirstLastPiecePriority) {
|
if (m_needsToSetFirstLastPiecePriority) {
|
||||||
|
@ -84,7 +84,7 @@ TrackerEntry &TrackerEntry::operator=(const TrackerEntry &other)
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TrackerEntry::operator==(const TrackerEntry &other)
|
bool TrackerEntry::operator==(const TrackerEntry &other) const
|
||||||
{
|
{
|
||||||
return (QUrl(url()) == QUrl(other.url()));
|
return (QUrl(url()) == QUrl(other.url()));
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ namespace BitTorrent
|
|||||||
|
|
||||||
void setTier(int value);
|
void setTier(int value);
|
||||||
TrackerEntry &operator=(const TrackerEntry &other);
|
TrackerEntry &operator=(const TrackerEntry &other);
|
||||||
bool operator==(const TrackerEntry &other);
|
bool operator==(const TrackerEntry &other) const;
|
||||||
|
|
||||||
libtorrent::announce_entry nativeEntry() const;
|
libtorrent::announce_entry nativeEntry() const;
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ namespace Net
|
|||||||
Smtp(QObject *parent = 0);
|
Smtp(QObject *parent = 0);
|
||||||
~Smtp();
|
~Smtp();
|
||||||
|
|
||||||
void sendMail(const QString &m_from, const QString &to, const QString &subject, const QString &body);
|
void sendMail(const QString &from, const QString &to, const QString &subject, const QString &body);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void readyRead();
|
void readyRead();
|
||||||
|
@ -430,9 +430,9 @@ QStringList AutoDownloadRule::feedURLs() const
|
|||||||
return m_dataPtr->feedURLs;
|
return m_dataPtr->feedURLs;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoDownloadRule::setFeedURLs(const QStringList &rssFeeds)
|
void AutoDownloadRule::setFeedURLs(const QStringList &urls)
|
||||||
{
|
{
|
||||||
m_dataPtr->feedURLs = rssFeeds;
|
m_dataPtr->feedURLs = urls;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AutoDownloadRule::name() const
|
QString AutoDownloadRule::name() const
|
||||||
|
@ -59,7 +59,7 @@ namespace RSS
|
|||||||
QString mustNotContain() const;
|
QString mustNotContain() const;
|
||||||
void setMustNotContain(const QString &tokens);
|
void setMustNotContain(const QString &tokens);
|
||||||
QStringList feedURLs() const;
|
QStringList feedURLs() const;
|
||||||
void setFeedURLs(const QStringList &feedURLs);
|
void setFeedURLs(const QStringList &urls);
|
||||||
int ignoreDays() const;
|
int ignoreDays() const;
|
||||||
void setIgnoreDays(int d);
|
void setIgnoreDays(int d);
|
||||||
QDateTime lastMatch() const;
|
QDateTime lastMatch() const;
|
||||||
@ -74,7 +74,7 @@ namespace RSS
|
|||||||
TriStateBool addPaused() const;
|
TriStateBool addPaused() const;
|
||||||
void setAddPaused(const TriStateBool &addPaused);
|
void setAddPaused(const TriStateBool &addPaused);
|
||||||
QString assignedCategory() const;
|
QString assignedCategory() const;
|
||||||
void setCategory(const QString &assignedCategory);
|
void setCategory(const QString &category);
|
||||||
|
|
||||||
bool matches(const QString &articleTitle) const;
|
bool matches(const QString &articleTitle) const;
|
||||||
|
|
||||||
|
@ -49,14 +49,14 @@ TorrentFilter::TorrentFilter()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TorrentFilter::TorrentFilter(Type type, QStringSet hashSet, QString category)
|
TorrentFilter::TorrentFilter(const Type type, const QStringSet &hashSet, const QString &category)
|
||||||
: m_type(type)
|
: m_type(type)
|
||||||
, m_category(category)
|
, m_category(category)
|
||||||
, m_hashSet(hashSet)
|
, m_hashSet(hashSet)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TorrentFilter::TorrentFilter(QString filter, QStringSet hashSet, QString category)
|
TorrentFilter::TorrentFilter(const QString &filter, const QStringSet &hashSet, const QString &category)
|
||||||
: m_type(All)
|
: m_type(All)
|
||||||
, m_category(category)
|
, m_category(category)
|
||||||
, m_hashSet(hashSet)
|
, m_hashSet(hashSet)
|
||||||
|
@ -72,8 +72,8 @@ public:
|
|||||||
|
|
||||||
TorrentFilter();
|
TorrentFilter();
|
||||||
// category: pass empty string for "no category" or null string (QString()) for "any category"
|
// category: pass empty string for "no category" or null string (QString()) for "any category"
|
||||||
TorrentFilter(Type type, QStringSet hashSet = AnyHash, QString category = AnyCategory);
|
TorrentFilter(const Type type, const QStringSet &hashSet = AnyHash, const QString &category = AnyCategory);
|
||||||
TorrentFilter(QString filter, QStringSet hashSet = AnyHash, QString category = AnyCategory);
|
TorrentFilter(const QString &filter, const QStringSet &hashSet = AnyHash, const QString &category = AnyCategory);
|
||||||
|
|
||||||
bool setType(Type type);
|
bool setType(Type type);
|
||||||
bool setTypeByName(const QString &filter);
|
bool setTypeByName(const QString &filter);
|
||||||
|
@ -78,8 +78,8 @@ namespace
|
|||||||
AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inParams, QWidget *parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::AddNewTorrentDialog)
|
, ui(new Ui::AddNewTorrentDialog)
|
||||||
, m_contentModel(0)
|
, m_contentModel(nullptr)
|
||||||
, m_contentDelegate(0)
|
, m_contentDelegate(nullptr)
|
||||||
, m_hasMetadata(false)
|
, m_hasMetadata(false)
|
||||||
, m_oldIndex(0)
|
, m_oldIndex(0)
|
||||||
, m_torrentParams(inParams)
|
, m_torrentParams(inParams)
|
||||||
@ -138,7 +138,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
// Signal / slots
|
// Signal / slots
|
||||||
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool)));
|
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool)));
|
||||||
connect(ui->doNotDeleteTorrentCheckBox, SIGNAL(clicked(bool)), SLOT(doNotDeleteTorrentClicked(bool)));
|
connect(ui->doNotDeleteTorrentCheckBox, SIGNAL(clicked(bool)), SLOT(doNotDeleteTorrentClicked(bool)));
|
||||||
editHotkey = new QShortcut(Qt::Key_F2, ui->contentTreeView, 0, 0, Qt::WidgetShortcut);
|
QShortcut *editHotkey = new QShortcut(Qt::Key_F2, ui->contentTreeView, 0, 0, Qt::WidgetShortcut);
|
||||||
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
||||||
connect(ui->contentTreeView, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
|
connect(ui->contentTreeView, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
|
||||||
|
|
||||||
@ -148,10 +148,9 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
AddNewTorrentDialog::~AddNewTorrentDialog()
|
AddNewTorrentDialog::~AddNewTorrentDialog()
|
||||||
{
|
{
|
||||||
saveState();
|
saveState();
|
||||||
|
|
||||||
|
delete m_contentDelegate;
|
||||||
delete ui;
|
delete ui;
|
||||||
if (m_contentModel)
|
|
||||||
delete m_contentModel;
|
|
||||||
delete editHotkey;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AddNewTorrentDialog::isEnabled()
|
bool AddNewTorrentDialog::isEnabled()
|
||||||
|
@ -110,7 +110,6 @@ private:
|
|||||||
QString m_filePath;
|
QString m_filePath;
|
||||||
BitTorrent::InfoHash m_hash;
|
BitTorrent::InfoHash m_hash;
|
||||||
BitTorrent::TorrentInfo m_torrentInfo;
|
BitTorrent::TorrentInfo m_torrentInfo;
|
||||||
QShortcut *editHotkey;
|
|
||||||
QByteArray m_headerState;
|
QByteArray m_headerState;
|
||||||
int m_oldIndex;
|
int m_oldIndex;
|
||||||
QScopedPointer<TorrentFileGuard> m_torrentGuard;
|
QScopedPointer<TorrentFileGuard> m_torrentGuard;
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
ICOHandler();
|
ICOHandler();
|
||||||
|
|
||||||
bool canRead() const;
|
bool canRead() const;
|
||||||
bool read(QImage *image);
|
bool read(QImage *outImage);
|
||||||
bool write(const QImage &image);
|
bool write(const QImage &image);
|
||||||
|
|
||||||
QByteArray name() const;
|
QByteArray name() const;
|
||||||
|
@ -199,7 +199,7 @@ private:
|
|||||||
void dragEnterEvent(QDragEnterEvent *event) override;
|
void dragEnterEvent(QDragEnterEvent *event) override;
|
||||||
void closeEvent(QCloseEvent *) override;
|
void closeEvent(QCloseEvent *) override;
|
||||||
void showEvent(QShowEvent *) override;
|
void showEvent(QShowEvent *) override;
|
||||||
bool event(QEvent *event) override;
|
bool event(QEvent *e) override;
|
||||||
void displayRSSTab(bool enable);
|
void displayRSSTab(bool enable);
|
||||||
void displaySearchTab(bool enable);
|
void displaySearchTab(bool enable);
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ public slots:
|
|||||||
void showConnectionTab();
|
void showConnectionTab();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void enableProxy(int comboIndex);
|
void enableProxy(int index);
|
||||||
void on_buttonBox_accepted();
|
void on_buttonBox_accepted();
|
||||||
void closeEvent(QCloseEvent *e);
|
void closeEvent(QCloseEvent *e);
|
||||||
void on_buttonBox_rejected();
|
void on_buttonBox_rejected();
|
||||||
@ -107,7 +107,7 @@ private slots:
|
|||||||
void on_btnWebUiCrt_clicked();
|
void on_btnWebUiCrt_clicked();
|
||||||
void on_btnWebUiKey_clicked();
|
void on_btnWebUiKey_clicked();
|
||||||
void on_registerDNSBtn_clicked();
|
void on_registerDNSBtn_clicked();
|
||||||
void setLocale(const QString &locale);
|
void setLocale(const QString &localeStr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Methods
|
// Methods
|
||||||
|
@ -40,9 +40,9 @@ SearchSortModel::SearchSortModel(QObject *parent)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchSortModel::enableNameFilter(bool enable)
|
void SearchSortModel::enableNameFilter(bool enabled)
|
||||||
{
|
{
|
||||||
m_isNameFilterEnabled = enable;
|
m_isNameFilterEnabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SearchSortModel::setNameFilter(const QString &searchTerm)
|
void SearchSortModel::setNameFilter(const QString &searchTerm)
|
||||||
|
@ -111,7 +111,7 @@ public slots:
|
|||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleFavicoDownload(const QString &url, const QString &filePath);
|
void handleFavicoDownload(const QString &url, const QString &filePath);
|
||||||
void handleFavicoFailure(const QString &url, const QString &reason);
|
void handleFavicoFailure(const QString &url, const QString &error);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// These 4 methods are virtual slots in the base class.
|
// These 4 methods are virtual slots in the base class.
|
||||||
|
Loading…
Reference in New Issue
Block a user