diff --git a/YACReaderLibrary/add_library_dialog.cpp b/YACReaderLibrary/add_library_dialog.cpp index 13e10694..80c2e8a1 100644 --- a/YACReaderLibrary/add_library_dialog.cpp +++ b/YACReaderLibrary/add_library_dialog.cpp @@ -68,8 +68,7 @@ void AddLibraryDialog::setupUI() void AddLibraryDialog::add() { - // accept->setEnabled(false); - emit(addLibrary(QDir::cleanPath(path->text()), nameEdit->text())); + emit addLibrary(QDir::cleanPath(path->text()), nameEdit->text()); } void AddLibraryDialog::nameSetted(const QString &text) diff --git a/YACReaderLibrary/comic_flow.cpp b/YACReaderLibrary/comic_flow.cpp index 931aae93..2cc4dbd2 100644 --- a/YACReaderLibrary/comic_flow.cpp +++ b/YACReaderLibrary/comic_flow.cpp @@ -36,7 +36,7 @@ void ComicFlow::setImagePaths(const QStringList &paths) addSlide(img); s = imageFiles.at(i); s.remove(s.size() - 4, 4); - if (QFileInfo(s + ".r").exists()) + if (QFileInfo::exists(s + ".r")) markSlide(i); } diff --git a/YACReaderLibrary/comic_vine/search_volume.h b/YACReaderLibrary/comic_vine/search_volume.h index 49cc0f38..6a9f1ee7 100644 --- a/YACReaderLibrary/comic_vine/search_volume.h +++ b/YACReaderLibrary/comic_vine/search_volume.h @@ -12,7 +12,6 @@ public: SearchVolume(QWidget *parent = nullptr); void clean(); void setVolumeInfo(const QString &volume); -public slots: QString getVolumeInfo() const; private: diff --git a/YACReaderLibrary/comic_vine/select_volume.cpp b/YACReaderLibrary/comic_vine/select_volume.cpp index d62e38eb..3a745ba8 100644 --- a/YACReaderLibrary/comic_vine/select_volume.cpp +++ b/YACReaderLibrary/comic_vine/select_volume.cpp @@ -59,7 +59,7 @@ SelectVolume::SelectVolume(QWidget *parent) connect(filterEdit, &QLineEdit::textChanged, proxyModel, &QSortFilterProxyModel::setFilterFixedString); - connect(tableVolumes->horizontalHeader(), &QHeaderView::sectionClicked, + connect(tableVolumes->horizontalHeader(), &QHeaderView::sectionClicked, this, [=](int index) { tableVolumes->horizontalHeader()->sortIndicatorSection() == index ? tableVolumes->sortByColumn(index, tableVolumes->horizontalHeader()->sortIndicatorOrder() == Qt::AscendingOrder ? Qt::DescendingOrder : Qt::AscendingOrder) : tableVolumes->sortByColumn(index, Qt::AscendingOrder); }); // connections diff --git a/YACReaderLibrary/comics_view.cpp b/YACReaderLibrary/comics_view.cpp index 4d9525d1..64ab0cf4 100644 --- a/YACReaderLibrary/comics_view.cpp +++ b/YACReaderLibrary/comics_view.cpp @@ -24,7 +24,7 @@ ComicsView::ComicsView(QWidget *parent) view->setResizeMode(QQuickWidget::SizeRootObjectToView); connect( - view, &QQuickWidget::statusChanged, + view, &QQuickWidget::statusChanged, this, [=](QQuickWidget::Status status) { if (status == QQuickWidget::Error) { QLOG_ERROR() << view->errors(); diff --git a/YACReaderLibrary/create_library_dialog.cpp b/YACReaderLibrary/create_library_dialog.cpp index 2c49d272..397ae636 100644 --- a/YACReaderLibrary/create_library_dialog.cpp +++ b/YACReaderLibrary/create_library_dialog.cpp @@ -87,10 +87,10 @@ void CreateLibraryDialog::create() QFileInfo f(path->text()); if (f.exists() && f.isDir() && f.isWritable()) { if (!libraries.contains(nameEdit->text())) { - emit(createLibrary(QDir::cleanPath(path->text()), QDir::cleanPath(path->text()) + "/.yacreaderlibrary", nameEdit->text())); + emit createLibrary(QDir::cleanPath(path->text()), QDir::cleanPath(path->text()) + "/.yacreaderlibrary", nameEdit->text()); close(); } else - emit(libraryExists(nameEdit->text())); + emit libraryExists(nameEdit->text()); } else QMessageBox::critical(NULL, tr("Path not found"), tr("The selected path does not exist or is not a valid path. Be sure that you have write access to this folder")); } diff --git a/YACReaderLibrary/folder_content_view.cpp b/YACReaderLibrary/folder_content_view.cpp index 33ca36c4..db8eb460 100644 --- a/YACReaderLibrary/folder_content_view.cpp +++ b/YACReaderLibrary/folder_content_view.cpp @@ -30,7 +30,7 @@ FolderContentView::FolderContentView(QWidget *parent) view->setResizeMode(QQuickWidget::SizeRootObjectToView); connect( - view, &QQuickWidget::statusChanged, + view, &QQuickWidget::statusChanged, this, [=](QQuickWidget::Status status) { if (status == QQuickWidget::Error) { QLOG_ERROR() << view->errors(); diff --git a/YACReaderLibrary/import_comics_info_dialog.cpp b/YACReaderLibrary/import_comics_info_dialog.cpp index de635e52..2ed5fd56 100644 --- a/YACReaderLibrary/import_comics_info_dialog.cpp +++ b/YACReaderLibrary/import_comics_info_dialog.cpp @@ -96,7 +96,7 @@ void ImportComicsInfoDialog::close() progressBar->hide(); accept->setDisabled(true); QDialog::close(); - emit(finished(0)); + emit finished(0); } void Importer::run() diff --git a/YACReaderLibrary/import_library_dialog.cpp b/YACReaderLibrary/import_library_dialog.cpp index c288f5eb..2a065bd6 100644 --- a/YACReaderLibrary/import_library_dialog.cpp +++ b/YACReaderLibrary/import_library_dialog.cpp @@ -97,9 +97,9 @@ void ImportLibraryDialog::add() if (!libraries.contains(nameEdit->text())) { accept->setEnabled(false); progressBar->show(); - emit(unpackCLC(QDir::cleanPath(path->text()), QDir::cleanPath(destPath->text()), nameEdit->text())); + emit unpackCLC(QDir::cleanPath(path->text()), QDir::cleanPath(destPath->text()), nameEdit->text()); } else { - emit(libraryExists(nameEdit->text())); + emit libraryExists(nameEdit->text()); } } diff --git a/YACReaderLibrary/library_creator.cpp b/YACReaderLibrary/library_creator.cpp index 6d843cfe..d9b2e898 100644 --- a/YACReaderLibrary/library_creator.cpp +++ b/YACReaderLibrary/library_creator.cpp @@ -154,7 +154,7 @@ void LibraryCreator::run() _database.close(); } QSqlDatabase::removeDatabase(_databaseConnection); - emit(created()); + emit created(); QLOG_INFO() << "Create library END"; } else { QLOG_INFO() << "Starting to update folder" << _sourceFolder << "in library ( " << _source << "," << _target << ")"; @@ -308,7 +308,7 @@ void LibraryCreator::insertComic(const QString &relativePath, const QFileInfo &f numPages = ie.getNumPages(); originalCoverSize = ie.getOriginalCoverSize(); if (numPages > 0) { - emit(comicAdded(relativePath, _target + "/covers/" + hash + ".jpg")); + emit comicAdded(relativePath, _target + "/covers/" + hash + ".jpg"); } } diff --git a/YACReaderLibrary/rename_library_dialog.cpp b/YACReaderLibrary/rename_library_dialog.cpp index 683bb8b1..b249a22c 100644 --- a/YACReaderLibrary/rename_library_dialog.cpp +++ b/YACReaderLibrary/rename_library_dialog.cpp @@ -54,7 +54,7 @@ void RenameLibraryDialog::setupUI() void RenameLibraryDialog::rename() { // accept->setEnabled(false); - emit(renameLibrary(newNameEdit->text())); + emit renameLibrary(newNameEdit->text()); } void RenameLibraryDialog::nameSetted(const QString &text) diff --git a/YACReaderLibrary/trayicon_controller.cpp b/YACReaderLibrary/trayicon_controller.cpp index d1ca2faa..79b121d4 100644 --- a/YACReaderLibrary/trayicon_controller.cpp +++ b/YACReaderLibrary/trayicon_controller.cpp @@ -36,7 +36,7 @@ TrayIconController::TrayIconController(QSettings *settings, LibraryWindow *windo #endif } - connect(&trayIcon, &QSystemTrayIcon::activated, + connect(&trayIcon, &QSystemTrayIcon::activated, this, [=](QSystemTrayIcon::ActivationReason reason) { #ifdef Q_OS_LINUX auto expectedReason = QSystemTrayIcon::Trigger; diff --git a/YACReaderLibrary/yacreader_history_controller.cpp b/YACReaderLibrary/yacreader_history_controller.cpp index 26af82a9..9ac7d401 100644 --- a/YACReaderLibrary/yacreader_history_controller.cpp +++ b/YACReaderLibrary/yacreader_history_controller.cpp @@ -11,32 +11,32 @@ void YACReaderHistoryController::clear() history.clear(); history.append(YACReaderLibrarySourceContainer(QModelIndex(), YACReaderLibrarySourceContainer::Folder)); // root folder is always the first item - emit(enabledBackward(false)); - emit(enabledForward(false)); + emit enabledBackward(false); + emit enabledForward(false); } void YACReaderHistoryController::backward() { if (currentFolderNavigation > 0) { currentFolderNavigation--; - emit(modelIndexSelected(history.at(currentFolderNavigation))); - emit(enabledForward(true)); + emit modelIndexSelected(history.at(currentFolderNavigation)); + emit enabledForward(true); } if (currentFolderNavigation == 0) - emit(enabledBackward(false)); + emit enabledBackward(false); } void YACReaderHistoryController::forward() { if (currentFolderNavigation < history.count() - 1) { currentFolderNavigation++; - emit(modelIndexSelected(history.at(currentFolderNavigation))); - emit(enabledBackward(true)); + emit modelIndexSelected(history.at(currentFolderNavigation)); + emit enabledBackward(true); } if (currentFolderNavigation == history.count() - 1) - emit(enabledForward(false)); + emit enabledForward(false); } void YACReaderHistoryController::updateHistory(const YACReaderLibrarySourceContainer &source) @@ -54,11 +54,11 @@ void YACReaderHistoryController::updateHistory(const YACReaderLibrarySourceConta if (source != history.at(currentFolderNavigation)) { history.append(source); - emit(enabledBackward(true)); + emit enabledBackward(true); currentFolderNavigation++; } - emit(enabledForward(false)); + emit enabledForward(false); } YACReaderLibrarySourceContainer YACReaderHistoryController::lastSourceContainer()