Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 40d6cbc4 authored by Laurent Montel's avatar Laurent Montel 😁

Const'ify, add const'ref found by clazy

parent 9ec15773
......@@ -99,7 +99,7 @@ private:
class ImageCollection : public KIPI::ImageCollectionShared
{
public:
ImageCollection(QUrl dirURL, const QString& name, const QList<QUrl>& images)
ImageCollection(const QUrl &dirURL, const QString& name, const QList<QUrl>& images)
: KIPI::ImageCollectionShared()
, mDirURL(dirURL)
, mName(name)
......
......@@ -93,7 +93,7 @@ void AbstractDocumentImpl::setDocumentErrorString(const QString& string)
d->mDocument->setErrorString(string);
}
void AbstractDocumentImpl::setDocumentCmsProfile(Cms::Profile::Ptr profile)
void AbstractDocumentImpl::setDocumentCmsProfile(const Cms::Profile::Ptr &profile)
{
d->mDocument->setCmsProfile(profile);
}
......
......@@ -115,7 +115,7 @@ protected:
void setDocumentFormat(const QByteArray& format);
void setDocumentExiv2Image(std::unique_ptr<Exiv2::Image>);
void setDocumentDownSampledImage(const QImage&, int invertedZoom);
void setDocumentCmsProfile(Cms::Profile::Ptr profile);
void setDocumentCmsProfile(const Cms::Profile::Ptr &profile);
void setDocumentErrorString(const QString&);
void switchToImpl(AbstractDocumentImpl* impl);
......
......@@ -562,7 +562,7 @@ QSvgRenderer* Document::svgRenderer() const
return d->mImpl->svgRenderer();
}
void Document::setCmsProfile(Cms::Profile::Ptr ptr)
void Document::setCmsProfile(const Cms::Profile::Ptr &ptr)
{
d->mCmsProfile = ptr;
}
......
......@@ -244,7 +244,7 @@ private:
void setDownSampledImage(const QImage&, int invertedZoom);
void switchToImpl(AbstractDocumentImpl* impl);
void setErrorString(const QString&);
void setCmsProfile(Cms::Profile::Ptr);
void setCmsProfile(const Cms::Profile::Ptr&);
Document(const QUrl&);
DocumentPrivate * const d;
......
......@@ -121,7 +121,7 @@ public:
/** @} */
virtual Document::Ptr document() const = 0;
virtual void setDocument(Document::Ptr) = 0;
virtual void setDocument(const Document::Ptr &) = 0;
virtual void loadConfig()
{}
......@@ -194,7 +194,7 @@ public:
{
return Document::Ptr();
}
void setDocument(Document::Ptr) override
void setDocument(const Document::Ptr&) override
{}
};
......
......@@ -171,7 +171,7 @@ Document::Ptr AbstractImageView::document() const
return d->mDocument;
}
void AbstractImageView::setDocument(Document::Ptr doc)
void AbstractImageView::setDocument(const Document::Ptr &doc)
{
if (d->mDocument) {
disconnect(d->mDocument.data(), nullptr, this, nullptr);
......
......@@ -65,7 +65,7 @@ public:
virtual void setZoomToFill(bool value, const QPointF& center = QPointF(-1, -1));
virtual void setDocument(Document::Ptr doc);
virtual void setDocument(const Document::Ptr &doc);
Document::Ptr document() const;
......
......@@ -98,7 +98,7 @@ Document::Ptr MessageViewAdapter::document() const
return d->mDocument;
}
void MessageViewAdapter::setDocument(Document::Ptr doc)
void MessageViewAdapter::setDocument(const Document::Ptr &doc)
{
d->mDocument = doc;
}
......
......@@ -46,7 +46,7 @@ public:
Document::Ptr document() const override;
void setDocument(Document::Ptr) override;
void setDocument(const Document::Ptr&) override;
void setInfoMessage(const QString&);
......
......@@ -160,7 +160,7 @@ struct RasterImageViewPrivate
mAlternateBuffer = QPixmap();
}
void drawAlphaBackground(QPainter* painter, const QRect& viewportRect, const QPoint& zoomedImageTopLeft, QPixmap texture)
void drawAlphaBackground(QPainter* painter, const QRect& viewportRect, const QPoint& zoomedImageTopLeft, const QPixmap &texture)
{
switch (mAlphaBackgroundMode) {
case AbstractImageView::AlphaBackgroundNone:
......
......@@ -74,7 +74,7 @@ void RasterImageViewAdapter::setCursor(const QCursor& cursor)
d->mView->setCursor(cursor);
}
void RasterImageViewAdapter::setDocument(Document::Ptr doc)
void RasterImageViewAdapter::setDocument(const Document::Ptr &doc)
{
d->mView->setDocument(doc);
......
......@@ -73,7 +73,7 @@ public:
Document::Ptr document() const override;
void setDocument(Document::Ptr) override;
void setDocument(const Document::Ptr &) override;
void loadConfig() override;
......
......@@ -189,7 +189,7 @@ void SvgViewAdapter::setCursor(const QCursor& cursor)
widget()->setCursor(cursor);
}
void SvgViewAdapter::setDocument(Document::Ptr doc)
void SvgViewAdapter::setDocument(const Document::Ptr &doc)
{
d->mView->setDocument(doc);
}
......
......@@ -77,7 +77,7 @@ public:
void setCursor(const QCursor&) override;
void setDocument(Document::Ptr) override;
void setDocument(const Document::Ptr &) override;
Document::Ptr document() const override;
......
......@@ -233,7 +233,7 @@ VideoViewAdapter::~VideoViewAdapter()
delete d;
}
void VideoViewAdapter::setDocument(Document::Ptr doc)
void VideoViewAdapter::setDocument(const Document::Ptr &doc)
{
d->mHud->show();
d->mDocument = doc;
......
......@@ -48,7 +48,7 @@ public:
Document::Ptr document() const override;
void setDocument(Document::Ptr) override;
void setDocument(const Document::Ptr &) override;
Q_SIGNALS:
void videoFinished();
......
......@@ -66,7 +66,7 @@ ImageScaler::~ImageScaler()
delete d;
}
void ImageScaler::setDocument(Document::Ptr document)
void ImageScaler::setDocument(const Document::Ptr &document)
{
if (d->mDocument) {
disconnect(d->mDocument.data(), nullptr, this, nullptr);
......
......@@ -45,7 +45,7 @@ class GWENVIEWLIB_EXPORT ImageScaler : public QObject
public:
explicit ImageScaler(QObject* parent = nullptr);
~ImageScaler() override;
void setDocument(Document::Ptr);
void setDocument(const Document::Ptr&);
void setZoom(qreal);
void setDestinationRegion(const QRegion&);
......
......@@ -366,7 +366,7 @@ struct OrientationInfo
, jxform(JXFORM_NONE)
{}
OrientationInfo(Orientation o, QMatrix m, JXFORM_CODE j)
OrientationInfo(Orientation o, const QMatrix &m, JXFORM_CODE j)
: orientation(o), matrix(m), jxform(j)
{}
......
......@@ -77,7 +77,7 @@ QList<QWidget*> TagItemDelegate::createItemWidgets(const QModelIndex &index) con
return QList<QWidget*>() << removeButton << assignToAllButton;
}
void TagItemDelegate::updateItemWidgets(const QList<QWidget*> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const
void TagItemDelegate::updateItemWidgets(const QList<QWidget *> widgets, const QStyleOptionViewItem& option, const QPersistentModelIndex& index) const
{
const bool fullyAssigned = index.data(TagModel::AssignmentStatusRole).toInt() == int(TagModel::FullyAssigned);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment