mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Convert emit(signal()) calls to emit signal()
This commit is contained in:
parent
8437bd38f4
commit
e1ed292a91
@ -133,7 +133,7 @@ bool BookmarksDialog::eventFilter(QObject *obj, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonPress) {
|
||||
if (obj == images.at(0)) {
|
||||
emit(goToPage(lastPage));
|
||||
emit goToPage(lastPage);
|
||||
close();
|
||||
event->accept();
|
||||
}
|
||||
@ -142,7 +142,7 @@ bool BookmarksDialog::eventFilter(QObject *obj, QEvent *event)
|
||||
bool b;
|
||||
int page = pages.at(i)->text().toInt(&b) - 1;
|
||||
if (b) {
|
||||
emit(goToPage(page));
|
||||
emit goToPage(page);
|
||||
close();
|
||||
}
|
||||
event->accept();
|
||||
|
@ -61,7 +61,7 @@ void GoToDialog::goTo()
|
||||
{
|
||||
unsigned int page = pageNumber->text().toInt();
|
||||
if (page >= 1 && page <= v->top()) {
|
||||
emit(goToPage(page - 1));
|
||||
emit goToPage(page - 1);
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
@ -112,14 +112,14 @@ void GoToFlowToolBar::goTo()
|
||||
{
|
||||
unsigned int page = edit->text().toInt();
|
||||
if (page >= 1 && page <= v->top()) {
|
||||
emit(goToPage(page - 1));
|
||||
emit goToPage(page - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void GoToFlowToolBar::centerSlide()
|
||||
{
|
||||
if (edit->text().toInt() != 0)
|
||||
emit(setCenter(edit->text().toInt() - 1));
|
||||
emit setCenter(edit->text().toInt() - 1);
|
||||
}
|
||||
|
||||
void GoToFlowToolBar::updateOptions()
|
||||
|
@ -140,7 +140,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(scaleCheckbox, &QCheckBox::clicked,
|
||||
[=](bool checked) {
|
||||
Configuration::getConfiguration().setEnlargeImages(checked);
|
||||
emit(changedImageOptions());
|
||||
emit changedImageOptions();
|
||||
});
|
||||
|
||||
scaleLayout->addWidget(scaleCheckbox);
|
||||
@ -153,7 +153,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(coverSPCheckBox, &QCheckBox::clicked,
|
||||
[=](bool checked) {
|
||||
settings->setValue(COVER_IS_SP, checked);
|
||||
emit(changedImageOptions());
|
||||
emit changedImageOptions();
|
||||
});
|
||||
|
||||
doublePageBoxLayout->addWidget(coverSPCheckBox);
|
||||
@ -262,7 +262,7 @@ void OptionsDialog::updateColor(const QColor &color)
|
||||
|
||||
settings->setValue(BACKGROUND_COLOR, color);
|
||||
|
||||
emit(changedOptions());
|
||||
emit changedOptions();
|
||||
}
|
||||
|
||||
void OptionsDialog::brightnessChanged(int value)
|
||||
|
@ -368,11 +368,11 @@ void TranslationLoader::run()
|
||||
utf8 = utf8.remove(utf8.count() - 1, 1);
|
||||
|
||||
QString translated(utf8);
|
||||
emit(requestFinished(translated));
|
||||
emit requestFinished(translated);
|
||||
} else
|
||||
emit(error());
|
||||
emit error();
|
||||
} else {
|
||||
emit(timeOut());
|
||||
emit timeOut();
|
||||
}
|
||||
}
|
||||
|
||||
@ -411,10 +411,10 @@ void TextToSpeachLoader::run()
|
||||
utf8 = utf8.remove(utf8.count() - 1, 1);
|
||||
utf8 = utf8.replace("\\", "");
|
||||
|
||||
emit(requestFinished(QUrl(utf8)));
|
||||
emit requestFinished(QUrl(utf8));
|
||||
} else
|
||||
emit(error());
|
||||
emit error();
|
||||
} else {
|
||||
emit(timeOut());
|
||||
emit timeOut();
|
||||
}
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ void Viewer::updatePage()
|
||||
if (currentPage->isNull())
|
||||
setPageUnavailableMessage();
|
||||
else
|
||||
emit(pageAvailable(true));
|
||||
emit pageAvailable(true);
|
||||
|
||||
emit backgroundChanges();
|
||||
|
||||
@ -955,7 +955,7 @@ void Viewer::setLoadingMessage()
|
||||
hideMagnifyingGlass();
|
||||
restoreMagnifyingGlass = true;
|
||||
}
|
||||
emit(pageAvailable(false));
|
||||
emit pageAvailable(false);
|
||||
configureContent(tr("Loading...please wait!"));
|
||||
}
|
||||
|
||||
@ -965,7 +965,7 @@ void Viewer::setPageUnavailableMessage()
|
||||
hideMagnifyingGlass();
|
||||
restoreMagnifyingGlass = true;
|
||||
}
|
||||
emit(pageAvailable(false));
|
||||
emit pageAvailable(false);
|
||||
configureContent(tr("Page not available!"));
|
||||
}
|
||||
|
||||
@ -1107,7 +1107,7 @@ void Viewer::showIsCoverMessage()
|
||||
shouldOpenPrevious = true;
|
||||
} else {
|
||||
shouldOpenPrevious = false;
|
||||
emit(openPreviousComic());
|
||||
emit openPreviousComic();
|
||||
}
|
||||
|
||||
shouldOpenNext = false; // single page comic
|
||||
@ -1121,7 +1121,7 @@ void Viewer::showIsLastMessage()
|
||||
shouldOpenNext = true;
|
||||
} else {
|
||||
shouldOpenNext = false;
|
||||
emit(openNextComic());
|
||||
emit openNextComic();
|
||||
}
|
||||
|
||||
shouldOpenPrevious = false; // single page comic
|
||||
|
@ -604,7 +604,7 @@ void FileComic::process()
|
||||
}
|
||||
|
||||
_index = _firstPage;
|
||||
emit(openAt(_index));
|
||||
emit openAt(_index);
|
||||
|
||||
int sectionIndex;
|
||||
QList<QVector<quint32>> sections = getSections(sectionIndex);
|
||||
@ -701,7 +701,7 @@ void FolderComic::process()
|
||||
|
||||
_index = _firstPage;
|
||||
|
||||
emit(openAt(_index));
|
||||
emit openAt(_index);
|
||||
|
||||
emit pageChanged(0); // this indicates new comic, index=0
|
||||
emit numPages(_pages.size());
|
||||
@ -847,7 +847,7 @@ void PDFComic::process()
|
||||
}
|
||||
|
||||
_index = _firstPage;
|
||||
emit(openAt(_index));
|
||||
emit openAt(_index);
|
||||
|
||||
// buffer index to avoid race conditions
|
||||
int buffered_index = _index;
|
||||
|
@ -136,7 +136,7 @@ void YACReaderOptionsDialog::saveFlowParameters()
|
||||
|
||||
void YACReaderOptionsDialog::saveOptions()
|
||||
{
|
||||
emit(optionsChanged());
|
||||
emit optionsChanged();
|
||||
close();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user