mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -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()
|
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)
|
void AddLibraryDialog::nameSetted(const QString &text)
|
||||||
|
@ -36,7 +36,7 @@ void ComicFlow::setImagePaths(const QStringList &paths)
|
|||||||
addSlide(img);
|
addSlide(img);
|
||||||
s = imageFiles.at(i);
|
s = imageFiles.at(i);
|
||||||
s.remove(s.size() - 4, 4);
|
s.remove(s.size() - 4, 4);
|
||||||
if (QFileInfo(s + ".r").exists())
|
if (QFileInfo::exists(s + ".r"))
|
||||||
markSlide(i);
|
markSlide(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ public:
|
|||||||
SearchVolume(QWidget *parent = nullptr);
|
SearchVolume(QWidget *parent = nullptr);
|
||||||
void clean();
|
void clean();
|
||||||
void setVolumeInfo(const QString &volume);
|
void setVolumeInfo(const QString &volume);
|
||||||
public slots:
|
|
||||||
QString getVolumeInfo() const;
|
QString getVolumeInfo() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -59,7 +59,7 @@ SelectVolume::SelectVolume(QWidget *parent)
|
|||||||
|
|
||||||
connect(filterEdit, &QLineEdit::textChanged, proxyModel, &QSortFilterProxyModel::setFilterFixedString);
|
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)
|
[=](int index) { tableVolumes->horizontalHeader()->sortIndicatorSection() == index ? tableVolumes->sortByColumn(index, tableVolumes->horizontalHeader()->sortIndicatorOrder() == Qt::AscendingOrder ? Qt::DescendingOrder : Qt::AscendingOrder)
|
||||||
: tableVolumes->sortByColumn(index, Qt::AscendingOrder); });
|
: tableVolumes->sortByColumn(index, Qt::AscendingOrder); });
|
||||||
// connections
|
// connections
|
||||||
|
@ -24,7 +24,7 @@ ComicsView::ComicsView(QWidget *parent)
|
|||||||
|
|
||||||
view->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
view->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||||
connect(
|
connect(
|
||||||
view, &QQuickWidget::statusChanged,
|
view, &QQuickWidget::statusChanged, this,
|
||||||
[=](QQuickWidget::Status status) {
|
[=](QQuickWidget::Status status) {
|
||||||
if (status == QQuickWidget::Error) {
|
if (status == QQuickWidget::Error) {
|
||||||
QLOG_ERROR() << view->errors();
|
QLOG_ERROR() << view->errors();
|
||||||
|
@ -87,10 +87,10 @@ void CreateLibraryDialog::create()
|
|||||||
QFileInfo f(path->text());
|
QFileInfo f(path->text());
|
||||||
if (f.exists() && f.isDir() && f.isWritable()) {
|
if (f.exists() && f.isDir() && f.isWritable()) {
|
||||||
if (!libraries.contains(nameEdit->text())) {
|
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();
|
close();
|
||||||
} else
|
} else
|
||||||
emit(libraryExists(nameEdit->text()));
|
emit libraryExists(nameEdit->text());
|
||||||
} else
|
} 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"));
|
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);
|
view->setResizeMode(QQuickWidget::SizeRootObjectToView);
|
||||||
connect(
|
connect(
|
||||||
view, &QQuickWidget::statusChanged,
|
view, &QQuickWidget::statusChanged, this,
|
||||||
[=](QQuickWidget::Status status) {
|
[=](QQuickWidget::Status status) {
|
||||||
if (status == QQuickWidget::Error) {
|
if (status == QQuickWidget::Error) {
|
||||||
QLOG_ERROR() << view->errors();
|
QLOG_ERROR() << view->errors();
|
||||||
|
@ -96,7 +96,7 @@ void ImportComicsInfoDialog::close()
|
|||||||
progressBar->hide();
|
progressBar->hide();
|
||||||
accept->setDisabled(true);
|
accept->setDisabled(true);
|
||||||
QDialog::close();
|
QDialog::close();
|
||||||
emit(finished(0));
|
emit finished(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Importer::run()
|
void Importer::run()
|
||||||
|
@ -97,9 +97,9 @@ void ImportLibraryDialog::add()
|
|||||||
if (!libraries.contains(nameEdit->text())) {
|
if (!libraries.contains(nameEdit->text())) {
|
||||||
accept->setEnabled(false);
|
accept->setEnabled(false);
|
||||||
progressBar->show();
|
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 {
|
} else {
|
||||||
emit(libraryExists(nameEdit->text()));
|
emit libraryExists(nameEdit->text());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ void LibraryCreator::run()
|
|||||||
_database.close();
|
_database.close();
|
||||||
}
|
}
|
||||||
QSqlDatabase::removeDatabase(_databaseConnection);
|
QSqlDatabase::removeDatabase(_databaseConnection);
|
||||||
emit(created());
|
emit created();
|
||||||
QLOG_INFO() << "Create library END";
|
QLOG_INFO() << "Create library END";
|
||||||
} else {
|
} else {
|
||||||
QLOG_INFO() << "Starting to update folder" << _sourceFolder << "in library ( " << _source << "," << _target << ")";
|
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();
|
numPages = ie.getNumPages();
|
||||||
originalCoverSize = ie.getOriginalCoverSize();
|
originalCoverSize = ie.getOriginalCoverSize();
|
||||||
if (numPages > 0) {
|
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()
|
void RenameLibraryDialog::rename()
|
||||||
{
|
{
|
||||||
// accept->setEnabled(false);
|
// accept->setEnabled(false);
|
||||||
emit(renameLibrary(newNameEdit->text()));
|
emit renameLibrary(newNameEdit->text());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenameLibraryDialog::nameSetted(const QString &text)
|
void RenameLibraryDialog::nameSetted(const QString &text)
|
||||||
|
@ -36,7 +36,7 @@ TrayIconController::TrayIconController(QSettings *settings, LibraryWindow *windo
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(&trayIcon, &QSystemTrayIcon::activated,
|
connect(&trayIcon, &QSystemTrayIcon::activated, this,
|
||||||
[=](QSystemTrayIcon::ActivationReason reason) {
|
[=](QSystemTrayIcon::ActivationReason reason) {
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
auto expectedReason = QSystemTrayIcon::Trigger;
|
auto expectedReason = QSystemTrayIcon::Trigger;
|
||||||
|
@ -11,32 +11,32 @@ void YACReaderHistoryController::clear()
|
|||||||
history.clear();
|
history.clear();
|
||||||
history.append(YACReaderLibrarySourceContainer(QModelIndex(), YACReaderLibrarySourceContainer::Folder)); // root folder is always the first item
|
history.append(YACReaderLibrarySourceContainer(QModelIndex(), YACReaderLibrarySourceContainer::Folder)); // root folder is always the first item
|
||||||
|
|
||||||
emit(enabledBackward(false));
|
emit enabledBackward(false);
|
||||||
emit(enabledForward(false));
|
emit enabledForward(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void YACReaderHistoryController::backward()
|
void YACReaderHistoryController::backward()
|
||||||
{
|
{
|
||||||
if (currentFolderNavigation > 0) {
|
if (currentFolderNavigation > 0) {
|
||||||
currentFolderNavigation--;
|
currentFolderNavigation--;
|
||||||
emit(modelIndexSelected(history.at(currentFolderNavigation)));
|
emit modelIndexSelected(history.at(currentFolderNavigation));
|
||||||
emit(enabledForward(true));
|
emit enabledForward(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentFolderNavigation == 0)
|
if (currentFolderNavigation == 0)
|
||||||
emit(enabledBackward(false));
|
emit enabledBackward(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void YACReaderHistoryController::forward()
|
void YACReaderHistoryController::forward()
|
||||||
{
|
{
|
||||||
if (currentFolderNavigation < history.count() - 1) {
|
if (currentFolderNavigation < history.count() - 1) {
|
||||||
currentFolderNavigation++;
|
currentFolderNavigation++;
|
||||||
emit(modelIndexSelected(history.at(currentFolderNavigation)));
|
emit modelIndexSelected(history.at(currentFolderNavigation));
|
||||||
emit(enabledBackward(true));
|
emit enabledBackward(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentFolderNavigation == history.count() - 1)
|
if (currentFolderNavigation == history.count() - 1)
|
||||||
emit(enabledForward(false));
|
emit enabledForward(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void YACReaderHistoryController::updateHistory(const YACReaderLibrarySourceContainer &source)
|
void YACReaderHistoryController::updateHistory(const YACReaderLibrarySourceContainer &source)
|
||||||
@ -54,11 +54,11 @@ void YACReaderHistoryController::updateHistory(const YACReaderLibrarySourceConta
|
|||||||
if (source != history.at(currentFolderNavigation)) {
|
if (source != history.at(currentFolderNavigation)) {
|
||||||
history.append(source);
|
history.append(source);
|
||||||
|
|
||||||
emit(enabledBackward(true));
|
emit enabledBackward(true);
|
||||||
currentFolderNavigation++;
|
currentFolderNavigation++;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit(enabledForward(false));
|
emit enabledForward(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
YACReaderLibrarySourceContainer YACReaderHistoryController::lastSourceContainer()
|
YACReaderLibrarySourceContainer YACReaderHistoryController::lastSourceContainer()
|
||||||
|
Loading…
Reference in New Issue
Block a user