Commit 9e72dc34 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Wizards: C++11-ify code generated by JSON wizards



Task-number: QTCREATORBUG-16983
Change-Id: I1f936f25f4e9756239e04d677cec92316e3dc75b
Reviewed-by: Kai Koehne's avatarKai Koehne <kai.koehne@qt.io>
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 94921534
......@@ -8,7 +8,7 @@ QT -= gui
@else
CONFIG -= qt
@endif
CONFIG += console
CONFIG += console c++11
CONFIG -= app_bundle
TEMPLATE = app
......
......@@ -29,9 +29,9 @@ class %{CN}
@endif
public:
@if '%{Base}' === 'QObject'
explicit %{CN}(QObject *parent = 0);
explicit %{CN}(QObject *parent = nullptr);
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
explicit %{CN}(QWidget *parent = 0);
explicit %{CN}(QWidget *parent = nullptr);
@else
%{CN}();
@endif
......
......@@ -10,7 +10,7 @@ class %{CN} : public %{Base}
Q_OBJECT
public:
explicit %{CN}(QObject *parent = 0);
explicit %{CN}(QObject *parent = nullptr);
@if %{CustomHeader}
// Header:
......
......@@ -10,7 +10,7 @@ class %{CN} : public %{Base}
Q_OBJECT
public:
explicit %{CN}(QObject *parent = 0);
explicit %{CN}(QObject *parent = nullptr);
@if %{CustomHeader}
// Header:
......
......@@ -10,7 +10,7 @@ class %{CN} : public %{Base}
Q_OBJECT
public:
explicit %{CN}(QObject *parent = 0);
explicit %{CN}(QObject *parent = nullptr);
@if %{CustomHeader}
// Header:
......
......@@ -39,7 +39,7 @@ bool %PluginName%Plugin::initialize(const QStringList &arguments, QString *error
Q_UNUSED(arguments)
Q_UNUSED(errorString)
QAction *action = new QAction(tr("%PluginName% Action"), this);
auto action = new QAction(tr("%PluginName% Action"), this);
Core::Command *cmd = Core::ActionManager::registerAction(action, Constants::ACTION_ID,
Core::Context(Core::Constants::C_GLOBAL));
cmd->setDefaultKeySequence(QKeySequence(tr("Ctrl+Alt+Meta+A")));
......
......@@ -9,7 +9,7 @@ class %ObjectName% : public QDeclarativeItem
Q_DISABLE_COPY(%ObjectName%)
public:
%ObjectName%(QDeclarativeItem *parent = 0);
%ObjectName%(QDeclarativeItem *parent = nullptr);
~%ObjectName%();
};
......
TEMPLATE = lib
TARGET = %ProjectName%
QT += declarative
CONFIG += qt plugin
CONFIG += qt plugin c++11
TARGET = $$qtLibraryTarget($$TARGET)
uri = %Uri%
......
......@@ -9,7 +9,7 @@ class %ObjectName% : public QQuickItem
Q_DISABLE_COPY(%ObjectName%)
public:
%ObjectName%(QQuickItem *parent = 0);
%ObjectName%(QQuickItem *parent = nullptr);
~%ObjectName%();
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment