forked from qt-creator/qt-creator
QmlDesigner: Fix clazy warning
Remove superfluous call to default constructors. Change-Id: Id16d7641a28b1d4b58c8bfe26b7076e8122b72c3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -55,8 +55,7 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
FormEditorWidget::FormEditorWidget(FormEditorView *view)
|
FormEditorWidget::FormEditorWidget(FormEditorView *view) :
|
||||||
: QWidget(),
|
|
||||||
m_formEditorView(view)
|
m_formEditorView(view)
|
||||||
{
|
{
|
||||||
setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/formeditorstylesheet.css")))));
|
setStyleSheet(Theme::replaceCssColors(QString::fromUtf8(Utils::FileReader::fetchQrc(QLatin1String(":/qmldesigner/formeditorstylesheet.css")))));
|
||||||
|
@@ -31,7 +31,6 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
LayerItem::LayerItem(FormEditorScene* scene)
|
LayerItem::LayerItem(FormEditorScene* scene)
|
||||||
: QGraphicsObject()
|
|
||||||
{
|
{
|
||||||
scene->addItem(this);
|
scene->addItem(this);
|
||||||
setZValue(1);
|
setZValue(1);
|
||||||
|
@@ -45,10 +45,9 @@
|
|||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
NavigatorWidget::NavigatorWidget(NavigatorView *view) :
|
NavigatorWidget::NavigatorWidget(NavigatorView *view)
|
||||||
QFrame(),
|
: m_treeView(new NavigatorTreeView),
|
||||||
m_treeView(new NavigatorTreeView),
|
m_navigatorView(view)
|
||||||
m_navigatorView(view)
|
|
||||||
{
|
{
|
||||||
m_treeView->setDragEnabled(true);
|
m_treeView->setDragEnabled(true);
|
||||||
m_treeView->setAcceptDrops(true);
|
m_treeView->setAcceptDrops(true);
|
||||||
|
@@ -85,10 +85,9 @@ void StatesEditorWidget::showAddNewStatesButton(bool showAddNewStatesButton)
|
|||||||
}
|
}
|
||||||
|
|
||||||
StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, StatesEditorModel *statesEditorModel)
|
StatesEditorWidget::StatesEditorWidget(StatesEditorView *statesEditorView, StatesEditorModel *statesEditorModel)
|
||||||
: QQuickWidget(),
|
: m_statesEditorView(statesEditorView),
|
||||||
m_statesEditorView(statesEditorView),
|
m_imageProvider(nullptr),
|
||||||
m_imageProvider(nullptr),
|
m_qmlSourceUpdateShortcut(nullptr)
|
||||||
m_qmlSourceUpdateShortcut(nullptr)
|
|
||||||
{
|
{
|
||||||
m_imageProvider = new Internal::StatesEditorImageProvider;
|
m_imageProvider = new Internal::StatesEditorImageProvider;
|
||||||
m_imageProvider->setNodeInstanceView(statesEditorView->nodeInstanceView());
|
m_imageProvider->setNodeInstanceView(statesEditorView->nodeInstanceView());
|
||||||
|
@@ -568,7 +568,6 @@ QmlItemNode QmlObjectNode::itemForInstance(const NodeInstance &instance) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
QmlObjectNode::QmlObjectNode()
|
QmlObjectNode::QmlObjectNode()
|
||||||
: QmlModelNodeFacade()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -38,7 +38,6 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
QmlModelState::QmlModelState()
|
QmlModelState::QmlModelState()
|
||||||
: QmlModelNodeFacade()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -89,7 +89,6 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
ColorTool::ColorTool()
|
ColorTool::ColorTool()
|
||||||
: QObject(), AbstractCustomTool()
|
|
||||||
{
|
{
|
||||||
auto colorToolAction = new ColorToolAction;
|
auto colorToolAction = new ColorToolAction;
|
||||||
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(colorToolAction);
|
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(colorToolAction);
|
||||||
|
@@ -42,11 +42,10 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
PathItem::PathItem(FormEditorScene* scene)
|
PathItem::PathItem(FormEditorScene* scene)
|
||||||
: QGraphicsObject(),
|
: m_selectionManipulator(this),
|
||||||
m_selectionManipulator(this),
|
m_lastPercent(-1.),
|
||||||
m_lastPercent(-1.),
|
m_formEditorItem(nullptr),
|
||||||
m_formEditorItem(nullptr),
|
m_dontUpdatePath(false)
|
||||||
m_dontUpdatePath(false)
|
|
||||||
{
|
{
|
||||||
scene->addItem(this);
|
scene->addItem(this);
|
||||||
setFlag(QGraphicsItem::ItemIsMovable, false);
|
setFlag(QGraphicsItem::ItemIsMovable, false);
|
||||||
|
@@ -140,9 +140,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
PathTool::PathTool()
|
PathTool::PathTool()
|
||||||
: QObject(),
|
: m_pathToolView(this)
|
||||||
AbstractCustomTool(),
|
|
||||||
m_pathToolView(this)
|
|
||||||
{
|
{
|
||||||
auto textToolAction = new PathToolAction;
|
auto textToolAction = new PathToolAction;
|
||||||
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
||||||
|
@@ -37,8 +37,7 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
PathToolView::PathToolView(PathTool *pathTool)
|
PathToolView::PathToolView(PathTool *pathTool)
|
||||||
: AbstractView(),
|
: m_pathTool(pathTool)
|
||||||
m_pathTool(pathTool)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -115,7 +115,6 @@ protected:
|
|||||||
|
|
||||||
|
|
||||||
SourceTool::SourceTool()
|
SourceTool::SourceTool()
|
||||||
: QObject(), AbstractCustomTool()
|
|
||||||
{
|
{
|
||||||
auto sourceToolAction = new SourceToolAction;
|
auto sourceToolAction = new SourceToolAction;
|
||||||
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(sourceToolAction);
|
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(sourceToolAction);
|
||||||
@@ -169,7 +168,6 @@ void SourceTool::mouseReleaseEvent(const QList<QGraphicsItem*> &itemList,
|
|||||||
AbstractFormEditorTool::mouseReleaseEvent(itemList, event);
|
AbstractFormEditorTool::mouseReleaseEvent(itemList, event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SourceTool::mouseDoubleClickEvent(const QList<QGraphicsItem*> &itemList, QGraphicsSceneMouseEvent *event)
|
void SourceTool::mouseDoubleClickEvent(const QList<QGraphicsItem*> &itemList, QGraphicsSceneMouseEvent *event)
|
||||||
{
|
{
|
||||||
AbstractFormEditorTool::mouseDoubleClickEvent(itemList, event);
|
AbstractFormEditorTool::mouseDoubleClickEvent(itemList, event);
|
||||||
|
@@ -34,7 +34,6 @@
|
|||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
|
|
||||||
TextEditItemWidget::TextEditItemWidget(QGraphicsScene* scene)
|
TextEditItemWidget::TextEditItemWidget(QGraphicsScene* scene)
|
||||||
: QGraphicsProxyWidget()
|
|
||||||
{
|
{
|
||||||
scene->addItem(this);
|
scene->addItem(this);
|
||||||
setFlag(QGraphicsItem::ItemIsMovable, false);
|
setFlag(QGraphicsItem::ItemIsMovable, false);
|
||||||
|
@@ -93,7 +93,6 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
TextTool::TextTool()
|
TextTool::TextTool()
|
||||||
: QObject() , AbstractCustomTool()
|
|
||||||
{
|
{
|
||||||
auto textToolAction = new TextToolAction;
|
auto textToolAction = new TextToolAction;
|
||||||
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
QmlDesignerPlugin::instance()->designerActionManager().addDesignerAction(textToolAction);
|
||||||
|
Reference in New Issue
Block a user