From kde-commits Sat Mar 09 02:16:20 2013 From: Peter Hedlund Date: Sat, 09 Mar 2013 02:16:20 +0000 To: kde-commits Subject: [kwordquiz] src: Krazy: explicit constructors. Message-Id: <20130309021620.E5821A604F () git ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=136279539004646 Git commit 6e7f3055e973cae087af5a7c7d3e04ef0c994bd8 by Peter Hedlund. Committed on 09/03/2013 at 03:14. Pushed by hedlund into branch 'master'. Krazy: explicit constructors. M +1 -1 src/kwordquiz.h M +1 -1 src/kwqcardscene.h M +1 -1 src/kwqcardview.h M +7 -7 src/kwqcommands.h M +1 -1 src/kwqpixmapitem.h M +1 -1 src/kwqscorewidget.h M +1 -1 src/kwqsortfiltermodel.h M +1 -1 src/kwqtabledelegate.h M +1 -1 src/kwqtablemodel.h M +1 -1 src/kwqtutorflashcard.h M +1 -1 src/prefcardappearance.h M +1 -1 src/prefeditor.h M +1 -1 src/prefgeneral.h M +1 -1 src/prefquiz.h M +1 -1 src/preftutor.h M +1 -1 src/wqprintdialogpage.h http://commits.kde.org/kwordquiz/6e7f3055e973cae087af5a7c7d3e04ef0c994bd8 diff --git a/src/kwordquiz.h b/src/kwordquiz.h index 2a6955c..602337e 100644 --- a/src/kwordquiz.h +++ b/src/kwordquiz.h @@ -63,7 +63,7 @@ class KWordQuizApp : public KXmlGuiWindow /** * construtor of KWordQuizApp, calls all init functions to create the = application. */ - KWordQuizApp(QWidget* parent=3D0); + explicit KWordQuizApp(QWidget* parent=3D0); = /** * destructor diff --git a/src/kwqcardscene.h b/src/kwqcardscene.h index 59aba31..320d78c 100644 --- a/src/kwqcardscene.h +++ b/src/kwqcardscene.h @@ -31,7 +31,7 @@ class KWQCardScene : public QGraphicsScene Q_OBJECT public: = - KWQCardScene(QObject *parent =3D 0); + explicit KWQCardScene(QObject *parent =3D 0); = /** * The smallest the view can be when 'auto-zoom' is off diff --git a/src/kwqcardview.h b/src/kwqcardview.h index 7b08fd4..1383030 100644 --- a/src/kwqcardview.h +++ b/src/kwqcardview.h @@ -28,7 +28,7 @@ class KWQCardView : public QGraphicsView Q_OBJECT public: = - KWQCardView(QWidget *parent =3D 0); + explicit KWQCardView(QWidget *parent =3D 0); = QSize minimumSizeHint() const {if(scene()=3D=3D0) return QSize(); else= return qobject_cast(scene())->minimumSizeHint();} = diff --git a/src/kwqcommands.h b/src/kwqcommands.h index f482aeb..1aa125c 100644 --- a/src/kwqcommands.h +++ b/src/kwqcommands.h @@ -53,7 +53,7 @@ typedef QList ColumnDataList; class KWQUndoCommand : public QUndoCommand { public: - KWQUndoCommand(KWQTableView *view); + explicit KWQUndoCommand(KWQTableView *view); = virtual void undo(); virtual void redo() {}; @@ -74,7 +74,7 @@ private: class KWQCommandClear : public KWQUndoCommand { public: - KWQCommandClear(KWQTableView *view); + explicit KWQCommandClear(KWQTableView *view); virtual void redo(); }; = @@ -82,7 +82,7 @@ public: class KWQCommandCut : public KWQCommandClear { public: - KWQCommandCut(KWQTableView *view); + explicit KWQCommandCut(KWQTableView *view); virtual void redo(); }; = @@ -90,7 +90,7 @@ public: class KWQCommandPaste : public KWQUndoCommand { public: - KWQCommandPaste(KWQTableView *view); + explicit KWQCommandPaste(KWQTableView *view); virtual void undo(); virtual void redo(); private: @@ -159,7 +159,7 @@ private: class KWQCommandInsert : public KWQUndoCommand { public: - KWQCommandInsert(KWQTableView *view); + explicit KWQCommandInsert(KWQTableView *view); virtual void undo(); virtual void redo(); }; @@ -168,7 +168,7 @@ public: class KWQCommandDelete : public KWQUndoCommand { public: - KWQCommandDelete(KWQTableView *view); + explicit KWQCommandDelete(KWQTableView *view); virtual void undo(); virtual void redo(); private: @@ -179,7 +179,7 @@ private: class KWQCommandUnmarkBlank : public KWQUndoCommand { public: - KWQCommandUnmarkBlank(KWQTableView *view); + explicit KWQCommandUnmarkBlank(KWQTableView *view); //virtual void undo(); virtual void redo(); }; diff --git a/src/kwqpixmapitem.h b/src/kwqpixmapitem.h index 9776f24..8f9ad74 100644 --- a/src/kwqpixmapitem.h +++ b/src/kwqpixmapitem.h @@ -23,7 +23,7 @@ class KWQPixmapItem: public QGraphicsPixmapItem { public: - KWQPixmapItem(const QPixmap &pixmap, QGraphicsItem *parentItem =3D 0); + explicit KWQPixmapItem(const QPixmap &pixmap, QGraphicsItem *parentIte= m =3D 0); = public: QRectF boundingRect() const; diff --git a/src/kwqscorewidget.h b/src/kwqscorewidget.h index 2dd57df..82b255f 100644 --- a/src/kwqscorewidget.h +++ b/src/kwqscorewidget.h @@ -27,7 +27,7 @@ class KWQScoreWidget : public QWidget, public Ui::KWQScor= eWidgetBase { public: enum CountDirection {cdCorrect, cdError}; - KWQScoreWidget(QWidget *parent); + explicit KWQScoreWidget(QWidget *parent); = void clear(); = diff --git a/src/kwqsortfiltermodel.h b/src/kwqsortfiltermodel.h index c9795d5..dc33612 100644 --- a/src/kwqsortfiltermodel.h +++ b/src/kwqsortfiltermodel.h @@ -31,7 +31,7 @@ class KWQSortFilterModel : public QSortFilterProxyModel { Q_OBJECT public: - KWQSortFilterModel(QObject *parent =3D 0); + explicit KWQSortFilterModel(QObject *parent =3D 0); = void setSourceModel(KWQTableModel * sourceModel); KWQTableModel * sourceModel() const; diff --git a/src/kwqtabledelegate.h b/src/kwqtabledelegate.h index b1c4727..55b8833 100644 --- a/src/kwqtabledelegate.h +++ b/src/kwqtabledelegate.h @@ -30,7 +30,7 @@ class KWQTableDelegate : public QItemDelegate { Q_OBJECT public: - KWQTableDelegate(QObject *parent =3D 0); + explicit KWQTableDelegate(QObject *parent =3D 0); = QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &op= tion, const QModelIndex &index) const; = diff --git a/src/kwqtablemodel.h b/src/kwqtablemodel.h index 1866cbd..8f8df73 100644 --- a/src/kwqtablemodel.h +++ b/src/kwqtablemodel.h @@ -43,7 +43,7 @@ public: SoundRole }; = - KWQTableModel(QObject * parent =3D 0); + explicit KWQTableModel(QObject * parent =3D 0); ~KWQTableModel(); = void setDocument(KEduVocDocument * doc); diff --git a/src/kwqtutorflashcard.h b/src/kwqtutorflashcard.h index 8f455cf..88afcea 100644 --- a/src/kwqtutorflashcard.h +++ b/src/kwqtutorflashcard.h @@ -30,7 +30,7 @@ class KWQTutorFlashCard : public QWidget Q_OBJECT = public: - KWQTutorFlashCard(QWidget* parent =3D 0); + explicit KWQTutorFlashCard(QWidget* parent =3D 0); void init(); /* reimplemented func to save flashcard geometry before closing */ void closeEvent (QCloseEvent* event); diff --git a/src/prefcardappearance.h b/src/prefcardappearance.h index 4484d92..4a8031d 100644 --- a/src/prefcardappearance.h +++ b/src/prefcardappearance.h @@ -27,7 +27,7 @@ class PrefCardAppearance : public QWidget, public Ui::Pre= fCardAppearanceBase { Q_OBJECT public: - PrefCardAppearance(QWidget *parent); + explicit PrefCardAppearance(QWidget *parent); = public slots: void slotFlipButtonClicked(); diff --git a/src/prefeditor.h b/src/prefeditor.h index 36b2895..bcb83b9 100644 --- a/src/prefeditor.h +++ b/src/prefeditor.h @@ -28,7 +28,7 @@ class PrefEditor : public QWidget, public Ui::PrefEditorB= ase { Q_OBJECT public: - PrefEditor(QWidget *parent); + explicit PrefEditor(QWidget *parent); = }; = diff --git a/src/prefgeneral.h b/src/prefgeneral.h index 5506294..1c56492 100644 --- a/src/prefgeneral.h +++ b/src/prefgeneral.h @@ -28,7 +28,7 @@ class PrefGeneral : public QWidget, public Ui::PrefGenera= lBase { Q_OBJECT public: - PrefGeneral(QWidget *parent); + explicit PrefGeneral(QWidget *parent); }; = #endif diff --git a/src/prefquiz.h b/src/prefquiz.h index 188fa36..fa9ccc0 100644 --- a/src/prefquiz.h +++ b/src/prefquiz.h @@ -28,7 +28,7 @@ class PrefQuiz : public QWidget, public Ui::PrefQuizBase { Q_OBJECT public: - PrefQuiz(QWidget *parent); + explicit PrefQuiz(QWidget *parent); = }; = diff --git a/src/preftutor.h b/src/preftutor.h index 646cab0..d56dcda 100644 --- a/src/preftutor.h +++ b/src/preftutor.h @@ -28,7 +28,7 @@ class PrefTutor : public QWidget, public Ui::PrefTutorBase { Q_OBJECT public: - PrefTutor(QWidget *parent); + explicit PrefTutor(QWidget *parent); = private slots: void timingChanged(int); diff --git a/src/wqprintdialogpage.h b/src/wqprintdialogpage.h index 8f8e6e5..73f4f25 100644 --- a/src/wqprintdialogpage.h +++ b/src/wqprintdialogpage.h @@ -33,7 +33,7 @@ class WQPrintDialogPage : public QWidget { Q_OBJECT public: - WQPrintDialogPage(QWidget *parent =3D 0); + explicit WQPrintDialogPage(QWidget *parent =3D 0); = int printStyle(); void setPrintStyle(int style);