diff --git a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_collection.h b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_collection.h index f9a898e6a8a..e8e792915bb 100644 --- a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_collection.h +++ b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_collection.h @@ -15,9 +15,9 @@ class @COLLECTION_PLUGIN_CLASS@ : public QObject, public QDesignerCustomWidgetCo @COLLECTION_PLUGIN_METADATA@ public: - explicit @COLLECTION_PLUGIN_CLASS@(QObject *parent = 0); + explicit @COLLECTION_PLUGIN_CLASS@(QObject *parent = nullptr); - virtual QList customWidgets() const; + QList customWidgets() const override; private: QList m_widgets; diff --git a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.cpp b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.cpp index 06dce7128a9..8afff94d745 100644 --- a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.cpp +++ b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.cpp @@ -6,7 +6,6 @@ @PLUGIN_CLASS@::@PLUGIN_CLASS@(QObject *parent) : QObject(parent) { - m_initialized = false; } void @PLUGIN_CLASS@::initialize(QDesignerFormEditorInterface * /* core */) diff --git a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.h b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.h index 0767c0581df..2402458092e 100644 --- a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.h +++ b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_single.h @@ -14,22 +14,22 @@ class @PLUGIN_CLASS@ : public QObject, public QDesignerCustomWidgetInterface @SINGLE_PLUGIN_METADATA@ public: - @PLUGIN_CLASS@(QObject *parent = 0); + explicit @PLUGIN_CLASS@(QObject *parent = nullptr); - bool isContainer() const; - bool isInitialized() const; - QIcon icon() const; - QString domXml() const; - QString group() const; - QString includeFile() const; - QString name() const; - QString toolTip() const; - QString whatsThis() const; - QWidget *createWidget(QWidget *parent); - void initialize(QDesignerFormEditorInterface *core); + bool isContainer() const override; + bool isInitialized() const override; + QIcon icon() const override; + QString domXml() const override; + QString group() const override; + QString includeFile() const override; + QString name() const override; + QString toolTip() const override; + QString whatsThis() const override; + QWidget *createWidget(QWidget *parent) override; + void initialize(QDesignerFormEditorInterface *core) override; private: - bool m_initialized; + bool m_initialized = false; }; @if ! '%{Cpp:PragmaOnce}' diff --git a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_widget.h b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_widget.h index 50256c5ff54..3ec192c6d31 100644 --- a/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_widget.h +++ b/share/qtcreator/templates/qt4project/customwidgetwizard/tpl_widget.h @@ -12,7 +12,7 @@ class @WIDGET_CLASS@ : public @WIDGET_BASE_CLASS@ Q_OBJECT public: - @WIDGET_CLASS@(QWidget *parent = 0); + explicit @WIDGET_CLASS@(QWidget *parent = nullptr); }; @if ! '%{Cpp:PragmaOnce}'