forked from qt-creator/qt-creator
Use a more logical code style
This adds C++11-style initializers and breaks the initializer list into a new line, since most classes will have other members to be put in new lines as well. Change-Id: I7b6d6bf6f32dbd58a744405aefabb02be9f45316 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
LorenDB
parent
4444ac052c
commit
6c0f2b1c63
@@ -10,11 +10,14 @@ public:
|
|||||||
|
|
||||||
@endif
|
@endif
|
||||||
@if '%{Base}' === 'QObject'
|
@if '%{Base}' === 'QObject'
|
||||||
%{CN}::%{CN}(QObject *parent) : QObject(parent)%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
%{CN}::%{CN}(QObject *parent)
|
||||||
|
: QObject{parent}%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
||||||
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
|
@elsif '%{Base}' === 'QWidget' || '%{Base}' === 'QMainWindow'
|
||||||
%{CN}::%{CN}(QWidget *parent) : %{Base}(parent)%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
%{CN}::%{CN}(QWidget *parent)
|
||||||
|
: %{Base}{parent}%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
||||||
@elsif %{JS: Cpp.hasQObjectParent('%{Base}')}
|
@elsif %{JS: Cpp.hasQObjectParent('%{Base}')}
|
||||||
%{CN}::%{CN}(QObject *parent) : %{Base}(parent)%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
%{CN}::%{CN}(QObject *parent)
|
||||||
|
: %{Base}{parent}%{JS: ('%{SharedDataInit}') ? ', %{SharedDataInit}' : ''}
|
||||||
@else
|
@else
|
||||||
%{CN}::%{CN}()%{JS: ('%{SharedDataInit}') ? ' : %{SharedDataInit}' : ''}
|
%{CN}::%{CN}()%{JS: ('%{SharedDataInit}') ? ' : %{SharedDataInit}' : ''}
|
||||||
@endif
|
@endif
|
||||||
@@ -23,7 +26,8 @@ public:
|
|||||||
}
|
}
|
||||||
@if '%{IncludeQSharedData}'
|
@if '%{IncludeQSharedData}'
|
||||||
|
|
||||||
%{CN}::%{CN}(const %{CN} &rhs) : data(rhs.data)
|
%{CN}::%{CN}(const %{CN} &rhs)
|
||||||
|
: data{rhs.data}
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user