summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/components
diff options
context:
space:
mode:
authorTim Jenssen <tim.jenssen@theqtcompany.com>2016-01-27 11:20:18 +0100
committerTim Jenssen <tim.jenssen@theqtcompany.com>2016-02-02 14:30:56 +0000
commitde28ab0a6f01ce3fc9a5b05754bc379587171887 (patch)
treee295dabac3db7cd565d2e17736c45382dce2c9bd /src/plugins/qmldesigner/components
parenta75a97db1b6c3bdf46dac11032db56349df7f0aa (diff)
downloadqt-creator-de28ab0a6f01ce3fc9a5b05754bc379587171887.tar.gz
QmlDesigner: using pragma once at formeditor files
- also clean up some empty lines and include orders Change-Id: Ia076951a6b0060ae70c53f213bdb5d6a12abd319 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmldesigner/components')
-rw-r--r--src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/anchorindicator.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/anchorindicatorgraphicsitem.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/backgroundaction.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/bindingindicator.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/bindingindicatorgraphicsitem.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.h9
-rw-r--r--src/plugins/qmldesigner/components/formeditor/controlelement.h11
-rw-r--r--src/plugins/qmldesigner/components/formeditor/dragtool.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditoritem.h11
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditornodeinstanceview.h9
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorscene.h15
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorsubwindow.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorview.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/formeditorwidget.h9
-rw-r--r--src/plugins/qmldesigner/components/formeditor/itemutilfunctions.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/layeritem.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/lineeditaction.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/movemanipulator.h15
-rw-r--r--src/plugins/qmldesigner/components/formeditor/movetool.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/numberseriesaction.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/onedimensionalcluster.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/resizecontroller.h12
-rw-r--r--src/plugins/qmldesigner/components/formeditor/resizehandleitem.h13
-rw-r--r--src/plugins/qmldesigner/components/formeditor/resizeindicator.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/resizemanipulator.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/resizetool.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.h12
-rw-r--r--src/plugins/qmldesigner/components/formeditor/scaleitem.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/scalemanipulator.h12
-rw-r--r--src/plugins/qmldesigner/components/formeditor/selectionindicator.h15
-rw-r--r--src/plugins/qmldesigner/components/formeditor/selectionrectangle.h10
-rw-r--r--src/plugins/qmldesigner/components/formeditor/selectiontool.h9
-rw-r--r--src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.h7
-rw-r--r--src/plugins/qmldesigner/components/formeditor/snapper.h8
-rw-r--r--src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h7
-rw-r--r--src/plugins/qmldesigner/components/formeditor/toolbox.h6
-rw-r--r--src/plugins/qmldesigner/components/formeditor/zoomaction.h6
40 files changed, 91 insertions, 269 deletions
diff --git a/src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h b/src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
index fe981c2405..4b5c0f43c7 100644
--- a/src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
+++ b/src/plugins/qmldesigner/components/formeditor/abstractcustomtool.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
-#define QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
+#pragma once
#include "abstractformeditortool.h"
@@ -43,5 +41,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ABSTRACTSINGLESELECTIONTOOL_H
diff --git a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h
index 219d6c5866..4704f1e896 100644
--- a/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h
+++ b/src/plugins/qmldesigner/components/formeditor/abstractformeditortool.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef ABSTRACTFORMEDITORTOOL_H
-#define ABSTRACTFORMEDITORTOOL_H
+#pragma once
#include "formeditoritem.h"
@@ -104,6 +102,4 @@ private:
QList<FormEditorItem*> m_itemList;
};
-}
-
-#endif // ABSTRACTFORMEDITORTOOL_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/anchorindicator.h b/src/plugins/qmldesigner/components/formeditor/anchorindicator.h
index 131c21e745..75b077f573 100644
--- a/src/plugins/qmldesigner/components/formeditor/anchorindicator.h
+++ b/src/plugins/qmldesigner/components/formeditor/anchorindicator.h
@@ -22,14 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef QMLDESIGNER_ANCHORINDICATOR_H
-#define QMLDESIGNER_ANCHORINDICATOR_H
-
-#include <QPointer>
#include "layeritem.h"
#include "formeditoritem.h"
+#include <QPointer>
namespace QmlDesigner {
@@ -62,5 +60,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ANCHORINDICATOR_H
diff --git a/src/plugins/qmldesigner/components/formeditor/anchorindicatorgraphicsitem.h b/src/plugins/qmldesigner/components/formeditor/anchorindicatorgraphicsitem.h
index 0761771cd7..a6cc8a8f17 100644
--- a/src/plugins/qmldesigner/components/formeditor/anchorindicatorgraphicsitem.h
+++ b/src/plugins/qmldesigner/components/formeditor/anchorindicatorgraphicsitem.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
-#define QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
+#pragma once
#include <QGraphicsObject>
@@ -65,5 +63,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_ANCHORINDICATORGRAPHICSITEM_H
diff --git a/src/plugins/qmldesigner/components/formeditor/backgroundaction.h b/src/plugins/qmldesigner/components/formeditor/backgroundaction.h
index 4d64eca3ea..007c280045 100644
--- a/src/plugins/qmldesigner/components/formeditor/backgroundaction.h
+++ b/src/plugins/qmldesigner/components/formeditor/backgroundaction.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef QMLDESIGNER_BACKGROUNDACTION_H
-#define QMLDESIGNER_BACKGROUNDACTION_H
+#pragma once
#include <QWidgetAction>
@@ -56,5 +54,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_BACKGROUNDACTION_H
diff --git a/src/plugins/qmldesigner/components/formeditor/bindingindicator.h b/src/plugins/qmldesigner/components/formeditor/bindingindicator.h
index 350f03381a..45dd66ebb2 100644
--- a/src/plugins/qmldesigner/components/formeditor/bindingindicator.h
+++ b/src/plugins/qmldesigner/components/formeditor/bindingindicator.h
@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef QMLDESIGNER_BINDINGINDICATOR_H
-#define QMLDESIGNER_BINDINGINDICATOR_H
-
-#include <QPointer>
#include "layeritem.h"
#include "formeditoritem.h"
+#include <QPointer>
+
namespace QmlDesigner {
class FormEditorItem;
@@ -44,7 +43,6 @@ public:
void show();
void hide();
-
void clear();
void setItems(const QList<FormEditorItem*> &itemList);
@@ -60,5 +58,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_BINDINGINDICATOR_H
diff --git a/src/plugins/qmldesigner/components/formeditor/bindingindicatorgraphicsitem.h b/src/plugins/qmldesigner/components/formeditor/bindingindicatorgraphicsitem.h
index c3e701d9d6..8a813c6df0 100644
--- a/src/plugins/qmldesigner/components/formeditor/bindingindicatorgraphicsitem.h
+++ b/src/plugins/qmldesigner/components/formeditor/bindingindicatorgraphicsitem.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
-#define QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
+#pragma once
#include <QGraphicsObject>
@@ -47,5 +45,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_BINDINGINDICATORGRAPHICSITEM_H
diff --git a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.h b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.h
index 49a736a612..beb57fae4d 100644
--- a/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.h
+++ b/src/plugins/qmldesigner/components/formeditor/contentnoteditableindicator.h
@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
-#define QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
+#include "layeritem.h"
+#include "formeditoritem.h"
#include <QPointer>
#include <QGraphicsRectItem>
-#include "layeritem.h"
-#include "formeditoritem.h"
namespace QmlDesigner {
@@ -57,5 +56,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // QMLDESIGNER_CONTENTNOTEDITABLEINDICATOR_H
diff --git a/src/plugins/qmldesigner/components/formeditor/controlelement.h b/src/plugins/qmldesigner/components/formeditor/controlelement.h
index 80f9de65ef..506adef224 100644
--- a/src/plugins/qmldesigner/components/formeditor/controlelement.h
+++ b/src/plugins/qmldesigner/components/formeditor/controlelement.h
@@ -22,14 +22,10 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef CONTROLELEMENT_H
-#define CONTROLELEMENT_H
-
+#pragma once
#include <QGraphicsRectItem>
-
namespace QmlDesigner {
class LayerItem;
@@ -41,13 +37,10 @@ public:
~ControlElement();
void hide();
-
void setBoundingRect(const QRectF &rect);
private:
QGraphicsRectItem *m_controlShape;
};
-}
-
-#endif // CONTROLELEMENT_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/dragtool.h b/src/plugins/qmldesigner/components/formeditor/dragtool.h
index 36ab84ee55..794fc0ab60 100644
--- a/src/plugins/qmldesigner/components/formeditor/dragtool.h
+++ b/src/plugins/qmldesigner/components/formeditor/dragtool.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef DRAGTOOL_H
-#define DRAGTOOL_H
+#pragma once
#include "abstractformeditortool.h"
#include "movemanipulator.h"
@@ -100,6 +98,4 @@ private:
bool m_isAborted;
};
-
-}
-#endif // DRAGTOOL_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h
index 0bfb4fcaba..a22227b55b 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorgraphicsview.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef FORMEDITORGRAPHICSVIEW_H
-#define FORMEDITORGRAPHICSVIEW_H
+#pragma once
#include <QGraphicsView>
@@ -63,5 +61,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // FORMEDITORGRAPHICSVIEW_H
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.h b/src/plugins/qmldesigner/components/formeditor/formeditoritem.h
index e25efbd929..d0fcc149b0 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.h
@@ -22,14 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef FORMEDITORITEM_H
-#define FORMEDITORITEM_H
+#include <qmlitemnode.h>
+#include "snappinglinecreator.h"
#include <QPointer>
#include <QGraphicsWidget>
-#include <qmlitemnode.h>
-#include "snappinglinecreator.h"
QT_BEGIN_NAMESPACE
class QTimeLine;
@@ -142,6 +141,4 @@ inline int FormEditorItem::type() const
return UserType + 0xfffa;
}
-}
-
-#endif // FORMEDITORITEM_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditornodeinstanceview.h b/src/plugins/qmldesigner/components/formeditor/formeditornodeinstanceview.h
index 19b16f6f6b..c104f12309 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditornodeinstanceview.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditornodeinstanceview.h
@@ -22,10 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef FORMEDITORNODEINSTANCE_H
-#define FORMEDITORNODEINSTANCE_H
-
+#pragma once
#include <nodeinstanceview.h>
@@ -41,6 +38,4 @@ public:
~FormEditorNodeInstanceView();
};
-
-}
-#endif //FORMEDITORNODEINSTANCE_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
index d01eb76f0c..a356d69cca 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorscene.h
@@ -22,16 +22,14 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef FORMEDITORSCENE_H
-#define FORMEDITORSCENE_H
-
+#include <qmlitemnode.h>
+#include "abstractformeditortool.h"
#include <QGraphicsScene>
#include <QPointer>
#include <QHash>
-#include <qmlitemnode.h>
-#include "abstractformeditortool.h"
QT_BEGIN_NAMESPACE
class QGraphicsSceneMouseEvent;
@@ -126,9 +124,4 @@ private:
bool m_showBoundingRects;
};
-
-
-
-}
-#endif //FORMEDITORSCENE_H
-
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorsubwindow.h b/src/plugins/qmldesigner/components/formeditor/formeditorsubwindow.h
index 49b30b4bc3..0da0944184 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorsubwindow.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorsubwindow.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef FORMEDITORSUBWINDOW_H
-#define FORMEDITORSUBWINDOW_H
+#pragma once
#include <QMdiSubWindow>
@@ -37,5 +35,3 @@ public:
};
} // namespace QmlDesigner
-
-#endif // FORMEDITORSUBWINDOW_H
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorview.h b/src/plugins/qmldesigner/components/formeditor/formeditorview.h
index c4c8376381..e5a6b3aff8 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorview.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorview.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef FORMEDITORVIEW_H
-#define FORMEDITORVIEW_H
+#pragma once
#include <abstractview.h>
@@ -138,6 +136,4 @@ private: //variables
int m_transactionCounter;
};
-}
-
-#endif //FORMEDITORVIEW_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h
index d8a46bbcce..95c10bcd82 100644
--- a/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h
+++ b/src/plugins/qmldesigner/components/formeditor/formeditorwidget.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef FORMEDITORWIDGET_H
-#define FORMEDITORWIDGET_H
+#pragma once
#include <QWidget>
#include <QPointer>
@@ -103,7 +101,4 @@ private:
QPointer<QAction> m_resetAction;
};
-
-}
-#endif //FORMEDITORWIDGET_H
-
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/itemutilfunctions.h b/src/plugins/qmldesigner/components/formeditor/itemutilfunctions.h
index cd18138884..ef53f8ffd2 100644
--- a/src/plugins/qmldesigner/components/formeditor/itemutilfunctions.h
+++ b/src/plugins/qmldesigner/components/formeditor/itemutilfunctions.h
@@ -22,13 +22,11 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef ITEMUTILFUNCTIONS_H
-#define ITEMUTILFUNCTIONS_H
-
-#include <QRectF>
#include "formeditoritem.h"
+#include <QRectF>
namespace QmlDesigner {
@@ -38,6 +36,4 @@ ModelNode parentNodeSemanticallyChecked(const ModelNode &childNode, const ModelN
FormEditorItem* mapGraphicsViewToGraphicsScene(FormEditorItem* item);
-}
-
-#endif // ITEMUTILFUNCTIONS_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/layeritem.h b/src/plugins/qmldesigner/components/formeditor/layeritem.h
index 166780d20b..0ea9a202a8 100644
--- a/src/plugins/qmldesigner/components/formeditor/layeritem.h
+++ b/src/plugins/qmldesigner/components/formeditor/layeritem.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef LAYERITEM_H
-#define LAYERITEM_H
+#pragma once
#include <QGraphicsObject>
@@ -56,6 +54,4 @@ inline int LayerItem::type() const
return Type;
}
-}
-
-#endif // LAYERITEM_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/lineeditaction.h b/src/plugins/qmldesigner/components/formeditor/lineeditaction.h
index 277bbc28ac..ce279f8326 100644
--- a/src/plugins/qmldesigner/components/formeditor/lineeditaction.h
+++ b/src/plugins/qmldesigner/components/formeditor/lineeditaction.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef LINEEDITACTION_H
-#define LINEEDITACTION_H
+#pragma once
#include <QWidgetAction>
@@ -52,5 +50,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // LINEEDITACTION_H
diff --git a/src/plugins/qmldesigner/components/formeditor/movemanipulator.h b/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
index 2647d0ab25..27b2e465f0 100644
--- a/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/movemanipulator.h
@@ -22,9 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef MOVEMANIPULATOR_H
-#define MOVEMANIPULATOR_H
+#include "formeditoritem.h"
+#include "rewritertransaction.h"
+#include "snapper.h"
+#include "formeditorview.h"
#include <QPointer>
#include <QGraphicsItem>
@@ -32,11 +35,6 @@
#include <QPointF>
#include <QRectF>
-#include "formeditoritem.h"
-#include "rewritertransaction.h"
-#include "snapper.h"
-#include "formeditorview.h"
-
namespace QmlDesigner {
class ModelNodeChangeSet;
@@ -115,5 +113,4 @@ private:
QPointF m_lastPosition;
};
-}
-#endif // MOVEMANIPULATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/movetool.h b/src/plugins/qmldesigner/components/formeditor/movetool.h
index fbce82ec3b..7c6b2bf621 100644
--- a/src/plugins/qmldesigner/components/formeditor/movetool.h
+++ b/src/plugins/qmldesigner/components/formeditor/movetool.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef MOVETOOL_H
-#define MOVETOOL_H
+#pragma once
#include "abstractformeditortool.h"
#include "movemanipulator.h"
@@ -36,7 +34,6 @@
namespace QmlDesigner {
-
class MoveTool : public AbstractFormEditorTool
{
public:
@@ -90,5 +87,4 @@ private:
QList<FormEditorItem*> m_movingItems;
};
-}
-#endif // MOVETOOL_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h
index 68650a0b54..d58be7ea85 100644
--- a/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h
+++ b/src/plugins/qmldesigner/components/formeditor/numberseriesaction.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef NUMBERSERIESACTION_H
-#define NUMBERSERIESACTION_H
+#pragma once
#include <QWidgetAction>
#include <QPointer>
@@ -60,6 +58,4 @@ private:
int m_comboBoxModelIndex;
};
-} // namespace QKinecticDesigner
-
-#endif // NUMBERSERIESACTION_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/onedimensionalcluster.h b/src/plugins/qmldesigner/components/formeditor/onedimensionalcluster.h
index af9ba536bd..83b9397629 100644
--- a/src/plugins/qmldesigner/components/formeditor/onedimensionalcluster.h
+++ b/src/plugins/qmldesigner/components/formeditor/onedimensionalcluster.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef ONEDIMENSIONALCLUSTER_H
-#define ONEDIMENSIONALCLUSTER_H
+#pragma once
#include <QList>
@@ -43,8 +41,6 @@ private:
double mean() const;
double first() const;
-
-
static QList<OneDimensionalCluster> createOneDimensionalClusterList(const QList<double> & oneDimensionalCoordinateList);
static QList<OneDimensionalCluster> reduceOneDimensionalClusterList(const QList<OneDimensionalCluster> & unreducedClusterList, double maximumDistance);
@@ -58,9 +54,7 @@ inline bool operator < (const OneDimensionalCluster & firstCluster, const OneDim
inline OneDimensionalCluster operator+(const OneDimensionalCluster & firstCluster, const OneDimensionalCluster & secondCluster)
{
-
return OneDimensionalCluster(firstCluster.m_coordinateList + secondCluster.m_coordinateList);
}
-}
-#endif // ONEDIMENSIONALCLUSTER_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/resizecontroller.h b/src/plugins/qmldesigner/components/formeditor/resizecontroller.h
index 7f97e68e90..334ce19c0c 100644
--- a/src/plugins/qmldesigner/components/formeditor/resizecontroller.h
+++ b/src/plugins/qmldesigner/components/formeditor/resizecontroller.h
@@ -22,24 +22,19 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef RESIZECONTROLLER_H
-#define RESIZECONTROLLER_H
+#pragma once
#include <QWeakPointer>
#include <QSharedPointer>
-
namespace QmlDesigner {
class FormEditorItem;
class LayerItem;
class ResizeHandleItem;
-
class ResizeControllerData;
class WeakResizeController;
-
class ResizeController
{
friend class WeakResizeController;
@@ -73,7 +68,6 @@ public:
WeakResizeController toWeakResizeController() const;
-
private: // functions
ResizeController(const QSharedPointer<ResizeControllerData> &data);
private: // variables
@@ -97,6 +91,4 @@ private: // variables
QWeakPointer<ResizeControllerData> m_data;
};
-}
-
-#endif // RESIZECONTROLLER_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/resizehandleitem.h b/src/plugins/qmldesigner/components/formeditor/resizehandleitem.h
index eeac2e3365..7e2e25c0fc 100644
--- a/src/plugins/qmldesigner/components/formeditor/resizehandleitem.h
+++ b/src/plugins/qmldesigner/components/formeditor/resizehandleitem.h
@@ -22,15 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef RESIZEHANDLEITEM_H
-#define RESIZEHANDLEITEM_H
-
-#include <QGraphicsItem>
+#include "resizecontroller.h"
#include <qmldesignercorelib_global.h>
-#include "resizecontroller.h"
+#include <QGraphicsItem>
namespace QmlDesigner {
@@ -42,7 +40,6 @@ public:
Type = 0xEAEA
};
-
ResizeHandleItem(QGraphicsItem *parent, const ResizeController &resizeController);
~ResizeHandleItem();
void setHandlePosition(const QPointF & globalPosition, const QPointF & itemSpacePosition);
@@ -77,6 +74,4 @@ inline int ResizeHandleItem::type() const
return Type;
}
-}
-
-#endif // RESIZEHANDLEITEM_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/resizeindicator.h b/src/plugins/qmldesigner/components/formeditor/resizeindicator.h
index 0c2e8e0b99..09027041db 100644
--- a/src/plugins/qmldesigner/components/formeditor/resizeindicator.h
+++ b/src/plugins/qmldesigner/components/formeditor/resizeindicator.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef RESIZEINDICATOR_H
-#define RESIZEINDICATOR_H
+#pragma once
#include "resizecontroller.h"
@@ -51,7 +49,6 @@ public:
void show();
void hide();
-
void clear();
void setItems(const QList<FormEditorItem*> &itemList);
@@ -59,10 +56,7 @@ public:
private:
QHash<FormEditorItem*, ResizeController> m_itemControllerHash;
-
LayerItem *m_layerItem;
};
} // namespace QmlDesigner
-
-#endif // SCALEINDICATOR_H
diff --git a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h
index 6e0c75ca00..ab4f97f9cb 100644
--- a/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/resizemanipulator.h
@@ -22,16 +22,15 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef RESIZEMANIPULATOR_H
-#define RESIZEMANIPULATOR_H
-
-#include <QPointer>
#include "resizehandleitem.h"
#include <snapper.h>
#include "rewritertransaction.h"
#include "formeditorview.h"
+#include <QPointer>
+
namespace QmlDesigner {
class ResizeHandleItem;
@@ -82,5 +81,4 @@ private:
bool m_isActive;
};
-}
-#endif // RESIZEMANIPULATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/resizetool.h b/src/plugins/qmldesigner/components/formeditor/resizetool.h
index cd9f4bea20..87690d8c21 100644
--- a/src/plugins/qmldesigner/components/formeditor/resizetool.h
+++ b/src/plugins/qmldesigner/components/formeditor/resizetool.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef RESIZETOOL_H
-#define RESIZETOOL_H
+#pragma once
#include "abstractformeditortool.h"
#include "selectionindicator.h"
@@ -32,7 +30,6 @@
#include "anchorindicator.h"
#include "resizemanipulator.h"
-
namespace QmlDesigner {
class ResizeTool : public AbstractFormEditorTool
@@ -66,7 +63,6 @@ public:
void instancesCompleted(const QList<FormEditorItem*> &itemList) override;
void instancePropertyChange(const QList<QPair<ModelNode, PropertyName> > &propertyList) override;
-
private:
SelectionIndicator m_selectionIndicator;
ResizeIndicator m_resizeIndicator;
@@ -74,6 +70,4 @@ private:
ResizeManipulator m_resizeManipulator;
};
-}
-
-#endif // RESIZETOOL_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.h b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.h
index 53c282f1e2..eadcf575ca 100644
--- a/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/rubberbandselectionmanipulator.h
@@ -22,10 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef RUBBERBANDSELECTIONMANIPULATOR_H
-#define RUBBERBANDSELECTIONMANIPULATOR_H
-
+#pragma once
#include "selectionrectangle.h"
#include "formeditorview.h"
@@ -33,7 +30,6 @@
namespace QmlDesigner {
-
class RubberBandSelectionManipulator
{
public:
@@ -43,7 +39,6 @@ public:
RemoveFromSelection
};
-
RubberBandSelectionManipulator(LayerItem *layerItem, FormEditorView *editorView);
void setItems(const QList<FormEditorItem*> &itemList);
@@ -63,7 +58,6 @@ public:
protected:
FormEditorItem *topFormEditorItem(const QList<QGraphicsItem*> &itemList);
-
private:
QList<FormEditorItem*> m_itemList;
QList<QmlItemNode> m_oldSelectionList;
@@ -74,6 +68,4 @@ private:
bool m_isActive;
};
-}
-
-#endif // RUBBERBANDSELECTIONMANIPULATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/scaleitem.h b/src/plugins/qmldesigner/components/formeditor/scaleitem.h
index 557a8ed019..b5e6ac00a3 100644
--- a/src/plugins/qmldesigner/components/formeditor/scaleitem.h
+++ b/src/plugins/qmldesigner/components/formeditor/scaleitem.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SCALEITEM_H
-#define SCALEITEM_H
+#pragma once
#include <QGraphicsRectItem>
@@ -44,6 +42,4 @@ private:
ScaleIndicator* m_indicator;
};
-}
-
-#endif // SCALEITEM_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/scalemanipulator.h b/src/plugins/qmldesigner/components/formeditor/scalemanipulator.h
index 59cd7e4c9c..9f04710ffb 100644
--- a/src/plugins/qmldesigner/components/formeditor/scalemanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/scalemanipulator.h
@@ -22,15 +22,13 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SCALEMANIPULATOR_H
-#define SCALEMANIPULATOR_H
+#pragma once
#include <QPointF>
-
-
+QT_BEGIN_NAMESPACE
class QGraphicsLineItem;
+QT_END_NAMESPACE
namespace QmlDesigner {
@@ -43,7 +41,6 @@ public:
ScaleManipulator(LayerItem *layerItem, FormEditorItem *formEditorItem);
virtual ~ScaleManipulator();
-
void begin(const QPointF& beginPoint);
void update(const QPointF& updatePoint);
void reparentTo(FormEditorItem *newParent);
@@ -54,5 +51,4 @@ private:
FormEditorItem *m_formEditorItem;
};
-}
-#endif // SCALEMANIPULATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/selectionindicator.h b/src/plugins/qmldesigner/components/formeditor/selectionindicator.h
index 09cc3e3d38..855eec8767 100644
--- a/src/plugins/qmldesigner/components/formeditor/selectionindicator.h
+++ b/src/plugins/qmldesigner/components/formeditor/selectionindicator.h
@@ -22,20 +22,17 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef SELECTIONINDICATOR_H
-#define SELECTIONINDICATOR_H
-
-#include <QPointer>
-#include <QGraphicsPolygonItem>
#include "layeritem.h"
#include "formeditoritem.h"
-#include <QCursor>
+#include <QCursor>
+#include <QPointer>
+#include <QGraphicsPolygonItem>
namespace QmlDesigner {
-
class SelectionIndicator
{
public:
@@ -59,6 +56,4 @@ private:
};
-}
-
-#endif // SELECTIONINDICATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/selectionrectangle.h b/src/plugins/qmldesigner/components/formeditor/selectionrectangle.h
index 5b781c167c..65ced30cb1 100644
--- a/src/plugins/qmldesigner/components/formeditor/selectionrectangle.h
+++ b/src/plugins/qmldesigner/components/formeditor/selectionrectangle.h
@@ -22,14 +22,12 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
+#pragma once
-#ifndef SELECTIONRECTANGLE_H
-#define SELECTIONRECTANGLE_H
+#include "layeritem.h"
#include <QPointer>
#include <QGraphicsRectItem>
-#include "layeritem.h"
-
namespace QmlDesigner {
@@ -54,6 +52,4 @@ private:
QPointer<LayerItem> m_layerItem;
};
-}
-
-#endif // SELECTIONRECTANGLE_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.h b/src/plugins/qmldesigner/components/formeditor/selectiontool.h
index f2dd993d28..15cfe08e76 100644
--- a/src/plugins/qmldesigner/components/formeditor/selectiontool.h
+++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.h
@@ -22,10 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SELECTIONTOOL_H
-#define SELECTIONTOOL_H
-
+#pragma once
#include "abstractformeditortool.h"
#include "rubberbandselectionmanipulator.h"
@@ -40,7 +37,6 @@
namespace QmlDesigner {
-
class SelectionTool : public AbstractFormEditorTool
{
public:
@@ -93,5 +89,4 @@ private:
QCursor m_cursor;
};
-}
-#endif // SELECTIONTOOL_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.h b/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.h
index 33d268d90d..7d351a4a7d 100644
--- a/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.h
+++ b/src/plugins/qmldesigner/components/formeditor/singleselectionmanipulator.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SINGLESELECTIONMANIPULATOR_H
-#define SINGLESELECTIONMANIPULATOR_H
+#pragma once
#include "formeditorview.h"
@@ -65,5 +63,4 @@ private:
bool m_isActive;
};
-}
-#endif // SINGLESELECTIONMANIPULATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/snapper.h b/src/plugins/qmldesigner/components/formeditor/snapper.h
index 7439f7e3db..259ee67c0e 100644
--- a/src/plugins/qmldesigner/components/formeditor/snapper.h
+++ b/src/plugins/qmldesigner/components/formeditor/snapper.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SNAPPER_H
-#define SNAPPER_H
+#pragma once
#include "formeditoritem.h"
@@ -34,7 +32,6 @@ QT_END_NAMESPACE
namespace QmlDesigner {
-
class Snapper
{
public:
@@ -115,5 +112,4 @@ private:
double m_snappingDistance;
};
-}
-#endif // SNAPPER_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h
index 3e87e5a506..fb7d43e26c 100644
--- a/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h
+++ b/src/plugins/qmldesigner/components/formeditor/snappinglinecreator.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef SNAPPINGLINECREATOR_H
-#define SNAPPINGLINECREATOR_H
+#pragma once
#include "layeritem.h"
#include <QPair>
@@ -97,5 +95,4 @@ private:
double m_rightPadding;
};
-}
-#endif // SNAPPINGLINECREATOR_H
+} // namespace QmlDesigner
diff --git a/src/plugins/qmldesigner/components/formeditor/toolbox.h b/src/plugins/qmldesigner/components/formeditor/toolbox.h
index 1b6703eb60..72bd0ffb8b 100644
--- a/src/plugins/qmldesigner/components/formeditor/toolbox.h
+++ b/src/plugins/qmldesigner/components/formeditor/toolbox.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef TOOLBOX_H
-#define TOOLBOX_H
+#pragma once
#include <utils/styledbar.h>
@@ -52,5 +50,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // TOOLBOX_H
diff --git a/src/plugins/qmldesigner/components/formeditor/zoomaction.h b/src/plugins/qmldesigner/components/formeditor/zoomaction.h
index 0a291a8ab5..cf55ed4c11 100644
--- a/src/plugins/qmldesigner/components/formeditor/zoomaction.h
+++ b/src/plugins/qmldesigner/components/formeditor/zoomaction.h
@@ -22,9 +22,7 @@
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
****************************************************************************/
-
-#ifndef ZOOMACTION_H
-#define ZOOMACTION_H
+#pragma once
#include <QWidgetAction>
#include <QPointer>
@@ -63,5 +61,3 @@ private:
};
} // namespace QmlDesigner
-
-#endif // ZOOMACTION_H