mirror of
https://github.com/YACReader/yacreader
synced 2025-05-25 09:50:33 -04:00
Fix a bunch of warnings
This commit is contained in:
parent
3355f2137c
commit
a47b706e29
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,6 @@ public:
|
||||
SearchVolume(QWidget *parent = nullptr);
|
||||
void clean();
|
||||
void setVolumeInfo(const QString &volume);
|
||||
public slots:
|
||||
QString getVolumeInfo() const;
|
||||
|
||||
private:
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
@ -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"));
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -96,7 +96,7 @@ void ImportComicsInfoDialog::close()
|
||||
progressBar->hide();
|
||||
accept->setDisabled(true);
|
||||
QDialog::close();
|
||||
emit(finished(0));
|
||||
emit finished(0);
|
||||
}
|
||||
|
||||
void Importer::run()
|
||||
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user