From 824a620d7a1df30f25371a43b0f60bf8dc7a63db Mon Sep 17 00:00:00 2001 From: Glen Kaukola Date: Fri, 2 Apr 2010 19:03:57 +0000 Subject: [PATCH] Krazy: Check for C++ ctors that should be declared 'explicit'. svn path=/trunk/KDE/kdegraphics/okular/; revision=1110334 --- generators/fax/faxdocument.h | 2 +- ui/annotationmodel.h | 2 +- ui/annotationpopup.h | 4 ++-- ui/formwidgets.h | 6 +++--- ui/tocmodel.h | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/generators/fax/faxdocument.h b/generators/fax/faxdocument.h index 9a7f430e3..e917895a2 100644 --- a/generators/fax/faxdocument.h +++ b/generators/fax/faxdocument.h @@ -33,7 +33,7 @@ class FaxDocument * * @param type The type of the fax document. */ - FaxDocument( const QString &fileName, DocumentType type = G3 ); + explicit FaxDocument( const QString &fileName, DocumentType type = G3 ); /** * Destroys the fax document. diff --git a/ui/annotationmodel.h b/ui/annotationmodel.h index fd02fdec6..23052abc1 100644 --- a/ui/annotationmodel.h +++ b/ui/annotationmodel.h @@ -29,7 +29,7 @@ class AnnotationModel : public QAbstractItemModel PageRole }; - AnnotationModel( Okular::Document *document, QObject *parent = 0 ); + explicit AnnotationModel( Okular::Document *document, QObject *parent = 0 ); virtual ~AnnotationModel(); // reimplementations from QAbstractItemModel diff --git a/ui/annotationpopup.h b/ui/annotationpopup.h index 307765291..5409f72d8 100644 --- a/ui/annotationpopup.h +++ b/ui/annotationpopup.h @@ -25,8 +25,8 @@ class AnnotationPopup : public QObject Q_OBJECT public: - AnnotationPopup( Okular::Document *document, - QWidget *parent = 0 ); + explicit AnnotationPopup( Okular::Document *document, + QWidget *parent = 0 ); void addAnnotation( Okular::Annotation* annotation, int pageNumber ); diff --git a/ui/formwidgets.h b/ui/formwidgets.h index 6d88ab7bc..2ed9c970a 100644 --- a/ui/formwidgets.h +++ b/ui/formwidgets.h @@ -109,7 +109,7 @@ class PushButtonEdit : public QPushButton, public FormWidgetIface Q_OBJECT public: - PushButtonEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); + explicit PushButtonEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); private slots: void slotClicked(); @@ -123,7 +123,7 @@ class CheckBoxEdit : public QCheckBox, public FormWidgetIface Q_OBJECT public: - CheckBoxEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); + explicit CheckBoxEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); // reimplemented from FormWidgetIface void setFormWidgetsController( FormWidgetsController *controller ); @@ -141,7 +141,7 @@ class RadioButtonEdit : public QRadioButton, public FormWidgetIface Q_OBJECT public: - RadioButtonEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); + explicit RadioButtonEdit( Okular::FormFieldButton * button, QWidget * parent = 0 ); // reimplemented from FormWidgetIface void setFormWidgetsController( FormWidgetsController *controller ); diff --git a/ui/tocmodel.h b/ui/tocmodel.h index d90fc4f19..a857dc0df 100644 --- a/ui/tocmodel.h +++ b/ui/tocmodel.h @@ -25,7 +25,7 @@ class TOCModel : public QAbstractItemModel Q_OBJECT public: - TOCModel( Okular::Document *document, QObject *parent = 0 ); + explicit TOCModel( Okular::Document *document, QObject *parent = 0 ); virtual ~TOCModel(); // reimplementations from QAbstractItemModel