Convert emit(signal()) calls to emit signal()

This commit is contained in:
Luis Ángel San Martín 2021-09-30 21:57:55 +02:00
parent 8437bd38f4
commit e1ed292a91
8 changed files with 23 additions and 23 deletions

View File

@ -133,7 +133,7 @@ bool BookmarksDialog::eventFilter(QObject *obj, QEvent *event)
{ {
if (event->type() == QEvent::MouseButtonPress) { if (event->type() == QEvent::MouseButtonPress) {
if (obj == images.at(0)) { if (obj == images.at(0)) {
emit(goToPage(lastPage)); emit goToPage(lastPage);
close(); close();
event->accept(); event->accept();
} }
@ -142,7 +142,7 @@ bool BookmarksDialog::eventFilter(QObject *obj, QEvent *event)
bool b; bool b;
int page = pages.at(i)->text().toInt(&b) - 1; int page = pages.at(i)->text().toInt(&b) - 1;
if (b) { if (b) {
emit(goToPage(page)); emit goToPage(page);
close(); close();
} }
event->accept(); event->accept();

View File

@ -61,7 +61,7 @@ void GoToDialog::goTo()
{ {
unsigned int page = pageNumber->text().toInt(); unsigned int page = pageNumber->text().toInt();
if (page >= 1 && page <= v->top()) { if (page >= 1 && page <= v->top()) {
emit(goToPage(page - 1)); emit goToPage(page - 1);
close(); close();
} }
} }

View File

@ -112,14 +112,14 @@ void GoToFlowToolBar::goTo()
{ {
unsigned int page = edit->text().toInt(); unsigned int page = edit->text().toInt();
if (page >= 1 && page <= v->top()) { if (page >= 1 && page <= v->top()) {
emit(goToPage(page - 1)); emit goToPage(page - 1);
} }
} }
void GoToFlowToolBar::centerSlide() void GoToFlowToolBar::centerSlide()
{ {
if (edit->text().toInt() != 0) if (edit->text().toInt() != 0)
emit(setCenter(edit->text().toInt() - 1)); emit setCenter(edit->text().toInt() - 1);
} }
void GoToFlowToolBar::updateOptions() void GoToFlowToolBar::updateOptions()

View File

@ -140,7 +140,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
connect(scaleCheckbox, &QCheckBox::clicked, connect(scaleCheckbox, &QCheckBox::clicked,
[=](bool checked) { [=](bool checked) {
Configuration::getConfiguration().setEnlargeImages(checked); Configuration::getConfiguration().setEnlargeImages(checked);
emit(changedImageOptions()); emit changedImageOptions();
}); });
scaleLayout->addWidget(scaleCheckbox); scaleLayout->addWidget(scaleCheckbox);
@ -153,7 +153,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
connect(coverSPCheckBox, &QCheckBox::clicked, connect(coverSPCheckBox, &QCheckBox::clicked,
[=](bool checked) { [=](bool checked) {
settings->setValue(COVER_IS_SP, checked); settings->setValue(COVER_IS_SP, checked);
emit(changedImageOptions()); emit changedImageOptions();
}); });
doublePageBoxLayout->addWidget(coverSPCheckBox); doublePageBoxLayout->addWidget(coverSPCheckBox);
@ -262,7 +262,7 @@ void OptionsDialog::updateColor(const QColor &color)
settings->setValue(BACKGROUND_COLOR, color); settings->setValue(BACKGROUND_COLOR, color);
emit(changedOptions()); emit changedOptions();
} }
void OptionsDialog::brightnessChanged(int value) void OptionsDialog::brightnessChanged(int value)

View File

@ -368,11 +368,11 @@ void TranslationLoader::run()
utf8 = utf8.remove(utf8.count() - 1, 1); utf8 = utf8.remove(utf8.count() - 1, 1);
QString translated(utf8); QString translated(utf8);
emit(requestFinished(translated)); emit requestFinished(translated);
} else } else
emit(error()); emit error();
} else { } else {
emit(timeOut()); emit timeOut();
} }
} }
@ -411,10 +411,10 @@ void TextToSpeachLoader::run()
utf8 = utf8.remove(utf8.count() - 1, 1); utf8 = utf8.remove(utf8.count() - 1, 1);
utf8 = utf8.replace("\\", ""); utf8 = utf8.replace("\\", "");
emit(requestFinished(QUrl(utf8))); emit requestFinished(QUrl(utf8));
} else } else
emit(error()); emit error();
} else { } else {
emit(timeOut()); emit timeOut();
} }
} }

View File

@ -318,7 +318,7 @@ void Viewer::updatePage()
if (currentPage->isNull()) if (currentPage->isNull())
setPageUnavailableMessage(); setPageUnavailableMessage();
else else
emit(pageAvailable(true)); emit pageAvailable(true);
emit backgroundChanges(); emit backgroundChanges();
@ -955,7 +955,7 @@ void Viewer::setLoadingMessage()
hideMagnifyingGlass(); hideMagnifyingGlass();
restoreMagnifyingGlass = true; restoreMagnifyingGlass = true;
} }
emit(pageAvailable(false)); emit pageAvailable(false);
configureContent(tr("Loading...please wait!")); configureContent(tr("Loading...please wait!"));
} }
@ -965,7 +965,7 @@ void Viewer::setPageUnavailableMessage()
hideMagnifyingGlass(); hideMagnifyingGlass();
restoreMagnifyingGlass = true; restoreMagnifyingGlass = true;
} }
emit(pageAvailable(false)); emit pageAvailable(false);
configureContent(tr("Page not available!")); configureContent(tr("Page not available!"));
} }
@ -1107,7 +1107,7 @@ void Viewer::showIsCoverMessage()
shouldOpenPrevious = true; shouldOpenPrevious = true;
} else { } else {
shouldOpenPrevious = false; shouldOpenPrevious = false;
emit(openPreviousComic()); emit openPreviousComic();
} }
shouldOpenNext = false; // single page comic shouldOpenNext = false; // single page comic
@ -1121,7 +1121,7 @@ void Viewer::showIsLastMessage()
shouldOpenNext = true; shouldOpenNext = true;
} else { } else {
shouldOpenNext = false; shouldOpenNext = false;
emit(openNextComic()); emit openNextComic();
} }
shouldOpenPrevious = false; // single page comic shouldOpenPrevious = false; // single page comic

View File

@ -604,7 +604,7 @@ void FileComic::process()
} }
_index = _firstPage; _index = _firstPage;
emit(openAt(_index)); emit openAt(_index);
int sectionIndex; int sectionIndex;
QList<QVector<quint32>> sections = getSections(sectionIndex); QList<QVector<quint32>> sections = getSections(sectionIndex);
@ -701,7 +701,7 @@ void FolderComic::process()
_index = _firstPage; _index = _firstPage;
emit(openAt(_index)); emit openAt(_index);
emit pageChanged(0); // this indicates new comic, index=0 emit pageChanged(0); // this indicates new comic, index=0
emit numPages(_pages.size()); emit numPages(_pages.size());
@ -847,7 +847,7 @@ void PDFComic::process()
} }
_index = _firstPage; _index = _firstPage;
emit(openAt(_index)); emit openAt(_index);
// buffer index to avoid race conditions // buffer index to avoid race conditions
int buffered_index = _index; int buffered_index = _index;

View File

@ -136,7 +136,7 @@ void YACReaderOptionsDialog::saveFlowParameters()
void YACReaderOptionsDialog::saveOptions() void YACReaderOptionsDialog::saveOptions()
{ {
emit(optionsChanged()); emit optionsChanged();
close(); close();
} }