diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index f7ac28a3c..f3f876215 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -30,84 +30,83 @@ #include "mainwindow.h" -#ifdef Q_OS_MAC -#include -#include -#endif - -#include -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB) -#include -#include "notifications.h" -#endif +#include +#include +#include #include +#include #include #include #include -#include -#include -#include -#include -#include -#include +#include +#include #include +#include #include +#include #include -#include -#include -#include +#include +#include -#include "base/preferences.h" -#include "base/settingsstorage.h" -#include "base/logger.h" -#include "base/utils/misc.h" -#include "base/utils/fs.h" -#ifdef Q_OS_WIN -#include "base/net/downloadmanager.h" -#include "base/net/downloadhandler.h" +#ifdef Q_OS_MAC +#include +#include #endif +#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) && defined(QT_DBUS_LIB) +#include +#include "notifications.h" +#endif + +#include "about_imp.h" +#include "addnewtorrentdialog.h" +#include "application.h" +#include "autoexpandabledialog.h" #include "base/bittorrent/session.h" #include "base/bittorrent/sessionstatus.h" #include "base/bittorrent/torrenthandle.h" #include "base/global.h" +#include "base/logger.h" +#include "base/preferences.h" #include "base/rss/rss_folder.h" #include "base/rss/rss_session.h" - -#include "application.h" -#if defined(Q_OS_WIN) || defined(Q_OS_MAC) -#include "programupdater.h" -#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 "base/settingsstorage.h" +#include "base/utils/fs.h" +#include "base/utils/misc.h" #include "cookiesdialog.h" -#include "speedlimitdlg.h" -#include "transferlistwidget.h" -#include "search/searchwidget.h" -#include "trackerlist.h" +#include "downloadfromurldlg.h" +#include "executionlog.h" +#include "guiiconprovider.h" +#include "hidabletabwidget.h" +#include "lineedit.h" +#include "optionsdlg.h" #include "peerlistwidget.h" -#include "transferlistfilterswidget.h" +#include "powermanagement.h" #include "propertieswidget.h" -#include "statusbar.h" #include "rss/rsswidget.h" -#include "about_imp.h" -#include "optionsdlg.h" -#if LIBTORRENT_VERSION_NUM < 10100 -#include "trackerlogin.h" -#endif -#include "lineedit.h" -#include "executionlog.h" -#include "hidabletabwidget.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" +#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) +#include "programupdater.h" +#endif +#if LIBTORRENT_VERSION_NUM < 10100 +#include "trackerlogin.h" +#endif #ifdef Q_OS_MAC void qt_mac_set_dock_menu(QMenu *menu); diff --git a/src/gui/optionsdlg.cpp b/src/gui/optionsdlg.cpp index c4ca836c6..0f5ef88d7 100644 --- a/src/gui/optionsdlg.cpp +++ b/src/gui/optionsdlg.cpp @@ -139,7 +139,7 @@ OptionsDialog::OptionsDialog(QWidget *parent) connect(ScanFoldersModel::instance(), &QAbstractListModel::dataChanged, this, &ThisType::enableApplyButton); 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 initializeLanguageCombo(); @@ -1578,7 +1578,7 @@ void OptionsDialog::on_IpFilterRefreshBtn_clicked() session->setIPFilteringEnabled(true); session->setIPFilterFile(""); // forcing Session reload filter file 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)); } @@ -1590,7 +1590,7 @@ void OptionsDialog::handleIPFilterParsed(bool error, int ruleCount) else 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; - 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)