mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-09 05:14:23 +00:00
Cleanup
Use Qt5 connect syntax Reorder include headers
This commit is contained in:
parent
eb201003ee
commit
cb929f7e59
@ -30,84 +30,83 @@
|
|||||||
|
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#include <QClipboard>
|
||||||
#include <QtMacExtras>
|
#include <QCloseEvent>
|
||||||
#include <QtMac>
|
#include <QCryptographicHash>
|
||||||
#endif
|
#include <QDebug>
|
||||||
|
#include <QDesktopServices>
|
||||||
|
#include <QFileDialog>
|
||||||
|
#include <QFileSystemWatcher>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QMimeData>
|
||||||
|
#include <QProcess>
|
||||||
|
#include <QScrollBar>
|
||||||
|
#include <QShortcut>
|
||||||
|
#include <QSplitter>
|
||||||
|
#include <QStatusBar>
|
||||||
|
#include <QSysInfo>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#include <QtMac>
|
||||||
|
#include <QtMacExtras>
|
||||||
|
#endif
|
||||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB)
|
||||||
#include <QDBusConnection>
|
#include <QDBusConnection>
|
||||||
#include "notifications.h"
|
#include "notifications.h"
|
||||||
#endif
|
#endif
|
||||||
#include <QDebug>
|
|
||||||
#include <QFileDialog>
|
|
||||||
#include <QFileSystemWatcher>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QTimer>
|
|
||||||
#include <QDesktopServices>
|
|
||||||
#include <QStatusBar>
|
|
||||||
#include <QClipboard>
|
|
||||||
#include <QCloseEvent>
|
|
||||||
#include <QShortcut>
|
|
||||||
#include <QScrollBar>
|
|
||||||
#include <QSplitter>
|
|
||||||
#include <QSysInfo>
|
|
||||||
#include <QMimeData>
|
|
||||||
#include <QCryptographicHash>
|
|
||||||
#include <QProcess>
|
|
||||||
|
|
||||||
#include "base/preferences.h"
|
#include "about_imp.h"
|
||||||
#include "base/settingsstorage.h"
|
#include "addnewtorrentdialog.h"
|
||||||
#include "base/logger.h"
|
#include "application.h"
|
||||||
#include "base/utils/misc.h"
|
#include "autoexpandabledialog.h"
|
||||||
#include "base/utils/fs.h"
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
#include "base/net/downloadmanager.h"
|
|
||||||
#include "base/net/downloadhandler.h"
|
|
||||||
#endif
|
|
||||||
#include "base/bittorrent/session.h"
|
#include "base/bittorrent/session.h"
|
||||||
#include "base/bittorrent/sessionstatus.h"
|
#include "base/bittorrent/sessionstatus.h"
|
||||||
#include "base/bittorrent/torrenthandle.h"
|
#include "base/bittorrent/torrenthandle.h"
|
||||||
#include "base/global.h"
|
#include "base/global.h"
|
||||||
|
#include "base/logger.h"
|
||||||
|
#include "base/preferences.h"
|
||||||
#include "base/rss/rss_folder.h"
|
#include "base/rss/rss_folder.h"
|
||||||
#include "base/rss/rss_session.h"
|
#include "base/rss/rss_session.h"
|
||||||
|
#include "base/settingsstorage.h"
|
||||||
|
#include "base/utils/fs.h"
|
||||||
|
#include "base/utils/misc.h"
|
||||||
|
#include "cookiesdialog.h"
|
||||||
|
#include "downloadfromurldlg.h"
|
||||||
|
#include "executionlog.h"
|
||||||
|
#include "guiiconprovider.h"
|
||||||
|
#include "hidabletabwidget.h"
|
||||||
|
#include "lineedit.h"
|
||||||
|
#include "optionsdlg.h"
|
||||||
|
#include "peerlistwidget.h"
|
||||||
|
#include "powermanagement.h"
|
||||||
|
#include "propertieswidget.h"
|
||||||
|
#include "rss/rsswidget.h"
|
||||||
|
#include "search/searchwidget.h"
|
||||||
|
#include "speedlimitdlg.h"
|
||||||
|
#include "statsdialog.h"
|
||||||
|
#include "statusbar.h"
|
||||||
|
#include "torrentcreatordlg.h"
|
||||||
|
#include "torrentmodel.h"
|
||||||
|
#include "trackerlist.h"
|
||||||
|
#include "transferlistfilterswidget.h"
|
||||||
|
#include "transferlistwidget.h"
|
||||||
|
#include "ui_mainwindow.h"
|
||||||
|
|
||||||
#include "application.h"
|
#ifdef Q_OS_WIN
|
||||||
|
#include "base/net/downloadhandler.h"
|
||||||
|
#include "base/net/downloadmanager.h"
|
||||||
|
#endif
|
||||||
|
#ifdef Q_OS_MAC
|
||||||
|
#include "macutilities.h"
|
||||||
|
#endif
|
||||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||||
#include "programupdater.h"
|
#include "programupdater.h"
|
||||||
#endif
|
#endif
|
||||||
#include "powermanagement.h"
|
|
||||||
#include "guiiconprovider.h"
|
|
||||||
#include "torrentmodel.h"
|
|
||||||
#include "autoexpandabledialog.h"
|
|
||||||
#include "torrentcreatordlg.h"
|
|
||||||
#include "downloadfromurldlg.h"
|
|
||||||
#include "addnewtorrentdialog.h"
|
|
||||||
#include "statsdialog.h"
|
|
||||||
#include "cookiesdialog.h"
|
|
||||||
#include "speedlimitdlg.h"
|
|
||||||
#include "transferlistwidget.h"
|
|
||||||
#include "search/searchwidget.h"
|
|
||||||
#include "trackerlist.h"
|
|
||||||
#include "peerlistwidget.h"
|
|
||||||
#include "transferlistfilterswidget.h"
|
|
||||||
#include "propertieswidget.h"
|
|
||||||
#include "statusbar.h"
|
|
||||||
#include "rss/rsswidget.h"
|
|
||||||
#include "about_imp.h"
|
|
||||||
#include "optionsdlg.h"
|
|
||||||
#if LIBTORRENT_VERSION_NUM < 10100
|
#if LIBTORRENT_VERSION_NUM < 10100
|
||||||
#include "trackerlogin.h"
|
#include "trackerlogin.h"
|
||||||
#endif
|
#endif
|
||||||
#include "lineedit.h"
|
|
||||||
#include "executionlog.h"
|
|
||||||
#include "hidabletabwidget.h"
|
|
||||||
#include "ui_mainwindow.h"
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
#include "macutilities.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
void qt_mac_set_dock_menu(QMenu *menu);
|
void qt_mac_set_dock_menu(QMenu *menu);
|
||||||
|
@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
|||||||
connect(ScanFoldersModel::instance(), &QAbstractListModel::dataChanged, this, &ThisType::enableApplyButton);
|
connect(ScanFoldersModel::instance(), &QAbstractListModel::dataChanged, this, &ThisType::enableApplyButton);
|
||||||
connect(m_ui->scanFoldersView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ThisType::handleScanFolderViewSelectionChanged);
|
connect(m_ui->scanFoldersView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &ThisType::handleScanFolderViewSelectionChanged);
|
||||||
|
|
||||||
connect(m_ui->buttonBox, SIGNAL(clicked(QAbstractButton*)), this, SLOT(applySettings(QAbstractButton*)));
|
connect(m_ui->buttonBox, &QDialogButtonBox::clicked, this, &OptionsDialog::applySettings);
|
||||||
// Languages supported
|
// Languages supported
|
||||||
initializeLanguageCombo();
|
initializeLanguageCombo();
|
||||||
|
|
||||||
@ -1578,7 +1578,7 @@ void OptionsDialog::on_IpFilterRefreshBtn_clicked()
|
|||||||
session->setIPFilteringEnabled(true);
|
session->setIPFilteringEnabled(true);
|
||||||
session->setIPFilterFile(""); // forcing Session reload filter file
|
session->setIPFilterFile(""); // forcing Session reload filter file
|
||||||
session->setIPFilterFile(getFilter());
|
session->setIPFilterFile(getFilter());
|
||||||
connect(session, SIGNAL(IPFilterParsed(bool, int)), SLOT(handleIPFilterParsed(bool, int)));
|
connect(session, &BitTorrent::Session::IPFilterParsed, this, &OptionsDialog::handleIPFilterParsed);
|
||||||
setCursor(QCursor(Qt::WaitCursor));
|
setCursor(QCursor(Qt::WaitCursor));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1590,7 +1590,7 @@ void OptionsDialog::handleIPFilterParsed(bool error, int ruleCount)
|
|||||||
else
|
else
|
||||||
QMessageBox::information(this, tr("Successfully refreshed"), tr("Successfully parsed the provided IP filter: %1 rules were applied.", "%1 is a number").arg(ruleCount));
|
QMessageBox::information(this, tr("Successfully refreshed"), tr("Successfully parsed the provided IP filter: %1 rules were applied.", "%1 is a number").arg(ruleCount));
|
||||||
m_refreshingIpFilter = false;
|
m_refreshingIpFilter = false;
|
||||||
disconnect(BitTorrent::Session::instance(), SIGNAL(IPFilterParsed(bool, int)), this, SLOT(handleIPFilterParsed(bool, int)));
|
disconnect(BitTorrent::Session::instance(), &BitTorrent::Session::IPFilterParsed, this, &OptionsDialog::handleIPFilterParsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString OptionsDialog::languageToLocalizedString(const QLocale &locale)
|
QString OptionsDialog::languageToLocalizedString(const QLocale &locale)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user