diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index 0d3e4f72..d7335ba4 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -2176,8 +2176,8 @@ void LibraryWindow::toNormal() auto timer = new QTimer(); timer->setSingleShot(true); timer->start(); - connect(timer, SIGNAL(timeout()), libraryToolBar, SLOT(show())); - connect(timer, SIGNAL(timeout()), timer, SLOT(deleteLater())); + connect(timer, &QTimer::timeout, libraryToolBar, &YACReaderMacOSXToolbar::show); + connect(timer, &QTimer::timeout, timer, &QTimer::deleteLater); #else libraryToolBar->show(); #endif diff --git a/custom_widgets/yacreader_macosx_toolbar.mm b/custom_widgets/yacreader_macosx_toolbar.mm index 51ea4d76..2b206718 100644 --- a/custom_widgets/yacreader_macosx_toolbar.mm +++ b/custom_widgets/yacreader_macosx_toolbar.mm @@ -188,7 +188,7 @@ void YACReaderMacOSXToolbar::addAction(QAction *action) QMacToolBarItem *toolBarItem = addItem(action->icon(), action->text()); if (action->data().toString() == TOGGLE_COMICS_VIEW_ACTION_YL) viewSelector = toolBarItem; - connect(toolBarItem, SIGNAL(activated()), action, SIGNAL(triggered())); + connect(toolBarItem, &QMacToolBarItem::activated, action, [=] { emit action->triggered(); }); NSToolbarItem *nativeItem = toolBarItem->nativeToolBarItem(); actions.insert(QString::fromNSString(nativeItem.itemIdentifier), action); @@ -287,7 +287,7 @@ QAction *YACReaderMacOSXToolbar::addFitToWidthSlider(QAction *attachToAction) QAction *action = new QAction("", attachToAction->parent()); - connect(toolBarItem, SIGNAL(activated()), action, SIGNAL(triggered())); + connect(toolBarItem, &QMacToolBarItem::activated, action, [=] { emit action->triggered(); }); return action; } @@ -359,8 +359,8 @@ MacToolBarItemWrapper::MacToolBarItemWrapper(QAction *action, QMacToolBarItem *t : action(action), toolbaritem(toolbaritem) { if (action->isCheckable()) { - connect(action, SIGNAL(toggled(bool)), this, SLOT(actionToggled(bool))); - connect(toolbaritem, SIGNAL(activated()), action, SLOT(toggle())); + connect(action, &QAction::toggled, this, &MacToolBarItemWrapper::actionToggled); + connect(toolbaritem, &QMacToolBarItem::activated, action, &QAction::toggle); updateIcon(action->isChecked()); } } diff --git a/custom_widgets/yacreader_titled_toolbar.cpp b/custom_widgets/yacreader_titled_toolbar.cpp index cd39462f..bacde44e 100644 --- a/custom_widgets/yacreader_titled_toolbar.cpp +++ b/custom_widgets/yacreader_titled_toolbar.cpp @@ -100,7 +100,7 @@ void YACReaderTitledToolBar::addAction(QAction *action) pb->setIcon(action->icon()); pb->addAction(action); - connect(pb, SIGNAL(clicked(bool)), action, SIGNAL(triggered(bool))); + connect(pb, &QPushButton::clicked, action, &QAction::triggered); mainLayout->addWidget(pb); #else