diff --git a/conf/editannottooldialog.cpp b/conf/editannottooldialog.cpp index cf79d83c9..64a01ab59 100644 --- a/conf/editannottooldialog.cpp +++ b/conf/editannottooldialog.cpp @@ -1,3 +1,12 @@ +/*************************************************************************** + * Copyright (C) 2012 by Fabio D'Urso * + * Copyright (C) 2015 by Laurent Montel * + * * + * 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 * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ #include "editannottooldialog.h" diff --git a/conf/editannottooldialog.h b/conf/editannottooldialog.h index 23372b17d..c5794e56e 100644 --- a/conf/editannottooldialog.h +++ b/conf/editannottooldialog.h @@ -43,7 +43,7 @@ class EditAnnotToolDialog : public QDialog ToolStamp }; - EditAnnotToolDialog( QWidget *parent = nullptr, const QDomElement &initialState = QDomElement() ); + explicit EditAnnotToolDialog( QWidget *parent = nullptr, const QDomElement &initialState = QDomElement() ); ~EditAnnotToolDialog(); QString name() const; QDomDocument toolXml() const; diff --git a/conf/widgetannottools.cpp b/conf/widgetannottools.cpp index f94278a8e..74992374e 100644 --- a/conf/widgetannottools.cpp +++ b/conf/widgetannottools.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include #include #include diff --git a/core/action.h b/core/action.h index 0b3ad370d..019df8850 100644 --- a/core/action.h +++ b/core/action.h @@ -237,7 +237,7 @@ class OKULARCORE_EXPORT ExecuteAction : public Action /** * The Browse action browses an url by opening a web browser or - * email client, depedning on the url protocol (e.g. http, mailto, etc.). + * email client, depending on the url protocol (e.g. http, mailto, etc.). */ class OKULARCORE_EXPORT BrowseAction : public Action { @@ -247,7 +247,7 @@ class OKULARCORE_EXPORT BrowseAction : public Action * * @param url The url to browse. */ - BrowseAction( const QUrl &url ); + explicit BrowseAction( const QUrl &url ); /** * Destroys the browse action. @@ -461,7 +461,7 @@ class OKULARCORE_EXPORT MovieAction : public Action /** * Creates a new movie action. */ - MovieAction( OperationType operation ); + explicit MovieAction( OperationType operation ); /** * Destroys the movie action. diff --git a/core/annotations.h b/core/annotations.h index 5c9397cb1..474fa73f8 100644 --- a/core/annotations.h +++ b/core/annotations.h @@ -781,7 +781,7 @@ class OKULARCORE_EXPORT TextAnnotation : public Annotation /** * Creates a new text annotation from the xml @p description */ - TextAnnotation( const QDomNode &description ); + explicit TextAnnotation( const QDomNode &description ); /** * Destroys the text annotation. @@ -1054,7 +1054,7 @@ class OKULARCORE_EXPORT GeomAnnotation : public Annotation /** * Creates a new geometrical annotation from the xml @p description */ - GeomAnnotation( const QDomNode &description ); + explicit GeomAnnotation( const QDomNode &description ); /** * Destroys the geometrical annotation. @@ -1296,7 +1296,7 @@ class OKULARCORE_EXPORT InkAnnotation : public Annotation /** * Creates a new ink annotation from the xml @p description */ - InkAnnotation( const QDomNode &description ); + explicit InkAnnotation( const QDomNode &description ); /** * Destroys the ink annotation. @@ -1458,7 +1458,7 @@ class OKULARCORE_EXPORT SoundAnnotation : public Annotation /** * Creates a new sound annotation from the xml @p description */ - SoundAnnotation( const QDomNode &description ); + explicit SoundAnnotation( const QDomNode &description ); /** * Destroys the sound annotation. */ @@ -1518,7 +1518,7 @@ class OKULARCORE_EXPORT MovieAnnotation : public Annotation /** * Creates a new movie annotation from the xml @p description */ - MovieAnnotation( const QDomNode &description ); + explicit MovieAnnotation( const QDomNode &description ); /** * Destroys the movie annotation. */ @@ -1565,7 +1565,7 @@ class OKULARCORE_EXPORT ScreenAnnotation : public Annotation /** * Creates a new screen annotation from the xml @p description */ - ScreenAnnotation( const QDomNode &description ); + explicit ScreenAnnotation( const QDomNode &description ); /** * Destroys the screen annotation. @@ -1634,7 +1634,7 @@ class OKULARCORE_EXPORT WidgetAnnotation : public Annotation /** * Creates a new widget annotation from the xml @p description */ - WidgetAnnotation( const QDomNode &description ); + explicit WidgetAnnotation( const QDomNode &description ); /** * Destroys the widget annotation. @@ -1689,7 +1689,7 @@ class OKULARCORE_EXPORT RichMediaAnnotation : public Annotation /** * Creates a new rich media annotation from the xml @p description */ - RichMediaAnnotation( const QDomNode &description ); + explicit RichMediaAnnotation( const QDomNode &description ); /** * Destroys the rich media annotation. diff --git a/core/area.h b/core/area.h index 964f9da65..5f11aea0b 100644 --- a/core/area.h +++ b/core/area.h @@ -448,7 +448,7 @@ class OKULARCORE_EXPORT AnnotationObjectRect : public ObjectRect * Creates a new annotation object rectangle with the * given @p annotation. */ - AnnotationObjectRect( Annotation *annotation ); + explicit AnnotationObjectRect( Annotation *annotation ); /** * Destroys the annotation object rectangle. @@ -871,7 +871,7 @@ class HighlightAreaRect : public RegularAreaRect * Creates a new highlight area rect with the coordinates of * the given @p area. */ - HighlightAreaRect( const RegularAreaRect *area = nullptr ); + explicit HighlightAreaRect( const RegularAreaRect *area = nullptr ); /** * The search ID of the highlight owner. diff --git a/core/audioplayer_p.h b/core/audioplayer_p.h index bc325f7cc..1b2ea58f6 100644 --- a/core/audioplayer_p.h +++ b/core/audioplayer_p.h @@ -26,7 +26,7 @@ class AudioPlayer; class AudioPlayerPrivate { public: - AudioPlayerPrivate( AudioPlayer * qq ); + explicit AudioPlayerPrivate( AudioPlayer * qq ); ~AudioPlayerPrivate(); diff --git a/core/document_p.h b/core/document_p.h index c47229118..792bec813 100644 --- a/core/document_p.h +++ b/core/document_p.h @@ -86,7 +86,7 @@ Q_DECLARE_FLAGS(LoadDocumentInfoFlags, LoadDocumentInfoFlag) class DocumentPrivate { public: - DocumentPrivate( Document *parent ) + explicit DocumentPrivate( Document *parent ) : m_parent( parent ), m_tempFile( nullptr ), m_docSize( -1 ), diff --git a/core/form_p.h b/core/form_p.h index 7e8389bf2..cbba06272 100644 --- a/core/form_p.h +++ b/core/form_p.h @@ -22,7 +22,7 @@ class FormField; class FormFieldPrivate { public: - FormFieldPrivate( FormField::FieldType type ); + explicit FormFieldPrivate( FormField::FieldType type ); virtual ~FormFieldPrivate(); void setDefault(); diff --git a/core/generator.h b/core/generator.h index ceaa43ced..b989a55de 100644 --- a/core/generator.h +++ b/core/generator.h @@ -221,7 +221,7 @@ class OKULARCORE_EXPORT Generator : public QObject /** * Creates a new generator. */ - Generator(QObject* parent = nullptr, const QVariantList& args = QVariantList()); + explicit Generator(QObject* parent = nullptr, const QVariantList& args = QVariantList()); /** * Destroys the generator. @@ -781,7 +781,7 @@ class OKULARCORE_EXPORT TextRequest /** * Creates a new text request. */ - TextRequest( Page *page ); + explicit TextRequest( Page *page ); TextRequest(); diff --git a/core/generator_p.h b/core/generator_p.h index 62858a9eb..239be0a79 100644 --- a/core/generator_p.h +++ b/core/generator_p.h @@ -114,7 +114,7 @@ class PixmapGenerationThread : public QThread Q_OBJECT public: - PixmapGenerationThread( Generator *generator ); + explicit PixmapGenerationThread( Generator *generator ); void startGeneration( PixmapRequest *request, bool calcBoundingRect ); @@ -142,7 +142,7 @@ class TextPageGenerationThread : public QThread Q_OBJECT public: - TextPageGenerationThread( Generator *generator ); + explicit TextPageGenerationThread( Generator *generator ); void endGeneration(); diff --git a/core/script/event_p.h b/core/script/event_p.h index 928833f08..eadd481d2 100644 --- a/core/script/event_p.h +++ b/core/script/event_p.h @@ -70,7 +70,7 @@ class Event PageClose, /// < Not implemented. }; - Event(EventType type); + explicit Event(EventType type); /** One of the defined EventTypes */ EventType eventType() const; diff --git a/core/script/executor_kjs_p.h b/core/script/executor_kjs_p.h index a193391fe..6d1462ef3 100644 --- a/core/script/executor_kjs_p.h +++ b/core/script/executor_kjs_p.h @@ -21,7 +21,7 @@ class Event; class ExecutorKJS { public: - ExecutorKJS( DocumentPrivate *doc ); + explicit ExecutorKJS( DocumentPrivate *doc ); ~ExecutorKJS(); void execute( const QString &script, Event *event ); diff --git a/core/textdocumentgenerator_p.h b/core/textdocumentgenerator_p.h index 1a4b869c5..e5fb0b34a 100644 --- a/core/textdocumentgenerator_p.h +++ b/core/textdocumentgenerator_p.h @@ -115,7 +115,7 @@ class TextDocumentGeneratorPrivate : public GeneratorPrivate friend class TextDocumentConverter; public: - TextDocumentGeneratorPrivate( TextDocumentConverter *converter ) + explicit TextDocumentGeneratorPrivate( TextDocumentConverter *converter ) : mConverter( converter ), mDocument( nullptr ), mGeneralSettings( nullptr ) { } diff --git a/core/textdocumentsettings.h b/core/textdocumentsettings.h index 50992a9ff..c295ccc81 100644 --- a/core/textdocumentsettings.h +++ b/core/textdocumentsettings.h @@ -84,7 +84,7 @@ class OKULARCORE_EXPORT TextDocumentSettingsWidget : public QWidget Q_OBJECT public: - TextDocumentSettingsWidget( QWidget *parent = nullptr ); + explicit TextDocumentSettingsWidget( QWidget *parent = nullptr ); virtual ~TextDocumentSettingsWidget(); void addRow( const QString& labelText, QWidget *widget ); diff --git a/core/textdocumentsettings_p.h b/core/textdocumentsettings_p.h index 998156b0f..b69e3d337 100644 --- a/core/textdocumentsettings_p.h +++ b/core/textdocumentsettings_p.h @@ -23,7 +23,7 @@ class TextDocumentSettingsWidgetPrivate * @note the private class won't take ownership of the ui, so you * must delete it yourself */ - TextDocumentSettingsWidgetPrivate(Ui_TextDocumentSettings *ui) + explicit TextDocumentSettingsWidgetPrivate(Ui_TextDocumentSettings *ui) : mUi(ui) {} @@ -36,7 +36,7 @@ class TextDocumentSettingsPrivate : public QObject Q_OBJECT public: - TextDocumentSettingsPrivate(QObject *parent) + explicit TextDocumentSettingsPrivate(QObject *parent) : QObject(parent) {} diff --git a/extensions.h b/extensions.h index e61340aeb..9d6b172ef 100644 --- a/extensions.h +++ b/extensions.h @@ -24,7 +24,7 @@ class BrowserExtension : public KParts::BrowserExtension Q_OBJECT public: - BrowserExtension(Part*); + explicit BrowserExtension(Part*); public Q_SLOTS: // Automatically detected by the host. @@ -39,7 +39,7 @@ class OkularLiveConnectExtension : public KParts::LiveConnectExtension Q_OBJECT public: - OkularLiveConnectExtension( Part *parent ); + explicit OkularLiveConnectExtension( Part *parent ); // from LiveConnectExtension bool get( const unsigned long objid, const QString &field, Type &type, diff --git a/generators/djvu/kdjvu.h b/generators/djvu/kdjvu.h index 9a5998d64..d111e633e 100644 --- a/generators/djvu/kdjvu.h +++ b/generators/djvu/kdjvu.h @@ -157,7 +157,7 @@ class KDjVu bool inlineText() const; private: - TextAnnotation( miniexp_t anno ); + explicit TextAnnotation( miniexp_t anno ); QSize m_size; bool m_inlineText; }; @@ -179,7 +179,7 @@ class KDjVu void setWidth( int width ); private: - LineAnnotation( miniexp_t anno ); + explicit LineAnnotation( miniexp_t anno ); QPoint m_point2; bool m_isArrow; miniexp_t m_width; diff --git a/generators/epub/epubdocument.h b/generators/epub/epubdocument.h index e823e3d06..2bd922681 100644 --- a/generators/epub/epubdocument.h +++ b/generators/epub/epubdocument.h @@ -24,7 +24,7 @@ namespace Epub { Q_OBJECT public: - EpubDocument(const QString &fileName); + explicit EpubDocument(const QString &fileName); bool isValid(); ~EpubDocument(); struct epub *getEpub(); diff --git a/generators/fictionbook/document.h b/generators/fictionbook/document.h index de0b83260..1fee7e9cd 100644 --- a/generators/fictionbook/document.h +++ b/generators/fictionbook/document.h @@ -20,7 +20,7 @@ namespace FictionBook { class Document { public: - Document( const QString &fileName ); + explicit Document( const QString &fileName ); bool open(); diff --git a/generators/mobipocket/mobidocument.h b/generators/mobipocket/mobidocument.h index de4398449..d589c942f 100644 --- a/generators/mobipocket/mobidocument.h +++ b/generators/mobipocket/mobidocument.h @@ -24,7 +24,7 @@ namespace Mobi { class MobiDocument : public QTextDocument { public: - MobiDocument(const QString &fileName); + explicit MobiDocument(const QString &fileName); ~MobiDocument(); Mobipocket::Document* mobi() const { return doc; } diff --git a/generators/ooo/document.h b/generators/ooo/document.h index 9c6bc97f6..bb681a7d9 100644 --- a/generators/ooo/document.h +++ b/generators/ooo/document.h @@ -21,7 +21,7 @@ namespace OOO { class Document { public: - Document( const QString &fileName ); + explicit Document( const QString &fileName ); ~Document(); bool open( const QString &password ); diff --git a/generators/ooo/formatproperty.h b/generators/ooo/formatproperty.h index 268066906..3b13f4d6e 100644 --- a/generators/ooo/formatproperty.h +++ b/generators/ooo/formatproperty.h @@ -76,7 +76,7 @@ class TextFormatProperty { public: TextFormatProperty(); - TextFormatProperty( const StyleInformation *information ); + explicit TextFormatProperty( const StyleInformation *information ); void apply( QTextCharFormat *format ) const; @@ -155,7 +155,7 @@ class ListFormatProperty }; ListFormatProperty(); - ListFormatProperty( Type type ); + explicit ListFormatProperty( Type type ); void apply( QTextListFormat *format, int level ) const; @@ -202,7 +202,7 @@ class StyleFormatProperty { public: StyleFormatProperty(); - StyleFormatProperty( const StyleInformation *information ); + explicit StyleFormatProperty( const StyleInformation *information ); void applyBlock( QTextBlockFormat *format ) const; void applyText( QTextCharFormat *format ) const; diff --git a/generators/ooo/manifest.h b/generators/ooo/manifest.h index fb5565664..b251b65fe 100644 --- a/generators/ooo/manifest.h +++ b/generators/ooo/manifest.h @@ -45,7 +45,7 @@ class ManifestEntry /** Create a new manifest entry */ - ManifestEntry( const QString &fileName ); + explicit ManifestEntry( const QString &fileName ); /** Set the mimetype of the file. diff --git a/generators/poppler/formfields.h b/generators/poppler/formfields.h index 46e95c45a..9f39dfbef 100644 --- a/generators/poppler/formfields.h +++ b/generators/poppler/formfields.h @@ -16,7 +16,7 @@ class PopplerFormFieldButton : public Okular::FormFieldButton { public: - PopplerFormFieldButton( Poppler::FormFieldButton * field ); + explicit PopplerFormFieldButton( Poppler::FormFieldButton * field ); virtual ~PopplerFormFieldButton(); // inherited from Okular::FormField @@ -46,7 +46,7 @@ class PopplerFormFieldButton : public Okular::FormFieldButton class PopplerFormFieldText : public Okular::FormFieldText { public: - PopplerFormFieldText( Poppler::FormFieldText * field ); + explicit PopplerFormFieldText( Poppler::FormFieldText * field ); virtual ~PopplerFormFieldText(); // inherited from Okular::FormField @@ -79,7 +79,7 @@ class PopplerFormFieldText : public Okular::FormFieldText class PopplerFormFieldChoice : public Okular::FormFieldChoice { public: - PopplerFormFieldChoice( Poppler::FormFieldChoice * field ); + explicit PopplerFormFieldChoice( Poppler::FormFieldChoice * field ); virtual ~PopplerFormFieldChoice(); // inherited from Okular::FormField diff --git a/generators/txt/document.h b/generators/txt/document.h index adfcbab52..83dac896c 100644 --- a/generators/txt/document.h +++ b/generators/txt/document.h @@ -19,7 +19,7 @@ namespace Txt Q_OBJECT public: - Document( const QString &fileName ); + explicit Document( const QString &fileName ); ~Document(); private: diff --git a/generators/xps/generator_xps.h b/generators/xps/generator_xps.h index 4b99437aa..f122e38a9 100644 --- a/generators/xps/generator_xps.h +++ b/generators/xps/generator_xps.h @@ -110,7 +110,7 @@ class XpsFile; class XpsHandler: public QXmlDefaultHandler { public: - XpsHandler( XpsPage *page ); + explicit XpsHandler( XpsPage *page ); ~XpsHandler(); bool startElement( const QString & nameSpace, diff --git a/mobile/components/documentitem.cpp b/mobile/components/documentitem.cpp index e674d0015..57461f6c2 100644 --- a/mobile/components/documentitem.cpp +++ b/mobile/components/documentitem.cpp @@ -19,7 +19,7 @@ #include "documentitem.h" -#include +#include // krazy:exclude=includes #include #include diff --git a/mobile/components/documentitem.h b/mobile/components/documentitem.h index 2c864811c..180bbb910 100644 --- a/mobile/components/documentitem.h +++ b/mobile/components/documentitem.h @@ -169,7 +169,7 @@ class Observer : public QObject, public Okular::DocumentObserver Q_OBJECT public: - Observer(DocumentItem *parent); + explicit Observer(DocumentItem *parent); ~Observer(); // inherited from DocumentObserver diff --git a/part.h b/part.h index ad963a90b..981d96661 100644 --- a/part.h +++ b/part.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include // krazy:exclude=includes #include #include diff --git a/shell/shell.h b/shell/shell.h index a66c60675..1f16cb2fb 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -20,9 +20,9 @@ #include #include #include -#include +#include -#include +#include // krazy:exclude=includes class KRecentFilesAction; class KToggleAction; diff --git a/ui/annotationtools.h b/ui/annotationtools.h index 1f7aa97cf..bd048029f 100644 --- a/ui/annotationtools.h +++ b/ui/annotationtools.h @@ -32,7 +32,7 @@ class Page; class AnnotatorEngine { public: - AnnotatorEngine( const QDomElement & engineElement ); + explicit AnnotatorEngine( const QDomElement & engineElement ); virtual ~AnnotatorEngine(); // enum definitions @@ -87,7 +87,7 @@ class SmoothPathEngine : public AnnotatorEngine { public: - SmoothPathEngine( const QDomElement & engineElement ); + explicit SmoothPathEngine( const QDomElement & engineElement ); QRect event( EventType type, Button button, double nX, double nY, double xScale, double yScale, const Okular::Page * /*page*/ ) override; diff --git a/ui/annotationwidgets.h b/ui/annotationwidgets.h index 13442ce47..ae5e427e7 100644 --- a/ui/annotationwidgets.h +++ b/ui/annotationwidgets.h @@ -72,7 +72,7 @@ class AnnotationWidget Q_OBJECT public: - AnnotationWidget( Okular::Annotation * ann ); + explicit AnnotationWidget( Okular::Annotation * ann ); virtual ~AnnotationWidget(); virtual Okular::Annotation::SubType annotationType() const; diff --git a/ui/embeddedfilesdialog.cpp b/ui/embeddedfilesdialog.cpp index e2901923d..ea162b957 100644 --- a/ui/embeddedfilesdialog.cpp +++ b/ui/embeddedfilesdialog.cpp @@ -183,7 +183,7 @@ void EmbeddedFilesDialog::viewFile( Okular::EmbeddedFile* ef ) + QDir::separator() + fileInfo.baseName() + ".XXXXXX" - + (fileInfo.completeSuffix().isEmpty() ? QString("") : "." + fileInfo.completeSuffix()) + + (fileInfo.completeSuffix().isEmpty() ? QString("") : "." + fileInfo.completeSuffix()) // krazy:exclude=doublequote_chars ); GuiUtils::writeEmbeddedFile( ef, this, *tmpFile ); diff --git a/ui/formwidgets.h b/ui/formwidgets.h index 218137172..f0206c3bb 100644 --- a/ui/formwidgets.h +++ b/ui/formwidgets.h @@ -54,7 +54,7 @@ class FormWidgetsController : public QObject Q_OBJECT public: - FormWidgetsController( Okular::Document *doc ); + explicit FormWidgetsController( Okular::Document *doc ); virtual ~FormWidgetsController(); void signalAction( Okular::Action *action ); diff --git a/ui/magnifierview.h b/ui/magnifierview.h index 09f26f7db..cd24e1eb2 100644 --- a/ui/magnifierview.h +++ b/ui/magnifierview.h @@ -29,7 +29,7 @@ class MagnifierView : public QWidget, public Okular::DocumentObserver Q_OBJECT public: - MagnifierView( Okular::Document *document, QWidget *parent = nullptr ); + explicit MagnifierView( Okular::Document *document, QWidget *parent = nullptr ); ~MagnifierView(); void notifySetup( const QVector< Okular::Page * > & pages, int setupFlags ) override; diff --git a/ui/minibar.h b/ui/minibar.h index d49007de1..0bf969ff0 100644 --- a/ui/minibar.h +++ b/ui/minibar.h @@ -32,7 +32,7 @@ class PagesEdit : public KLineEdit Q_OBJECT public: - PagesEdit( MiniBar * parent ); + explicit PagesEdit( MiniBar * parent ); void setText( const QString & ) override; protected: @@ -54,7 +54,7 @@ class PageNumberEdit : public PagesEdit Q_OBJECT public: - PageNumberEdit( MiniBar * parent ); + explicit PageNumberEdit( MiniBar * parent ); void setPagesNumber( int pages ); private: @@ -65,7 +65,7 @@ class PageLabelEdit : public PagesEdit { Q_OBJECT public: - PageLabelEdit( MiniBar * parent ); + explicit PageLabelEdit( MiniBar * parent ); void setText( const QString & newText ) override; void setPageLabels( const QVector< Okular::Page * > & pageVector ); diff --git a/ui/pageitemdelegate.h b/ui/pageitemdelegate.h index 4067db060..bbf0a802c 100644 --- a/ui/pageitemdelegate.h +++ b/ui/pageitemdelegate.h @@ -17,7 +17,7 @@ class PageItemDelegate : public QItemDelegate Q_OBJECT public: - PageItemDelegate( QObject * parent = nullptr ); + explicit PageItemDelegate( QObject * parent = nullptr ); virtual ~PageItemDelegate(); static const int PageRole = 0x000f0001; diff --git a/ui/pageviewutils.h b/ui/pageviewutils.h index 6c3740927..3fabeb702 100644 --- a/ui/pageviewutils.h +++ b/ui/pageviewutils.h @@ -107,7 +107,7 @@ class PageViewMessage : public QWidget Q_OBJECT public: - PageViewMessage( QWidget * parent ); + explicit PageViewMessage( QWidget * parent ); enum Icon { None, Info, Warning, Error, Find, Annotation }; void display( const QString & message, const QString & details = QString(), Icon icon = Info, int durationMs = 4000 ); diff --git a/ui/propertiesdialog.h b/ui/propertiesdialog.h index dbf7ebd51..5abe394c3 100644 --- a/ui/propertiesdialog.h +++ b/ui/propertiesdialog.h @@ -56,7 +56,7 @@ class FontsListModel Q_OBJECT public: - FontsListModel( QObject * parent = nullptr ); + explicit FontsListModel( QObject * parent = nullptr ); virtual ~FontsListModel(); // reimplementations from QAbstractTableModel diff --git a/ui/sidebar.h b/ui/sidebar.h index 3eb3b4639..1256a39a2 100644 --- a/ui/sidebar.h +++ b/ui/sidebar.h @@ -20,7 +20,7 @@ class OKULARPART_EXPORT Sidebar : public QWidget { Q_OBJECT public: - Sidebar( QWidget *parent = nullptr ); + explicit Sidebar( QWidget *parent = nullptr ); ~Sidebar(); int addItem( QWidget *widget, const QIcon &icon, const QString &text ); diff --git a/ui/snapshottaker.h b/ui/snapshottaker.h index 4f624b26c..ae4c71f51 100644 --- a/ui/snapshottaker.h +++ b/ui/snapshottaker.h @@ -21,7 +21,7 @@ class SnapshotTaker : public QObject Q_OBJECT public: - SnapshotTaker( const QUrl &url, QObject *parent = nullptr ); + explicit SnapshotTaker( const QUrl &url, QObject *parent = nullptr ); ~SnapshotTaker(); Q_SIGNALS: diff --git a/ui/thumbnaillist.h b/ui/thumbnaillist.h index f2fd3b34b..0717c58c1 100644 --- a/ui/thumbnaillist.h +++ b/ui/thumbnaillist.h @@ -80,7 +80,7 @@ class ThumbnailsBox : public QWidget Q_OBJECT public: - ThumbnailsBox( QWidget * parent ) : QWidget( parent ) { QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0);} + explicit ThumbnailsBox( QWidget * parent ) : QWidget( parent ) { QVBoxLayout *vbox = new QVBoxLayout(this); vbox->setMargin(0); vbox->setSpacing(0);} QSize sizeHint() const override { return QSize(); } }; diff --git a/ui/toolaction.h b/ui/toolaction.h index 2070ede0e..3f42bcc21 100644 --- a/ui/toolaction.h +++ b/ui/toolaction.h @@ -22,7 +22,7 @@ class ToolAction : public KSelectAction Q_OBJECT public: - ToolAction( QObject *parent = nullptr ); + explicit ToolAction( QObject *parent = nullptr ); virtual ~ToolAction(); void addAction( QAction *action ); diff --git a/ui/tts.h b/ui/tts.h index 00d8c2e73..767ad4c89 100644 --- a/ui/tts.h +++ b/ui/tts.h @@ -17,7 +17,7 @@ class OkularTTS : public QObject { Q_OBJECT public: - OkularTTS( QObject *parent = nullptr ); + explicit OkularTTS( QObject *parent = nullptr ); ~OkularTTS(); void say( const QString &text );