diff options
author | Albert Astals Cid <aacid@kde.org> | 2021-08-21 21:46:00 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2021-08-27 16:11:53 +0200 |
commit | 6aff5bbbfe06c70314ba7ea936d98aed0e48331f (patch) | |
tree | 6e69834989b2b1560b170906215be75a7d82d139 /qt6 | |
parent | 646a1519d965895a4126b4e5f6fee2102d9c38a6 (diff) |
CI: Enable google-explicit-constructor
I was doing some refactoring before and was hit by one of the
constructors being magically called when i didn't want that.
Since we don't really on it (was just used in some of the explicit type
conversions) I think it makes sense to enable
And 2 small qt6 clang-tidy fixes because we don't have qt6 on
the clang-tidy CI yet
There's 2 potentially source incompatible changes in the qt frontend,
but i really really hope noone was using the constructors that way
Diffstat (limited to 'qt6')
55 files changed, 123 insertions, 111 deletions
diff --git a/qt6/demos/abstractinfodock.h b/qt6/demos/abstractinfodock.h index 557fca7e..9dd2576f 100644 --- a/qt6/demos/abstractinfodock.h +++ b/qt6/demos/abstractinfodock.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class AbstractInfoDock : public QDockWidget, public DocumentObserver Q_OBJECT public: - AbstractInfoDock(QWidget *parent = nullptr); + explicit AbstractInfoDock(QWidget *parent = nullptr); ~AbstractInfoDock() override; void documentLoaded() override; diff --git a/qt6/demos/embeddedfiles.h b/qt6/demos/embeddedfiles.h index 7ddb6b1e..e4a40403 100644 --- a/qt6/demos/embeddedfiles.h +++ b/qt6/demos/embeddedfiles.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class EmbeddedFilesDock : public AbstractInfoDock Q_OBJECT public: - EmbeddedFilesDock(QWidget *parent = nullptr); + explicit EmbeddedFilesDock(QWidget *parent = nullptr); ~EmbeddedFilesDock() override; void documentLoaded() override; diff --git a/qt6/demos/fonts.h b/qt6/demos/fonts.h index e056e01b..e8fed63f 100644 --- a/qt6/demos/fonts.h +++ b/qt6/demos/fonts.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class FontsDock : public AbstractInfoDock Q_OBJECT public: - FontsDock(QWidget *parent = nullptr); + explicit FontsDock(QWidget *parent = nullptr); ~FontsDock() override; void documentClosed() override; diff --git a/qt6/demos/info.h b/qt6/demos/info.h index d964a9f4..0bbcf75d 100644 --- a/qt6/demos/info.h +++ b/qt6/demos/info.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class InfoDock : public AbstractInfoDock Q_OBJECT public: - InfoDock(QWidget *parent = nullptr); + explicit InfoDock(QWidget *parent = nullptr); ~InfoDock() override; void documentClosed() override; diff --git a/qt6/demos/metadata.h b/qt6/demos/metadata.h index f5dc391d..0d58e840 100644 --- a/qt6/demos/metadata.h +++ b/qt6/demos/metadata.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class MetadataDock : public AbstractInfoDock Q_OBJECT public: - MetadataDock(QWidget *parent = nullptr); + explicit MetadataDock(QWidget *parent = nullptr); ~MetadataDock() override; void documentClosed() override; diff --git a/qt6/demos/navigationtoolbar.h b/qt6/demos/navigationtoolbar.h index 7ca73015..ffec8f4d 100644 --- a/qt6/demos/navigationtoolbar.h +++ b/qt6/demos/navigationtoolbar.h @@ -1,7 +1,7 @@ /* * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org> * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it> - * Copyright (C) 2019, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2019, 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -33,7 +33,7 @@ class NavigationToolBar : public QToolBar, public DocumentObserver Q_OBJECT public: - NavigationToolBar(QWidget *parent = nullptr); + explicit NavigationToolBar(QWidget *parent = nullptr); ~NavigationToolBar() override; void documentLoaded() override; diff --git a/qt6/demos/optcontent.h b/qt6/demos/optcontent.h index 7764a42b..9da451be 100644 --- a/qt6/demos/optcontent.h +++ b/qt6/demos/optcontent.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class OptContentDock : public AbstractInfoDock Q_OBJECT public: - OptContentDock(QWidget *parent = nullptr); + explicit OptContentDock(QWidget *parent = nullptr); ~OptContentDock() override; void documentLoaded() override; diff --git a/qt6/demos/pageview.h b/qt6/demos/pageview.h index 9149ec0d..c7446d43 100644 --- a/qt6/demos/pageview.h +++ b/qt6/demos/pageview.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org> * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +32,7 @@ class PageView : public QScrollArea, public DocumentObserver Q_OBJECT public: - PageView(QWidget *parent = nullptr); + explicit PageView(QWidget *parent = nullptr); ~PageView() override; void documentLoaded() override; diff --git a/qt6/demos/permissions.h b/qt6/demos/permissions.h index 9c5072b8..06293ccc 100644 --- a/qt6/demos/permissions.h +++ b/qt6/demos/permissions.h @@ -1,5 +1,6 @@ /* * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ class PermissionsDock : public AbstractInfoDock Q_OBJECT public: - PermissionsDock(QWidget *parent = nullptr); + explicit PermissionsDock(QWidget *parent = nullptr); ~PermissionsDock() override; void documentClosed() override; diff --git a/qt6/demos/thumbnails.h b/qt6/demos/thumbnails.h index 3eda6cf7..a568df65 100644 --- a/qt6/demos/thumbnails.h +++ b/qt6/demos/thumbnails.h @@ -1,6 +1,7 @@ /* * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com> * Copyright (C) 2009, Pino Toscano <pino@kde.org> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,7 @@ class ThumbnailsDock : public AbstractInfoDock Q_OBJECT public: - ThumbnailsDock(QWidget *parent = nullptr); + explicit ThumbnailsDock(QWidget *parent = nullptr); ~ThumbnailsDock() override; void documentClosed() override; diff --git a/qt6/demos/toc.h b/qt6/demos/toc.h index b6c77ba7..fa5ec591 100644 --- a/qt6/demos/toc.h +++ b/qt6/demos/toc.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2008, Pino Toscano <pino@kde.org> - * Copyright (C) 2019, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2019, 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -29,7 +29,7 @@ class TocDock : public AbstractInfoDock Q_OBJECT public: - TocDock(QWidget *parent = nullptr); + explicit TocDock(QWidget *parent = nullptr); ~TocDock() override; void documentClosed() override; diff --git a/qt6/demos/viewer.h b/qt6/demos/viewer.h index a3492f31..bb1a990e 100644 --- a/qt6/demos/viewer.h +++ b/qt6/demos/viewer.h @@ -2,6 +2,7 @@ * Copyright (C) 2008, Pino Toscano <pino@kde.org> * Copyright (C) 2021, Mahmoud Khalil <mahmoudkhalil11@gmail.com> * Copyright (C) 2021, Oliver Sander <oliver.sander@tu-dresden.de> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,7 +39,7 @@ class PdfViewer : public QMainWindow friend class DocumentObserver; public: - PdfViewer(QWidget *parent = nullptr); + explicit PdfViewer(QWidget *parent = nullptr); ~PdfViewer() override; QSize sizeHint() const override; diff --git a/qt6/src/QPainterOutputDev.h b/qt6/src/QPainterOutputDev.h index d15579be..3c133d64 100644 --- a/qt6/src/QPainterOutputDev.h +++ b/qt6/src/QPainterOutputDev.h @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Brad Hards <bradh@frogmouth.net> -// Copyright (C) 2005, 2018, 2019 Albert Astals Cid <aacid@kde.org> +// Copyright (C) 2005, 2018, 2019, 2021 Albert Astals Cid <aacid@kde.org> // Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc@gnome.org> // Copyright (C) 2010 Pino Toscano <pino@kde.org> // Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> @@ -57,7 +57,7 @@ class QPainterOutputDev : public OutputDev { public: // Constructor. - QPainterOutputDev(QPainter *painter); + explicit QPainterOutputDev(QPainter *painter); // Destructor. ~QPainterOutputDev() override; diff --git a/qt6/src/poppler-annotation.h b/qt6/src/poppler-annotation.h index 6497ce27..eceb234f 100644 --- a/qt6/src/poppler-annotation.h +++ b/qt6/src/poppler-annotation.h @@ -1,5 +1,5 @@ /* poppler-annotation.h: qt interface to poppler - * Copyright (C) 2006-2008, 2012, 2013, 2018-2020 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2006-2008, 2012, 2013, 2018-2021 Albert Astals Cid <aacid@kde.org> * Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org> * Copyright (C) 2007, Brad Hards <bradh@frogmouth.net> * Copyright (C) 2010, Philip Lorenz <lorenzph+freedesktop@gmail.com> @@ -404,7 +404,7 @@ public: protected: /// \cond PRIVATE - Annotation(AnnotationPrivate &dd); + explicit Annotation(AnnotationPrivate &dd); Q_DECLARE_PRIVATE(Annotation) QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr; /// \endcond @@ -443,7 +443,7 @@ public: InplaceAlignRight }; - TextAnnotation(TextType type); + explicit TextAnnotation(TextType type); ~TextAnnotation() override; SubType subType() const override; @@ -489,7 +489,7 @@ public: void setInplaceIntent(InplaceIntent intent); private: - TextAnnotation(TextAnnotationPrivate &dd); + explicit TextAnnotation(TextAnnotationPrivate &dd); void setTextType(TextType type); Q_DECLARE_PRIVATE(TextAnnotation) Q_DISABLE_COPY(TextAnnotation) @@ -532,7 +532,7 @@ public: PolygonCloud }; - LineAnnotation(LineType type); + explicit LineAnnotation(LineType type); ~LineAnnotation() override; SubType subType() const override; @@ -566,7 +566,7 @@ public: void setLineIntent(LineIntent intent); private: - LineAnnotation(LineAnnotationPrivate &dd); + explicit LineAnnotation(LineAnnotationPrivate &dd); void setLineType(LineType type); Q_DECLARE_PRIVATE(LineAnnotation) Q_DISABLE_COPY(LineAnnotation) @@ -601,7 +601,7 @@ public: void setGeomInnerColor(const QColor &color); private: - GeomAnnotation(GeomAnnotationPrivate &dd); + explicit GeomAnnotation(GeomAnnotationPrivate &dd); Q_DECLARE_PRIVATE(GeomAnnotation) Q_DISABLE_COPY(GeomAnnotation) }; @@ -667,7 +667,7 @@ public: void setHighlightQuads(const QList<Quad> &quads); private: - HighlightAnnotation(HighlightAnnotationPrivate &dd); + explicit HighlightAnnotation(HighlightAnnotationPrivate &dd); Q_DECLARE_PRIVATE(HighlightAnnotation) Q_DISABLE_COPY(HighlightAnnotation) }; @@ -715,7 +715,7 @@ public: void setStampIconName(const QString &name); private: - StampAnnotation(StampAnnotationPrivate &dd); + explicit StampAnnotation(StampAnnotationPrivate &dd); Q_DECLARE_PRIVATE(StampAnnotation) Q_DISABLE_COPY(StampAnnotation) }; @@ -738,7 +738,7 @@ public: void setInkPaths(const QList<QVector<QPointF>> &paths); private: - InkAnnotation(InkAnnotationPrivate &dd); + explicit InkAnnotation(InkAnnotationPrivate &dd); Q_DECLARE_PRIVATE(InkAnnotation) Q_DISABLE_COPY(InkAnnotation) }; @@ -771,7 +771,7 @@ public: private: LinkAnnotation(); - LinkAnnotation(LinkAnnotationPrivate &dd); + explicit LinkAnnotation(LinkAnnotationPrivate &dd); Q_DECLARE_PRIVATE(LinkAnnotation) Q_DISABLE_COPY(LinkAnnotation) }; @@ -803,7 +803,7 @@ public: void setCaretSymbol(CaretSymbol symbol); private: - CaretAnnotation(CaretAnnotationPrivate &dd); + explicit CaretAnnotation(CaretAnnotationPrivate &dd); Q_DECLARE_PRIVATE(CaretAnnotation) Q_DISABLE_COPY(CaretAnnotation) }; @@ -843,7 +843,7 @@ public: private: FileAttachmentAnnotation(); - FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd); + explicit FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd); Q_DECLARE_PRIVATE(FileAttachmentAnnotation) Q_DISABLE_COPY(FileAttachmentAnnotation) }; @@ -883,7 +883,7 @@ public: private: SoundAnnotation(); - SoundAnnotation(SoundAnnotationPrivate &dd); + explicit SoundAnnotation(SoundAnnotationPrivate &dd); Q_DECLARE_PRIVATE(SoundAnnotation) Q_DISABLE_COPY(SoundAnnotation) }; @@ -923,7 +923,7 @@ public: private: MovieAnnotation(); - MovieAnnotation(MovieAnnotationPrivate &dd); + explicit MovieAnnotation(MovieAnnotationPrivate &dd); Q_DECLARE_PRIVATE(MovieAnnotation) Q_DISABLE_COPY(MovieAnnotation) }; @@ -972,7 +972,7 @@ public: private: ScreenAnnotation(); - ScreenAnnotation(ScreenAnnotationPrivate &dd); + explicit ScreenAnnotation(ScreenAnnotationPrivate &dd); Q_DECLARE_PRIVATE(ScreenAnnotation) Q_DISABLE_COPY(ScreenAnnotation) }; @@ -1002,7 +1002,7 @@ public: private: WidgetAnnotation(); - WidgetAnnotation(WidgetAnnotationPrivate &dd); + explicit WidgetAnnotation(WidgetAnnotationPrivate &dd); Q_DECLARE_PRIVATE(WidgetAnnotation) Q_DISABLE_COPY(WidgetAnnotation) }; @@ -1326,7 +1326,7 @@ private: void setContent(RichMediaAnnotation::Content *content); RichMediaAnnotation(); - RichMediaAnnotation(RichMediaAnnotationPrivate &dd); + explicit RichMediaAnnotation(RichMediaAnnotationPrivate &dd); Q_DECLARE_PRIVATE(RichMediaAnnotation) Q_DISABLE_COPY(RichMediaAnnotation) }; diff --git a/qt6/src/poppler-embeddedfile-private.h b/qt6/src/poppler-embeddedfile-private.h index 531b4833..5eacf50d 100644 --- a/qt6/src/poppler-embeddedfile-private.h +++ b/qt6/src/poppler-embeddedfile-private.h @@ -1,5 +1,5 @@ /* poppler-embeddedfile-private.h: Qt interface to poppler - * Copyright (C) 2005, 2008, 2009, 2012, 2018, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2005, 2008, 2009, 2012, 2018, 2021, Albert Astals Cid <aacid@kde.org> * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net> * Copyright (C) 2008, 2011, Pino Toscano <pino@kde.org> * @@ -28,7 +28,7 @@ namespace Poppler { class EmbeddedFileData { public: - EmbeddedFileData(FileSpec *fs); + explicit EmbeddedFileData(FileSpec *fs); ~EmbeddedFileData(); EmbeddedFileData(const EmbeddedFileData &) = delete; diff --git a/qt6/src/poppler-form.cc b/qt6/src/poppler-form.cc index b4ebee41..58e84110 100644 --- a/qt6/src/poppler-form.cc +++ b/qt6/src/poppler-form.cc @@ -1,6 +1,6 @@ /* poppler-form.h: qt interface to poppler * Copyright (C) 2007-2008, 2011, Pino Toscano <pino@kde.org> - * Copyright (C) 2008, 2011, 2012, 2015-2020 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2008, 2011, 2012, 2015-2021 Albert Astals Cid <aacid@kde.org> * Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org> * Copyright (C) 2012, Adam Reichold <adamreichold@myopera.com> * Copyright (C) 2016, Hanno Meyer-Thurow <h.mth@web.de> @@ -765,7 +765,7 @@ bool CertificateInfo::checkPassword(const QString &password) const class SignatureValidationInfoPrivate { public: - SignatureValidationInfoPrivate(CertificateInfo &&ci) : cert_info(ci) { } + explicit SignatureValidationInfoPrivate(CertificateInfo &&ci) : cert_info(ci) { } SignatureValidationInfo::SignatureStatus signature_status; SignatureValidationInfo::CertificateStatus certificate_status; diff --git a/qt6/src/poppler-form.h b/qt6/src/poppler-form.h index 468689e6..9704f847 100644 --- a/qt6/src/poppler-form.h +++ b/qt6/src/poppler-form.h @@ -1,6 +1,6 @@ /* poppler-form.h: qt interface to poppler * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org> - * Copyright (C) 2008, 2011, 2016, 2017, 2019, 2020, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2008, 2011, 2016, 2017, 2019-2021, Albert Astals Cid <aacid@kde.org> * Copyright (C) 2012, Adam Reichold <adamreichold@myopera.com> * Copyright (C) 2016, Hanno Meyer-Thurow <h.mth@web.de> * Copyright (C) 2017, Hans-Ulrich Jüttner <huj@froreich-bioscientia.de> @@ -69,7 +69,7 @@ class POPPLER_QT6_EXPORT FormFieldIcon friend class FormFieldIconData; public: - FormFieldIcon(FormFieldIconData *data); + explicit FormFieldIcon(FormFieldIconData *data); FormFieldIcon(const FormFieldIcon &ffIcon); ~FormFieldIcon(); @@ -196,7 +196,7 @@ public: protected: /// \cond PRIVATE - FormField(std::unique_ptr<FormFieldData> dd); + explicit FormField(std::unique_ptr<FormFieldData> dd); std::unique_ptr<FormFieldData> m_formData; /// \endcond @@ -498,7 +498,7 @@ public: }; CertificateInfo(); - CertificateInfo(CertificateInfoPrivate *priv); + explicit CertificateInfo(CertificateInfoPrivate *priv); ~CertificateInfo(); /** @@ -641,7 +641,7 @@ public: }; /// \cond PRIVATE - SignatureValidationInfo(SignatureValidationInfoPrivate *priv); + explicit SignatureValidationInfo(SignatureValidationInfoPrivate *priv); /// \endcond ~SignatureValidationInfo(); diff --git a/qt6/src/poppler-link-extractor-private.h b/qt6/src/poppler-link-extractor-private.h index e2cc78b2..b36a3cc0 100644 --- a/qt6/src/poppler-link-extractor-private.h +++ b/qt6/src/poppler-link-extractor-private.h @@ -1,6 +1,7 @@ /* poppler-link-extractor_p.h: qt interface to poppler * Copyright (C) 2007, 2008, 2011, Pino Toscano <pino@kde.org> * Copyright (C) 2021, Oliver Sander <oliver.sander@tu-dresden.de> + * Copyright (C) 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +37,7 @@ class PageData; class LinkExtractorOutputDev : public OutputDev { public: - LinkExtractorOutputDev(PageData *data); + explicit LinkExtractorOutputDev(PageData *data); ~LinkExtractorOutputDev() override; // inherited from OutputDev diff --git a/qt6/src/poppler-link-private.h b/qt6/src/poppler-link-private.h index 4921a633..edf334b3 100644 --- a/qt6/src/poppler-link-private.h +++ b/qt6/src/poppler-link-private.h @@ -1,5 +1,5 @@ /* poppler-link-private.h: qt interface to poppler - * Copyright (C) 2016, 2018, 2020 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2016, 2018, 2020, 2021 Albert Astals Cid <aacid@kde.org> * Copyright (C) 2018 Intevation GmbH <intevation@intevation.de> * Copyright (C) 2020, 2021 Oliver Sander <oliver.sander@tu-dresden.de> * @@ -34,7 +34,7 @@ class Link; class LinkPrivate { public: - LinkPrivate(const QRectF &area) : linkArea(area) { } + explicit LinkPrivate(const QRectF &area) : linkArea(area) { } virtual ~LinkPrivate(); diff --git a/qt6/src/poppler-link.cc b/qt6/src/poppler-link.cc index 8a5bb1d6..b2c1b24b 100644 --- a/qt6/src/poppler-link.cc +++ b/qt6/src/poppler-link.cc @@ -1,5 +1,5 @@ /* poppler-link.cc: qt interface to poppler - * Copyright (C) 2006-2007, 2013, 2016-2020, Albert Astals Cid + * Copyright (C) 2006-2007, 2013, 2016-2021, Albert Astals Cid * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org> * Copyright (C) 2010 Hib Eris <hib@hiberis.nl> * Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com> @@ -92,7 +92,7 @@ LinkGotoPrivate::~LinkGotoPrivate() = default; class LinkExecutePrivate : public LinkPrivate { public: - LinkExecutePrivate(const QRectF &area); + explicit LinkExecutePrivate(const QRectF &area); ~LinkExecutePrivate() override; QString fileName; @@ -106,7 +106,7 @@ LinkExecutePrivate::~LinkExecutePrivate() = default; class LinkBrowsePrivate : public LinkPrivate { public: - LinkBrowsePrivate(const QRectF &area); + explicit LinkBrowsePrivate(const QRectF &area); ~LinkBrowsePrivate() override; QString url; @@ -119,7 +119,7 @@ LinkBrowsePrivate::~LinkBrowsePrivate() = default; class LinkActionPrivate : public LinkPrivate { public: - LinkActionPrivate(const QRectF &area); + explicit LinkActionPrivate(const QRectF &area); ~LinkActionPrivate() override; LinkAction::ActionType type; @@ -132,7 +132,7 @@ LinkActionPrivate::~LinkActionPrivate() = default; class LinkSoundPrivate : public LinkPrivate { public: - LinkSoundPrivate(const QRectF &area); + explicit LinkSoundPrivate(const QRectF &area); ~LinkSoundPrivate() override; double volume; @@ -191,7 +191,7 @@ LinkRenditionPrivate::~LinkRenditionPrivate() class LinkJavaScriptPrivate : public LinkPrivate { public: - LinkJavaScriptPrivate(const QRectF &area); + explicit LinkJavaScriptPrivate(const QRectF &area); ~LinkJavaScriptPrivate() override; QString js; diff --git a/qt6/src/poppler-link.h b/qt6/src/poppler-link.h index 595916fd..7cadd218 100644 --- a/qt6/src/poppler-link.h +++ b/qt6/src/poppler-link.h @@ -1,5 +1,5 @@ /* poppler-link.h: qt interface to poppler - * Copyright (C) 2006, 2013, 2016, 2018, 2019, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2006, 2013, 2016, 2018, 2019, 2021, Albert Astals Cid <aacid@kde.org> * Copyright (C) 2007-2008, 2010, Pino Toscano <pino@kde.org> * Copyright (C) 2010, 2012, Guillermo Amaral <gamaral@kdab.com> * Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com> @@ -90,8 +90,8 @@ public: }; /// \cond PRIVATE - LinkDestination(const LinkDestinationData &data); - LinkDestination(const QString &description); + explicit LinkDestination(const LinkDestinationData &data); + explicit LinkDestination(const QString &description); /// \endcond /** * Copy constructor. @@ -178,7 +178,7 @@ class POPPLER_QT6_EXPORT Link { public: /// \cond PRIVATE - Link(const QRectF &linkArea); + explicit Link(const QRectF &linkArea); /// \endcond /** @@ -228,7 +228,7 @@ public: protected: /// \cond PRIVATE - Link(LinkPrivate &dd); + explicit Link(LinkPrivate &dd); Q_DECLARE_PRIVATE(Link) LinkPrivate *d_ptr; /// \endcond @@ -609,7 +609,7 @@ public: /** * Create a new OCGState link. This is only used by Poppler::Page. */ - LinkOCGState(LinkOCGStatePrivate *ocgp); + explicit LinkOCGState(LinkOCGStatePrivate *ocgp); /** * Destructor. */ @@ -631,7 +631,7 @@ public: /** * Create a new Hide link. This is only used by Poppler::Page. */ - LinkHide(LinkHidePrivate *lhidep); + explicit LinkHide(LinkHidePrivate *lhidep); /** * Destructor. */ diff --git a/qt6/src/poppler-media.cc b/qt6/src/poppler-media.cc index b493b8dd..5c804951 100644 --- a/qt6/src/poppler-media.cc +++ b/qt6/src/poppler-media.cc @@ -1,6 +1,6 @@ /* poppler-media.cc: qt interface to poppler * Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org> - * Copyright (C) 2013, 2018 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2013, 2018, 2021 Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -32,7 +32,7 @@ namespace Poppler { class MediaRenditionPrivate { public: - MediaRenditionPrivate(::MediaRendition *renditionA) : rendition(renditionA) { } + explicit MediaRenditionPrivate(::MediaRendition *renditionA) : rendition(renditionA) { } ~MediaRenditionPrivate() { delete rendition; } diff --git a/qt6/src/poppler-media.h b/qt6/src/poppler-media.h index e6c793b7..83bd3294 100644 --- a/qt6/src/poppler-media.h +++ b/qt6/src/poppler-media.h @@ -1,6 +1,6 @@ /* poppler-media.h: qt interface to poppler * Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org> - * Copyright (C) 2012, 2013 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2012, 2013, 2021 Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +40,7 @@ public: /** Constructs a MediaRendition. Takes ownership of the passed rendition */ - MediaRendition(::MediaRendition *rendition); + explicit MediaRendition(::MediaRendition *rendition); ~MediaRendition(); /** diff --git a/qt6/src/poppler-optcontent-private.h b/qt6/src/poppler-optcontent-private.h index 550a7bcc..589fb0bc 100644 --- a/qt6/src/poppler-optcontent-private.h +++ b/qt6/src/poppler-optcontent-private.h @@ -2,7 +2,7 @@ * * Copyright (C) 2007, Brad Hards <bradh@kde.org> * Copyright (C) 2008, Pino Toscano <pino@kde.org> - * Copyright (C) 2016, 2018, 2019, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2016, 2018, 2019, 2021, Albert Astals Cid <aacid@kde.org> * Copyright (C) 2017, Hubert Figuière <hub@figuiere.net> * * This program is free software; you can redistribute it and/or modify @@ -59,8 +59,8 @@ public: HeadingOnly }; - OptContentItem(OptionalContentGroup *group); - OptContentItem(const QString &label); + explicit OptContentItem(OptionalContentGroup *group); + explicit OptContentItem(const QString &label); OptContentItem(); ~OptContentItem(); diff --git a/qt6/src/poppler-optcontent.h b/qt6/src/poppler-optcontent.h index 2aaea362..6b9467a3 100644 --- a/qt6/src/poppler-optcontent.h +++ b/qt6/src/poppler-optcontent.h @@ -3,7 +3,7 @@ * Copyright (C) 2007, Brad Hards <bradh@kde.org> * Copyright (C) 2008, Pino Toscano <pino@kde.org> * Copyright (C) 2013, Anthony Granger <grangeranthony@gmail.com> - * Copyright (C) 2016, Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2016, 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -71,7 +71,7 @@ public: void applyLink(LinkOCGState *link); private: - OptContentModel(OCGs *optContent, QObject *parent = nullptr); + explicit OptContentModel(OCGs *optContent, QObject *parent = nullptr); friend class OptContentModelPrivate; OptContentModelPrivate *d; diff --git a/qt6/src/poppler-page-transition.cc b/qt6/src/poppler-page-transition.cc index 30f8bee2..2e1687cc 100644 --- a/qt6/src/poppler-page-transition.cc +++ b/qt6/src/poppler-page-transition.cc @@ -1,7 +1,7 @@ /* PageTransition.cc * Copyright (C) 2005, Net Integration Technologies, Inc. * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se> - * Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2018, 2021 Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,7 +27,7 @@ namespace Poppler { class PageTransitionData { public: - PageTransitionData(Object *trans) { pt = new ::PageTransition(trans); } + explicit PageTransitionData(Object *trans) { pt = new ::PageTransition(trans); } PageTransitionData(const PageTransitionData &ptd) { pt = new ::PageTransition(*ptd.pt); } diff --git a/qt6/src/poppler-page-transition.h b/qt6/src/poppler-page-transition.h index e7dac916..6c09623d 100644 --- a/qt6/src/poppler-page-transition.h +++ b/qt6/src/poppler-page-transition.h @@ -2,7 +2,7 @@ * Copyright (C) 2005, Net Integration Technologies, Inc. * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net> * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se> - * Copyright (C) 2018 Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2018, 2021, Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -84,7 +84,7 @@ public: Outward }; - PageTransition(const PageTransitionParams params); + explicit PageTransition(const PageTransitionParams params); /** \brief copy constructor */ PageTransition(const PageTransition &pt); diff --git a/qt6/src/poppler-private.h b/qt6/src/poppler-private.h index 7ca700f6..ca69d676 100644 --- a/qt6/src/poppler-private.h +++ b/qt6/src/poppler-private.h @@ -1,7 +1,7 @@ /* poppler-private.h: qt interface to poppler * Copyright (C) 2005, Net Integration Technologies, Inc. * Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net> - * Copyright (C) 2006-2009, 2011, 2012, 2017-2020 by Albert Astals Cid <aacid@kde.org> + * Copyright (C) 2006-2009, 2011, 2012, 2017-2021 by Albert Astals Cid <aacid@kde.org> * Copyright (C) 2007-2009, 2011, 2014 by Pino Toscano <pino@kde.org> * Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com> * Copyright (C) 2011 Hib Eris <hib@hiberis.nl> @@ -196,7 +196,7 @@ public: type = FontInfo::unknown; } - FontInfoData(::FontInfo *fi) + explicit FontInfoData(::FontInfo *fi) { if (fi->getName()) fontName = fi->getName()->c_str(); diff --git a/qt6/src/poppler-qiodeviceoutstream-private.h b/qt6/src/poppler-qiodeviceoutstream-private.h index a97317f6..9f407d17 100644 --- a/qt6/src/poppler-qiodeviceoutstream-private.h +++ b/qt6/src/poppler-qiodeviceoutstream-private.h @@ -1,6 +1,7 @@ /* poppler-qiodevicestream-private.h: Qt6 interface to poppler * Copyright (C) 2008, Pino Toscano <pino@kde.org> * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com> + * Copyright (C) 2021 Albert Astals Cid <aacid@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -30,7 +31,7 @@ namespace Poppler { class QIODeviceOutStream : public OutStream { public: - QIODeviceOutStream(QIODevice *device); + explicit QIODeviceOutStream(QIODevice *device); ~QIODeviceOutStream() override; void close() override; diff --git a/qt6/src/poppler-qt6.h b/qt6/src/poppler-qt6.h index 9650b97e..73ae20e7 100644 --- a/qt6/src/poppler-qt6.h +++ b/qt6/src/poppler-qt6.h @@ -202,7 +202,7 @@ public: /** Create a new font information container. */ - FontInfo(const FontInfoData &fid); + explicit FontInfo(const FontInfoData &fid); /// \endcond /** @@ -337,7 +337,7 @@ class POPPLER_QT6_EXPORT EmbeddedFile public: /// \cond PRIVATE - EmbeddedFile(EmbFile *embfile); + explicit EmbeddedFile(EmbFile *embfile); /// \endcond /** @@ -403,7 +403,7 @@ public: private: Q_DISABLE_COPY(EmbeddedFile) - EmbeddedFile(EmbeddedFileData &dd); + explicit EmbeddedFile(EmbeddedFileData &dd); EmbeddedFileData *m_embeddedFile; }; @@ -993,7 +993,7 @@ public: QVector<OutlineItem> children() const; private: - OutlineItem(OutlineItemData *data); + explicit OutlineItem(OutlineItemData *data); OutlineItemData *m_data; }; @@ -1732,7 +1732,7 @@ private: DocumentData *m_doc; - Document(DocumentData *dataA); + explicit Document(DocumentData *dataA); }; class BaseConverterPrivate; @@ -1783,7 +1783,7 @@ public: protected: /// \cond PRIVATE - BaseConverter(BaseConverterPrivate &dd); + explicit BaseConverter(BaseConverterPrivate &dd); Q_DECLARE_PRIVATE(BaseConverter) BaseConverterPrivate *d_ptr; /// \endcond @@ -1919,7 +1919,7 @@ private: Q_DECLARE_PRIVATE(PSConverter) Q_DISABLE_COPY(PSConverter) - PSConverter(DocumentData *document); + explicit PSConverter(DocumentData *document); }; /** @@ -2068,7 +2068,7 @@ private: Q_DECLARE_PRIVATE(PDFConverter) Q_DISABLE_COPY(PDFConverter) - PDFConverter(DocumentData *document); + explicit PDFConverter(DocumentData *document); }; /** @@ -2120,7 +2120,7 @@ public: /** \cond PRIVATE The caller keeps the ownership of the popplersound argument */ - SoundObject(Sound *popplersound); + explicit SoundObject(Sound *popplersound); /// \endcond ~SoundObject(); @@ -2227,7 +2227,7 @@ public: private: /// \cond PRIVATE - MovieObject(AnnotMovie *ann); + explicit MovieObject(AnnotMovie *ann); /// \endcond Q_DISABLE_COPY(MovieObject) diff --git a/qt6/tests/check_actualtext.cpp b/qt6/tests/check_actualtext.cpp index 1aa4ba67..d2eff79a 100644 --- a/qt6/tests/check_actualtext.cpp +++ b/qt6/tests/check_actualtext.cpp @@ -8,7 +8,7 @@ class TestActualText : public QObject { Q_OBJECT public: - TestActualText(QObject *parent = nullptr) : QObject(parent) { } + explicit TestActualText(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkActualText1(); void checkActualText2(); diff --git a/qt6/tests/check_annotations.cpp b/qt6/tests/check_annotations.cpp index d0cd2fc6..3476dd60 100644 --- a/qt6/tests/check_annotations.cpp +++ b/qt6/tests/check_annotations.cpp @@ -15,7 +15,7 @@ class TestAnnotations : public QObject { Q_OBJECT public: - TestAnnotations(QObject *parent = nullptr) : QObject(parent) { } + explicit TestAnnotations(QObject *parent = nullptr) : QObject(parent) { } void saveAndCheck(const std::unique_ptr<Poppler::Document> &doc, const std::function<void(Poppler::Annotation *a)> &checkFunction); diff --git a/qt6/tests/check_attachments.cpp b/qt6/tests/check_attachments.cpp index f586a921..319ec4ee 100644 --- a/qt6/tests/check_attachments.cpp +++ b/qt6/tests/check_attachments.cpp @@ -8,7 +8,7 @@ class TestAttachments : public QObject { Q_OBJECT public: - TestAttachments(QObject *parent = nullptr) : QObject(parent) { } + explicit TestAttachments(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkNoAttachments(); void checkAttach1(); diff --git a/qt6/tests/check_dateConversion.cpp b/qt6/tests/check_dateConversion.cpp index 69be1724..d675a405 100644 --- a/qt6/tests/check_dateConversion.cpp +++ b/qt6/tests/check_dateConversion.cpp @@ -9,7 +9,7 @@ class TestDateConv : public QObject { Q_OBJECT public: - TestDateConv(QObject *parent = nullptr) : QObject(parent) { } + explicit TestDateConv(QObject *parent = nullptr) : QObject(parent) { } private slots: void initTestCase(); diff --git a/qt6/tests/check_fonts.cpp b/qt6/tests/check_fonts.cpp index 12864454..e8389e3c 100644 --- a/qt6/tests/check_fonts.cpp +++ b/qt6/tests/check_fonts.cpp @@ -8,7 +8,7 @@ class TestFontsData : public QObject { Q_OBJECT public: - TestFontsData(QObject *parent = nullptr) : QObject(parent) { } + explicit TestFontsData(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkNoFonts(); void checkType1(); diff --git a/qt6/tests/check_forms.cpp b/qt6/tests/check_forms.cpp index 841fcafb..36a00f19 100644 --- a/qt6/tests/check_forms.cpp +++ b/qt6/tests/check_forms.cpp @@ -9,7 +9,7 @@ class TestForms : public QObject { Q_OBJECT public: - TestForms(QObject *parent = nullptr) : QObject(parent) { } + explicit TestForms(QObject *parent = nullptr) : QObject(parent) { } private slots: void testCheckbox(); // Test for issue #655 void testCheckboxIssue159(); // Test for issue #159 @@ -172,7 +172,7 @@ void TestForms::testSetIcon() } // Just making sure that setting a invalid icon will still produce a valid icon. - anmButton->setIcon(nullptr); + anmButton->setIcon(Poppler::FormFieldIcon(nullptr)); Poppler::FormFieldIcon anmIcon = anmButton->icon(); QVERIFY(Poppler::FormFieldIconData::getData(anmIcon)); diff --git a/qt6/tests/check_goostring.cpp b/qt6/tests/check_goostring.cpp index 626e7774..4a07cc6d 100644 --- a/qt6/tests/check_goostring.cpp +++ b/qt6/tests/check_goostring.cpp @@ -7,7 +7,7 @@ class TestGooString : public QObject { Q_OBJECT public: - TestGooString(QObject *parent = nullptr) : QObject(parent) { } + explicit TestGooString(QObject *parent = nullptr) : QObject(parent) { } private slots: void testInsertData_data(); void testInsertData(); diff --git a/qt6/tests/check_internal_outline.cpp b/qt6/tests/check_internal_outline.cpp index 0119d909..02342de5 100644 --- a/qt6/tests/check_internal_outline.cpp +++ b/qt6/tests/check_internal_outline.cpp @@ -8,7 +8,7 @@ class TestInternalOutline : public QObject { Q_OBJECT public: - TestInternalOutline(QObject *parent = nullptr) : QObject(parent) { } + explicit TestInternalOutline(QObject *parent = nullptr) : QObject(parent) { } private slots: void testCreateOutline(); void testSetOutline(); diff --git a/qt6/tests/check_lexer.cpp b/qt6/tests/check_lexer.cpp index f0b5e134..9c60962a 100644 --- a/qt6/tests/check_lexer.cpp +++ b/qt6/tests/check_lexer.cpp @@ -7,7 +7,7 @@ class TestLexer : public QObject { Q_OBJECT public: - TestLexer(QObject *parent = nullptr) : QObject(parent) { } + explicit TestLexer(QObject *parent = nullptr) : QObject(parent) { } private slots: void testNumbers(); }; diff --git a/qt6/tests/check_links.cpp b/qt6/tests/check_links.cpp index 52112400..04075c52 100644 --- a/qt6/tests/check_links.cpp +++ b/qt6/tests/check_links.cpp @@ -8,7 +8,7 @@ class TestLinks : public QObject { Q_OBJECT public: - TestLinks(QObject *parent = nullptr) : QObject(parent) { } + explicit TestLinks(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkDocumentWithNoDests(); void checkDests_xr01(); diff --git a/qt6/tests/check_metadata.cpp b/qt6/tests/check_metadata.cpp index 9c5c722c..e5008009 100644 --- a/qt6/tests/check_metadata.cpp +++ b/qt6/tests/check_metadata.cpp @@ -6,7 +6,7 @@ class TestMetaData : public QObject { Q_OBJECT public: - TestMetaData(QObject *parent = nullptr) : QObject(parent) { } + explicit TestMetaData(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkStrings_data(); void checkStrings(); diff --git a/qt6/tests/check_object.cpp b/qt6/tests/check_object.cpp index e3bc0ee5..08a7f750 100644 --- a/qt6/tests/check_object.cpp +++ b/qt6/tests/check_object.cpp @@ -7,7 +7,7 @@ class TestObject : public QObject { Q_OBJECT public: - TestObject(QObject *parent = nullptr) : QObject(parent) { } + explicit TestObject(QObject *parent = nullptr) : QObject(parent) { } private slots: void benchDefaultConstructor(); void benchMoveConstructor(); diff --git a/qt6/tests/check_optcontent.cpp b/qt6/tests/check_optcontent.cpp index e417c034..b5956682 100644 --- a/qt6/tests/check_optcontent.cpp +++ b/qt6/tests/check_optcontent.cpp @@ -10,7 +10,7 @@ class TestOptionalContent : public QObject { Q_OBJECT public: - TestOptionalContent(QObject *parent = nullptr) : QObject(parent) { } + explicit TestOptionalContent(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkVisPolicy(); void checkNestedLayers(); diff --git a/qt6/tests/check_outline.cpp b/qt6/tests/check_outline.cpp index dc03a139..8f7383e1 100644 --- a/qt6/tests/check_outline.cpp +++ b/qt6/tests/check_outline.cpp @@ -8,7 +8,7 @@ class TestOutline : public QObject { Q_OBJECT public: - TestOutline(QObject *parent = nullptr) : QObject(parent) { } + explicit TestOutline(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkOutline_xr02(); }; diff --git a/qt6/tests/check_pagelabelinfo.cpp b/qt6/tests/check_pagelabelinfo.cpp index 520a5f9b..a8e0f9ef 100644 --- a/qt6/tests/check_pagelabelinfo.cpp +++ b/qt6/tests/check_pagelabelinfo.cpp @@ -10,7 +10,7 @@ class TestPageLabelInfo : public QObject { Q_OBJECT public: - TestPageLabelInfo(QObject *parent = nullptr) : QObject(parent) { } + explicit TestPageLabelInfo(QObject *parent = nullptr) : QObject(parent) { } private slots: void testFromDecimal(); void testFromDecimalUnicode(); diff --git a/qt6/tests/check_pagelayout.cpp b/qt6/tests/check_pagelayout.cpp index a61a8d5f..e17b293e 100644 --- a/qt6/tests/check_pagelayout.cpp +++ b/qt6/tests/check_pagelayout.cpp @@ -6,7 +6,7 @@ class TestPageLayout : public QObject { Q_OBJECT public: - TestPageLayout(QObject *parent = nullptr) : QObject(parent) { } + explicit TestPageLayout(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkNone(); void checkSingle(); diff --git a/qt6/tests/check_pagemode.cpp b/qt6/tests/check_pagemode.cpp index 80707413..f20548d0 100644 --- a/qt6/tests/check_pagemode.cpp +++ b/qt6/tests/check_pagemode.cpp @@ -6,7 +6,7 @@ class TestPageMode : public QObject { Q_OBJECT public: - TestPageMode(QObject *parent = nullptr) : QObject(parent) { } + explicit TestPageMode(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkNone(); void checkFullScreen(); diff --git a/qt6/tests/check_password.cpp b/qt6/tests/check_password.cpp index e41cfced..24b6f4fa 100644 --- a/qt6/tests/check_password.cpp +++ b/qt6/tests/check_password.cpp @@ -6,7 +6,7 @@ class TestPassword : public QObject { Q_OBJECT public: - TestPassword(QObject *parent = nullptr) : QObject(parent) { } + explicit TestPassword(QObject *parent = nullptr) : QObject(parent) { } private slots: void password1(); void password1a(); diff --git a/qt6/tests/check_permissions.cpp b/qt6/tests/check_permissions.cpp index c9f94188..fde19161 100644 --- a/qt6/tests/check_permissions.cpp +++ b/qt6/tests/check_permissions.cpp @@ -6,7 +6,7 @@ class TestPermissions : public QObject { Q_OBJECT public: - TestPermissions(QObject *parent = nullptr) : QObject(parent) { } + explicit TestPermissions(QObject *parent = nullptr) : QObject(parent) { } private slots: void permissions1(); }; diff --git a/qt6/tests/check_search.cpp b/qt6/tests/check_search.cpp index 468e799f..b0e84482 100644 --- a/qt6/tests/check_search.cpp +++ b/qt6/tests/check_search.cpp @@ -6,7 +6,7 @@ class TestSearch : public QObject { Q_OBJECT public: - TestSearch(QObject *parent = nullptr) : QObject(parent) { } + explicit TestSearch(QObject *parent = nullptr) : QObject(parent) { } private slots: void testAcrossLinesSearch(); // leave it first void bug7063(); diff --git a/qt6/tests/check_strings.cpp b/qt6/tests/check_strings.cpp index fdd2f703..0fe8a7ee 100644 --- a/qt6/tests/check_strings.cpp +++ b/qt6/tests/check_strings.cpp @@ -32,7 +32,7 @@ class TestStrings : public QObject Q_OBJECT public: - TestStrings(QObject *parent = nullptr) : QObject(parent) { } + explicit TestStrings(QObject *parent = nullptr) : QObject(parent) { } private slots: void initTestCase(); diff --git a/qt6/tests/check_stroke_opacity.cpp b/qt6/tests/check_stroke_opacity.cpp index 2b10d1bc..9ece677a 100644 --- a/qt6/tests/check_stroke_opacity.cpp +++ b/qt6/tests/check_stroke_opacity.cpp @@ -11,7 +11,7 @@ class TestStrokeOpacity : public QObject { Q_OBJECT public: - TestStrokeOpacity(QObject *parent = nullptr) : QObject(parent) { } + explicit TestStrokeOpacity(QObject *parent = nullptr) : QObject(parent) { } private slots: void checkStrokeOpacity_data(); void checkStrokeOpacity(); diff --git a/qt6/tests/check_utf_conversion.cpp b/qt6/tests/check_utf_conversion.cpp index f2a66096..af5a65b4 100644 --- a/qt6/tests/check_utf_conversion.cpp +++ b/qt6/tests/check_utf_conversion.cpp @@ -13,7 +13,7 @@ class TestUTFConversion : public QObject { Q_OBJECT public: - TestUTFConversion(QObject *parent = nullptr) : QObject(parent) { } + explicit TestUTFConversion(QObject *parent = nullptr) : QObject(parent) { } private slots: void testUTF_data(); void testUTF(); diff --git a/qt6/tests/stress-threads-qt6.cpp b/qt6/tests/stress-threads-qt6.cpp index d88b20f4..11887652 100644 --- a/qt6/tests/stress-threads-qt6.cpp +++ b/qt6/tests/stress-threads-qt6.cpp @@ -21,7 +21,7 @@ class SillyThread : public QThread { Q_OBJECT public: - SillyThread(Poppler::Document *document, QObject *parent = nullptr); + explicit SillyThread(Poppler::Document *document, QObject *parent = nullptr); void run() override; diff --git a/qt6/tests/test-password-qt6.cpp b/qt6/tests/test-password-qt6.cpp index e4a247cd..339e75f2 100644 --- a/qt6/tests/test-password-qt6.cpp +++ b/qt6/tests/test-password-qt6.cpp @@ -11,7 +11,7 @@ class PDFDisplay : public QWidget // picture display widget { Q_OBJECT public: - PDFDisplay(std::unique_ptr<Poppler::Document> &&d, QWidget *parent = nullptr); + explicit PDFDisplay(std::unique_ptr<Poppler::Document> &&d, QWidget *parent = nullptr); ~PDFDisplay() override; protected: |