diff --git a/src/services/abstract/gui/formfeeddetails.cpp b/src/services/abstract/gui/formfeeddetails.cpp index a78674dfb..0dd67f79e 100755 --- a/src/services/abstract/gui/formfeeddetails.cpp +++ b/src/services/abstract/gui/formfeeddetails.cpp @@ -289,21 +289,21 @@ void FormFeedDetails::guessIconOnly() { void FormFeedDetails::createConnections() { // General connections. - connect(m_ui->m_buttonBox, SIGNAL(accepted()), this, SLOT(apply())); - connect(m_ui->m_txtTitle->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onTitleChanged(QString))); - connect(m_ui->m_txtDescription->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onDescriptionChanged(QString))); - connect(m_ui->m_txtUrl->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUrlChanged(QString))); - connect(m_ui->m_txtUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUsernameChanged(QString))); - connect(m_ui->m_txtPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onPasswordChanged(QString))); - connect(m_ui->m_gbAuthentication, SIGNAL(toggled(bool)), this, SLOT(onAuthenticationSwitched())); - connect(m_ui->m_cmbAutoUpdateType, SIGNAL(currentIndexChanged(int)), this, SLOT(onAutoUpdateTypeChanged(int))); - connect(m_ui->m_btnFetchMetadata, SIGNAL(clicked()), this, SLOT(guessFeed())); + connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &FormFeedDetails::apply); + connect(m_ui->m_txtTitle->lineEdit(), &BaseLineEdit::textChanged, this, &FormFeedDetails::onTitleChanged); + connect(m_ui->m_txtDescription->lineEdit(), &BaseLineEdit::textChanged, this, &FormFeedDetails::onDescriptionChanged); + connect(m_ui->m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &FormFeedDetails::onUrlChanged); + connect(m_ui->m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormFeedDetails::onUsernameChanged); + connect(m_ui->m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormFeedDetails::onPasswordChanged); + connect(m_ui->m_gbAuthentication, &QGroupBox::toggled, this, &FormFeedDetails::onAuthenticationSwitched); + connect(m_ui->m_cmbAutoUpdateType, static_cast(&QComboBox::currentIndexChanged), this, &FormFeedDetails::onAutoUpdateTypeChanged); + connect(m_ui->m_btnFetchMetadata, &QPushButton::clicked, this, &FormFeedDetails::guessFeed); // Icon connections. - connect(m_actionFetchIcon, SIGNAL(triggered()), this, SLOT(guessIconOnly())); - connect(m_actionLoadIconFromFile, SIGNAL(triggered()), this, SLOT(onLoadIconFromFile())); - connect(m_actionNoIcon, SIGNAL(triggered()), this, SLOT(onNoIconSelected())); - connect(m_actionUseDefaultIcon, SIGNAL(triggered()), this, SLOT(onUseDefaultIcon())); + connect(m_actionFetchIcon, &QAction::triggered, this, &FormFeedDetails::guessIconOnly); + connect(m_actionLoadIconFromFile, &QAction::triggered, this, &FormFeedDetails::onLoadIconFromFile); + connect(m_actionNoIcon, &QAction::triggered, this, &FormFeedDetails::onNoIconSelected); + connect(m_actionUseDefaultIcon, &QAction::triggered, this, &FormFeedDetails::onUseDefaultIcon); } void FormFeedDetails::setEditableFeed(Feed *editable_feed) { diff --git a/src/services/abstract/recyclebin.cpp b/src/services/abstract/recyclebin.cpp index 8e621d937..9f6ad1fcd 100755 --- a/src/services/abstract/recyclebin.cpp +++ b/src/services/abstract/recyclebin.cpp @@ -79,8 +79,8 @@ QList RecycleBin::contextMenu() { tr("Empty recycle bin"), this); - connect(restore_action, SIGNAL(triggered()), this, SLOT(restore())); - connect(empty_action, SIGNAL(triggered()), this, SLOT(empty())); + connect(restore_action, &QAction::triggered, this, &RecycleBin::restore); + connect(empty_action, &QAction::triggered, this, &RecycleBin::empty); m_contextMenu.append(restore_action); m_contextMenu.append(empty_action); diff --git a/src/services/owncloud/gui/formeditowncloudaccount.cpp b/src/services/owncloud/gui/formeditowncloudaccount.cpp index 7cddeadf9..a0639c788 100755 --- a/src/services/owncloud/gui/formeditowncloudaccount.cpp +++ b/src/services/owncloud/gui/formeditowncloudaccount.cpp @@ -49,16 +49,16 @@ FormEditOwnCloudAccount::FormEditOwnCloudAccount(QWidget *parent) setTabOrder(m_ui->m_checkShowPassword, m_ui->m_btnTestSetup); setTabOrder(m_ui->m_btnTestSetup, m_ui->m_buttonBox); - connect(m_ui->m_checkShowPassword, SIGNAL(toggled(bool)), this, SLOT(displayPassword(bool))); - connect(m_ui->m_buttonBox, SIGNAL(accepted()), this, SLOT(onClickedOk())); - connect(m_ui->m_buttonBox, SIGNAL(rejected()), this, SLOT(onClickedCancel())); - connect(m_ui->m_txtPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onPasswordChanged())); - connect(m_ui->m_txtUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUsernameChanged())); - connect(m_ui->m_txtUrl->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUrlChanged())); - connect(m_ui->m_txtPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_txtUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_txtUrl->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_btnTestSetup, SIGNAL(clicked()), this, SLOT(performTest())); + connect(m_ui->m_checkShowPassword, &QCheckBox::toggled, this, &FormEditOwnCloudAccount::displayPassword); + connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &FormEditOwnCloudAccount::onClickedOk); + connect(m_ui->m_buttonBox, &QDialogButtonBox::rejected, this, &FormEditOwnCloudAccount::onClickedCancel); + connect(m_ui->m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::onPasswordChanged); + connect(m_ui->m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::onUsernameChanged); + connect(m_ui->m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::onUrlChanged); + connect(m_ui->m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::checkOkButton); + connect(m_ui->m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::checkOkButton); + connect(m_ui->m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditOwnCloudAccount::checkOkButton); + connect(m_ui->m_btnTestSetup, &QPushButton::clicked, this, &FormEditOwnCloudAccount::performTest); onPasswordChanged(); onUsernameChanged(); diff --git a/src/services/owncloud/owncloudserviceroot.cpp b/src/services/owncloud/owncloudserviceroot.cpp index 76bc2efac..6a95ba357 100755 --- a/src/services/owncloud/owncloudserviceroot.cpp +++ b/src/services/owncloud/owncloudserviceroot.cpp @@ -80,7 +80,7 @@ QList OwnCloudServiceRoot::serviceMenu() { if (m_serviceMenu.isEmpty()) { m_actionSyncIn = new QAction(qApp->icons()->fromTheme(QSL("view-refresh")), tr("Sync in"), this); - connect(m_actionSyncIn, SIGNAL(triggered()), this, SLOT(syncIn())); + connect(m_actionSyncIn, &QAction::triggered, this, &OwnCloudServiceRoot::syncIn); m_serviceMenu.append(m_actionSyncIn); } diff --git a/src/services/standard/gui/formstandardimportexport.cpp b/src/services/standard/gui/formstandardimportexport.cpp index a16572194..672b3101b 100755 --- a/src/services/standard/gui/formstandardimportexport.cpp +++ b/src/services/standard/gui/formstandardimportexport.cpp @@ -38,9 +38,9 @@ FormStandardImportExport::FormStandardImportExport(StandardServiceRoot *service_ m_ui->setupUi(this); m_model = new FeedsImportExportModel(m_ui->m_treeFeeds); - connect(m_model, SIGNAL(parsingStarted()), this, SLOT(onParsingStarted())); - connect(m_model, SIGNAL(parsingFinished(int,int,bool)), this, SLOT(onParsingFinished(int,int,bool))); - connect(m_model, SIGNAL(parsingProgress(int,int)), this, SLOT(onParsingProgress(int,int))); + connect(m_model, &FeedsImportExportModel::parsingStarted, this, &FormStandardImportExport::onParsingStarted); + connect(m_model, &FeedsImportExportModel::parsingFinished, this, &FormStandardImportExport::onParsingFinished); + connect(m_model, &FeedsImportExportModel::parsingProgress, this, &FormStandardImportExport::onParsingProgress); setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | Qt::Dialog | Qt::WindowSystemMenuHint); @@ -48,10 +48,10 @@ FormStandardImportExport::FormStandardImportExport(StandardServiceRoot *service_ m_ui->m_buttonBox->button(QDialogButtonBox::Ok)->disconnect(); m_ui->m_lblResult->setStatus(WidgetWithStatus::Warning, tr("No operation executed yet."), tr("No operation executed yet.")); - connect(m_ui->m_buttonBox->button(QDialogButtonBox::Ok), SIGNAL(clicked()), this, SLOT(performAction())); - connect(m_ui->m_btnSelectFile, SIGNAL(clicked()), this, SLOT(selectFile())); - connect(m_ui->m_btnCheckAllItems, SIGNAL(clicked()), m_model, SLOT(checkAllItems())); - connect(m_ui->m_btnUncheckAllItems, SIGNAL(clicked()), m_model, SLOT(uncheckAllItems())); + connect(m_ui->m_buttonBox->button(QDialogButtonBox::Ok), &QPushButton::clicked, this, &FormStandardImportExport::performAction); + connect(m_ui->m_btnSelectFile, &QPushButton::clicked, this, &FormStandardImportExport::selectFile); + connect(m_ui->m_btnCheckAllItems, &QPushButton::clicked, m_model, &FeedsImportExportModel::checkAllItems); + connect(m_ui->m_btnUncheckAllItems, &QPushButton::clicked, m_model, &FeedsImportExportModel::uncheckAllItems); } FormStandardImportExport::~FormStandardImportExport() { diff --git a/src/services/standard/standardserviceroot.cpp b/src/services/standard/standardserviceroot.cpp index 05bb7f5e5..01e6371b8 100755 --- a/src/services/standard/standardserviceroot.cpp +++ b/src/services/standard/standardserviceroot.cpp @@ -224,8 +224,8 @@ QList StandardServiceRoot::getContextMenuForFeed(StandardFeed *feed) { } // Make connections. - disconnect(m_actionFeedFetchMetadata, SIGNAL(triggered()), 0, 0); - connect(m_actionFeedFetchMetadata, SIGNAL(triggered()), feed, SLOT(fetchMetadataForItself())); + disconnect(m_actionFeedFetchMetadata, &QAction::triggered, 0, 0); + connect(m_actionFeedFetchMetadata, &QAction::triggered, feed, &StandardFeed::fetchMetadataForItself); return m_feedContextMenu; } @@ -345,8 +345,8 @@ QList StandardServiceRoot::serviceMenu() { m_actionExportFeeds = new QAction(qApp->icons()->fromTheme("document-export"), tr("Export feeds"), this); m_actionImportFeeds = new QAction(qApp->icons()->fromTheme("document-import"), tr("Import feeds"), this); - connect(m_actionExportFeeds, SIGNAL(triggered()), this, SLOT(exportFeeds())); - connect(m_actionImportFeeds, SIGNAL(triggered()), this, SLOT(importFeeds())); + connect(m_actionExportFeeds, &QAction::triggered, this, &StandardServiceRoot::exportFeeds); + connect(m_actionImportFeeds, &QAction::triggered, this, &StandardServiceRoot::importFeeds); m_serviceMenu.append(m_actionExportFeeds); m_serviceMenu.append(m_actionImportFeeds); diff --git a/src/services/tt-rss/gui/formeditaccount.cpp b/src/services/tt-rss/gui/formeditaccount.cpp index 63f55ec58..d2d6a7c9a 100755 --- a/src/services/tt-rss/gui/formeditaccount.cpp +++ b/src/services/tt-rss/gui/formeditaccount.cpp @@ -56,21 +56,21 @@ FormEditAccount::FormEditAccount(QWidget *parent) setTabOrder(m_ui->m_checkShowHttpPassword, m_ui->m_btnTestSetup); setTabOrder(m_ui->m_btnTestSetup, m_ui->m_buttonBox); - connect(m_ui->m_checkShowPassword, SIGNAL(toggled(bool)), this, SLOT(displayPassword(bool))); - connect(m_ui->m_buttonBox, SIGNAL(accepted()), this, SLOT(onClickedOk())); - connect(m_ui->m_buttonBox, SIGNAL(rejected()), this, SLOT(onClickedCancel())); - connect(m_ui->m_txtPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onPasswordChanged())); - connect(m_ui->m_txtUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUsernameChanged())); - connect(m_ui->m_txtHttpPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onHttpPasswordChanged())); - connect(m_ui->m_txtHttpUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onHttpUsernameChanged())); - connect(m_ui->m_txtUrl->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(onUrlChanged())); - connect(m_ui->m_txtPassword->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_txtUsername->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_txtUrl->lineEdit(), SIGNAL(textChanged(QString)), this, SLOT(checkOkButton())); - connect(m_ui->m_btnTestSetup, SIGNAL(clicked()), this, SLOT(performTest())); - connect(m_ui->m_gbHttpAuthentication, SIGNAL(toggled(bool)), this, SLOT(onHttpPasswordChanged())); - connect(m_ui->m_gbHttpAuthentication, SIGNAL(toggled(bool)), this, SLOT(onHttpUsernameChanged())); - connect(m_ui->m_checkShowHttpPassword, SIGNAL(toggled(bool)), this, SLOT(displayHttpPassword(bool))); + connect(m_ui->m_checkShowPassword, &QCheckBox::toggled, this, &FormEditAccount::displayPassword); + connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &FormEditAccount::onClickedOk); + connect(m_ui->m_buttonBox, &QDialogButtonBox::rejected, this, &FormEditAccount::onClickedCancel); + connect(m_ui->m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::onPasswordChanged); + connect(m_ui->m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::onUsernameChanged); + connect(m_ui->m_txtHttpPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::onHttpPasswordChanged); + connect(m_ui->m_txtHttpUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::onHttpUsernameChanged); + connect(m_ui->m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::onUrlChanged); + connect(m_ui->m_txtPassword->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::checkOkButton); + connect(m_ui->m_txtUsername->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::checkOkButton); + connect(m_ui->m_txtUrl->lineEdit(), &BaseLineEdit::textChanged, this, &FormEditAccount::checkOkButton); + connect(m_ui->m_btnTestSetup, &QPushButton::clicked, this, &FormEditAccount::performTest); + connect(m_ui->m_gbHttpAuthentication, &QGroupBox::toggled, this, &FormEditAccount::onHttpPasswordChanged); + connect(m_ui->m_gbHttpAuthentication, &QGroupBox::toggled, this, &FormEditAccount::onHttpUsernameChanged); + connect(m_ui->m_checkShowHttpPassword, &QCheckBox::toggled, this, &FormEditAccount::displayHttpPassword); onPasswordChanged(); onUsernameChanged(); diff --git a/src/services/tt-rss/ttrssserviceroot.cpp b/src/services/tt-rss/ttrssserviceroot.cpp index ab46316a1..510168207 100755 --- a/src/services/tt-rss/ttrssserviceroot.cpp +++ b/src/services/tt-rss/ttrssserviceroot.cpp @@ -170,7 +170,7 @@ QList TtRssServiceRoot::serviceMenu() { if (m_serviceMenu.isEmpty()) { m_actionSyncIn = new QAction(qApp->icons()->fromTheme(QSL("view-refresh")), tr("Sync in"), this); - connect(m_actionSyncIn, SIGNAL(triggered()), this, SLOT(syncIn())); + connect(m_actionSyncIn, &QAction::triggered, this, &TtRssServiceRoot::syncIn); m_serviceMenu.append(m_actionSyncIn); }