diff --git a/app/savebar.cpp b/app/savebar.cpp --- a/app/savebar.cpp +++ b/app/savebar.cpp @@ -346,17 +346,17 @@ { QList lst = DocumentFactory::instance()->modifiedDocumentList(); if (action == "first") { - goToUrl(lst[0]); + emit goToUrl(lst[0]); } else if (action == "previous") { int pos = lst.indexOf(d->mCurrentUrl); --pos; Q_ASSERT(pos >= 0); - goToUrl(lst[pos]); + emit goToUrl(lst[pos]); } else if (action == "next") { int pos = lst.indexOf(d->mCurrentUrl); ++pos; Q_ASSERT(pos < lst.size()); - goToUrl(lst[pos]); + emit goToUrl(lst[pos]); } else { qWarning() << "Unknown action: " << action ; } diff --git a/importer/importer.cpp b/importer/importer.cpp --- a/importer/importer.cpp +++ b/importer/importer.cpp @@ -177,7 +177,7 @@ d->mJobProgress = 0; emitProgressChanged(); - maximumChanged(d->mUrlList.count() * 100); + emit maximumChanged(d->mUrlList.count() * 100); if (!d->createImportDir(destination)) { qWarning() << "Could not create import dir"; @@ -204,7 +204,7 @@ { KIO::Job* job = KIO::del(d->mTempImportDirUrl, KIO::HideProgressInfo); KJobWidgets::setWindow(job, d->mAuthWindow); - importFinished(); + emit importFinished(); } void Importer::advance() @@ -222,7 +222,7 @@ void Importer::emitProgressChanged() { - progressChanged(d->mProgress * 100 + d->mJobProgress); + emit progressChanged(d->mProgress * 100 + d->mJobProgress); } QList Importer::importedUrlList() const diff --git a/lib/contextmanager.cpp b/lib/contextmanager.cpp --- a/lib/contextmanager.cpp +++ b/lib/contextmanager.cpp @@ -164,7 +164,7 @@ } d->mSelectedFileItemListNeedsUpdate = true; - currentUrlChanged(currentUrl); + emit currentUrlChanged(currentUrl); } KFileItemList ContextManager::selectedFileItemList() const @@ -186,9 +186,9 @@ d->mDirListerFinished = false; } else { d->mCurrentDirUrl.clear(); - d->mDirModel->dirLister()->clear(); + emit d->mDirModel->dirLister()->clear(); } - currentDirUrlChanged(url); + emit currentDirUrlChanged(url); } QUrl ContextManager::currentDirUrl() const diff --git a/lib/crop/croptool.cpp b/lib/crop/croptool.cpp --- a/lib/crop/croptool.cpp +++ b/lib/crop/croptool.cpp @@ -250,7 +250,7 @@ d->mRect = rect; d->keepRectInsideImage(); if (d->mRect != oldRect) { - rectUpdated(d->mRect); + emit rectUpdated(d->mRect); } imageView()->update(); } @@ -390,7 +390,7 @@ d->keepRectInsideImage(); imageView()->update(); - rectUpdated(d->mRect); + emit rectUpdated(d->mRect); } void CropTool::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) @@ -410,7 +410,7 @@ return; } event->accept(); - d->mCropWidget->findChild()->accepted(); + emit d->mCropWidget->findChild()->accepted(); } void CropTool::hoverMoveEvent(QGraphicsSceneHoverEvent* event) @@ -432,16 +432,16 @@ switch (event->key()) { case Qt::Key_Escape: event->accept(); - buttons->rejected(); + emit buttons->rejected(); break; case Qt::Key_Return: case Qt::Key_Enter: { event->accept(); auto focusButton = static_cast(buttons->focusWidget()); if (focusButton && buttons->buttonRole(focusButton) == QDialogButtonBox::RejectRole) { - buttons->rejected(); + emit buttons->rejected(); } else { - buttons->accepted(); + emit buttons->accepted(); } break; } diff --git a/lib/datewidget.cpp b/lib/datewidget.cpp --- a/lib/datewidget.cpp +++ b/lib/datewidget.cpp @@ -68,7 +68,7 @@ { mDate = mDate.addDays(delta); updateButton(); - q->dateChanged(mDate); + emit q->dateChanged(mDate); } }; diff --git a/lib/document/document.cpp b/lib/document/document.cpp --- a/lib/document/document.cpp +++ b/lib/document/document.cpp @@ -128,7 +128,7 @@ if (mDownSampledImageMap[invertedZoom].size().isEmpty()) { mDownSampledImageMap[invertedZoom] = mImage; } - q->downSampledImageReady(); + emit q->downSampledImageReady(); } //- DownSamplingJob --------------------------------------- @@ -320,7 +320,7 @@ SaveJob* saveJob = static_cast(job); d->mUrl = saveJob->newUrl(); d->mImageMetaInfoModel.setUrl(d->mUrl); - saved(saveJob->oldUrl(), d->mUrl); + emit saved(saveJob->oldUrl(), d->mUrl); } } @@ -488,9 +488,9 @@ // If user just undid all his changes this does not really correspond // to a save, but it's similar enough as far as Document users are // concerned - saved(d->mUrl, d->mUrl); + emit saved(d->mUrl, d->mUrl); } else { - modified(d->mUrl); + emit modified(d->mUrl); } } @@ -525,7 +525,7 @@ d->mCurrentJob = job; LOG("Starting first job"); job->start(); - busyChanged(d->mUrl, true); + emit busyChanged(d->mUrl, true); } LOG_QUEUE("Job added", d); } @@ -538,8 +538,8 @@ if (d->mJobQueue.isEmpty()) { LOG("All done"); d->mCurrentJob.clear(); - busyChanged(d->mUrl, false); - allTasksDone(); + emit busyChanged(d->mUrl, false); + emit allTasksDone(); } else { LOG("Starting next job"); d->mCurrentJob = d->mJobQueue.dequeue(); diff --git a/lib/document/documentloadedimpl.cpp b/lib/document/documentloadedimpl.cpp --- a/lib/document/documentloadedimpl.cpp +++ b/lib/document/documentloadedimpl.cpp @@ -103,16 +103,16 @@ void DocumentLoadedImpl::setImage(const QImage& image) { setDocumentImage(image); - imageRectUpdated(image.rect()); + emit imageRectUpdated(image.rect()); } void DocumentLoadedImpl::applyTransformation(Orientation orientation) { QImage image = document()->image(); QMatrix matrix = ImageUtils::transformMatrix(orientation); image = image.transformed(matrix); setDocumentImage(image); - imageRectUpdated(image.rect()); + emit imageRectUpdated(image.rect()); } QByteArray DocumentLoadedImpl::rawData() const diff --git a/lib/documentview/abstractimageview.cpp b/lib/documentview/abstractimageview.cpp --- a/lib/documentview/abstractimageview.cpp +++ b/lib/documentview/abstractimageview.cpp @@ -130,9 +130,9 @@ { if (event->modifiers() & Qt::ControlModifier) { if (event->button() == Qt::LeftButton) { - q->zoomInRequested(event->pos()); + emit q->zoomInRequested(event->pos()); } else if (event->button() == Qt::RightButton) { - q->zoomOutRequested(event->pos()); + emit q->zoomOutRequested(event->pos()); } } } @@ -251,7 +251,7 @@ d->adjustImageOffset(AbstractImageViewPrivate::Silent); d->setScrollPos(scroll, AbstractImageViewPrivate::Silent); onZoomChanged(); - zoomChanged(d->mZoom); + emit zoomChanged(d->mZoom); } bool AbstractImageView::zoomToFit() const @@ -274,7 +274,7 @@ // We do not set zoom to 1 if zoomToFit is off, this is up to the code // calling us. It may went to zoom to some other level and/or to zoom on // a particular position - zoomToFitChanged(d->mZoomToFit); + emit zoomToFitChanged(d->mZoomToFit); } void AbstractImageView::setZoomToFill(bool on, const QPointF& center) @@ -287,7 +287,7 @@ // We do not set zoom to 1 if zoomToFit is off, this is up to the code // calling us. It may went to zoom to some other level and/or to zoom on // a particular position - zoomToFillChanged(d->mZoomToFill); + emit zoomToFillChanged(d->mZoomToFill); } const QPixmap& AbstractImageView::alphaBackgroundTexture() const @@ -439,11 +439,11 @@ switch (event->key()) { case Qt::Key_Left: case Qt::Key_Up: - previousImageRequested(); + emit previousImageRequested(); break; case Qt::Key_Right: case Qt::Key_Down: - nextImageRequested(); + emit nextImageRequested(); break; default: break; @@ -502,7 +502,7 @@ void AbstractImageView::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event) { if (event->modifiers() == Qt::NoModifier && event->button() == Qt::LeftButton) { - toggleFullScreenRequested(); + emit toggleFullScreenRequested(); } d->checkAndRequestZoomAction(event); diff --git a/lib/documentview/documentview.cpp b/lib/documentview/documentview.cpp --- a/lib/documentview/documentview.cpp +++ b/lib/documentview/documentview.cpp @@ -161,15 +161,15 @@ adapter->setScrollPos(mSetup.position); } } - q->adapterChanged(); - q->positionChanged(); + emit q->adapterChanged(); + emit q->positionChanged(); if (adapter->canZoom()) { if (adapter->zoomToFit()) { - q->zoomToFitChanged(true); + emit q->zoomToFitChanged(true); } else if (adapter->zoomToFill()) { - q->zoomToFillChanged(true); + emit q->zoomToFillChanged(true); } else { - q->zoomChanged(adapter->zoom()); + emit q->zoomChanged(adapter->zoom()); } } if (adapter->rasterImageView()) { @@ -296,7 +296,7 @@ } mZoomSnapValues << MAXIMUM_ZOOM_VALUE; - q->minimumZoomChanged(min); + emit q->minimumZoomChanged(min); } void showLoadingIndicator() @@ -345,7 +345,7 @@ QObject::connect(anim, SIGNAL(finished()), q, SIGNAL(isAnimatedChanged())); anim->setDuration(DocumentView::AnimDuration); mFadeAnimation = anim; - q->isAnimatedChanged(); + emit q->isAnimatedChanged(); anim->start(QAbstractAnimation::DeleteWhenStopped); } @@ -697,7 +697,7 @@ void DocumentView::slotZoomChanged(qreal zoom) { d->updateCaption(); - zoomChanged(zoom); + emit zoomChanged(zoom); } void DocumentView::setZoom(qreal zoom) @@ -749,10 +749,10 @@ d->controlWheelAccumulatedDelta += event->delta(); // Browse with mouse wheel if (d->controlWheelAccumulatedDelta >= QWheelEvent::DefaultDeltasPerStep) { - previousImageRequested(); + emit previousImageRequested(); d->controlWheelAccumulatedDelta = 0; } else if (d->controlWheelAccumulatedDelta <= -QWheelEvent::DefaultDeltasPerStep) { - nextImageRequested(); + emit nextImageRequested(); d->controlWheelAccumulatedDelta = 0; } return; @@ -773,7 +773,7 @@ // Filter out context menu if Ctrl is down to avoid showing it when // zooming out with Ctrl + Right button if (event->modifiers() != Qt::ControlModifier) { - contextMenuRequested(); + emit contextMenuRequested(); } } @@ -865,17 +865,17 @@ void DocumentView::emitHudDeselectClicked() { - hudDeselectClicked(this); + emit hudDeselectClicked(this); } void DocumentView::emitHudTrashClicked() { - hudTrashClicked(this); + emit hudTrashClicked(this); } void DocumentView::emitFocused() { - focused(this); + emit focused(this); } void DocumentView::setGeometry(const QRectF& rect) @@ -903,7 +903,7 @@ anim->setDuration(DocumentView::AnimDuration); connect(anim, SIGNAL(finished()), SIGNAL(isAnimatedChanged())); d->mMoveAnimation = anim; - isAnimatedChanged(); + emit isAnimatedChanged(); anim->start(QAbstractAnimation::DeleteWhenStopped); } @@ -920,7 +920,7 @@ void DocumentView::slotFadeInFinished() { - fadeInFinished(this); + emit fadeInFinished(this); } bool DocumentView::isAnimated() const diff --git a/lib/documentview/messageviewadapter.cpp b/lib/documentview/messageviewadapter.cpp --- a/lib/documentview/messageviewadapter.cpp +++ b/lib/documentview/messageviewadapter.cpp @@ -114,11 +114,11 @@ switch (event->key()) { case Qt::Key_Left: case Qt::Key_Up: - previousImageRequested(); + emit previousImageRequested(); break; case Qt::Key_Right: case Qt::Key_Down: - nextImageRequested(); + emit nextImageRequested(); break; default: break; diff --git a/lib/documentview/rasterimageview.cpp b/lib/documentview/rasterimageview.cpp --- a/lib/documentview/rasterimageview.cpp +++ b/lib/documentview/rasterimageview.cpp @@ -359,7 +359,7 @@ if (!d->mEmittedCompleted) { d->mEmittedCompleted = true; - completed(); + emit completed(); } } @@ -472,7 +472,7 @@ if (d->mTool) { d->mTool.data()->toolActivated(); } - currentToolChanged(tool); + emit currentToolChanged(tool); update(); } diff --git a/lib/documentview/svgviewadapter.cpp b/lib/documentview/svgviewadapter.cpp --- a/lib/documentview/svgviewadapter.cpp +++ b/lib/documentview/svgviewadapter.cpp @@ -85,7 +85,7 @@ mSvgItem->setScale(zoom()); } applyPendingScrollPos(); - completed(); + emit completed(); mImageFullyLoaded = true; } diff --git a/lib/documentview/videoviewadapter.cpp b/lib/documentview/videoviewadapter.cpp --- a/lib/documentview/videoviewadapter.cpp +++ b/lib/documentview/videoviewadapter.cpp @@ -163,10 +163,10 @@ mSeekSlider->triggerAction(QAbstractSlider::SliderSingleStepAdd); break; case Qt::Key_Up: - q->previousImageRequested(); + emit q->previousImageRequested(); break; case Qt::Key_Down: - q->nextImageRequested(); + emit q->nextImageRequested(); break; default: break; @@ -272,7 +272,7 @@ d->keyPressEvent(static_cast(event)); } else if (event->type() == QEvent::MouseButtonDblClick) { if (static_cast(event)->modifiers() == Qt::NoModifier) { - toggleFullScreenRequested(); + emit toggleFullScreenRequested(); } } return false; diff --git a/lib/eventwatcher.cpp b/lib/eventwatcher.cpp --- a/lib/eventwatcher.cpp +++ b/lib/eventwatcher.cpp @@ -47,7 +47,7 @@ bool EventWatcher::eventFilter(QObject*, QEvent* event) { if (mEventTypes.contains(event->type())) { - eventTriggered(event); + emit eventTriggered(event); } return false; } diff --git a/lib/hud/hudbutton.cpp b/lib/hud/hudbutton.cpp --- a/lib/hud/hudbutton.cpp +++ b/lib/hud/hudbutton.cpp @@ -187,7 +187,7 @@ d->mIsDown = false; update(); if (boundingRect().contains(event->pos())) { - clicked(); + emit clicked(); } } diff --git a/lib/hud/hudslider.cpp b/lib/hud/hudslider.cpp --- a/lib/hud/hudslider.cpp +++ b/lib/hud/hudslider.cpp @@ -297,7 +297,7 @@ d->mValue = value; setSliderPosition(value); update(); - valueChanged(d->mValue); + emit valueChanged(d->mValue); } } @@ -346,7 +346,7 @@ case QAbstractSlider::SliderNoAction: break; }; - actionTriggered(action); + emit actionTriggered(action); setValue(d->mSliderPosition); } diff --git a/lib/hud/hudwidget.cpp b/lib/hud/hudwidget.cpp --- a/lib/hud/hudwidget.cpp +++ b/lib/hud/hudwidget.cpp @@ -115,7 +115,7 @@ void HudWidget::slotCloseButtonClicked() { close(); - closed(); + emit closed(); } void HudWidget::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) @@ -140,9 +140,9 @@ void HudWidget::slotFadeAnimationFinished() { if (qFuzzyCompare(opacity(), 1)) { - fadedIn(); + emit fadedIn(); } else { - fadedOut(); + emit fadedOut(); if (d->mAutoDeleteOnFadeout) { deleteLater(); } diff --git a/lib/imagescaler.cpp b/lib/imagescaler.cpp --- a/lib/imagescaler.cpp +++ b/lib/imagescaler.cpp @@ -129,7 +129,7 @@ const qreal REAL_DELTA = 0.001; if (qAbs(d->mZoom - 1.0) < REAL_DELTA) { QImage tmp = d->mDocument->image().copy(rect); - scaledRect(rect.left(), rect.top(), tmp); + emit scaledRect(rect.left(), rect.top(), tmp); return; } diff --git a/lib/redeyereduction/redeyereductiontool.cpp b/lib/redeyereduction/redeyereductiontool.cpp --- a/lib/redeyereduction/redeyereductiontool.cpp +++ b/lib/redeyereduction/redeyereductiontool.cpp @@ -177,7 +177,7 @@ return; } event->accept(); - d->mToolWidget->mainDialogButtonBox->accepted(); + emit d->mToolWidget->mainDialogButtonBox->accepted(); } void RedEyeReductionTool::keyPressEvent(QKeyEvent* event) @@ -192,16 +192,16 @@ switch (event->key()) { case Qt::Key_Escape: event->accept(); - buttons->rejected(); + emit buttons->rejected(); break; case Qt::Key_Return: case Qt::Key_Enter: { event->accept(); auto focusButton = static_cast(buttons->focusWidget()); if (focusButton && buttons->buttonRole(focusButton) == QDialogButtonBox::RejectRole) { - buttons->rejected(); + emit buttons->rejected(); } else { - buttons->accepted(); + emit buttons->accepted(); } break; } diff --git a/lib/slidecontainer.cpp b/lib/slidecontainer.cpp --- a/lib/slidecontainer.cpp +++ b/lib/slidecontainer.cpp @@ -158,9 +158,9 @@ { if (height() == 0) { mSlidingOut = false; - slidedOut(); + emit slidedOut(); } else { - slidedIn(); + emit slidedIn(); } } diff --git a/lib/slideshow.cpp b/lib/slideshow.cpp --- a/lib/slideshow.cpp +++ b/lib/slideshow.cpp @@ -231,7 +231,7 @@ d->updateTimerInterval(); d->mTimer->setSingleShot(false); d->doStart(); - stateChanged(true); + emit stateChanged(true); } void SlideShow::setInterval(int intervalInSeconds) @@ -269,7 +269,7 @@ LOG("Stopping timer"); d->mTimer->stop(); d->mState = Paused; - stateChanged(false); + emit stateChanged(false); } void SlideShow::resumeAndGoToNextUrl() @@ -289,7 +289,7 @@ pause(); return; } - goToUrl(url); + emit goToUrl(url); } void SlideShow::setCurrentUrl(const QUrl &url) diff --git a/lib/thumbnailprovider/thumbnailgenerator.cpp b/lib/thumbnailprovider/thumbnailgenerator.cpp --- a/lib/thumbnailprovider/thumbnailgenerator.cpp +++ b/lib/thumbnailprovider/thumbnailgenerator.cpp @@ -292,7 +292,7 @@ QSize size(mOriginalWidth, mOriginalHeight); LOG("emitting done signal, size=" << size); QMutexLocker lock(&mMutex); - done(mImage, size); + emit done(mImage, size); LOG("Done"); } } diff --git a/lib/thumbnailprovider/thumbnailprovider.cpp b/lib/thumbnailprovider/thumbnailprovider.cpp --- a/lib/thumbnailprovider/thumbnailprovider.cpp +++ b/lib/thumbnailprovider/thumbnailprovider.cpp @@ -296,7 +296,7 @@ if (mItems.isEmpty()) { LOG("No more items. Nothing to do"); mCurrentItem = KFileItem(); - finished(); + emit finished(); return; } diff --git a/lib/thumbnailview/previewitemdelegate.cpp b/lib/thumbnailview/previewitemdelegate.cpp --- a/lib/thumbnailview/previewitemdelegate.cpp +++ b/lib/thumbnailview/previewitemdelegate.cpp @@ -864,24 +864,24 @@ void PreviewItemDelegate::slotSaveClicked() { - saveDocumentRequested(urlForIndex(d->mIndexUnderCursor)); + emit saveDocumentRequested(urlForIndex(d->mIndexUnderCursor)); } void PreviewItemDelegate::slotRotateLeftClicked() { d->selectIndexUnderCursorIfNoMultiSelection(); - rotateDocumentLeftRequested(urlForIndex(d->mIndexUnderCursor)); + emit rotateDocumentLeftRequested(urlForIndex(d->mIndexUnderCursor)); } void PreviewItemDelegate::slotRotateRightClicked() { d->selectIndexUnderCursorIfNoMultiSelection(); - rotateDocumentRightRequested(urlForIndex(d->mIndexUnderCursor)); + emit rotateDocumentRightRequested(urlForIndex(d->mIndexUnderCursor)); } void PreviewItemDelegate::slotFullScreenClicked() { - showDocumentInFullScreenRequested(urlForIndex(d->mIndexUnderCursor)); + emit showDocumentInFullScreenRequested(urlForIndex(d->mIndexUnderCursor)); } void PreviewItemDelegate::slotToggleSelectionClicked() diff --git a/lib/thumbnailview/thumbnailview.cpp b/lib/thumbnailview/thumbnailview.cpp --- a/lib/thumbnailview/thumbnailview.cpp +++ b/lib/thumbnailview/thumbnailview.cpp @@ -390,8 +390,8 @@ it.value().mAdjustedPix = QPixmap(); } - thumbnailSizeChanged(value); - thumbnailWidthChanged(value.width()); + emit thumbnailSizeChanged(value); + emit thumbnailWidthChanged(value.width()); if (d->mScaleMode != ScaleToFit) { scheduleDelayedItemsLayout(); } @@ -490,7 +490,7 @@ { QListView::rowsInserted(parent, start, end); d->mScheduledThumbnailGenerationTimer.start(); - rowsInsertedSignal(parent, start, end); + emit rowsInsertedSignal(parent, start, end); } void ThumbnailView::dataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector &roles)