Clazy: Use fixits to refactor some old style signal connections

This commit is contained in:
Felix Kauselmann 2021-06-01 18:14:24 +02:00
parent ca81b5424a
commit 8377de7c3e
49 changed files with 371 additions and 367 deletions

View File

@ -69,7 +69,7 @@ BookmarksDialog::BookmarksDialog(QWidget *parent)
cancel = new QPushButton(tr("Close")); cancel = new QPushButton(tr("Close"));
cancel->setFlat(true); cancel->setFlat(true);
connect(cancel, SIGNAL(clicked()), this, SLOT(hide())); connect(cancel, &QAbstractButton::clicked, this, &QWidget::hide);
buttons->addStretch(); buttons->addStretch();
buttons->addWidget(cancel); buttons->addWidget(cancel);

View File

@ -21,9 +21,9 @@ void GoToDialog::setupUI()
textLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); textLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
accept = new QPushButton(tr("Go To")); accept = new QPushButton(tr("Go To"));
connect(accept, SIGNAL(clicked()), this, SLOT(goTo())); connect(accept, &QAbstractButton::clicked, this, &GoToDialog::goTo);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, &QAbstractButton::clicked, this, &QWidget::close);
auto topLayout = new QHBoxLayout; auto topLayout = new QHBoxLayout;

View File

@ -29,7 +29,7 @@ GoToFlow::GoToFlow(QWidget *parent, FlowType flowType)
: GoToFlowWidget(parent), ready(false) : GoToFlowWidget(parent), ready(false)
{ {
updateTimer = new QTimer; updateTimer = new QTimer;
connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateImageData())); connect(updateTimer, &QTimer::timeout, this, &GoToFlow::updateImageData);
worker = new PageLoader(&mutexGoToFlow); worker = new PageLoader(&mutexGoToFlow);
@ -38,13 +38,13 @@ GoToFlow::GoToFlow(QWidget *parent, FlowType flowType)
imageSize = Configuration::getConfiguration().getGotoSlideSize(); imageSize = Configuration::getConfiguration().getGotoSlideSize();
flow->setSlideSize(imageSize); flow->setSlideSize(imageSize);
connect(flow, SIGNAL(centerIndexChanged(int)), this, SLOT(setPageNumber(int))); connect(flow, &PictureFlow::centerIndexChanged, this, &GoToFlowWidget::setPageNumber);
connect(flow, SIGNAL(selected(unsigned int)), this, SIGNAL(goToPage(unsigned int))); connect(flow, &YACReaderFlow::selected, this, &GoToFlow::goToPage);
connect(flow, &PictureFlow::centerIndexChanged, this, &GoToFlow::preload); connect(flow, &PictureFlow::centerIndexChanged, this, &GoToFlow::preload);
connect(flow, &PictureFlow::centerIndexChangedSilent, this, &GoToFlow::preload); connect(flow, &PictureFlow::centerIndexChangedSilent, this, &GoToFlow::preload);
connect(toolBar, SIGNAL(goTo(unsigned int)), this, SIGNAL(goToPage(unsigned int))); connect(toolBar, SIGNAL(goTo(unsigned int)), this, SIGNAL(goToPage(unsigned int)));
connect(toolBar, SIGNAL(setCenter(unsigned int)), flow, SLOT(showSlide(unsigned int))); connect(toolBar, &GoToFlowToolBar::setCenter, flow, &PictureFlow::showSlide);
mainLayout->addWidget(flow); mainLayout->addWidget(flow);
toolBar->raise(); toolBar->raise();

View File

@ -21,11 +21,11 @@ GoToFlowGL::GoToFlowGL(QWidget *parent, FlowType flowType)
imageSize = Configuration::getConfiguration().getGotoSlideSize(); imageSize = Configuration::getConfiguration().getGotoSlideSize();
flow->setSlideSize(imageSize); flow->setSlideSize(imageSize);
connect(flow, SIGNAL(centerIndexChanged(int)), this, SLOT(setPageNumber(int))); connect(flow, &YACReaderFlowGL::centerIndexChanged, this, &GoToFlowWidget::setPageNumber);
connect(flow, SIGNAL(selected(unsigned int)), this, SIGNAL(goToPage(unsigned int))); connect(flow, &YACReaderFlowGL::selected, this, &GoToFlowGL::goToPage);
connect(toolBar, SIGNAL(goTo(unsigned int)), this, SIGNAL(goToPage(unsigned int))); connect(toolBar, SIGNAL(goTo(unsigned int)), this, SIGNAL(goToPage(unsigned int)));
connect(toolBar, SIGNAL(setCenter(unsigned int)), flow, SLOT(setCenterIndex(unsigned int))); connect(toolBar, &GoToFlowToolBar::setCenter, flow, &YACReaderFlowGL::setCenterIndex);
mainLayout->addWidget(flow); mainLayout->addWidget(flow);
toolBar->raise(); toolBar->raise();

View File

@ -57,7 +57,7 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget *parent)
centerButton->setStyleSheet(centerButtonCSS); centerButton->setStyleSheet(centerButtonCSS);
centerButton->setFixedSize(26, 50); centerButton->setFixedSize(26, 50);
centerButton->setAttribute(Qt::WA_LayoutUsesWidgetRect, true); centerButton->setAttribute(Qt::WA_LayoutUsesWidgetRect, true);
connect(centerButton, SIGNAL(clicked()), this, SLOT(centerSlide())); connect(centerButton, &QAbstractButton::clicked, this, &GoToFlowToolBar::centerSlide);
QString goToButtonCSS = "QPushButton {background-image: url(:/images/imgGoToSlide.png); width: 100%; height:100%; background-repeat: none; border: none;} " QString goToButtonCSS = "QPushButton {background-image: url(:/images/imgGoToSlide.png); width: 100%; height:100%; background-repeat: none; border: none;} "
"QPushButton:focus { border: none; outline: none;}" "QPushButton:focus { border: none; outline: none;}"

View File

@ -139,11 +139,11 @@ void MainWindowViewer::setupUI()
//setUnifiedTitleAndToolBarOnMac(true); //setUnifiedTitleAndToolBarOnMac(true);
viewer = new Viewer(this); viewer = new Viewer(this);
connect(viewer, SIGNAL(reset()), this, SLOT(processReset())); connect(viewer, &Viewer::reset, this, &MainWindowViewer::processReset);
//detected end of comic //detected end of comic
connect(viewer, SIGNAL(openNextComic()), this, SLOT(openNextComic())); connect(viewer, &Viewer::openNextComic, this, &MainWindowViewer::openNextComic);
//detected start of comic //detected start of comic
connect(viewer, SIGNAL(openPreviousComic()), this, SLOT(openPreviousComic())); connect(viewer, &Viewer::openPreviousComic, this, &MainWindowViewer::openPreviousComic);
setCentralWidget(viewer); setCentralWidget(viewer);
int heightDesktopResolution = QApplication::desktop()->screenGeometry().height(); int heightDesktopResolution = QApplication::desktop()->screenGeometry().height();
@ -163,15 +163,15 @@ void MainWindowViewer::setupUI()
had->loadHelp(":/files/helpYACReader.html"); had->loadHelp(":/files/helpYACReader.html");
optionsDialog = new OptionsDialog(this); optionsDialog = new OptionsDialog(this);
connect(optionsDialog, SIGNAL(accepted()), viewer, SLOT(updateOptions())); connect(optionsDialog, &QDialog::accepted, viewer, &Viewer::updateOptions);
connect(optionsDialog, SIGNAL(optionsChanged()), this, SLOT(reloadOptions())); connect(optionsDialog, &YACReaderOptionsDialog::optionsChanged, this, &MainWindowViewer::reloadOptions);
connect(optionsDialog, SIGNAL(changedFilters(int, int, int)), viewer, SLOT(updateFilters(int, int, int))); connect(optionsDialog, &OptionsDialog::changedFilters, viewer, &Viewer::updateFilters);
connect(optionsDialog, &OptionsDialog::changedImageOptions, viewer, &Viewer::updatePage); connect(optionsDialog, &OptionsDialog::changedImageOptions, viewer, &Viewer::updatePage);
optionsDialog->restoreOptions(settings); optionsDialog->restoreOptions(settings);
//shortcutsDialog = new ShortcutsDialog(this); //shortcutsDialog = new ShortcutsDialog(this);
editShortcutsDialog = new EditShortcutsDialog(this); editShortcutsDialog = new EditShortcutsDialog(this);
connect(optionsDialog, SIGNAL(editShortcuts()), editShortcutsDialog, SLOT(show())); connect(optionsDialog, &YACReaderOptionsDialog::editShortcuts, editShortcutsDialog, &QWidget::show);
createActions(); createActions();
setUpShortcutsManagement(); setUpShortcutsManagement();
@ -240,13 +240,13 @@ void MainWindowViewer::createActions()
openFolderAction->setToolTip(tr("Open image folder")); openFolderAction->setToolTip(tr("Open image folder"));
openFolderAction->setData(OPEN_FOLDER_ACTION_Y); openFolderAction->setData(OPEN_FOLDER_ACTION_Y);
openFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_FOLDER_ACTION_Y)); openFolderAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_FOLDER_ACTION_Y));
connect(openFolderAction, SIGNAL(triggered()), this, SLOT(openFolder())); connect(openFolderAction, &QAction::triggered, this, &MainWindowViewer::openFolder);
openLatestComicAction = new QAction(tr("Open latest comic"), this); openLatestComicAction = new QAction(tr("Open latest comic"), this);
openLatestComicAction->setToolTip(tr("Open the latest comic opened in the previous reading session")); openLatestComicAction->setToolTip(tr("Open the latest comic opened in the previous reading session"));
openLatestComicAction->setData(OPEN_LATEST_COMIC_Y); openLatestComicAction->setData(OPEN_LATEST_COMIC_Y);
openLatestComicAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_LATEST_COMIC_Y)); openLatestComicAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(OPEN_LATEST_COMIC_Y));
connect(openLatestComicAction, SIGNAL(triggered()), this, SLOT(openLatestComic())); connect(openLatestComicAction, &QAction::triggered, this, &MainWindowViewer::openLatestComic);
QAction *recentFileAction = nullptr; QAction *recentFileAction = nullptr;
//TODO: Replace limit with a configurable value //TODO: Replace limit with a configurable value
@ -267,7 +267,7 @@ void MainWindowViewer::createActions()
saveImageAction->setDisabled(true); saveImageAction->setDisabled(true);
saveImageAction->setData(SAVE_IMAGE_ACTION_Y); saveImageAction->setData(SAVE_IMAGE_ACTION_Y);
saveImageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SAVE_IMAGE_ACTION_Y)); saveImageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SAVE_IMAGE_ACTION_Y));
connect(saveImageAction, SIGNAL(triggered()), this, SLOT(saveImage())); connect(saveImageAction, &QAction::triggered, this, &MainWindowViewer::saveImage);
openComicOnTheLeftAction = new QAction(tr("Previous Comic"), this); openComicOnTheLeftAction = new QAction(tr("Previous Comic"), this);
openComicOnTheLeftAction->setIcon(QIcon(":/images/viewer_toolbar/openPrevious.png")); openComicOnTheLeftAction->setIcon(QIcon(":/images/viewer_toolbar/openPrevious.png"));
@ -292,7 +292,7 @@ void MainWindowViewer::createActions()
goToPageOnTheLeftAction->setDisabled(true); goToPageOnTheLeftAction->setDisabled(true);
goToPageOnTheLeftAction->setData(PREV_ACTION_Y); goToPageOnTheLeftAction->setData(PREV_ACTION_Y);
goToPageOnTheLeftAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(PREV_ACTION_Y)); goToPageOnTheLeftAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(PREV_ACTION_Y));
connect(goToPageOnTheLeftAction, SIGNAL(triggered()), viewer, SLOT(left())); connect(goToPageOnTheLeftAction, &QAction::triggered, viewer, &Viewer::left);
goToPageOnTheRightAction = new QAction(tr("&Next"), this); goToPageOnTheRightAction = new QAction(tr("&Next"), this);
goToPageOnTheRightAction->setIcon(QIcon(":/images/viewer_toolbar/next.png")); goToPageOnTheRightAction->setIcon(QIcon(":/images/viewer_toolbar/next.png"));
@ -301,7 +301,7 @@ void MainWindowViewer::createActions()
goToPageOnTheRightAction->setDisabled(true); goToPageOnTheRightAction->setDisabled(true);
goToPageOnTheRightAction->setData(NEXT_ACTION_Y); goToPageOnTheRightAction->setData(NEXT_ACTION_Y);
goToPageOnTheRightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(NEXT_ACTION_Y)); goToPageOnTheRightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(NEXT_ACTION_Y));
connect(goToPageOnTheRightAction, SIGNAL(triggered()), viewer, SLOT(right())); connect(goToPageOnTheRightAction, &QAction::triggered, viewer, &Viewer::right);
adjustHeightAction = new QAction(tr("Fit Height"), this); adjustHeightAction = new QAction(tr("Fit Height"), this);
adjustHeightAction->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png")); adjustHeightAction->setIcon(QIcon(":/images/viewer_toolbar/toHeight.png"));
@ -312,7 +312,7 @@ void MainWindowViewer::createActions()
adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y); adjustHeightAction->setData(ADJUST_HEIGHT_ACTION_Y);
adjustHeightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_HEIGHT_ACTION_Y)); adjustHeightAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_HEIGHT_ACTION_Y));
adjustHeightAction->setCheckable(true); adjustHeightAction->setCheckable(true);
connect(adjustHeightAction, SIGNAL(triggered()), this, SLOT(fitToHeight())); connect(adjustHeightAction, &QAction::triggered, this, &MainWindowViewer::fitToHeight);
adjustWidthAction = new QAction(tr("Fit Width"), this); adjustWidthAction = new QAction(tr("Fit Width"), this);
adjustWidthAction->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png")); adjustWidthAction->setIcon(QIcon(":/images/viewer_toolbar/toWidth.png"));
@ -323,7 +323,7 @@ void MainWindowViewer::createActions()
adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y); adjustWidthAction->setData(ADJUST_WIDTH_ACTION_Y);
adjustWidthAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_WIDTH_ACTION_Y)); adjustWidthAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_WIDTH_ACTION_Y));
adjustWidthAction->setCheckable(true); adjustWidthAction->setCheckable(true);
connect(adjustWidthAction, SIGNAL(triggered()), this, SLOT(fitToWidth())); connect(adjustWidthAction, &QAction::triggered, this, &MainWindowViewer::fitToWidth);
adjustToFullSizeAction = new QAction(tr("Show full size"), this); adjustToFullSizeAction = new QAction(tr("Show full size"), this);
adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png")); adjustToFullSizeAction->setIcon(QIcon(":/images/viewer_toolbar/full.png"));
@ -332,7 +332,7 @@ void MainWindowViewer::createActions()
adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y); adjustToFullSizeAction->setData(ADJUST_TO_FULL_SIZE_ACTION_Y);
adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y)); adjustToFullSizeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ADJUST_TO_FULL_SIZE_ACTION_Y));
adjustToFullSizeAction->setCheckable(true); adjustToFullSizeAction->setCheckable(true);
connect(adjustToFullSizeAction, SIGNAL(triggered()), this, SLOT(adjustToFullSizeSwitch())); connect(adjustToFullSizeAction, &QAction::triggered, this, &MainWindowViewer::adjustToFullSizeSwitch);
fitToPageAction = new QAction(tr("Fit to page"), this); fitToPageAction = new QAction(tr("Fit to page"), this);
fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/fitToPage.png")); fitToPageAction->setIcon(QIcon(":/images/viewer_toolbar/fitToPage.png"));
@ -340,7 +340,7 @@ void MainWindowViewer::createActions()
fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y); fitToPageAction->setData(FIT_TO_PAGE_ACTION_Y);
fitToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FIT_TO_PAGE_ACTION_Y)); fitToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(FIT_TO_PAGE_ACTION_Y));
fitToPageAction->setCheckable(true); fitToPageAction->setCheckable(true);
connect(fitToPageAction, SIGNAL(triggered()), this, SLOT(fitToPageSwitch())); connect(fitToPageAction, &QAction::triggered, this, &MainWindowViewer::fitToPageSwitch);
//fit modes have to be exclusive and checkable //fit modes have to be exclusive and checkable
auto fitModes = new QActionGroup(this); auto fitModes = new QActionGroup(this);
@ -370,7 +370,7 @@ void MainWindowViewer::createActions()
resetZoomAction->setDisabled(true); resetZoomAction->setDisabled(true);
resetZoomAction->setData(RESET_ZOOM_ACTION_Y); resetZoomAction->setData(RESET_ZOOM_ACTION_Y);
resetZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RESET_ZOOM_ACTION_Y)); resetZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RESET_ZOOM_ACTION_Y));
connect(resetZoomAction, SIGNAL(triggered()), this, SLOT(resetZoomLevel())); connect(resetZoomAction, &QAction::triggered, this, &MainWindowViewer::resetZoomLevel);
showZoomSliderlAction = new QAction(tr("Show zoom slider"), this); showZoomSliderlAction = new QAction(tr("Show zoom slider"), this);
showZoomSliderlAction->setIcon(QIcon(":/images/viewer_toolbar/zoom.png")); showZoomSliderlAction->setIcon(QIcon(":/images/viewer_toolbar/zoom.png"));
@ -380,27 +380,27 @@ void MainWindowViewer::createActions()
increasePageZoomAction->setDisabled(true); increasePageZoomAction->setDisabled(true);
increasePageZoomAction->setData(ZOOM_PLUS_ACTION_Y); increasePageZoomAction->setData(ZOOM_PLUS_ACTION_Y);
increasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_PLUS_ACTION_Y)); increasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_PLUS_ACTION_Y));
connect(increasePageZoomAction, SIGNAL(triggered()), this, SLOT(increasePageZoomLevel())); connect(increasePageZoomAction, &QAction::triggered, this, &MainWindowViewer::increasePageZoomLevel);
decreasePageZoomAction = new QAction(tr("Zoom-"), this); decreasePageZoomAction = new QAction(tr("Zoom-"), this);
decreasePageZoomAction->setDisabled(true); decreasePageZoomAction->setDisabled(true);
decreasePageZoomAction->setData(ZOOM_MINUS_ACTION_Y); decreasePageZoomAction->setData(ZOOM_MINUS_ACTION_Y);
decreasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_MINUS_ACTION_Y)); decreasePageZoomAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ZOOM_MINUS_ACTION_Y));
connect(decreasePageZoomAction, SIGNAL(triggered()), this, SLOT(decreasePageZoomLevel())); connect(decreasePageZoomAction, &QAction::triggered, this, &MainWindowViewer::decreasePageZoomLevel);
leftRotationAction = new QAction(tr("Rotate image to the left"), this); leftRotationAction = new QAction(tr("Rotate image to the left"), this);
leftRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateL.png")); leftRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateL.png"));
leftRotationAction->setDisabled(true); leftRotationAction->setDisabled(true);
leftRotationAction->setData(LEFT_ROTATION_ACTION_Y); leftRotationAction->setData(LEFT_ROTATION_ACTION_Y);
leftRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(LEFT_ROTATION_ACTION_Y)); leftRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(LEFT_ROTATION_ACTION_Y));
connect(leftRotationAction, SIGNAL(triggered()), viewer, SLOT(rotateLeft())); connect(leftRotationAction, &QAction::triggered, viewer, &Viewer::rotateLeft);
rightRotationAction = new QAction(tr("Rotate image to the right"), this); rightRotationAction = new QAction(tr("Rotate image to the right"), this);
rightRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateR.png")); rightRotationAction->setIcon(QIcon(":/images/viewer_toolbar/rotateR.png"));
rightRotationAction->setDisabled(true); rightRotationAction->setDisabled(true);
rightRotationAction->setData(RIGHT_ROTATION_ACTION_Y); rightRotationAction->setData(RIGHT_ROTATION_ACTION_Y);
rightRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RIGHT_ROTATION_ACTION_Y)); rightRotationAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(RIGHT_ROTATION_ACTION_Y));
connect(rightRotationAction, SIGNAL(triggered()), viewer, SLOT(rotateRight())); connect(rightRotationAction, &QAction::triggered, viewer, &Viewer::rotateRight);
doublePageAction = new QAction(tr("Double page mode"), this); doublePageAction = new QAction(tr("Double page mode"), this);
doublePageAction->setToolTip(tr("Switch to double page mode")); doublePageAction->setToolTip(tr("Switch to double page mode"));
@ -410,7 +410,7 @@ void MainWindowViewer::createActions()
doublePageAction->setChecked(Configuration::getConfiguration().getDoublePage()); doublePageAction->setChecked(Configuration::getConfiguration().getDoublePage());
doublePageAction->setData(DOUBLE_PAGE_ACTION_Y); doublePageAction->setData(DOUBLE_PAGE_ACTION_Y);
doublePageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DOUBLE_PAGE_ACTION_Y)); doublePageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DOUBLE_PAGE_ACTION_Y));
connect(doublePageAction, SIGNAL(triggered()), viewer, SLOT(doublePageSwitch())); connect(doublePageAction, &QAction::triggered, viewer, &Viewer::doublePageSwitch);
//inversed pictures mode //inversed pictures mode
doubleMangaPageAction = new QAction(tr("Double page manga mode"), this); doubleMangaPageAction = new QAction(tr("Double page manga mode"), this);
@ -421,7 +421,7 @@ void MainWindowViewer::createActions()
doubleMangaPageAction->setChecked(Configuration::getConfiguration().getDoubleMangaPage()); doubleMangaPageAction->setChecked(Configuration::getConfiguration().getDoubleMangaPage());
doubleMangaPageAction->setData(DOUBLE_MANGA_PAGE_ACTION_Y); doubleMangaPageAction->setData(DOUBLE_MANGA_PAGE_ACTION_Y);
doubleMangaPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DOUBLE_MANGA_PAGE_ACTION_Y)); doubleMangaPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(DOUBLE_MANGA_PAGE_ACTION_Y));
connect(doubleMangaPageAction, SIGNAL(triggered()), viewer, SLOT(doubleMangaPageSwitch())); connect(doubleMangaPageAction, &QAction::triggered, viewer, &Viewer::doubleMangaPageSwitch);
connect(doubleMangaPageAction, &QAction::triggered, this, &MainWindowViewer::doubleMangaPageSwitch); connect(doubleMangaPageAction, &QAction::triggered, this, &MainWindowViewer::doubleMangaPageSwitch);
goToPageAction = new QAction(tr("Go To"), this); goToPageAction = new QAction(tr("Go To"), this);
@ -430,7 +430,7 @@ void MainWindowViewer::createActions()
goToPageAction->setToolTip(tr("Go to page ...")); goToPageAction->setToolTip(tr("Go to page ..."));
goToPageAction->setData(GO_TO_PAGE_ACTION_Y); goToPageAction->setData(GO_TO_PAGE_ACTION_Y);
goToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GO_TO_PAGE_ACTION_Y)); goToPageAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(GO_TO_PAGE_ACTION_Y));
connect(goToPageAction, SIGNAL(triggered()), viewer, SLOT(showGoToDialog())); connect(goToPageAction, &QAction::triggered, viewer, &Viewer::showGoToDialog);
optionsAction = new QAction(tr("Options"), this); optionsAction = new QAction(tr("Options"), this);
optionsAction->setToolTip(tr("YACReader options")); optionsAction->setToolTip(tr("YACReader options"));
@ -445,7 +445,7 @@ void MainWindowViewer::createActions()
helpAboutAction->setIcon(QIcon(":/images/viewer_toolbar/help.png")); helpAboutAction->setIcon(QIcon(":/images/viewer_toolbar/help.png"));
helpAboutAction->setData(HELP_ABOUT_ACTION_Y); helpAboutAction->setData(HELP_ABOUT_ACTION_Y);
helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_Y)); helpAboutAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(HELP_ABOUT_ACTION_Y));
connect(helpAboutAction, SIGNAL(triggered()), had, SLOT(show())); connect(helpAboutAction, &QAction::triggered, had, &QWidget::show);
showMagnifyingGlassAction = new QAction(tr("Magnifying glass"), this); showMagnifyingGlassAction = new QAction(tr("Magnifying glass"), this);
showMagnifyingGlassAction->setToolTip(tr("Switch Magnifying glass")); showMagnifyingGlassAction->setToolTip(tr("Switch Magnifying glass"));
@ -454,7 +454,7 @@ void MainWindowViewer::createActions()
showMagnifyingGlassAction->setCheckable(true); showMagnifyingGlassAction->setCheckable(true);
showMagnifyingGlassAction->setData(SHOW_MAGNIFYING_GLASS_ACTION_Y); showMagnifyingGlassAction->setData(SHOW_MAGNIFYING_GLASS_ACTION_Y);
showMagnifyingGlassAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_MAGNIFYING_GLASS_ACTION_Y)); showMagnifyingGlassAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_MAGNIFYING_GLASS_ACTION_Y));
connect(showMagnifyingGlassAction, SIGNAL(triggered()), viewer, SLOT(magnifyingGlassSwitch())); connect(showMagnifyingGlassAction, &QAction::triggered, viewer, &Viewer::magnifyingGlassSwitch);
setBookmarkAction = new QAction(tr("Set bookmark"), this); setBookmarkAction = new QAction(tr("Set bookmark"), this);
setBookmarkAction->setToolTip(tr("Set a bookmark on the current page")); setBookmarkAction->setToolTip(tr("Set a bookmark on the current page"));
@ -463,9 +463,9 @@ void MainWindowViewer::createActions()
setBookmarkAction->setCheckable(true); setBookmarkAction->setCheckable(true);
setBookmarkAction->setData(SET_BOOKMARK_ACTION_Y); setBookmarkAction->setData(SET_BOOKMARK_ACTION_Y);
setBookmarkAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_BOOKMARK_ACTION_Y)); setBookmarkAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SET_BOOKMARK_ACTION_Y));
connect(setBookmarkAction, SIGNAL(triggered(bool)), viewer, SLOT(setBookmark(bool))); connect(setBookmarkAction, &QAction::triggered, viewer, &Viewer::setBookmark);
connect(viewer, SIGNAL(pageAvailable(bool)), setBookmarkAction, SLOT(setEnabled(bool))); connect(viewer, &Viewer::pageAvailable, setBookmarkAction, &QAction::setEnabled);
connect(viewer, SIGNAL(pageIsBookmark(bool)), setBookmarkAction, SLOT(setChecked(bool))); connect(viewer, &Viewer::pageIsBookmark, setBookmarkAction, &QAction::setChecked);
showBookmarksAction = new QAction(tr("Show bookmarks"), this); showBookmarksAction = new QAction(tr("Show bookmarks"), this);
showBookmarksAction->setToolTip(tr("Show the bookmarks of the current comic")); showBookmarksAction->setToolTip(tr("Show the bookmarks of the current comic"));
@ -473,27 +473,27 @@ void MainWindowViewer::createActions()
showBookmarksAction->setDisabled(true); showBookmarksAction->setDisabled(true);
showBookmarksAction->setData(SHOW_BOOKMARKS_ACTION_Y); showBookmarksAction->setData(SHOW_BOOKMARKS_ACTION_Y);
showBookmarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_BOOKMARKS_ACTION_Y)); showBookmarksAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_BOOKMARKS_ACTION_Y));
connect(showBookmarksAction, SIGNAL(triggered()), viewer->getBookmarksDialog(), SLOT(show())); connect(showBookmarksAction, &QAction::triggered, viewer->getBookmarksDialog(), &QWidget::show);
showShorcutsAction = new QAction(tr("Show keyboard shortcuts"), this); showShorcutsAction = new QAction(tr("Show keyboard shortcuts"), this);
showShorcutsAction->setIcon(QIcon(":/images/viewer_toolbar/shortcuts.png")); showShorcutsAction->setIcon(QIcon(":/images/viewer_toolbar/shortcuts.png"));
showShorcutsAction->setData(SHOW_SHORCUTS_ACTION_Y); showShorcutsAction->setData(SHOW_SHORCUTS_ACTION_Y);
showShorcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_SHORCUTS_ACTION_Y)); showShorcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_SHORCUTS_ACTION_Y));
//connect(showShorcutsAction, SIGNAL(triggered()),shortcutsDialog,SLOT(show())); //connect(showShorcutsAction, SIGNAL(triggered()),shortcutsDialog,SLOT(show()));
connect(showShorcutsAction, SIGNAL(triggered()), editShortcutsDialog, SLOT(show())); connect(showShorcutsAction, &QAction::triggered, editShortcutsDialog, &QWidget::show);
showInfoAction = new QAction(tr("Show Info"), this); showInfoAction = new QAction(tr("Show Info"), this);
showInfoAction->setIcon(QIcon(":/images/viewer_toolbar/info.png")); showInfoAction->setIcon(QIcon(":/images/viewer_toolbar/info.png"));
showInfoAction->setDisabled(true); showInfoAction->setDisabled(true);
showInfoAction->setData(SHOW_INFO_ACTION_Y); showInfoAction->setData(SHOW_INFO_ACTION_Y);
showInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_INFO_ACTION_Y)); showInfoAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_INFO_ACTION_Y));
connect(showInfoAction, SIGNAL(triggered()), viewer, SLOT(informationSwitch())); connect(showInfoAction, &QAction::triggered, viewer, &Viewer::informationSwitch);
closeAction = new QAction(tr("Close"), this); closeAction = new QAction(tr("Close"), this);
closeAction->setIcon(QIcon(":/images/viewer_toolbar/close.png")); closeAction->setIcon(QIcon(":/images/viewer_toolbar/close.png"));
closeAction->setData(CLOSE_ACTION_Y); closeAction->setData(CLOSE_ACTION_Y);
closeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(CLOSE_ACTION_Y)); closeAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(CLOSE_ACTION_Y));
connect(closeAction, SIGNAL(triggered()), this, SLOT(close())); connect(closeAction, &QAction::triggered, this, &QWidget::close);
showDictionaryAction = new QAction(tr("Show Dictionary"), this); showDictionaryAction = new QAction(tr("Show Dictionary"), this);
showDictionaryAction->setIcon(QIcon(":/images/viewer_toolbar/translator.png")); showDictionaryAction->setIcon(QIcon(":/images/viewer_toolbar/translator.png"));
@ -501,7 +501,7 @@ void MainWindowViewer::createActions()
showDictionaryAction->setDisabled(true); showDictionaryAction->setDisabled(true);
showDictionaryAction->setData(SHOW_DICTIONARY_ACTION_Y); showDictionaryAction->setData(SHOW_DICTIONARY_ACTION_Y);
showDictionaryAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_DICTIONARY_ACTION_Y)); showDictionaryAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_DICTIONARY_ACTION_Y));
connect(showDictionaryAction, SIGNAL(triggered()), viewer, SLOT(translatorSwitch())); connect(showDictionaryAction, &QAction::triggered, viewer, &Viewer::translatorSwitch);
//deprecated //deprecated
alwaysOnTopAction = new QAction(tr("Always on top"), this); alwaysOnTopAction = new QAction(tr("Always on top"), this);
@ -511,19 +511,19 @@ void MainWindowViewer::createActions()
alwaysOnTopAction->setChecked(Configuration::getConfiguration().getAlwaysOnTop()); alwaysOnTopAction->setChecked(Configuration::getConfiguration().getAlwaysOnTop());
alwaysOnTopAction->setData(ALWAYS_ON_TOP_ACTION_Y); alwaysOnTopAction->setData(ALWAYS_ON_TOP_ACTION_Y);
alwaysOnTopAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ALWAYS_ON_TOP_ACTION_Y)); alwaysOnTopAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(ALWAYS_ON_TOP_ACTION_Y));
connect(alwaysOnTopAction, SIGNAL(triggered()), this, SLOT(alwaysOnTopSwitch())); connect(alwaysOnTopAction, &QAction::triggered, this, &MainWindowViewer::alwaysOnTopSwitch);
showFlowAction = new QAction(tr("Show go to flow"), this); showFlowAction = new QAction(tr("Show go to flow"), this);
showFlowAction->setIcon(QIcon(":/images/viewer_toolbar/flow.png")); showFlowAction->setIcon(QIcon(":/images/viewer_toolbar/flow.png"));
showFlowAction->setDisabled(true); showFlowAction->setDisabled(true);
showFlowAction->setData(SHOW_FLOW_ACTION_Y); showFlowAction->setData(SHOW_FLOW_ACTION_Y);
showFlowAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_FLOW_ACTION_Y)); showFlowAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_FLOW_ACTION_Y));
connect(showFlowAction, SIGNAL(triggered()), viewer, SLOT(goToFlowSwitch())); connect(showFlowAction, &QAction::triggered, viewer, &Viewer::goToFlowSwitch);
showEditShortcutsAction = new QAction(tr("Edit shortcuts"), this); showEditShortcutsAction = new QAction(tr("Edit shortcuts"), this);
showEditShortcutsAction->setData(SHOW_EDIT_SHORTCUTS_ACTION_Y); showEditShortcutsAction->setData(SHOW_EDIT_SHORTCUTS_ACTION_Y);
showEditShortcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_EDIT_SHORTCUTS_ACTION_Y)); showEditShortcutsAction->setShortcut(ShortcutsManager::getShortcutsManager().getShortcut(SHOW_EDIT_SHORTCUTS_ACTION_Y));
connect(showEditShortcutsAction, SIGNAL(triggered()), editShortcutsDialog, SLOT(show())); connect(showEditShortcutsAction, &QAction::triggered, editShortcutsDialog, &QWidget::show);
} }
void MainWindowViewer::createToolBars() void MainWindowViewer::createToolBars()
@ -584,9 +584,9 @@ void MainWindowViewer::createToolBars()
comicToolBar->addAction(showZoomSliderlAction); comicToolBar->addAction(showZoomSliderlAction);
connect(showZoomSliderlAction, SIGNAL(triggered()), this, SLOT(toggleFitToWidthSlider())); connect(showZoomSliderlAction, &QAction::triggered, this, &MainWindowViewer::toggleFitToWidthSlider);
connect(zoomSliderAction, SIGNAL(zoomRatioChanged(int)), viewer, SLOT(updateZoomRatio(int))); connect(zoomSliderAction, &YACReaderSlider::zoomRatioChanged, viewer, &Viewer::updateZoomRatio);
connect(viewer, SIGNAL(zoomUpdated(int)), zoomSliderAction, SLOT(updateZoomRatio(int))); connect(viewer, &Viewer::zoomUpdated, zoomSliderAction, &YACReaderSlider::updateZoomRatio);
comicToolBar->addAction(leftRotationAction); comicToolBar->addAction(leftRotationAction);
comicToolBar->addAction(rightRotationAction); comicToolBar->addAction(rightRotationAction);
@ -1217,8 +1217,8 @@ void MainWindowViewer::checkNewVersion()
if (lastCheck.isNull() || lastCheck.daysTo(current) >= conf.getNumDaysBetweenVersionChecks()) { if (lastCheck.isNull() || lastCheck.daysTo(current) >= conf.getNumDaysBetweenVersionChecks()) {
versionChecker = new HttpVersionChecker(); versionChecker = new HttpVersionChecker();
connect(versionChecker, SIGNAL(newVersionDetected()), connect(versionChecker, &HttpVersionChecker::newVersionDetected,
this, SLOT(newVersion())); this, &MainWindowViewer::newVersion);
QTimer::singleShot(100, versionChecker, &HttpVersionChecker::get); QTimer::singleShot(100, versionChecker, &HttpVersionChecker::get);

View File

@ -19,7 +19,7 @@ NotificationsLabelWidget::NotificationsLabelWidget(QWidget *parent)
anim->setEndValue(0.0); anim->setEndValue(0.0);
anim->setEasingCurve(QEasingCurve::InExpo); anim->setEasingCurve(QEasingCurve::InExpo);
connect(anim, SIGNAL(finished()), this, SLOT(hide())); connect(anim, &QAbstractAnimation::finished, this, &QWidget::hide);
textLabel = new QLabel(this); textLabel = new QLabel(this);
textLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); textLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter);

View File

@ -53,7 +53,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
path->addWidget(pathFindButton = new QPushButton(QIcon(":/images/find_folder.png"), "")); path->addWidget(pathFindButton = new QPushButton(QIcon(":/images/find_folder.png"), ""));
pathBox->setLayout(path); pathBox->setLayout(path);
connect(pathFindButton, SIGNAL(clicked()), this, SLOT(findFolder())); connect(pathFindButton, &QAbstractButton::clicked, this, &OptionsDialog::findFolder);
auto colorSelection = new QHBoxLayout; auto colorSelection = new QHBoxLayout;
backgroundColor = new QLabel(); backgroundColor = new QLabel();
@ -63,7 +63,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
backgroundColor->setAutoFillBackground(true); backgroundColor->setAutoFillBackground(true);
colorDialog = new QColorDialog(Qt::red, this); colorDialog = new QColorDialog(Qt::red, this);
connect(colorDialog, SIGNAL(colorSelected(QColor)), this, SLOT(updateColor(QColor))); connect(colorDialog, &QColorDialog::colorSelected, this, &OptionsDialog::updateColor);
QGroupBox *colorBox = new QGroupBox(tr("Background color")); QGroupBox *colorBox = new QGroupBox(tr("Background color"));
//backgroundColor->setMinimumWidth(100); //backgroundColor->setMinimumWidth(100);
@ -72,26 +72,26 @@ OptionsDialog::OptionsDialog(QWidget *parent)
colorSelection->setStretchFactor(backgroundColor, 1); colorSelection->setStretchFactor(backgroundColor, 1);
colorSelection->setStretchFactor(selectBackgroundColorButton, 0); colorSelection->setStretchFactor(selectBackgroundColorButton, 0);
//colorSelection->addStretch(); //colorSelection->addStretch();
connect(selectBackgroundColorButton, SIGNAL(clicked()), colorDialog, SLOT(show())); connect(selectBackgroundColorButton, &QAbstractButton::clicked, colorDialog, &QWidget::show);
colorBox->setLayout(colorSelection); colorBox->setLayout(colorSelection);
brightnessS = new YACReaderSpinSliderWidget(this, true); brightnessS = new YACReaderSpinSliderWidget(this, true);
brightnessS->setRange(0, 100); brightnessS->setRange(0, 100);
//brightnessS->setText(tr("Brightness")); //brightnessS->setText(tr("Brightness"));
brightnessS->setTracking(false); brightnessS->setTracking(false);
connect(brightnessS, SIGNAL(valueChanged(int)), this, SLOT(brightnessChanged(int))); connect(brightnessS, &YACReaderSpinSliderWidget::valueChanged, this, &OptionsDialog::brightnessChanged);
contrastS = new YACReaderSpinSliderWidget(this, true); contrastS = new YACReaderSpinSliderWidget(this, true);
contrastS->setRange(0, 250); contrastS->setRange(0, 250);
//contrastS->setText(tr("Contrast")); //contrastS->setText(tr("Contrast"));
contrastS->setTracking(false); contrastS->setTracking(false);
connect(contrastS, SIGNAL(valueChanged(int)), this, SLOT(contrastChanged(int))); connect(contrastS, &YACReaderSpinSliderWidget::valueChanged, this, &OptionsDialog::contrastChanged);
gammaS = new YACReaderSpinSliderWidget(this, true); gammaS = new YACReaderSpinSliderWidget(this, true);
gammaS->setRange(0, 250); gammaS->setRange(0, 250);
//gammaS->setText(tr("Gamma")); //gammaS->setText(tr("Gamma"));
gammaS->setTracking(false); gammaS->setTracking(false);
connect(gammaS, SIGNAL(valueChanged(int)), this, SLOT(gammaChanged(int))); connect(gammaS, &YACReaderSpinSliderWidget::valueChanged, this, &OptionsDialog::gammaChanged);
//connect(brightnessS,SIGNAL(valueChanged(int)),this,SIGNAL(changedOptions())); //connect(brightnessS,SIGNAL(valueChanged(int)),this,SIGNAL(changedOptions()));
quickNavi = new QCheckBox(tr("Quick Navigation Mode")); quickNavi = new QCheckBox(tr("Quick Navigation Mode"));
@ -126,7 +126,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
layoutImage->addWidget(contrastS, 1, 1); layoutImage->addWidget(contrastS, 1, 1);
layoutImage->addWidget(gammaS, 2, 1); layoutImage->addWidget(gammaS, 2, 1);
QPushButton *pushButton = new QPushButton(tr("Reset")); QPushButton *pushButton = new QPushButton(tr("Reset"));
connect(pushButton, SIGNAL(pressed()), this, SLOT(resetImageConfig())); connect(pushButton, &QAbstractButton::pressed, this, &OptionsDialog::resetImageConfig);
layoutImage->addWidget(pushButton, 3, 0); layoutImage->addWidget(pushButton, 3, 0);
layoutImage->setColumnStretch(1, 1); layoutImage->setColumnStretch(1, 1);

View File

@ -414,7 +414,7 @@ void Render::render()
//si se ha creado un hilo para renderizar la página actual, se arranca //si se ha creado un hilo para renderizar la página actual, se arranca
if (pageRenders[currentPageBufferedIndex] != 0) { if (pageRenders[currentPageBufferedIndex] != 0) {
//se conecta la señal pageReady del hilo, con el SLOT prepareAvailablePage //se conecta la señal pageReady del hilo, con el SLOT prepareAvailablePage
connect(pageRenders[currentPageBufferedIndex], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int))); connect(pageRenders[currentPageBufferedIndex], &PageRender::pageReady, this, &Render::prepareAvailablePage);
//se emite la señal de procesando, debido a que los hilos se arrancan aquí //se emite la señal de procesando, debido a que los hilos se arrancan aquí
if (filters.size() > 0) if (filters.size() > 0)
emit processingPage(); emit processingPage();
@ -712,17 +712,17 @@ void Render::createComic(const QString &path)
connect(comic, SIGNAL(errorOpening()), this, SIGNAL(errorOpening()), Qt::QueuedConnection); connect(comic, SIGNAL(errorOpening()), this, SIGNAL(errorOpening()), Qt::QueuedConnection);
connect(comic, SIGNAL(errorOpening(QString)), this, SIGNAL(errorOpening(QString)), Qt::QueuedConnection); connect(comic, SIGNAL(errorOpening(QString)), this, SIGNAL(errorOpening(QString)), Qt::QueuedConnection);
connect(comic, SIGNAL(crcErrorFound(QString)), this, SIGNAL(crcError(QString)), Qt::QueuedConnection); connect(comic, &Comic::crcErrorFound, this, &Render::crcError, Qt::QueuedConnection);
connect(comic, SIGNAL(errorOpening()), this, SLOT(reset()), Qt::QueuedConnection); connect(comic, SIGNAL(errorOpening()), this, SLOT(reset()), Qt::QueuedConnection);
connect(comic, SIGNAL(imageLoaded(int)), this, SLOT(pageRawDataReady(int)), Qt::QueuedConnection); connect(comic, SIGNAL(imageLoaded(int)), this, SLOT(pageRawDataReady(int)), Qt::QueuedConnection);
connect(comic, SIGNAL(imageLoaded(int)), this, SIGNAL(imageLoaded(int)), Qt::QueuedConnection); connect(comic, SIGNAL(imageLoaded(int)), this, SIGNAL(imageLoaded(int)), Qt::QueuedConnection);
connect(comic, SIGNAL(openAt(int)), this, SLOT(renderAt(int)), Qt::QueuedConnection); connect(comic, &Comic::openAt, this, &Render::renderAt, Qt::QueuedConnection);
connect(comic, SIGNAL(numPages(unsigned int)), this, SIGNAL(numPages(unsigned int)), Qt::QueuedConnection); connect(comic, SIGNAL(numPages(unsigned int)), this, SIGNAL(numPages(unsigned int)), Qt::QueuedConnection);
connect(comic, SIGNAL(numPages(unsigned int)), this, SLOT(setNumPages(unsigned int)), Qt::QueuedConnection); connect(comic, SIGNAL(numPages(unsigned int)), this, SLOT(setNumPages(unsigned int)), Qt::QueuedConnection);
connect(comic, SIGNAL(imageLoaded(int, QByteArray)), this, SIGNAL(imageLoaded(int, QByteArray)), Qt::QueuedConnection); connect(comic, SIGNAL(imageLoaded(int, QByteArray)), this, SIGNAL(imageLoaded(int, QByteArray)), Qt::QueuedConnection);
connect(comic, SIGNAL(isBookmark(bool)), this, SIGNAL(currentPageIsBookmark(bool)), Qt::QueuedConnection); connect(comic, &Comic::isBookmark, this, &Render::currentPageIsBookmark, Qt::QueuedConnection);
connect(comic, SIGNAL(bookmarksUpdated()), this, SIGNAL(bookmarksUpdated()), Qt::QueuedConnection); connect(comic, &Comic::bookmarksUpdated, this, &Render::bookmarksUpdated, Qt::QueuedConnection);
//connect(comic,SIGNAL(isLast()),this,SIGNAL(isLast())); //connect(comic,SIGNAL(isLast()),this,SIGNAL(isLast()));
//connect(comic,SIGNAL(isCover()),this,SIGNAL(isCover())); //connect(comic,SIGNAL(isCover()),this,SIGNAL(isCover()));
@ -748,11 +748,11 @@ void Render::startLoad()
connect(comic, SIGNAL(errorOpening()), thread, SLOT(quit()), Qt::QueuedConnection); connect(comic, SIGNAL(errorOpening()), thread, SLOT(quit()), Qt::QueuedConnection);
connect(comic, SIGNAL(errorOpening(QString)), thread, SLOT(quit()), Qt::QueuedConnection); connect(comic, SIGNAL(errorOpening(QString)), thread, SLOT(quit()), Qt::QueuedConnection);
connect(comic, SIGNAL(imagesLoaded()), thread, SLOT(quit()), Qt::QueuedConnection); connect(comic, &Comic::imagesLoaded, thread, &QThread::quit, Qt::QueuedConnection);
connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection); connect(comic, SIGNAL(destroyed()), thread, SLOT(quit()), Qt::QueuedConnection);
connect(comic, SIGNAL(invalidated()), thread, SLOT(quit()), Qt::QueuedConnection); connect(comic, &Comic::invalidated, thread, &QThread::quit, Qt::QueuedConnection);
connect(thread, SIGNAL(started()), comic, SLOT(process())); connect(thread, SIGNAL(started()), comic, SLOT(process()));
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, &QThread::finished, thread, &QObject::deleteLater);
if (thread != nullptr) if (thread != nullptr)
thread->start(); thread->start();
@ -983,7 +983,7 @@ void Render::fillBuffer()
pagesReady[currentIndex + i]) //preload next pages pagesReady[currentIndex + i]) //preload next pages
{ {
pageRenders[currentPageBufferedIndex + i] = new PageRender(this, currentIndex + i, comic->getRawData()->at(currentIndex + i), buffer[currentPageBufferedIndex + i], imageRotation, filters); pageRenders[currentPageBufferedIndex + i] = new PageRender(this, currentIndex + i, comic->getRawData()->at(currentIndex + i), buffer[currentPageBufferedIndex + i], imageRotation, filters);
connect(pageRenders[currentPageBufferedIndex + i], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int))); connect(pageRenders[currentPageBufferedIndex + i], &PageRender::pageReady, this, &Render::prepareAvailablePage);
pageRenders[currentPageBufferedIndex + i]->start(); pageRenders[currentPageBufferedIndex + i]->start();
} }
@ -994,7 +994,7 @@ void Render::fillBuffer()
pagesReady[currentIndex - i]) //preload previous pages pagesReady[currentIndex - i]) //preload previous pages
{ {
pageRenders[currentPageBufferedIndex - i] = new PageRender(this, currentIndex - i, comic->getRawData()->at(currentIndex - i), buffer[currentPageBufferedIndex - i], imageRotation, filters); pageRenders[currentPageBufferedIndex - i] = new PageRender(this, currentIndex - i, comic->getRawData()->at(currentIndex - i), buffer[currentPageBufferedIndex - i], imageRotation, filters);
connect(pageRenders[currentPageBufferedIndex - i], SIGNAL(pageReady(int)), this, SLOT(prepareAvailablePage(int))); connect(pageRenders[currentPageBufferedIndex - i], &PageRender::pageReady, this, &Render::prepareAvailablePage);
pageRenders[currentPageBufferedIndex - i]->start(); pageRenders[currentPageBufferedIndex - i]->start();
} }
} }

View File

@ -18,7 +18,7 @@ ShortcutsDialog::ShortcutsDialog(QWidget *parent)
auto mainLayout = new QVBoxLayout; auto mainLayout = new QVBoxLayout;
close = new QPushButton(tr("Close")); close = new QPushButton(tr("Close"));
connect(close, SIGNAL(clicked()), this, SLOT(close())); connect(close, &QAbstractButton::clicked, this, &QWidget::close);
auto bottomLayout = new QHBoxLayout; auto bottomLayout = new QHBoxLayout;
bottomLayout->addStretch(); bottomLayout->addStretch();

View File

@ -157,9 +157,9 @@ YACReaderTranslator::YACReaderTranslator(QWidget *parent)
show(); show();
connect(searchButton, SIGNAL(pressed()), this, SLOT(translate())); connect(searchButton, &QAbstractButton::pressed, this, &YACReaderTranslator::translate);
connect(speakButton, SIGNAL(pressed()), this, SLOT(play())); connect(speakButton, &QAbstractButton::pressed, this, &YACReaderTranslator::play);
connect(clearButton, SIGNAL(pressed()), this, SLOT(clear())); connect(clearButton, &QAbstractButton::pressed, this, &YACReaderTranslator::clear);
//multimedia/phonon //multimedia/phonon
#if QT_VERSION >= 0x050000 #if QT_VERSION >= 0x050000
@ -191,16 +191,16 @@ void YACReaderTranslator::translate()
QString to = this->to->itemData(this->to->currentIndex()).toString(); QString to = this->to->itemData(this->to->currentIndex()).toString();
TranslationLoader *translationLoader = new TranslationLoader(text, from, to); TranslationLoader *translationLoader = new TranslationLoader(text, from, to);
connect(translationLoader, SIGNAL(requestFinished(QString)), this, SLOT(setTranslation(QString))); connect(translationLoader, &TranslationLoader::requestFinished, this, &YACReaderTranslator::setTranslation);
connect(translationLoader, SIGNAL(error()), this, SLOT(error())); connect(translationLoader, &TranslationLoader::error, this, &YACReaderTranslator::error);
connect(translationLoader, SIGNAL(timeOut()), this, SLOT(error())); connect(translationLoader, &TranslationLoader::timeOut, this, &YACReaderTranslator::error);
connect(translationLoader, SIGNAL(finished()), translationLoader, SLOT(deleteLater())); connect(translationLoader, &QThread::finished, translationLoader, &QObject::deleteLater);
TextToSpeachLoader *tts = new TextToSpeachLoader(text, from); TextToSpeachLoader *tts = new TextToSpeachLoader(text, from);
connect(tts, SIGNAL(requestFinished(QUrl)), this, SLOT(setSpeak(QUrl))); connect(tts, &TextToSpeachLoader::requestFinished, this, &YACReaderTranslator::setSpeak);
connect(tts, SIGNAL(error()), this, SLOT(error())); connect(tts, &TextToSpeachLoader::error, this, &YACReaderTranslator::error);
connect(tts, SIGNAL(timeOut()), this, SLOT(error())); connect(tts, &TextToSpeachLoader::timeOut, this, &YACReaderTranslator::error);
connect(tts, SIGNAL(finished()), tts, SLOT(deleteLater())); connect(tts, &QThread::finished, tts, &QObject::deleteLater);
translationLoader->start(); translationLoader->start();
tts->start(); tts->start();
@ -348,8 +348,8 @@ void TranslationLoader::run()
QTimer tT; QTimer tT;
tT.setSingleShot(true); tT.setSingleShot(true);
connect(&tT, SIGNAL(timeout()), &q, SLOT(quit())); connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
connect(&manager, SIGNAL(finished(QNetworkReply *)), &q, SLOT(quit())); connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appid=%1&from=%2&to=%3&text=%4&contentType=text/plain"; QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Translate?appid=%1&from=%2&to=%3&text=%4&contentType=text/plain";
url = url.arg(APPID).arg(from).arg(to).arg(text); url = url.arg(APPID).arg(from).arg(to).arg(text);
@ -391,8 +391,8 @@ void TextToSpeachLoader::run()
QTimer tT; QTimer tT;
tT.setSingleShot(true); tT.setSingleShot(true);
connect(&tT, SIGNAL(timeout()), &q, SLOT(quit())); connect(&tT, &QTimer::timeout, &q, &QEventLoop::quit);
connect(&manager, SIGNAL(finished(QNetworkReply *)), &q, SLOT(quit())); connect(&manager, &QNetworkAccessManager::finished, &q, &QEventLoop::quit);
QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appid=%1&language=%2&text=%3&contentType=text/plain"; QString url = "http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appid=%1&language=%2&text=%3&contentType=text/plain";
url = url.arg(APPID).arg(language).arg(text); url = url.arg(APPID).arg(language).arg(text);

View File

@ -115,9 +115,9 @@ Viewer::Viewer(QWidget *parent)
//animations //animations
verticalScroller = new QPropertyAnimation(verticalScrollBar(), "sliderPosition"); verticalScroller = new QPropertyAnimation(verticalScrollBar(), "sliderPosition");
connect(verticalScroller, SIGNAL(valueChanged(const QVariant &)), this, SIGNAL(backgroundChanges())); connect(verticalScroller, &QVariantAnimation::valueChanged, this, &Viewer::backgroundChanges);
horizontalScroller = new QPropertyAnimation(horizontalScrollBar(), "sliderPosition"); horizontalScroller = new QPropertyAnimation(horizontalScrollBar(), "sliderPosition");
connect(horizontalScroller, SIGNAL(valueChanged(const QVariant &)), this, SIGNAL(backgroundChanges())); connect(horizontalScroller, &QVariantAnimation::valueChanged, this, &Viewer::backgroundChanges);
groupScroller = new QParallelAnimationGroup(); groupScroller = new QParallelAnimationGroup();
groupScroller->addAnimation(verticalScroller); groupScroller->addAnimation(verticalScroller);
groupScroller->addAnimation(horizontalScroller); groupScroller->addAnimation(horizontalScroller);
@ -155,41 +155,41 @@ void Viewer::createConnections()
connect(this, SIGNAL(backgroundChanges()), mglass, SLOT(updateImage())); connect(this, SIGNAL(backgroundChanges()), mglass, SLOT(updateImage()));
//goToDialog //goToDialog
connect(goToDialog, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int))); connect(goToDialog, &GoToDialog::goToPage, this, &Viewer::goTo);
//goToFlow goTo //goToFlow goTo
connect(goToFlow, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int))); connect(goToFlow, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int)));
//current time //current time
auto t = new QTimer(this); auto t = new QTimer(this);
connect(t, SIGNAL(timeout()), this, SLOT(updateInformation())); connect(t, &QTimer::timeout, this, &Viewer::updateInformation);
t->start(1000); t->start(1000);
//hide cursor //hide cursor
connect(hideCursorTimer, SIGNAL(timeout()), this, SLOT(hideCursor())); connect(hideCursorTimer, &QTimer::timeout, this, &Viewer::hideCursor);
//bookmarks //bookmarks
connect(bd, SIGNAL(goToPage(unsigned int)), this, SLOT(goTo(unsigned int))); connect(bd, &BookmarksDialog::goToPage, this, &Viewer::goTo);
//render //render
connect(render, SIGNAL(errorOpening()), this, SLOT(resetContent())); connect(render, SIGNAL(errorOpening()), this, SLOT(resetContent()));
connect(render, SIGNAL(errorOpening()), this, SLOT(showMessageErrorOpening())); connect(render, SIGNAL(errorOpening()), this, SLOT(showMessageErrorOpening()));
connect(render, SIGNAL(errorOpening(QString)), this, SLOT(showMessageErrorOpening(QString))); connect(render, SIGNAL(errorOpening(QString)), this, SLOT(showMessageErrorOpening(QString)));
connect(render, SIGNAL(crcError(QString)), this, SLOT(processCRCError(QString))); connect(render, &Render::crcError, this, &Viewer::processCRCError);
connect(render, SIGNAL(numPages(unsigned int)), goToFlow, SLOT(setNumSlides(unsigned int))); connect(render, SIGNAL(numPages(unsigned int)), goToFlow, SLOT(setNumSlides(unsigned int)));
connect(render, SIGNAL(numPages(unsigned int)), goToDialog, SLOT(setNumPages(unsigned int))); connect(render, SIGNAL(numPages(unsigned int)), goToDialog, SLOT(setNumPages(unsigned int)));
//connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation())); //connect(render,SIGNAL(numPages(unsigned int)),this,SLOT(updateInformation()));
connect(render, SIGNAL(imageLoaded(int, QByteArray)), goToFlow, SLOT(setImageReady(int, QByteArray))); connect(render, SIGNAL(imageLoaded(int, QByteArray)), goToFlow, SLOT(setImageReady(int, QByteArray)));
connect(render, SIGNAL(currentPageReady()), this, SLOT(updatePage())); connect(render, &Render::currentPageReady, this, &Viewer::updatePage);
connect(render, SIGNAL(processingPage()), this, SLOT(setLoadingMessage())); connect(render, &Render::processingPage, this, &Viewer::setLoadingMessage);
connect(render, SIGNAL(currentPageIsBookmark(bool)), this, SIGNAL(pageIsBookmark(bool))); connect(render, &Render::currentPageIsBookmark, this, &Viewer::pageIsBookmark);
connect(render, SIGNAL(pageChanged(int)), this, SLOT(updateInformation())); connect(render, &Render::pageChanged, this, &Viewer::updateInformation);
//connect(render,SIGNAL(bookmarksLoaded(Bookmarks)),this,SLOT(setBookmarks(Bookmarks))); //connect(render,SIGNAL(bookmarksLoaded(Bookmarks)),this,SLOT(setBookmarks(Bookmarks)));
connect(render, SIGNAL(isLast()), this, SLOT(showIsLastMessage())); connect(render, &Render::isLast, this, &Viewer::showIsLastMessage);
connect(render, SIGNAL(isCover()), this, SLOT(showIsCoverMessage())); connect(render, &Render::isCover, this, &Viewer::showIsCoverMessage);
connect(render, SIGNAL(bookmarksUpdated()), this, SLOT(setBookmarks())); connect(render, &Render::bookmarksUpdated, this, &Viewer::setBookmarks);
} }
//Deprecated //Deprecated
@ -841,8 +841,8 @@ void Viewer::showGoToFlow()
void Viewer::animateShowGoToFlow() void Viewer::animateShowGoToFlow()
{ {
if (goToFlow->isHidden() && showGoToFlowAnimation->state() != QPropertyAnimation::Running) { if (goToFlow->isHidden() && showGoToFlowAnimation->state() != QPropertyAnimation::Running) {
disconnect(showGoToFlowAnimation, SIGNAL(finished()), goToFlow, SLOT(hide())); disconnect(showGoToFlowAnimation, &QAbstractAnimation::finished, goToFlow, &QWidget::hide);
connect(showGoToFlowAnimation, SIGNAL(finished()), this, SLOT(moveCursoToGoToFlow())); connect(showGoToFlowAnimation, &QAbstractAnimation::finished, this, &Viewer::moveCursoToGoToFlow);
showGoToFlowAnimation->setStartValue(QPoint((width() - goToFlow->width()) / 2, height() - 10)); showGoToFlowAnimation->setStartValue(QPoint((width() - goToFlow->width()) / 2, height() - 10));
showGoToFlowAnimation->setEndValue(QPoint((width() - goToFlow->width()) / 2, height() - goToFlow->height())); showGoToFlowAnimation->setEndValue(QPoint((width() - goToFlow->width()) / 2, height() - goToFlow->height()));
showGoToFlowAnimation->start(); showGoToFlowAnimation->start();
@ -856,8 +856,8 @@ void Viewer::animateShowGoToFlow()
void Viewer::animateHideGoToFlow() void Viewer::animateHideGoToFlow()
{ {
if (goToFlow->isVisible() && showGoToFlowAnimation->state() != QPropertyAnimation::Running) { if (goToFlow->isVisible() && showGoToFlowAnimation->state() != QPropertyAnimation::Running) {
connect(showGoToFlowAnimation, SIGNAL(finished()), goToFlow, SLOT(hide())); connect(showGoToFlowAnimation, &QAbstractAnimation::finished, goToFlow, &QWidget::hide);
disconnect(showGoToFlowAnimation, SIGNAL(finished()), this, SLOT(moveCursoToGoToFlow())); disconnect(showGoToFlowAnimation, &QAbstractAnimation::finished, this, &Viewer::moveCursoToGoToFlow);
showGoToFlowAnimation->setStartValue(QPoint((width() - goToFlow->width()) / 2, height() - goToFlow->height())); showGoToFlowAnimation->setStartValue(QPoint((width() - goToFlow->width()) / 2, height() - goToFlow->height()));
showGoToFlowAnimation->setEndValue(QPoint((width() - goToFlow->width()) / 2, height())); showGoToFlowAnimation->setEndValue(QPoint((width() - goToFlow->width()) / 2, height()));
showGoToFlowAnimation->start(); showGoToFlowAnimation->start();
@ -1018,7 +1018,7 @@ void Viewer::updateBackgroundColor(const QColor &color)
void Viewer::animateShowTranslator() void Viewer::animateShowTranslator()
{ {
if (translator->isHidden() && translatorAnimation->state() != QPropertyAnimation::Running) { if (translator->isHidden() && translatorAnimation->state() != QPropertyAnimation::Running) {
disconnect(translatorAnimation, SIGNAL(finished()), translator, SLOT(hide())); disconnect(translatorAnimation, &QAbstractAnimation::finished, translator, &QWidget::hide);
if (translatorXPos == -10000) if (translatorXPos == -10000)
translatorXPos = (width() - translator->width()) / 2; translatorXPos = (width() - translator->width()) / 2;
int x = qMax(0, qMin(translatorXPos, width() - translator->width())); int x = qMax(0, qMin(translatorXPos, width() - translator->width()));
@ -1036,7 +1036,7 @@ void Viewer::animateShowTranslator()
void Viewer::animateHideTranslator() void Viewer::animateHideTranslator()
{ {
if (translator->isVisible() && translatorAnimation->state() != QPropertyAnimation::Running) { if (translator->isVisible() && translatorAnimation->state() != QPropertyAnimation::Running) {
connect(translatorAnimation, SIGNAL(finished()), translator, SLOT(hide())); connect(translatorAnimation, &QAbstractAnimation::finished, translator, &QWidget::hide);
translatorAnimation->setStartValue(QPoint(translatorXPos = translator->pos().x(), translator->pos().y())); translatorAnimation->setStartValue(QPoint(translatorXPos = translator->pos().x(), translator->pos().y()));
if ((translator->width() / 2) + translator->pos().x() <= width() / 2) if ((translator->width() / 2) + translator->pos().x() <= width() / 2)
translatorAnimation->setEndValue(QPoint(-translator->width(), translator->pos().y())); translatorAnimation->setEndValue(QPoint(-translator->width(), translator->pos().y()));

View File

@ -11,7 +11,7 @@ YACReaderSliderAction::YACReaderSliderAction(QWidget *parent)
widget = new YACReaderSlider(); widget = new YACReaderSlider();
setDefaultWidget(widget); setDefaultWidget(widget);
connect(widget, SIGNAL(zoomRatioChanged(int)), this, SIGNAL(zoomRatioChanged(int))); connect(widget, &YACReaderSlider::zoomRatioChanged, this, &YACReaderSliderAction::zoomRatioChanged);
} }
void YACReaderSliderAction::updateText(int value) void YACReaderSliderAction::updateText(int value)

View File

@ -47,9 +47,9 @@ AddLabelDialog::AddLabelDialog(QWidget *parent)
setLayout(layout); setLayout(layout);
//connections //connections
connect(edit, SIGNAL(textChanged(QString)), this, SLOT(validateName(QString))); connect(edit, &QLineEdit::textChanged, this, &AddLabelDialog::validateName);
connect(cancelButton, SIGNAL(clicked()), this, SLOT(close())); connect(cancelButton, &QAbstractButton::clicked, this, &QWidget::close);
connect(acceptButton, SIGNAL(clicked()), this, SLOT(accept())); connect(acceptButton, &QAbstractButton::clicked, this, &QDialog::accept);
} }
YACReader::LabelColors AddLabelDialog::selectedColor() YACReader::LabelColors AddLabelDialog::selectedColor()

View File

@ -16,22 +16,22 @@ void AddLibraryDialog::setupUI()
textLabel = new QLabel(tr("Comics folder : ")); textLabel = new QLabel(tr("Comics folder : "));
path = new QLineEdit; path = new QLineEdit;
textLabel->setBuddy(path); textLabel->setBuddy(path);
connect(path, SIGNAL(textChanged(QString)), this, SLOT(pathSetted(QString))); connect(path, &QLineEdit::textChanged, this, &AddLibraryDialog::pathSetted);
nameLabel = new QLabel(tr("Library name : ")); nameLabel = new QLabel(tr("Library name : "));
nameEdit = new QLineEdit; nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit); nameLabel->setBuddy(nameEdit);
connect(nameEdit, SIGNAL(textChanged(QString)), this, SLOT(nameSetted(QString))); connect(nameEdit, &QLineEdit::textChanged, this, &AddLibraryDialog::nameSetted);
accept = new QPushButton(tr("Add")); accept = new QPushButton(tr("Add"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(add())); connect(accept, &QAbstractButton::clicked, this, &AddLibraryDialog::add);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &AddLibraryDialog::findPath);
auto content = new QGridLayout; auto content = new QGridLayout;

View File

@ -64,15 +64,15 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
tableView->horizontalHeader()->restoreState(settings->value(COMICS_VIEW_HEADERS).toByteArray()); tableView->horizontalHeader()->restoreState(settings->value(COMICS_VIEW_HEADERS).toByteArray());
//connections--------------------------------------------- //connections---------------------------------------------
connect(tableView, SIGNAL(clicked(QModelIndex)), this, SLOT(centerComicFlow(QModelIndex))); connect(tableView, &QAbstractItemView::clicked, this, &ClassicComicsView::centerComicFlow);
connect(tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(selectedComicForOpening(QModelIndex))); connect(tableView, &QAbstractItemView::doubleClicked, this, &ClassicComicsView::selectedComicForOpening);
connect(comicFlow, SIGNAL(centerIndexChanged(int)), this, SLOT(updateTableView(int))); connect(comicFlow, &ComicFlowWidget::centerIndexChanged, this, &ClassicComicsView::updateTableView);
connect(tableView, SIGNAL(comicRated(int, QModelIndex)), this, SIGNAL(comicRated(int, QModelIndex))); connect(tableView, &YACReaderTableView::comicRated, this, &ComicsView::comicRated);
connect(comicFlow, SIGNAL(selected(uint)), this, SIGNAL(selected(uint))); connect(comicFlow, &ComicFlowWidget::selected, this, &ComicsView::selected);
connect(tableView->horizontalHeader(), SIGNAL(sectionMoved(int, int, int)), this, SLOT(saveTableHeadersStatus())); connect(tableView->horizontalHeader(), &QHeaderView::sectionMoved, this, &ClassicComicsView::saveTableHeadersStatus);
connect(tableView->horizontalHeader(), SIGNAL(sectionResized(int, int, int)), this, SLOT(saveTableHeadersStatus())); connect(tableView->horizontalHeader(), &QHeaderView::sectionResized, this, &ClassicComicsView::saveTableHeadersStatus);
connect(comicFlow, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(requestedViewContextMenu(QPoint))); connect(comicFlow, &QWidget::customContextMenuRequested, this, &ClassicComicsView::requestedViewContextMenu);
connect(tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(requestedItemContextMenu(QPoint))); connect(tableView, &QWidget::customContextMenuRequested, this, &ClassicComicsView::requestedItemContextMenu);
layout->addWidget(sVertical); layout->addWidget(sVertical);
setLayout(layout); setLayout(layout);
@ -94,7 +94,7 @@ ClassicComicsView::ClassicComicsView(QWidget *parent)
hideFlowViewAction->setCheckable(true); hideFlowViewAction->setCheckable(true);
hideFlowViewAction->setChecked(false); hideFlowViewAction->setChecked(false);
connect(hideFlowViewAction, SIGNAL(toggled(bool)), this, SLOT(hideComicFlow(bool))); connect(hideFlowViewAction, &QAction::toggled, this, &ClassicComicsView::hideComicFlow);
} }
void ClassicComicsView::hideComicFlow(bool hide) void ClassicComicsView::hideComicFlow(bool hide)
@ -133,8 +133,8 @@ void ClassicComicsView::setModel(ComicModel *model)
if (model == NULL) { if (model == NULL) {
comicFlow->clear(); comicFlow->clear();
} else { } else {
connect(model, SIGNAL(dataChanged(QModelIndex, QModelIndex, QVector<int>)), this, SLOT(applyModelChanges(QModelIndex, QModelIndex, QVector<int>)), Qt::UniqueConnection); connect(model, &QAbstractItemModel::dataChanged, this, &ClassicComicsView::applyModelChanges, Qt::UniqueConnection);
connect(model, SIGNAL(rowsRemoved(QModelIndex, int, int)), this, SLOT(removeItemsFromFlow(QModelIndex, int, int)), Qt::UniqueConnection); connect(model, &QAbstractItemModel::rowsRemoved, this, &ClassicComicsView::removeItemsFromFlow, Qt::UniqueConnection);
connect(model, SIGNAL(resortedIndexes(QList<int>)), comicFlow, SLOT(resortCovers(QList<int>)), Qt::UniqueConnection); connect(model, SIGNAL(resortedIndexes(QList<int>)), comicFlow, SLOT(resortCovers(QList<int>)), Qt::UniqueConnection);
connect(model, SIGNAL(newSelectedIndex(QModelIndex)), this, SLOT(setCurrentIndex(QModelIndex)), Qt::UniqueConnection); connect(model, SIGNAL(newSelectedIndex(QModelIndex)), this, SLOT(setCurrentIndex(QModelIndex)), Qt::UniqueConnection);

View File

@ -7,10 +7,10 @@ ComicFlow::ComicFlow(QWidget *parent, FlowType flowType)
: YACReaderFlow(parent, flowType), worker(new WorkerThread<QImage>) : YACReaderFlow(parent, flowType), worker(new WorkerThread<QImage>)
{ {
resetWorkerIndex(); resetWorkerIndex();
connect(&updateTimer, SIGNAL(timeout()), this, SLOT(updateImageData())); connect(&updateTimer, &QTimer::timeout, this, &ComicFlow::updateImageData);
connect(this, SIGNAL(centerIndexChanged(int)), this, SLOT(preload())); connect(this, &PictureFlow::centerIndexChanged, this, &ComicFlow::preload);
connect(this, SIGNAL(centerIndexChangedSilent(int)), this, SLOT(preload())); connect(this, &PictureFlow::centerIndexChangedSilent, this, &ComicFlow::preload);
setReflectionEffect(PlainReflection); setReflectionEffect(PlainReflection);
} }

View File

@ -10,8 +10,8 @@ ComicFlowWidgetSW::ComicFlowWidgetSW(QWidget *parent)
{ {
flow = new ComicFlow(parent); flow = new ComicFlow(parent);
connect(flow, SIGNAL(centerIndexChanged(int)), this, SIGNAL(centerIndexChanged(int))); connect(flow, &PictureFlow::centerIndexChanged, this, &ComicFlowWidget::centerIndexChanged);
connect(flow, SIGNAL(selected(unsigned int)), this, SIGNAL(selected(unsigned int))); connect(flow, &YACReaderFlow::selected, this, &ComicFlowWidget::selected);
auto l = new QVBoxLayout; auto l = new QVBoxLayout;
l->addWidget(flow); l->addWidget(flow);
@ -155,8 +155,8 @@ ComicFlowWidgetGL::ComicFlowWidgetGL(QWidget *parent)
{ {
flow = new YACReaderComicFlowGL(parent); flow = new YACReaderComicFlowGL(parent);
connect(flow, SIGNAL(centerIndexChanged(int)), this, SIGNAL(centerIndexChanged(int))); connect(flow, &YACReaderFlowGL::centerIndexChanged, this, &ComicFlowWidget::centerIndexChanged);
connect(flow, SIGNAL(selected(unsigned int)), this, SIGNAL(selected(unsigned int))); connect(flow, &YACReaderFlowGL::selected, this, &ComicFlowWidget::selected);
auto l = new QVBoxLayout; auto l = new QVBoxLayout;
l->addWidget(flow); l->addWidget(flow);

View File

@ -23,14 +23,14 @@ ApiKeyDialog::ApiKeyDialog(QWidget *parent)
info->setOpenExternalLinks(true); info->setOpenExternalLinks(true);
edit = new QLineEdit(); edit = new QLineEdit();
edit->setPlaceholderText(tr("Paste here your Comic Vine API key")); edit->setPlaceholderText(tr("Paste here your Comic Vine API key"));
connect(edit, SIGNAL(textChanged(QString)), this, SLOT(enableAccept(QString))); connect(edit, &QLineEdit::textChanged, this, &ApiKeyDialog::enableAccept);
acceptButton = new QPushButton(tr("Accept")); acceptButton = new QPushButton(tr("Accept"));
acceptButton->setDisabled(true); acceptButton->setDisabled(true);
connect(acceptButton, SIGNAL(clicked()), this, SLOT(saveApiKey())); connect(acceptButton, &QAbstractButton::clicked, this, &ApiKeyDialog::saveApiKey);
cancelButton = new QPushButton(tr("Cancel")); cancelButton = new QPushButton(tr("Cancel"));
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(cancelButton, &QAbstractButton::clicked, this, &QDialog::reject);
layout->addWidget(info); layout->addWidget(info);
layout->addWidget(edit); layout->addWidget(edit);

View File

@ -20,10 +20,10 @@ void ComicVineAllVolumeComicsRetriever::getAllVolumeComics()
void ComicVineAllVolumeComicsRetriever::getAllVolumeComics(int range) void ComicVineAllVolumeComicsRetriever::getAllVolumeComics(int range)
{ {
HttpWorker *search = new HttpWorker(volumeURLString.arg(range)); HttpWorker *search = new HttpWorker(volumeURLString.arg(range));
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SLOT(appendVolumeComicsInfo(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineAllVolumeComicsRetriever::appendVolumeComicsInfo);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); connect(search, &HttpWorker::timeout, this, &ComicVineAllVolumeComicsRetriever::timeOut);
connect(search, SIGNAL(timeout()), this, SIGNAL(finished())); connect(search, &HttpWorker::timeout, this, &ComicVineAllVolumeComicsRetriever::finished);
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }

View File

@ -64,9 +64,9 @@ ComicVineClient::~ComicVineClient()
void ComicVineClient::search(const QString &query, int page) void ComicVineClient::search(const QString &query, int page)
{ {
HttpWorker *search = new HttpWorker(QString(CV_SEARCH).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(query).arg(page)); HttpWorker *search = new HttpWorker(QString(CV_SEARCH).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(query).arg(page));
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SLOT(proccessVolumesSearchData(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::proccessVolumesSearchData);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut);
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }
//CV_SEARCH result //CV_SEARCH result
@ -102,18 +102,18 @@ void ComicVineClient::proccessComicDetailData(const QByteArray &data)
void ComicVineClient::getSeriesDetail(const QString &id) void ComicVineClient::getSeriesDetail(const QString &id)
{ {
HttpWorker *search = new HttpWorker(QString(CV_SERIES_DETAIL).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(id)); HttpWorker *search = new HttpWorker(QString(CV_SERIES_DETAIL).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(id));
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SLOT(proccessSeriesDetailData(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::proccessSeriesDetailData);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut);
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }
void ComicVineClient::getSeriesCover(const QString &url) void ComicVineClient::getSeriesCover(const QString &url)
{ {
auto search = new HttpWorker(url); auto search = new HttpWorker(url);
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SIGNAL(seriesCover(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::seriesCover);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); //TODO connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut); //TODO
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }
@ -121,9 +121,9 @@ void ComicVineClient::getSeriesCover(const QString &url)
void ComicVineClient::getVolumeComicsInfo(const QString &idVolume, int page) void ComicVineClient::getVolumeComicsInfo(const QString &idVolume, int page)
{ {
HttpWorker *search = new HttpWorker(QString(CV_COMICS_INFO).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(idVolume).arg((page - 1) * 100)); //page doesn't work for search, using offset instead HttpWorker *search = new HttpWorker(QString(CV_COMICS_INFO).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(idVolume).arg((page - 1) * 100)); //page doesn't work for search, using offset instead
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SLOT(processVolumeComicsInfo(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::processVolumeComicsInfo);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); //TODO connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut); //TODO
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }
@ -170,9 +170,9 @@ void ComicVineClient::getComicDetailAsync(const QString &id)
{ {
HttpWorker *search = new HttpWorker(QString(CV_COMIC_DETAIL).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(id)); HttpWorker *search = new HttpWorker(QString(CV_COMIC_DETAIL).replace(CV_WEB_ADDRESS, baseURL).replace(CV_API_KEY, settings->value(COMIC_VINE_API_KEY, CV_API_KEY_DEFAULT).toString()).arg(id));
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SLOT(proccessComicDetailData(const QByteArray &))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::proccessComicDetailData);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut);
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }
@ -197,9 +197,9 @@ QByteArray ComicVineClient::getStoryArcDetail(const QString &id, bool &outError,
void ComicVineClient::getComicCover(const QString &url) void ComicVineClient::getComicCover(const QString &url)
{ {
auto search = new HttpWorker(url); auto search = new HttpWorker(url);
connect(search, SIGNAL(dataReady(const QByteArray &)), this, SIGNAL(comicCover(QByteArray))); connect(search, &HttpWorker::dataReady, this, &ComicVineClient::comicCover);
connect(search, SIGNAL(timeout()), this, SIGNAL(timeOut())); //TODO connect(search, &HttpWorker::timeout, this, &ComicVineClient::timeOut); //TODO
connect(search, SIGNAL(finished()), search, SLOT(deleteLater())); connect(search, &QThread::finished, search, &QObject::deleteLater);
search->get(); search->get();
} }

View File

@ -106,17 +106,17 @@ void ComicVineDialog::doStackedWidgets()
void ComicVineDialog::doConnections() void ComicVineDialog::doConnections()
{ {
connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); connect(closeButton, &QAbstractButton::clicked, this, &QWidget::close);
connect(nextButton, SIGNAL(clicked()), this, SLOT(goNext())); connect(nextButton, &QAbstractButton::clicked, this, &ComicVineDialog::goNext);
connect(backButton, SIGNAL(clicked()), this, SLOT(goBack())); connect(backButton, &QAbstractButton::clicked, this, &ComicVineDialog::goBack);
connect(searchButton, SIGNAL(clicked()), this, SLOT(search())); connect(searchButton, &QAbstractButton::clicked, this, &ComicVineDialog::search);
connect(skipButton, SIGNAL(clicked()), this, SLOT(goToNextComic())); connect(skipButton, &QAbstractButton::clicked, this, &ComicVineDialog::goToNextComic);
connect(selectVolumeWidget, SIGNAL(loadPage(QString, int)), this, SLOT(searchVolume(QString, int))); connect(selectVolumeWidget, &ScraperSelector::loadPage, this, &ComicVineDialog::searchVolume);
connect(selectComicWidget, SIGNAL(loadPage(QString, int)), this, SLOT(getVolumeComicsInfo(QString, int))); connect(selectComicWidget, &ScraperSelector::loadPage, this, &ComicVineDialog::getVolumeComicsInfo);
connect(sortVolumeComicsWidget, SIGNAL(loadPage(QString, int)), this, SLOT(getVolumeComicsInfo(QString, int))); connect(sortVolumeComicsWidget, &ScraperSelector::loadPage, this, &ComicVineDialog::getVolumeComicsInfo);
connect(this, SIGNAL(accepted()), this, SLOT(close()), Qt::QueuedConnection); connect(this, &QDialog::accepted, this, &QWidget::close, Qt::QueuedConnection);
} }
void ComicVineDialog::goNext() void ComicVineDialog::goNext()
@ -749,9 +749,9 @@ void ComicVineDialog::searchVolume(const QString &v, int page)
currentVolumeSearchString = v; currentVolumeSearchString = v;
auto comicVineClient = new ComicVineClient; auto comicVineClient = new ComicVineClient;
connect(comicVineClient, SIGNAL(searchResult(QString)), this, SLOT(debugClientResults(QString))); connect(comicVineClient, &ComicVineClient::searchResult, this, &ComicVineDialog::debugClientResults);
connect(comicVineClient, SIGNAL(timeOut()), this, SLOT(queryTimeOut())); connect(comicVineClient, &ComicVineClient::timeOut, this, &ComicVineDialog::queryTimeOut);
connect(comicVineClient, SIGNAL(finished()), comicVineClient, SLOT(deleteLater())); connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater);
comicVineClient->search(v, page); comicVineClient->search(v, page);
status = SearchingVolume; status = SearchingVolume;
@ -765,11 +765,11 @@ void ComicVineDialog::getVolumeComicsInfo(const QString &vID, int /* page */)
auto comicVineClient = new ComicVineClient; auto comicVineClient = new ComicVineClient;
if (mode == Volume) if (mode == Volume)
connect(comicVineClient, SIGNAL(volumeComicsInfo(QString)), this, SLOT(showSortVolumeComics(QString))); connect(comicVineClient, &ComicVineClient::volumeComicsInfo, this, &ComicVineDialog::showSortVolumeComics);
else else
connect(comicVineClient, SIGNAL(volumeComicsInfo(QString)), this, SLOT(showSelectComic(QString))); connect(comicVineClient, &ComicVineClient::volumeComicsInfo, this, &ComicVineDialog::showSelectComic);
connect(comicVineClient, SIGNAL(timeOut()), this, SLOT(queryTimeOut())); connect(comicVineClient, &ComicVineClient::timeOut, this, &ComicVineDialog::queryTimeOut);
connect(comicVineClient, SIGNAL(finished()), comicVineClient, SLOT(deleteLater())); connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater);
QLOG_TRACE() << vID; QLOG_TRACE() << vID;

View File

@ -24,8 +24,8 @@ ScraperResultsPaginator::ScraperResultsPaginator(QWidget *parent)
previousPage->setIconSize(pp.size()); previousPage->setIconSize(pp.size());
previousPage->setIcon(pp); previousPage->setIcon(pp);
connect(nextPage, SIGNAL(clicked()), this, SIGNAL(loadNextPage())); connect(nextPage, &QAbstractButton::clicked, this, &ScraperResultsPaginator::loadNextPage);
connect(previousPage, SIGNAL(clicked()), this, SIGNAL(loadPreviousPage())); connect(previousPage, &QAbstractButton::clicked, this, &ScraperResultsPaginator::loadPreviousPage);
numElements = new QLabel(tr("Number of volumes found : %1")); numElements = new QLabel(tr("Number of volumes found : %1"));
numElements->setStyleSheet(labelStylesheet); numElements->setStyleSheet(labelStylesheet);

View File

@ -29,7 +29,7 @@ ScraperScrollLabel::ScraperScrollLabel(QWidget *parent)
"QScrollBar::down-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-down.png') center top no-repeat;}" "QScrollBar::down-arrow:vertical {border:none;width: 9px;height: 6px;background: url(':/images/folders_view/line-down.png') center top no-repeat;}"
"QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {background: none; }"); "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical, QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {background: none; }");
connect(textLabel, SIGNAL(linkActivated(QString)), this, SLOT(openLink(QString))); connect(textLabel, &QLabel::linkActivated, this, &ScraperScrollLabel::openLink);
} }
void ScraperScrollLabel::setAltText(const QString &text) void ScraperScrollLabel::setAltText(const QString &text)

View File

@ -4,8 +4,8 @@ ScraperSelector::ScraperSelector(QWidget *parent)
: QWidget(parent) : QWidget(parent)
{ {
paginator = new ScraperResultsPaginator; paginator = new ScraperResultsPaginator;
connect(paginator, SIGNAL(loadNextPage()), this, SLOT(loadNextPage())); connect(paginator, &ScraperResultsPaginator::loadNextPage, this, &ScraperSelector::loadNextPage);
connect(paginator, SIGNAL(loadPreviousPage()), this, SLOT(loadPreviousPage())); connect(paginator, &ScraperResultsPaginator::loadPreviousPage, this, &ScraperSelector::loadPreviousPage);
} }
void ScraperSelector::load(const QString &json, const QString &searchString) void ScraperSelector::load(const QString &json, const QString &searchString)

View File

@ -33,7 +33,7 @@ SelectComic::SelectComic(QWidget *parent)
tableComics = new ScraperTableView(this); tableComics = new ScraperTableView(this);
//connections //connections
connect(tableComics, SIGNAL(clicked(QModelIndex)), this, SLOT(loadComicInfo(QModelIndex))); connect(tableComics, &QAbstractItemView::clicked, this, &SelectComic::loadComicInfo);
paginator->setCustomLabel(tr("comics")); paginator->setCustomLabel(tr("comics"));
@ -95,13 +95,13 @@ void SelectComic::loadComicInfo(const QModelIndex &mi)
detailLabel->setAltText(loadingStyle.arg(tr("loading description"))); detailLabel->setAltText(loadingStyle.arg(tr("loading description")));
auto comicVineClient = new ComicVineClient; auto comicVineClient = new ComicVineClient;
connect(comicVineClient, SIGNAL(comicCover(const QByteArray &)), this, SLOT(setCover(const QByteArray &))); connect(comicVineClient, &ComicVineClient::comicCover, this, &SelectComic::setCover);
connect(comicVineClient, SIGNAL(finished()), comicVineClient, SLOT(deleteLater())); connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater);
comicVineClient->getComicCover(coverURL); comicVineClient->getComicCover(coverURL);
auto comicVineClient2 = new ComicVineClient; auto comicVineClient2 = new ComicVineClient;
connect(comicVineClient2, SIGNAL(comicDetail(QString)), this, SLOT(setDescription(QString))); connect(comicVineClient2, &ComicVineClient::comicDetail, this, &SelectComic::setDescription);
connect(comicVineClient2, SIGNAL(finished()), comicVineClient2, SLOT(deleteLater())); connect(comicVineClient2, &ComicVineClient::finished, comicVineClient2, &QObject::deleteLater);
comicVineClient2->getComicDetailAsync(id); comicVineClient2->getComicDetailAsync(id);
} }

View File

@ -55,7 +55,7 @@ SelectVolume::SelectVolume(QWidget *parent)
//tableVolumes->horizontalHeader()->setSortIndicatorShown(false); //tableVolumes->horizontalHeader()->setSortIndicatorShown(false);
connect(tableVolumes->horizontalHeader(), SIGNAL(sectionClicked(int)), tableVolumes, SLOT(sortByColumn(int))); connect(tableVolumes->horizontalHeader(), SIGNAL(sectionClicked(int)), tableVolumes, SLOT(sortByColumn(int)));
//connections //connections
connect(tableVolumes, SIGNAL(clicked(QModelIndex)), this, SLOT(loadVolumeInfo(QModelIndex))); connect(tableVolumes, &QAbstractItemView::clicked, this, &SelectVolume::loadVolumeInfo);
paginator->setCustomLabel(tr("volumes")); paginator->setCustomLabel(tr("volumes"));
@ -122,13 +122,13 @@ void SelectVolume::loadVolumeInfo(const QModelIndex &omi)
detailLabel->setAltText(loadingStyle.arg(tr("loading description"))); detailLabel->setAltText(loadingStyle.arg(tr("loading description")));
auto comicVineClient = new ComicVineClient; auto comicVineClient = new ComicVineClient;
connect(comicVineClient, SIGNAL(seriesCover(const QByteArray &)), this, SLOT(setCover(const QByteArray &))); connect(comicVineClient, &ComicVineClient::seriesCover, this, &SelectVolume::setCover);
connect(comicVineClient, SIGNAL(finished()), comicVineClient, SLOT(deleteLater())); connect(comicVineClient, &ComicVineClient::finished, comicVineClient, &QObject::deleteLater);
comicVineClient->getSeriesCover(coverURL); comicVineClient->getSeriesCover(coverURL);
auto comicVineClient2 = new ComicVineClient; auto comicVineClient2 = new ComicVineClient;
connect(comicVineClient2, SIGNAL(seriesDetail(QString)), this, SLOT(setDescription(QString))); connect(comicVineClient2, &ComicVineClient::seriesDetail, this, &SelectVolume::setDescription);
connect(comicVineClient2, SIGNAL(finished()), comicVineClient2, SLOT(deleteLater())); connect(comicVineClient2, &ComicVineClient::finished, comicVineClient2, &QObject::deleteLater);
comicVineClient2->getSeriesDetail(id); comicVineClient2->getSeriesDetail(id);
} }

View File

@ -32,8 +32,8 @@ SortVolumeComics::SortVolumeComics(QWidget *parent)
//moveDownButtonIL = new ScrapperToolButton(ScrapperToolButton::RIGHT); //moveDownButtonIL = new ScrapperToolButton(ScrapperToolButton::RIGHT);
//moveDownButtonIL->setIcon(QIcon(":/images/comic_vine/rowDown.png")); //moveDownButtonIL->setIcon(QIcon(":/images/comic_vine/rowDown.png"));
connect(moveUpButtonCL, SIGNAL(clicked()), this, SLOT(moveUpCL())); connect(moveUpButtonCL, &QAbstractButton::clicked, this, &SortVolumeComics::moveUpCL);
connect(moveDownButtonCL, SIGNAL(clicked()), this, SLOT(moveDownCL())); connect(moveDownButtonCL, &QAbstractButton::clicked, this, &SortVolumeComics::moveDownCL);
//connect(moveUpButtonIL,SIGNAL(clicked()),this,SLOT(moveUpIL())); //connect(moveUpButtonIL,SIGNAL(clicked()),this,SLOT(moveUpIL()));
//connect(moveUpButtonIL,SIGNAL(clicked()),this,SLOT(moveDownIL())); //connect(moveUpButtonIL,SIGNAL(clicked()),this,SLOT(moveDownIL()));
@ -49,8 +49,8 @@ SortVolumeComics::SortVolumeComics(QWidget *parent)
//content->addWidget(tableVolumes,0,Qt::AlignRight|Qt::AlignTop); //content->addWidget(tableVolumes,0,Qt::AlignRight|Qt::AlignTop);
connect(tableVolumeComics->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(synchronizeScroll(int))); connect(tableVolumeComics->verticalScrollBar(), &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
connect(tableFiles->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(synchronizeScroll(int))); connect(tableFiles->verticalScrollBar(), &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
//connect(tableVolumeComics, SIGNAL(pressed(QModelIndex)), tableFiles, SLOT(setCurrentIndex(QModelIndex))); //connect(tableVolumeComics, SIGNAL(pressed(QModelIndex)), tableFiles, SLOT(setCurrentIndex(QModelIndex)));
//connect(tableFiles, SIGNAL(pressed(QModelIndex)), tableVolumeComics, SLOT(setCurrentIndex(QModelIndex))); //connect(tableFiles, SIGNAL(pressed(QModelIndex)), tableVolumeComics, SLOT(setCurrentIndex(QModelIndex)));
@ -93,8 +93,8 @@ SortVolumeComics::SortVolumeComics(QWidget *parent)
tableFiles->addAction(restoreAllItems); tableFiles->addAction(restoreAllItems);
//tableFiles->addAction(restoreItems); //tableFiles->addAction(restoreItems);
connect(removeItemFromList, SIGNAL(triggered()), this, SLOT(removeSelectedComics())); connect(removeItemFromList, &QAction::triggered, this, &SortVolumeComics::removeSelectedComics);
connect(restoreAllItems, SIGNAL(triggered()), this, SLOT(restoreAllComics())); connect(restoreAllItems, &QAction::triggered, this, &SortVolumeComics::restoreAllComics);
//connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector())); //connect(restoreItems,SIGNAL(triggered()),this,SLOT(showRemovedComicsSelector()));
} }
@ -136,11 +136,11 @@ void SortVolumeComics::synchronizeScroll(int pos)
if (senderObject == tableVolumeComicsScrollBar) { if (senderObject == tableVolumeComicsScrollBar) {
disconnect(tableFilesScrollBar, SIGNAL(valueChanged(int)), this, 0); disconnect(tableFilesScrollBar, SIGNAL(valueChanged(int)), this, 0);
tableFilesScrollBar->setValue(pos); tableFilesScrollBar->setValue(pos);
connect(tableFilesScrollBar, SIGNAL(valueChanged(int)), this, SLOT(synchronizeScroll(int))); connect(tableFilesScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
} else { } else {
disconnect(tableVolumeComicsScrollBar, SIGNAL(valueChanged(int)), this, 0); disconnect(tableVolumeComicsScrollBar, SIGNAL(valueChanged(int)), this, 0);
tableVolumeComicsScrollBar->setValue(pos); tableVolumeComicsScrollBar->setValue(pos);
connect(tableVolumeComicsScrollBar, SIGNAL(valueChanged(int)), this, SLOT(synchronizeScroll(int))); connect(tableVolumeComicsScrollBar, &QAbstractSlider::valueChanged, this, &SortVolumeComics::synchronizeScroll);
} }
} }

View File

@ -17,23 +17,23 @@ void CreateLibraryDialog::setupUI()
textLabel = new QLabel(tr("Comics folder : ")); textLabel = new QLabel(tr("Comics folder : "));
path = new QLineEdit; path = new QLineEdit;
textLabel->setBuddy(path); textLabel->setBuddy(path);
connect(path, SIGNAL(textChanged(QString)), this, SLOT(pathSetted(QString))); connect(path, &QLineEdit::textChanged, this, &CreateLibraryDialog::pathSetted);
nameLabel = new QLabel(tr("Library Name : ")); nameLabel = new QLabel(tr("Library Name : "));
nameEdit = new QLineEdit; nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit); nameLabel->setBuddy(nameEdit);
connect(nameEdit, SIGNAL(textChanged(QString)), this, SLOT(nameSetted(QString))); connect(nameEdit, &QLineEdit::textChanged, this, &CreateLibraryDialog::nameSetted);
accept = new QPushButton(tr("Create")); accept = new QPushButton(tr("Create"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(create())); connect(accept, SIGNAL(clicked()), this, SLOT(create()));
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SIGNAL(cancelCreate())); connect(cancel, &QAbstractButton::clicked, this, &CreateLibraryDialog::cancelCreate);
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &CreateLibraryDialog::findPath);
auto content = new QGridLayout; auto content = new QGridLayout;
@ -160,7 +160,7 @@ UpdateLibraryDialog::UpdateLibraryDialog(QWidget *parent)
bottom->addStretch(); bottom->addStretch();
bottom->addWidget(cancel = new QPushButton(tr("Cancel"))); bottom->addWidget(cancel = new QPushButton(tr("Cancel")));
connect(cancel, SIGNAL(clicked()), this, SIGNAL(cancelUpdate())); connect(cancel, &QAbstractButton::clicked, this, &UpdateLibraryDialog::cancelUpdate);
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
mainLayout->addStretch(); mainLayout->addStretch();

View File

@ -125,7 +125,7 @@ EmptyFolderWidget::EmptyFolderWidget(QWidget *parent)
setAcceptDrops(true); setAcceptDrops(true);
connect(foldersView, SIGNAL(clicked(QModelIndex)), this, SLOT(onItemClicked(QModelIndex))); connect(foldersView, &QAbstractItemView::clicked, this, &EmptyFolderWidget::onItemClicked);
} }
void EmptyFolderWidget::setSubfolders(const QModelIndex &mi, const QStringList &foldersNames) void EmptyFolderWidget::setSubfolders(const QModelIndex &mi, const QStringList &foldersNames)

View File

@ -17,14 +17,14 @@ ExportComicsInfoDialog::ExportComicsInfoDialog(QWidget *parent)
accept = new QPushButton(tr("Create")); accept = new QPushButton(tr("Create"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(exportComicsInfo())); connect(accept, &QAbstractButton::clicked, this, &ExportComicsInfoDialog::exportComicsInfo);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
connect(cancel, SIGNAL(clicked()), this, SIGNAL(rejected())); connect(cancel, &QAbstractButton::clicked, this, &QDialog::rejected);
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &ExportComicsInfoDialog::findPath);
auto libraryLayout = new QHBoxLayout; auto libraryLayout = new QHBoxLayout;

View File

@ -14,14 +14,14 @@ ExportLibraryDialog::ExportLibraryDialog(QWidget *parent)
accept = new QPushButton(tr("Create")); accept = new QPushButton(tr("Create"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(exportLibrary())); connect(accept, &QAbstractButton::clicked, this, &ExportLibraryDialog::exportLibrary);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
connect(cancel, SIGNAL(clicked()), this, SIGNAL(rejected())); connect(cancel, &QAbstractButton::clicked, this, &QDialog::rejected);
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &ExportLibraryDialog::findPath);
auto libraryLayout = new QHBoxLayout; auto libraryLayout = new QHBoxLayout;

View File

@ -213,7 +213,7 @@ void GridComicsView::createCoverSizeSliderWidget()
coverSizeSliderWidget->setLayout(horizontalLayout); coverSizeSliderWidget->setLayout(horizontalLayout);
//TODO add shortcuts (ctrl-+ and ctrl-- for zooming in out, + ctrl-0 for reseting the zoom) //TODO add shortcuts (ctrl-+ and ctrl-- for zooming in out, + ctrl-0 for reseting the zoom)
connect(coverSizeSlider, SIGNAL(valueChanged(int)), this, SLOT(setCoversSize(int))); connect(coverSizeSlider, &QAbstractSlider::valueChanged, this, &GridComicsView::setCoversSize);
int coverSize = settings->value(COMICS_GRID_COVER_SIZES, YACREADER_MIN_COVER_WIDTH).toInt(); int coverSize = settings->value(COMICS_GRID_COVER_SIZES, YACREADER_MIN_COVER_WIDTH).toInt();
@ -277,7 +277,7 @@ void GridComicsView::setModel(ComicModel *model)
//If the currentComicView was hidden before showing it sometimes the scroll view doesn't show it //If the currentComicView was hidden before showing it sometimes the scroll view doesn't show it
//this is a hacky solution... //this is a hacky solution...
QTimer::singleShot(0, this, SLOT(resetScroll())); QTimer::singleShot(0, this, &GridComicsView::resetScroll);
} }
void GridComicsView::updateBackgroundConfig() void GridComicsView::updateBackgroundConfig()

View File

@ -19,14 +19,14 @@ ImportComicsInfoDialog::ImportComicsInfoDialog(QWidget *parent)
accept = new QPushButton(tr("Import")); accept = new QPushButton(tr("Import"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(import())); connect(accept, &QAbstractButton::clicked, this, &ImportComicsInfoDialog::import);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
//connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected())); //connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &ImportComicsInfoDialog::findPath);
auto libraryLayout = new QHBoxLayout; auto libraryLayout = new QHBoxLayout;
@ -40,7 +40,7 @@ ImportComicsInfoDialog::ImportComicsInfoDialog(QWidget *parent)
progressBar->setMaximum(0); progressBar->setMaximum(0);
progressBar->setTextVisible(false); progressBar->setTextVisible(false);
progressBar->hide(); progressBar->hide();
connect(accept, SIGNAL(clicked()), progressBar, SLOT(show())); connect(accept, &QAbstractButton::clicked, progressBar, &QWidget::show);
auto bottomLayout = new QHBoxLayout; auto bottomLayout = new QHBoxLayout;
bottomLayout->addStretch(); bottomLayout->addStretch();
@ -86,7 +86,7 @@ void ImportComicsInfoDialog::import()
importer->source = path->text(); importer->source = path->text();
importer->dest = dest; importer->dest = dest;
connect(importer, SIGNAL(finished()), this, SLOT(close())); connect(importer, SIGNAL(finished()), this, SLOT(close()));
connect(importer, SIGNAL(finished()), this, SLOT(hide())); connect(importer, &QThread::finished, this, &QWidget::hide);
importer->start(); importer->start();
} }

View File

@ -17,7 +17,7 @@ void ImportLibraryDialog::setupUI()
nameLabel = new QLabel(tr("Library Name : ")); nameLabel = new QLabel(tr("Library Name : "));
nameEdit = new QLineEdit; nameEdit = new QLineEdit;
nameLabel->setBuddy(nameEdit); nameLabel->setBuddy(nameEdit);
connect(nameEdit, SIGNAL(textChanged(QString)), this, SLOT(nameEntered())); connect(nameEdit, &QLineEdit::textChanged, this, &ImportLibraryDialog::nameEntered);
textLabel = new QLabel(tr("Package location : ")); textLabel = new QLabel(tr("Package location : "));
path = new QLineEdit; path = new QLineEdit;
@ -29,17 +29,17 @@ void ImportLibraryDialog::setupUI()
accept = new QPushButton(tr("Unpack")); accept = new QPushButton(tr("Unpack"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(add())); connect(accept, &QAbstractButton::clicked, this, &ImportLibraryDialog::add);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));
//connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected())); //connect(cancel,SIGNAL(clicked()),this,SIGNAL(rejected()));
find = new QPushButton(QIcon(":/images/find_folder.png"), ""); find = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(find, SIGNAL(clicked()), this, SLOT(findPath())); connect(find, &QAbstractButton::clicked, this, &ImportLibraryDialog::findPath);
findDest = new QPushButton(QIcon(":/images/find_folder.png"), ""); findDest = new QPushButton(QIcon(":/images/find_folder.png"), "");
connect(findDest, SIGNAL(clicked()), this, SLOT(findDestination())); connect(findDest, &QAbstractButton::clicked, this, &ImportLibraryDialog::findDestination);
auto content = new QGridLayout; auto content = new QGridLayout;

View File

@ -195,7 +195,7 @@ ImportWidget::ImportWidget(QWidget *parent)
" QToolButton:checked {background:url(\":/images/hiddenCovers.png\"); border:none;}"); " QToolButton:checked {background:url(\":/images/hiddenCovers.png\"); border:none;}");
hideButton->setCheckable(true); hideButton->setCheckable(true);
connect(hideButton, SIGNAL(toggled(bool)), this, SLOT(showCovers(bool))); connect(hideButton, &QAbstractButton::toggled, this, &ImportWidget::showCovers);
layout->addWidget(coversLabel, 0, Qt::AlignHCenter); layout->addWidget(coversLabel, 0, Qt::AlignHCenter);
layout->addWidget(coversViewContainer); layout->addWidget(coversViewContainer);
@ -203,7 +203,7 @@ ImportWidget::ImportWidget(QWidget *parent)
layout->addWidget(currentComicLabel, 0, Qt::AlignHCenter); layout->addWidget(currentComicLabel, 0, Qt::AlignHCenter);
layout->setContentsMargins(0, layout->contentsMargins().top(), 0, layout->contentsMargins().bottom()); layout->setContentsMargins(0, layout->contentsMargins().top(), 0, layout->contentsMargins().bottom());
connect(stop, SIGNAL(clicked()), this, SIGNAL(stop())); connect(stop, &QAbstractButton::clicked, this, &ImportWidget::stop);
//connect(stop,SIGNAL(clicked()),this,SLOT(addCoverTest())); //connect(stop,SIGNAL(clicked()),this,SLOT(addCoverTest()));
previousWidth = 0; previousWidth = 0;

View File

@ -309,8 +309,8 @@ void LibraryWindow::doLayout()
importWidget = new ImportWidget(); importWidget = new ImportWidget();
mainWidget->addWidget(importWidget); mainWidget->addWidget(importWidget);
connect(noLibrariesWidget, SIGNAL(createNewLibrary()), this, SLOT(createLibrary())); connect(noLibrariesWidget, &NoLibrariesWidget::createNewLibrary, this, &LibraryWindow::createLibrary);
connect(noLibrariesWidget, SIGNAL(addExistingLibrary()), this, SLOT(showAddLibrary())); connect(noLibrariesWidget, &NoLibrariesWidget::addExistingLibrary, this, &LibraryWindow::showAddLibrary);
//collapsible disabled in macosx (only temporaly) //collapsible disabled in macosx (only temporaly)
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
@ -1059,55 +1059,55 @@ void LibraryWindow::createMenus()
void LibraryWindow::createConnections() void LibraryWindow::createConnections()
{ {
//history navigation //history navigation
connect(backAction, SIGNAL(triggered()), historyController, SLOT(backward())); connect(backAction, &QAction::triggered, historyController, &YACReaderHistoryController::backward);
connect(forwardAction, SIGNAL(triggered()), historyController, SLOT(forward())); connect(forwardAction, &QAction::triggered, historyController, &YACReaderHistoryController::forward);
//-- //--
connect(historyController, SIGNAL(enabledBackward(bool)), backAction, SLOT(setEnabled(bool))); connect(historyController, &YACReaderHistoryController::enabledBackward, backAction, &QAction::setEnabled);
connect(historyController, SIGNAL(enabledForward(bool)), forwardAction, SLOT(setEnabled(bool))); connect(historyController, &YACReaderHistoryController::enabledForward, forwardAction, &QAction::setEnabled);
//connect(foldersView, SIGNAL(clicked(QModelIndex)), historyController, SLOT(updateHistory(QModelIndex))); //connect(foldersView, SIGNAL(clicked(QModelIndex)), historyController, SLOT(updateHistory(QModelIndex)));
//libraryCreator connections //libraryCreator connections
connect(createLibraryDialog, SIGNAL(createLibrary(QString, QString, QString)), this, SLOT(create(QString, QString, QString))); connect(createLibraryDialog, SIGNAL(createLibrary(QString, QString, QString)), this, SLOT(create(QString, QString, QString)));
connect(createLibraryDialog, SIGNAL(libraryExists(QString)), this, SLOT(libraryAlreadyExists(QString))); connect(createLibraryDialog, &CreateLibraryDialog::libraryExists, this, &LibraryWindow::libraryAlreadyExists);
connect(importComicsInfoDialog, SIGNAL(finished(int)), this, SLOT(reloadCurrentLibrary())); connect(importComicsInfoDialog, &QDialog::finished, this, &LibraryWindow::reloadCurrentLibrary);
//connect(libraryCreator,SIGNAL(coverExtracted(QString)),createLibraryDialog,SLOT(showCurrentFile(QString))); //connect(libraryCreator,SIGNAL(coverExtracted(QString)),createLibraryDialog,SLOT(showCurrentFile(QString)));
//connect(libraryCreator,SIGNAL(coverExtracted(QString)),updateLibraryDialog,SLOT(showCurrentFile(QString))); //connect(libraryCreator,SIGNAL(coverExtracted(QString)),updateLibraryDialog,SLOT(showCurrentFile(QString)));
connect(libraryCreator, SIGNAL(finished()), this, SLOT(showRootWidget())); connect(libraryCreator, SIGNAL(finished()), this, SLOT(showRootWidget()));
connect(libraryCreator, SIGNAL(updated()), this, SLOT(reloadCurrentLibrary())); connect(libraryCreator, &LibraryCreator::updated, this, &LibraryWindow::reloadCurrentLibrary);
connect(libraryCreator, SIGNAL(created()), this, SLOT(openLastCreated())); connect(libraryCreator, &LibraryCreator::created, this, &LibraryWindow::openLastCreated);
//connect(libraryCreator,SIGNAL(updatedCurrentFolder()), this, SLOT(showRootWidget())); //connect(libraryCreator,SIGNAL(updatedCurrentFolder()), this, SLOT(showRootWidget()));
connect(libraryCreator, SIGNAL(updatedCurrentFolder(QModelIndex)), this, SLOT(reloadAfterCopyMove(QModelIndex))); connect(libraryCreator, &LibraryCreator::updatedCurrentFolder, this, &LibraryWindow::reloadAfterCopyMove);
connect(libraryCreator, SIGNAL(comicAdded(QString, QString)), importWidget, SLOT(newComic(QString, QString))); connect(libraryCreator, &LibraryCreator::comicAdded, importWidget, &ImportWidget::newComic);
//libraryCreator errors //libraryCreator errors
connect(libraryCreator, SIGNAL(failedCreatingDB(QString)), this, SLOT(manageCreatingError(QString))); connect(libraryCreator, &LibraryCreator::failedCreatingDB, this, &LibraryWindow::manageCreatingError);
connect(libraryCreator, SIGNAL(failedUpdatingDB(QString)), this, SLOT(manageUpdatingError(QString))); //TODO: implement failedUpdatingDB connect(libraryCreator, SIGNAL(failedUpdatingDB(QString)), this, SLOT(manageUpdatingError(QString))); //TODO: implement failedUpdatingDB
//new import widget //new import widget
connect(importWidget, SIGNAL(stop()), this, SLOT(stopLibraryCreator())); connect(importWidget, &ImportWidget::stop, this, &LibraryWindow::stopLibraryCreator);
//packageManager connections //packageManager connections
connect(exportLibraryDialog, SIGNAL(exportPath(QString)), this, SLOT(exportLibrary(QString))); connect(exportLibraryDialog, &ExportLibraryDialog::exportPath, this, &LibraryWindow::exportLibrary);
connect(exportLibraryDialog, SIGNAL(rejected()), packageManager, SLOT(cancel())); connect(exportLibraryDialog, &QDialog::rejected, packageManager, &PackageManager::cancel);
connect(packageManager, SIGNAL(exported()), exportLibraryDialog, SLOT(close())); connect(packageManager, SIGNAL(exported()), exportLibraryDialog, SLOT(close()));
connect(importLibraryDialog, SIGNAL(unpackCLC(QString, QString, QString)), this, SLOT(importLibrary(QString, QString, QString))); connect(importLibraryDialog, &ImportLibraryDialog::unpackCLC, this, &LibraryWindow::importLibrary);
connect(importLibraryDialog, SIGNAL(rejected()), packageManager, SLOT(cancel())); connect(importLibraryDialog, &QDialog::rejected, packageManager, &PackageManager::cancel);
connect(importLibraryDialog, SIGNAL(rejected()), this, SLOT(deleteCurrentLibrary())); connect(importLibraryDialog, &QDialog::rejected, this, &LibraryWindow::deleteCurrentLibrary);
connect(importLibraryDialog, SIGNAL(libraryExists(QString)), this, SLOT(libraryAlreadyExists(QString))); connect(importLibraryDialog, &ImportLibraryDialog::libraryExists, this, &LibraryWindow::libraryAlreadyExists);
connect(packageManager, SIGNAL(imported()), importLibraryDialog, SLOT(hide())); connect(packageManager, &PackageManager::imported, importLibraryDialog, &QWidget::hide);
connect(packageManager, SIGNAL(imported()), this, SLOT(openLastCreated())); connect(packageManager, &PackageManager::imported, this, &LibraryWindow::openLastCreated);
//create and update dialogs //create and update dialogs
connect(createLibraryDialog, SIGNAL(cancelCreate()), this, SLOT(cancelCreating())); connect(createLibraryDialog, &CreateLibraryDialog::cancelCreate, this, &LibraryWindow::cancelCreating);
//open existing library from dialog. //open existing library from dialog.
connect(addLibraryDialog, SIGNAL(addLibrary(QString, QString)), this, SLOT(openLibrary(QString, QString))); connect(addLibraryDialog, &AddLibraryDialog::addLibrary, this, &LibraryWindow::openLibrary);
//load library when selected library changes //load library when selected library changes
connect(selectedLibrary, SIGNAL(currentIndexChanged(QString)), this, SLOT(loadLibrary(QString))); connect(selectedLibrary, &YACReaderLibraryListWidget::currentIndexChanged, this, &LibraryWindow::loadLibrary);
//rename library dialog //rename library dialog
connect(renameLibraryDialog, SIGNAL(renameLibrary(QString)), this, SLOT(rename(QString))); connect(renameLibraryDialog, &RenameLibraryDialog::renameLibrary, this, &LibraryWindow::rename);
//navigations between view modes (tree,list and flow) //navigations between view modes (tree,list and flow)
//TODO connect(foldersView, SIGNAL(pressed(QModelIndex)), this, SLOT(updateFoldersViewConextMenu(QModelIndex))); //TODO connect(foldersView, SIGNAL(pressed(QModelIndex)), this, SLOT(updateFoldersViewConextMenu(QModelIndex)));
@ -1116,79 +1116,83 @@ void LibraryWindow::createConnections()
//drops in folders view //drops in folders view
connect(foldersView, SIGNAL(copyComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)), this, SLOT(copyAndImportComicsToFolder(QList<QPair<QString, QString>>, QModelIndex))); connect(foldersView, SIGNAL(copyComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)), this, SLOT(copyAndImportComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)));
connect(foldersView, SIGNAL(moveComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)), this, SLOT(moveAndImportComicsToFolder(QList<QPair<QString, QString>>, QModelIndex))); connect(foldersView, SIGNAL(moveComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)), this, SLOT(moveAndImportComicsToFolder(QList<QPair<QString, QString>>, QModelIndex)));
connect(foldersView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showFoldersContextMenu(QPoint))); connect(foldersView, &QWidget::customContextMenuRequested, this, &LibraryWindow::showFoldersContextMenu);
//actions //actions
connect(createLibraryAction, SIGNAL(triggered()), this, SLOT(createLibrary())); connect(createLibraryAction, &QAction::triggered, this, &LibraryWindow::createLibrary);
connect(exportLibraryAction, SIGNAL(triggered()), exportLibraryDialog, SLOT(open())); connect(exportLibraryAction, &QAction::triggered, exportLibraryDialog, &QDialog::open);
connect(importLibraryAction, SIGNAL(triggered()), this, SLOT(importLibraryPackage())); connect(importLibraryAction, &QAction::triggered, this, &LibraryWindow::importLibraryPackage);
connect(openLibraryAction, SIGNAL(triggered()), this, SLOT(showAddLibrary())); connect(openLibraryAction, &QAction::triggered, this, &LibraryWindow::showAddLibrary);
connect(setAsReadAction, SIGNAL(triggered()), this, SLOT(setCurrentComicReaded())); connect(setAsReadAction, &QAction::triggered, this, &LibraryWindow::setCurrentComicReaded);
connect(setAsNonReadAction, SIGNAL(triggered()), this, SLOT(setCurrentComicUnreaded())); connect(setAsNonReadAction, &QAction::triggered, this, &LibraryWindow::setCurrentComicUnreaded);
connect(setNormalAction, &QAction::triggered, this, &LibraryWindow::setSelectedComicsAsNormal); connect(setNormalAction, &QAction::triggered, this, &LibraryWindow::setSelectedComicsAsNormal);
connect(setMangaAction, &QAction::triggered, this, &LibraryWindow::setSelectedComicsAsManga); connect(setMangaAction, &QAction::triggered, this, &LibraryWindow::setSelectedComicsAsManga);
//connect(setAllAsReadAction,SIGNAL(triggered()),this,SLOT(setComicsReaded())); //connect(setAllAsReadAction,SIGNAL(triggered()),this,SLOT(setComicsReaded()));
//connect(setAllAsNonReadAction,SIGNAL(triggered()),this,SLOT(setComicsUnreaded())); //connect(setAllAsNonReadAction,SIGNAL(triggered()),this,SLOT(setComicsUnreaded()));
//comicsInfoManagement //comicsInfoManagement
connect(exportComicsInfoAction, SIGNAL(triggered()), this, SLOT(showExportComicsInfo())); connect(exportComicsInfoAction, &QAction::triggered, this, &LibraryWindow::showExportComicsInfo);
connect(importComicsInfoAction, SIGNAL(triggered()), this, SLOT(showImportComicsInfo())); connect(importComicsInfoAction, &QAction::triggered, this, &LibraryWindow::showImportComicsInfo);
//properties & config //properties & config
connect(propertiesDialog, SIGNAL(accepted()), navigationController, SLOT(reselectCurrentSource())); connect(propertiesDialog, &QDialog::accepted, navigationController, &YACReaderNavigationController::reselectCurrentSource);
//comic vine //comic vine
connect(comicVineDialog, SIGNAL(accepted()), navigationController, SLOT(reselectCurrentSource()), Qt::QueuedConnection); connect(comicVineDialog, &QDialog::accepted, navigationController, &YACReaderNavigationController::reselectCurrentSource, Qt::QueuedConnection);
connect(updateLibraryAction, SIGNAL(triggered()), this, SLOT(updateLibrary())); connect(updateLibraryAction, &QAction::triggered, this, &LibraryWindow::updateLibrary);
connect(renameLibraryAction, SIGNAL(triggered()), this, SLOT(renameLibrary())); connect(renameLibraryAction, &QAction::triggered, this, &LibraryWindow::renameLibrary);
//connect(deleteLibraryAction,SIGNAL(triggered()),this,SLOT(deleteLibrary())); //connect(deleteLibraryAction,SIGNAL(triggered()),this,SLOT(deleteLibrary()));
connect(removeLibraryAction, SIGNAL(triggered()), this, SLOT(removeLibrary())); connect(removeLibraryAction, &QAction::triggered, this, &LibraryWindow::removeLibrary);
connect(openComicAction, SIGNAL(triggered()), this, SLOT(openComic())); connect(openComicAction, &QAction::triggered, this, QOverload<>::of(&LibraryWindow::openComic));
connect(helpAboutAction, SIGNAL(triggered()), had, SLOT(show())); connect(helpAboutAction, &QAction::triggered, had, &QWidget::show);
connect(addFolderAction, SIGNAL(triggered()), this, SLOT(addFolderToCurrentIndex())); connect(addFolderAction, &QAction::triggered, this, &LibraryWindow::addFolderToCurrentIndex);
connect(deleteFolderAction, SIGNAL(triggered()), this, SLOT(deleteSelectedFolder())); connect(deleteFolderAction, &QAction::triggered, this, &LibraryWindow::deleteSelectedFolder);
connect(setRootIndexAction, SIGNAL(triggered()), this, SLOT(setRootIndex())); connect(setRootIndexAction, &QAction::triggered, this, &LibraryWindow::setRootIndex);
connect(expandAllNodesAction, SIGNAL(triggered()), foldersView, SLOT(expandAll())); connect(expandAllNodesAction, &QAction::triggered, foldersView, &QTreeView::expandAll);
connect(colapseAllNodesAction, SIGNAL(triggered()), foldersView, SLOT(collapseAll())); connect(colapseAllNodesAction, &QAction::triggered, foldersView, &QTreeView::collapseAll);
#ifndef Q_OS_MAC #ifndef Q_OS_MAC
connect(toggleFullScreenAction, SIGNAL(triggered()), this, SLOT(toggleFullScreen())); connect(toggleFullScreenAction, &QAction::triggered, this, &LibraryWindow::toggleFullScreen);
#endif #endif
connect(toggleComicsViewAction, SIGNAL(triggered()), comicsViewsManager, SLOT(toggleComicsView())); connect(toggleComicsViewAction, &QAction::triggered, comicsViewsManager, &YACReaderComicsViewsManager::toggleComicsView);
connect(optionsAction, SIGNAL(triggered()), optionsDialog, SLOT(show())); connect(optionsAction, &QAction::triggered, optionsDialog, &QWidget::show);
#ifdef SERVER_RELEASE #ifdef SERVER_RELEASE
connect(serverConfigAction, SIGNAL(triggered()), serverConfigDialog, SLOT(show())); connect(serverConfigAction, &QAction::triggered, serverConfigDialog, &QWidget::show);
#endif #endif
connect(optionsDialog, SIGNAL(optionsChanged()), this, SLOT(reloadOptions())); connect(optionsDialog, &YACReaderOptionsDialog::optionsChanged, this, &LibraryWindow::reloadOptions);
connect(optionsDialog, SIGNAL(editShortcuts()), editShortcutsDialog, SLOT(show())); connect(optionsDialog, &YACReaderOptionsDialog::editShortcuts, editShortcutsDialog, &QWidget::show);
//Search filter //Search filter
connect(searchEdit, SIGNAL(filterChanged(YACReader::SearchModifiers, QString)), this, SLOT(setSearchFilter(YACReader::SearchModifiers, QString))); #ifdef Q_OS_MAC
connect(searchEdit, &YACReaderMacOSXSearchLineEdit::filterChanged, this, &LibraryWindow::setSearchFilter);
#else
connect(searchEdit, &YACReaderSearchLineEdit::filterChanged, this, &LibraryWindow::setSearchFilter);
#endif
connect(&comicQueryResultProcessor, &ComicQueryResultProcessor::newData, this, &LibraryWindow::setComicSearchFilterData); connect(&comicQueryResultProcessor, &ComicQueryResultProcessor::newData, this, &LibraryWindow::setComicSearchFilterData);
connect(folderQueryResultProcessor.get(), &FolderQueryResultProcessor::newData, this, &LibraryWindow::setFolderSearchFilterData); connect(folderQueryResultProcessor.get(), &FolderQueryResultProcessor::newData, this, &LibraryWindow::setFolderSearchFilterData);
//ContextMenus //ContextMenus
connect(openContainingFolderComicAction, SIGNAL(triggered()), this, SLOT(openContainingFolderComic())); connect(openContainingFolderComicAction, &QAction::triggered, this, &LibraryWindow::openContainingFolderComic);
connect(setFolderAsNotCompletedAction, SIGNAL(triggered()), this, SLOT(setFolderAsNotCompleted())); connect(setFolderAsNotCompletedAction, &QAction::triggered, this, &LibraryWindow::setFolderAsNotCompleted);
connect(setFolderAsCompletedAction, SIGNAL(triggered()), this, SLOT(setFolderAsCompleted())); connect(setFolderAsCompletedAction, &QAction::triggered, this, &LibraryWindow::setFolderAsCompleted);
connect(setFolderAsReadAction, SIGNAL(triggered()), this, SLOT(setFolderAsRead())); connect(setFolderAsReadAction, &QAction::triggered, this, &LibraryWindow::setFolderAsRead);
connect(setFolderAsUnreadAction, SIGNAL(triggered()), this, SLOT(setFolderAsUnread())); connect(setFolderAsUnreadAction, &QAction::triggered, this, &LibraryWindow::setFolderAsUnread);
connect(openContainingFolderAction, SIGNAL(triggered()), this, SLOT(openContainingFolder())); connect(openContainingFolderAction, &QAction::triggered, this, &LibraryWindow::openContainingFolder);
connect(setFolderAsMangaAction, &QAction::triggered, this, &LibraryWindow::setFolderAsManga); connect(setFolderAsMangaAction, &QAction::triggered, this, &LibraryWindow::setFolderAsManga);
connect(setFolderAsNormalAction, &QAction::triggered, this, &LibraryWindow::setFolderAsNormal); connect(setFolderAsNormalAction, &QAction::triggered, this, &LibraryWindow::setFolderAsNormal);
connect(resetComicRatingAction, SIGNAL(triggered()), this, SLOT(resetComicRating())); connect(resetComicRatingAction, &QAction::triggered, this, &LibraryWindow::resetComicRating);
//connect(dm,SIGNAL(directoryLoaded(QString)),foldersView,SLOT(expandAll())); //connect(dm,SIGNAL(directoryLoaded(QString)),foldersView,SLOT(expandAll()));
//connect(dm,SIGNAL(directoryLoaded(QString)),this,SLOT(updateFoldersView(QString))); //connect(dm,SIGNAL(directoryLoaded(QString)),this,SLOT(updateFoldersView(QString)));
//Comicts edition //Comicts edition
connect(editSelectedComicsAction, SIGNAL(triggered()), this, SLOT(showProperties())); connect(editSelectedComicsAction, &QAction::triggered, this, &LibraryWindow::showProperties);
connect(asignOrderAction, SIGNAL(triggered()), this, SLOT(asignNumbers())); connect(asignOrderAction, &QAction::triggered, this, &LibraryWindow::asignNumbers);
connect(deleteComicsAction, SIGNAL(triggered()), this, SLOT(deleteComics())); connect(deleteComicsAction, &QAction::triggered, this, &LibraryWindow::deleteComics);
connect(getInfoAction, SIGNAL(triggered()), this, SLOT(showComicVineScraper())); connect(getInfoAction, &QAction::triggered, this, &LibraryWindow::showComicVineScraper);
//connect(socialAction,SIGNAL(triggered()),this,SLOT(showSocial())); //connect(socialAction,SIGNAL(triggered()),this,SLOT(showSocial()));
@ -1199,33 +1203,33 @@ void LibraryWindow::createConnections()
connect(focusSearchLineAction, &QAction::triggered, searchEdit, [this] { searchEdit->setFocus(Qt::ShortcutFocusReason); }); connect(focusSearchLineAction, &QAction::triggered, searchEdit, [this] { searchEdit->setFocus(Qt::ShortcutFocusReason); });
connect(focusComicsViewAction, &QAction::triggered, comicsViewsManager, &YACReaderComicsViewsManager::focusComicsViewViaShortcut); connect(focusComicsViewAction, &QAction::triggered, comicsViewsManager, &YACReaderComicsViewsManager::focusComicsViewViaShortcut);
connect(showEditShortcutsAction, SIGNAL(triggered()), editShortcutsDialog, SLOT(show())); connect(showEditShortcutsAction, &QAction::triggered, editShortcutsDialog, &QWidget::show);
connect(quitAction, &QAction::triggered, this, &LibraryWindow::closeApp); connect(quitAction, &QAction::triggered, this, &LibraryWindow::closeApp);
//update folders (partial updates) //update folders (partial updates)
connect(updateCurrentFolderAction, SIGNAL(triggered()), this, SLOT(updateCurrentFolder())); connect(updateCurrentFolderAction, &QAction::triggered, this, &LibraryWindow::updateCurrentFolder);
connect(updateFolderAction, SIGNAL(triggered()), this, SLOT(updateCurrentFolder())); connect(updateFolderAction, &QAction::triggered, this, &LibraryWindow::updateCurrentFolder);
//lists //lists
connect(addReadingListAction, SIGNAL(triggered()), this, SLOT(addNewReadingList())); connect(addReadingListAction, &QAction::triggered, this, &LibraryWindow::addNewReadingList);
connect(deleteReadingListAction, SIGNAL(triggered()), this, SLOT(deleteSelectedReadingList())); connect(deleteReadingListAction, &QAction::triggered, this, &LibraryWindow::deleteSelectedReadingList);
connect(addLabelAction, SIGNAL(triggered()), this, SLOT(showAddNewLabelDialog())); connect(addLabelAction, &QAction::triggered, this, &LibraryWindow::showAddNewLabelDialog);
connect(renameListAction, SIGNAL(triggered()), this, SLOT(showRenameCurrentList())); connect(renameListAction, &QAction::triggered, this, &LibraryWindow::showRenameCurrentList);
connect(listsModel, SIGNAL(addComicsToFavorites(QList<qulonglong>)), comicsModel, SLOT(addComicsToFavorites(QList<qulonglong>))); connect(listsModel, SIGNAL(addComicsToFavorites(QList<qulonglong>)), comicsModel, SLOT(addComicsToFavorites(QList<qulonglong>)));
connect(listsModel, SIGNAL(addComicsToLabel(QList<qulonglong>, qulonglong)), comicsModel, SLOT(addComicsToLabel(QList<qulonglong>, qulonglong))); connect(listsModel, SIGNAL(addComicsToLabel(QList<qulonglong>, qulonglong)), comicsModel, SLOT(addComicsToLabel(QList<qulonglong>, qulonglong)));
connect(listsModel, SIGNAL(addComicsToReadingList(QList<qulonglong>, qulonglong)), comicsModel, SLOT(addComicsToReadingList(QList<qulonglong>, qulonglong))); connect(listsModel, SIGNAL(addComicsToReadingList(QList<qulonglong>, qulonglong)), comicsModel, SLOT(addComicsToReadingList(QList<qulonglong>, qulonglong)));
//-- //--
connect(addToFavoritesAction, SIGNAL(triggered()), this, SLOT(addSelectedComicsToFavorites())); connect(addToFavoritesAction, &QAction::triggered, this, &LibraryWindow::addSelectedComicsToFavorites);
//save covers //save covers
connect(saveCoversToAction, SIGNAL(triggered()), this, SLOT(saveSelectedCoversTo())); connect(saveCoversToAction, &QAction::triggered, this, &LibraryWindow::saveSelectedCoversTo);
//upgrade library //upgrade library
connect(this, SIGNAL(libraryUpgraded(QString)), this, SLOT(loadLibrary(QString)), Qt::QueuedConnection); connect(this, &LibraryWindow::libraryUpgraded, this, &LibraryWindow::loadLibrary, Qt::QueuedConnection);
connect(this, SIGNAL(errorUpgradingLibrary(QString)), this, SLOT(showErrorUpgradingLibrary(QString)), Qt::QueuedConnection); connect(this, &LibraryWindow::errorUpgradingLibrary, this, &LibraryWindow::showErrorUpgradingLibrary, Qt::QueuedConnection);
} }
void LibraryWindow::showErrorUpgradingLibrary(const QString &path) void LibraryWindow::showErrorUpgradingLibrary(const QString &path)
@ -1453,7 +1457,7 @@ void LibraryWindow::moveAndImportComicsToFolder(const QList<QPair<QString, QStri
void LibraryWindow::processComicFiles(ComicFilesManager *comicFilesManager, QProgressDialog *progressDialog) void LibraryWindow::processComicFiles(ComicFilesManager *comicFilesManager, QProgressDialog *progressDialog)
{ {
connect(comicFilesManager, SIGNAL(progress(int)), progressDialog, SLOT(setValue(int))); connect(comicFilesManager, &ComicFilesManager::progress, progressDialog, &QProgressDialog::setValue);
QThread *thread = NULL; QThread *thread = NULL;
@ -1461,15 +1465,15 @@ void LibraryWindow::processComicFiles(ComicFilesManager *comicFilesManager, QPro
comicFilesManager->moveToThread(thread); comicFilesManager->moveToThread(thread);
connect(progressDialog, SIGNAL(canceled()), comicFilesManager, SLOT(cancel()), Qt::DirectConnection); connect(progressDialog, &QProgressDialog::canceled, comicFilesManager, &ComicFilesManager::cancel, Qt::DirectConnection);
connect(thread, SIGNAL(started()), comicFilesManager, SLOT(process())); connect(thread, &QThread::started, comicFilesManager, &ComicFilesManager::process);
connect(comicFilesManager, SIGNAL(success(QModelIndex)), this, SLOT(updateCopyMoveFolderDestination(QModelIndex))); connect(comicFilesManager, &ComicFilesManager::success, this, &LibraryWindow::updateCopyMoveFolderDestination);
connect(comicFilesManager, SIGNAL(finished()), thread, SLOT(quit())); connect(comicFilesManager, &ComicFilesManager::finished, thread, &QThread::quit);
connect(comicFilesManager, SIGNAL(finished()), comicFilesManager, SLOT(deleteLater())); connect(comicFilesManager, &ComicFilesManager::finished, comicFilesManager, &QObject::deleteLater);
connect(comicFilesManager, SIGNAL(finished()), progressDialog, SLOT(close())); connect(comicFilesManager, &ComicFilesManager::finished, progressDialog, &QWidget::close);
connect(comicFilesManager, SIGNAL(finished()), progressDialog, SLOT(deleteLater())); connect(comicFilesManager, &ComicFilesManager::finished, progressDialog, &QObject::deleteLater);
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, &QThread::finished, thread, &QObject::deleteLater);
if (thread != NULL) if (thread != NULL)
thread->start(); thread->start();
@ -1593,9 +1597,9 @@ void LibraryWindow::deleteSelectedFolder()
const auto thread = new QThread(this); const auto thread = new QThread(this);
moveAndConnectRemoverToThread(remover, thread); moveAndConnectRemoverToThread(remover, thread);
connect(remover, SIGNAL(remove(QModelIndex)), foldersModel, SLOT(deleteFolder(QModelIndex))); connect(remover, &FoldersRemover::remove, foldersModel, &FolderModel::deleteFolder);
connect(remover, SIGNAL(removeError()), this, SLOT(errorDeletingFolder())); connect(remover, &FoldersRemover::removeError, this, &LibraryWindow::errorDeletingFolder);
connect(remover, SIGNAL(finished()), navigationController, SLOT(reselectCurrentFolder())); connect(remover, &FoldersRemover::finished, navigationController, &YACReaderNavigationController::reselectCurrentFolder);
thread->start(); thread->start();
} }
@ -1768,7 +1772,7 @@ void LibraryWindow::setupAddToSubmenu(QMenu &menu)
menu.addAction(action); menu.addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(onAddComicsToLabel())); connect(action, &QAction::triggered, this, &LibraryWindow::onAddComicsToLabel);
} }
} }
@ -1940,7 +1944,7 @@ void LibraryWindow::openLastCreated()
selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded)); selectedLibrary->setCurrentIndex(selectedLibrary->findText(_lastAdded));
libraries.save(); libraries.save();
connect(selectedLibrary, SIGNAL(currentIndexChanged(QString)), this, SLOT(loadLibrary(QString))); connect(selectedLibrary, &YACReaderLibraryListWidget::currentIndexChanged, this, &LibraryWindow::loadLibrary);
loadLibrary(_lastAdded); loadLibrary(_lastAdded);
} }
@ -2573,13 +2577,13 @@ void LibraryWindow::deleteComicsFromDisk()
comicsModel->startTransaction(); comicsModel->startTransaction();
connect(remover, SIGNAL(remove(int)), comicsModel, SLOT(remove(int))); connect(remover, &ComicsRemover::remove, comicsModel, &ComicModel::remove);
connect(remover, SIGNAL(removeError()), this, SLOT(setRemoveError())); connect(remover, &ComicsRemover::removeError, this, &LibraryWindow::setRemoveError);
connect(remover, SIGNAL(finished()), comicsModel, SLOT(finishTransaction())); connect(remover, &ComicsRemover::finished, comicsModel, &ComicModel::finishTransaction);
connect(remover, SIGNAL(removedItemsFromFolder(qulonglong)), foldersModel, SLOT(updateFolderChildrenInfo(qulonglong))); connect(remover, &ComicsRemover::removedItemsFromFolder, foldersModel, &FolderModel::updateFolderChildrenInfo);
connect(remover, SIGNAL(finished()), this, SLOT(checkEmptyFolder())); connect(remover, &ComicsRemover::finished, this, &LibraryWindow::checkEmptyFolder);
connect(remover, SIGNAL(finished()), this, SLOT(checkRemoveError())); connect(remover, &ComicsRemover::finished, this, &LibraryWindow::checkRemoveError);
thread->start(); thread->start();
} }

View File

@ -245,7 +245,7 @@ int main(int argc, char **argv)
auto mw = new LibraryWindow(); auto mw = new LibraryWindow();
mw->connect(localServer, SIGNAL(comicUpdated(quint64, const ComicDB &)), mw, SLOT(updateComicsView(quint64, const ComicDB &)), Qt::QueuedConnection); mw->connect(localServer, &YACReaderLocalServer::comicUpdated, mw, &LibraryWindow::updateComicsView, Qt::QueuedConnection);
//connections to localServer //connections to localServer

View File

@ -73,6 +73,6 @@ NoLibrariesWidget::NoLibrariesWidget(QWidget *parent)
layout->addSpacing(150); layout->addSpacing(150);
layout->addStretch(); layout->addStretch();
connect(createButton, SIGNAL(clicked()), this, SIGNAL(createNewLibrary())); connect(createButton, &QAbstractButton::clicked, this, &NoLibrariesWidget::createNewLibrary);
connect(addButton, SIGNAL(clicked()), this, SIGNAL(addExistingLibrary())); connect(addButton, &QAbstractButton::clicked, this, &NoLibrariesWidget::addExistingLibrary);
} }

View File

@ -72,7 +72,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
auto apiKeyBox = new QGroupBox(tr("Comic Vine API key")); auto apiKeyBox = new QGroupBox(tr("Comic Vine API key"));
apiKeyBox->setLayout(apiKeyLayout); apiKeyBox->setLayout(apiKeyLayout);
connect(apiKeyButton, SIGNAL(clicked()), this, SLOT(editApiKey())); connect(apiKeyButton, &QAbstractButton::clicked, this, &OptionsDialog::editApiKey);
//grid view background config //grid view background config
useBackgroundImageCheck = new QCheckBox(tr("Enable background image")); useBackgroundImageCheck = new QCheckBox(tr("Enable background image"));
@ -115,9 +115,9 @@ OptionsDialog::OptionsDialog(QWidget *parent)
gridViewLayout->addWidget(continueReadingGroup); gridViewLayout->addWidget(continueReadingGroup);
gridViewLayout->addStretch(); gridViewLayout->addStretch();
connect(useBackgroundImageCheck, SIGNAL(clicked(bool)), this, SLOT(useBackgroundImageCheckClicked(bool))); connect(useBackgroundImageCheck, &QAbstractButton::clicked, this, &OptionsDialog::useBackgroundImageCheckClicked);
connect(backgroundImageOpacitySlider, SIGNAL(valueChanged(int)), this, SLOT(backgroundImageOpacitySliderChanged(int))); connect(backgroundImageOpacitySlider, &QAbstractSlider::valueChanged, this, &OptionsDialog::backgroundImageOpacitySliderChanged);
connect(backgroundImageBlurRadiusSlider, SIGNAL(valueChanged(int)), this, SLOT(backgroundImageBlurRadiusSliderChanged(int))); connect(backgroundImageBlurRadiusSlider, &QAbstractSlider::valueChanged, this, &OptionsDialog::backgroundImageBlurRadiusSliderChanged);
connect(useCurrentComicCoverCheck, &QCheckBox::clicked, this, &OptionsDialog::useCurrentComicCoverCheckClicked); connect(useCurrentComicCoverCheck, &QCheckBox::clicked, this, &OptionsDialog::useCurrentComicCoverCheckClicked);
connect(resetButton, &QPushButton::clicked, this, &OptionsDialog::resetToDefaults); connect(resetButton, &QPushButton::clicked, this, &OptionsDialog::resetToDefaults);
//end grid view background config //end grid view background config

View File

@ -120,8 +120,8 @@ void PropertiesDialog::createCoverBox()
//busyIndicator->move((280-busyIndicator->width())/2,(444-busyIndicator->height()-28)/2); //busyIndicator->move((280-busyIndicator->width())/2,(444-busyIndicator->height()-28)/2);
//busyIndicator->hide(); //busyIndicator->hide();
connect(showPreviousCoverPageButton, SIGNAL(clicked()), this, SLOT(loadPreviousCover())); connect(showPreviousCoverPageButton, &QAbstractButton::clicked, this, &PropertiesDialog::loadPreviousCover);
connect(showNextCoverPageButton, SIGNAL(clicked()), this, SLOT(loadNextCover())); connect(showNextCoverPageButton, &QAbstractButton::clicked, this, &PropertiesDialog::loadNextCover);
} }
QFrame *createLine() QFrame *createLine()
@ -299,8 +299,8 @@ void PropertiesDialog::createButtonBox()
//rotateWidgetsButton = buttonBox->addButton(tr("Rotate &Widgets"),QDialogButtonBox::ActionRole); //rotateWidgetsButton = buttonBox->addButton(tr("Rotate &Widgets"),QDialogButtonBox::ActionRole);
//connect(rotateWidgetsButton, SIGNAL(clicked()), this, SLOT(rotateWidgets())); //connect(rotateWidgetsButton, SIGNAL(clicked()), this, SLOT(rotateWidgets()));
connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); connect(closeButton, &QAbstractButton::clicked, this, &QWidget::close);
connect(saveButton, SIGNAL(clicked()), this, SLOT(save())); connect(saveButton, &QAbstractButton::clicked, this, &PropertiesDialog::save);
} }
QImage blurred(const QImage &image, const QRect &rect, int radius, bool alphaOnly = false) QImage blurred(const QImage &image, const QRect &rect, int radius, bool alphaOnly = false)

View File

@ -15,11 +15,11 @@ void RenameLibraryDialog::setupUI()
newNameLabel = new QLabel(tr("New Library Name : ")); newNameLabel = new QLabel(tr("New Library Name : "));
newNameEdit = new QLineEdit; newNameEdit = new QLineEdit;
newNameLabel->setBuddy(newNameEdit); newNameLabel->setBuddy(newNameEdit);
connect(newNameEdit, SIGNAL(textChanged(QString)), this, SLOT(nameSetted(QString))); connect(newNameEdit, &QLineEdit::textChanged, this, &RenameLibraryDialog::nameSetted);
accept = new QPushButton(tr("Rename")); accept = new QPushButton(tr("Rename"));
accept->setDisabled(true); accept->setDisabled(true);
connect(accept, SIGNAL(clicked()), this, SLOT(rename())); connect(accept, &QAbstractButton::clicked, this, &RenameLibraryDialog::rename);
cancel = new QPushButton(tr("Cancel")); cancel = new QPushButton(tr("Cancel"));
connect(cancel, SIGNAL(clicked()), this, SLOT(close())); connect(cancel, SIGNAL(clicked()), this, SLOT(close()));

View File

@ -63,9 +63,9 @@ void ComicController::service(HttpRequest &request, HttpResponse &response)
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, SIGNAL(imagesLoaded()), thread, SLOT(quit())); connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process())); connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path); comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -68,9 +68,9 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, SIGNAL(imagesLoaded()), thread, SLOT(quit())); connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process())); connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path); comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -55,9 +55,9 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening()), thread, SLOT(quit()));
connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit())); connect(comicFile, SIGNAL(errorOpening(QString)), thread, SLOT(quit()));
connect(comicFile, SIGNAL(imagesLoaded()), thread, SLOT(quit())); connect(comicFile, &Comic::imagesLoaded, thread, &QThread::quit);
connect(thread, SIGNAL(started()), comicFile, SLOT(process())); connect(thread, SIGNAL(started()), comicFile, SLOT(process()));
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater())); connect(thread, &QThread::finished, thread, &QObject::deleteLater);
comicFile->load(libraries.getPath(libraryId) + comic.path); comicFile->load(libraries.getPath(libraryId) + comic.path);

View File

@ -139,7 +139,7 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent)
portWidget->setLayout(portWidgetLayout); portWidget->setLayout(portWidgetLayout);
portWidget->move(332, 244); portWidget->move(332, 244);
//accept->move(514,149); //accept->move(514,149);
connect(accept, SIGNAL(pressed()), this, SLOT(updatePort())); connect(accept, &QAbstractButton::pressed, this, &ServerConfigDialog::updatePort);
//END FORM----------------------------------------------------------------- //END FORM-----------------------------------------------------------------
check = new QCheckBox(this); check = new QCheckBox(this);
@ -174,8 +174,8 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent)
settings->endGroup(); settings->endGroup();
connect(check, SIGNAL(stateChanged(int)), this, SLOT(enableServer(int))); connect(check, &QCheckBox::stateChanged, this, &ServerConfigDialog::enableServer);
connect(performanceWorkaroundCheck, SIGNAL(stateChanged(int)), this, SLOT(enableperformanceWorkaround(int))); connect(performanceWorkaroundCheck, &QCheckBox::stateChanged, this, &ServerConfigDialog::enableperformanceWorkaround);
} }
void ServerConfigDialog::enableServer(int status) void ServerConfigDialog::enableServer(int status)

View File

@ -31,7 +31,7 @@ YACReaderComicsViewsManager::YACReaderComicsViewsManager(QSettings *settings, Li
case Grid: case Grid:
comicsView = gridComicsView = new GridComicsView(); comicsView = gridComicsView = new GridComicsView();
connect(libraryWindow->optionsDialog, SIGNAL(optionsChanged()), gridComicsView, SLOT(updateBackgroundConfig())); connect(libraryWindow->optionsDialog, &YACReaderOptionsDialog::optionsChanged, gridComicsView, &GridComicsView::updateBackgroundConfig);
comicsViewStatus = Grid; comicsViewStatus = Grid;
break; break;
@ -114,8 +114,8 @@ void YACReaderComicsViewsManager::showNoSearchResultsView()
void YACReaderComicsViewsManager::toggleComicsView() void YACReaderComicsViewsManager::toggleComicsView()
{ {
if (comicsViewStack->currentWidget() == comicsView) { if (comicsViewStack->currentWidget() == comicsView) {
QTimer::singleShot(0, this, SLOT(showComicsViewTransition())); QTimer::singleShot(0, this, &YACReaderComicsViewsManager::showComicsViewTransition);
QTimer::singleShot(100, this, SLOT(_toggleComicsView())); QTimer::singleShot(100, this, &YACReaderComicsViewsManager::_toggleComicsView);
} else { } else {
_toggleComicsView(); _toggleComicsView();
} }
@ -130,28 +130,28 @@ void YACReaderComicsViewsManager::focusComicsViewViaShortcut()
void YACReaderComicsViewsManager::disconnectComicsViewConnections(ComicsView *widget) void YACReaderComicsViewsManager::disconnectComicsViewConnections(ComicsView *widget)
{ {
disconnect(widget, SIGNAL(comicRated(int, QModelIndex)), libraryWindow->comicsModel, SLOT(updateRating(int, QModelIndex))); disconnect(widget, &ComicsView::comicRated, libraryWindow->comicsModel, &ComicModel::updateRating);
disconnect(libraryWindow->showHideMarksAction, SIGNAL(toggled(bool)), widget, SLOT(setShowMarks(bool))); disconnect(libraryWindow->showHideMarksAction, &QAction::toggled, widget, &ComicsView::setShowMarks);
disconnect(widget, SIGNAL(selected(unsigned int)), libraryWindow, SLOT(openComic())); disconnect(widget, &ComicsView::selected, libraryWindow, QOverload<>::of(&LibraryWindow::openComic));
disconnect(widget, SIGNAL(openComic(ComicDB)), libraryWindow, SLOT(openComic(ComicDB))); disconnect(widget, &ComicsView::openComic, libraryWindow, QOverload<const ComicDB &, const ComicModel::Mode>::of(&LibraryWindow::openComic));
disconnect(libraryWindow->selectAllComicsAction, SIGNAL(triggered()), widget, SLOT(selectAll())); disconnect(libraryWindow->selectAllComicsAction, &QAction::triggered, widget, &ComicsView::selectAll);
disconnect(comicsView, SIGNAL(copyComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(copyAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>))); disconnect(comicsView, SIGNAL(copyComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(copyAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>)));
disconnect(comicsView, SIGNAL(moveComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(moveAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>))); disconnect(comicsView, SIGNAL(moveComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(moveAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>)));
disconnect(comicsView, SIGNAL(customContextMenuViewRequested(QPoint)), libraryWindow, SLOT(showComicsViewContextMenu(QPoint))); disconnect(comicsView, &ComicsView::customContextMenuViewRequested, libraryWindow, &LibraryWindow::showComicsViewContextMenu);
disconnect(comicsView, SIGNAL(customContextMenuItemRequested(QPoint)), libraryWindow, SLOT(showComicsItemContextMenu(QPoint))); disconnect(comicsView, &ComicsView::customContextMenuItemRequested, libraryWindow, &LibraryWindow::showComicsItemContextMenu);
} }
void YACReaderComicsViewsManager::doComicsViewConnections() void YACReaderComicsViewsManager::doComicsViewConnections()
{ {
connect(comicsView, SIGNAL(comicRated(int, QModelIndex)), libraryWindow->comicsModel, SLOT(updateRating(int, QModelIndex))); connect(comicsView, &ComicsView::comicRated, libraryWindow->comicsModel, &ComicModel::updateRating);
connect(libraryWindow->showHideMarksAction, SIGNAL(toggled(bool)), comicsView, SLOT(setShowMarks(bool))); connect(libraryWindow->showHideMarksAction, &QAction::toggled, comicsView, &ComicsView::setShowMarks);
connect(comicsView, SIGNAL(selected(unsigned int)), libraryWindow, SLOT(openComic())); connect(comicsView, &ComicsView::selected, libraryWindow, QOverload<>::of(&LibraryWindow::openComic));
connect(comicsView, SIGNAL(openComic(const ComicDB &, const ComicModel::Mode)), libraryWindow, SLOT(openComic(const ComicDB &, const ComicModel::Mode))); connect(comicsView, &ComicsView::openComic, libraryWindow, QOverload<const ComicDB &, const ComicModel::Mode>::of(&LibraryWindow::openComic));
connect(libraryWindow->selectAllComicsAction, SIGNAL(triggered()), comicsView, SLOT(selectAll())); connect(libraryWindow->selectAllComicsAction, &QAction::triggered, comicsView, &ComicsView::selectAll);
connect(comicsView, SIGNAL(customContextMenuViewRequested(QPoint)), libraryWindow, SLOT(showComicsViewContextMenu(QPoint))); connect(comicsView, &ComicsView::customContextMenuViewRequested, libraryWindow, &LibraryWindow::showComicsViewContextMenu);
connect(comicsView, SIGNAL(customContextMenuItemRequested(QPoint)), libraryWindow, SLOT(showComicsItemContextMenu(QPoint))); connect(comicsView, &ComicsView::customContextMenuItemRequested, libraryWindow, &LibraryWindow::showComicsItemContextMenu);
//Drops //Drops
connect(comicsView, SIGNAL(copyComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(copyAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>))); connect(comicsView, SIGNAL(copyComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(copyAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>)));
connect(comicsView, SIGNAL(moveComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(moveAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>))); connect(comicsView, SIGNAL(moveComicsToCurrentFolder(QList<QPair<QString, QString>>)), libraryWindow, SLOT(moveAndImportComicsToCurrentFolder(QList<QPair<QString, QString>>)));
@ -200,7 +200,7 @@ void YACReaderComicsViewsManager::_toggleComicsView()
gridComicsView = new GridComicsView(); gridComicsView = new GridComicsView();
switchToComicsView(classicComicsView, gridComicsView); switchToComicsView(classicComicsView, gridComicsView);
connect(libraryWindow->optionsDialog, SIGNAL(optionsChanged()), gridComicsView, SLOT(updateBackgroundConfig())); connect(libraryWindow->optionsDialog, &YACReaderOptionsDialog::optionsChanged, gridComicsView, &GridComicsView::updateBackgroundConfig);
comicsViewStatus = Grid; comicsViewStatus = Grid;
break; break;

View File

@ -24,7 +24,7 @@ YACReaderLocalServer::YACReaderLocalServer(QObject *parent)
QLOG_ERROR() << "Unable to create local server"; QLOG_ERROR() << "Unable to create local server";
} }
connect(localServer, SIGNAL(newConnection()), this, SLOT(sendResponse())); connect(localServer, &QLocalServer::newConnection, this, &YACReaderLocalServer::sendResponse);
} }
bool YACReaderLocalServer::isListening() bool YACReaderLocalServer::isListening()
@ -47,8 +47,8 @@ void YACReaderLocalServer::sendResponse()
auto worker = new YACReaderClientConnectionWorker(clientConnection); auto worker = new YACReaderClientConnectionWorker(clientConnection);
if (worker != 0) { if (worker != 0) {
clientConnection->moveToThread(worker); clientConnection->moveToThread(worker);
connect(worker, SIGNAL(comicUpdated(quint64, ComicDB)), this, SIGNAL(comicUpdated(quint64, ComicDB))); connect(worker, &YACReaderClientConnectionWorker::comicUpdated, this, &YACReaderLocalServer::comicUpdated);
connect(worker, SIGNAL(finished()), worker, SLOT(deleteLater())); connect(worker, &QThread::finished, worker, &QObject::deleteLater);
worker->start(); worker->start();
} }

View File

@ -269,11 +269,11 @@ void YACReaderNavigationController::loadPreviousStatus()
void YACReaderNavigationController::setupConnections() void YACReaderNavigationController::setupConnections()
{ {
connect(libraryWindow->foldersView, SIGNAL(clicked(QModelIndex)), this, SLOT(selectedFolder(QModelIndex))); connect(libraryWindow->foldersView, &QAbstractItemView::clicked, this, &YACReaderNavigationController::selectedFolder);
connect(libraryWindow->listsView, SIGNAL(clicked(QModelIndex)), this, SLOT(selectedList(QModelIndex))); connect(libraryWindow->listsView, &QAbstractItemView::clicked, this, &YACReaderNavigationController::selectedList);
connect(libraryWindow->historyController, SIGNAL(modelIndexSelected(YACReaderLibrarySourceContainer)), this, SLOT(selectedIndexFromHistory(YACReaderLibrarySourceContainer))); connect(libraryWindow->historyController, &YACReaderHistoryController::modelIndexSelected, this, &YACReaderNavigationController::selectedIndexFromHistory);
connect(comicsViewsManager->emptyFolderWidget, SIGNAL(subfolderSelected(QModelIndex, int)), this, SLOT(selectSubfolder(QModelIndex, int))); connect(comicsViewsManager->emptyFolderWidget, &EmptyFolderWidget::subfolderSelected, this, &YACReaderNavigationController::selectSubfolder);
connect(libraryWindow->comicsModel, SIGNAL(isEmpty()), this, SLOT(reselectCurrentSource())); connect(libraryWindow->comicsModel, &ComicModel::isEmpty, this, &YACReaderNavigationController::reselectCurrentSource);
} }
qulonglong YACReaderNavigationController::folderModelIndexToID(const QModelIndex &mi) qulonglong YACReaderNavigationController::folderModelIndexToID(const QModelIndex &mi)