Merge lp:~aacid/unity-2d/unity-2d_qrectf_for_qml into lp:unity-2d

Proposed by Albert Astals Cid
Status: Merged
Approved by: Michał Sawicz
Approved revision: 932
Merged at revision: 933
Proposed branch: lp:~aacid/unity-2d/unity-2d_qrectf_for_qml
Merge into: lp:unity-2d
Diff against target: 111 lines (+12/-12)
4 files modified
libunity-2d-private/src/inputshapemask.cpp (+2/-2)
libunity-2d-private/src/inputshapemask.h (+4/-4)
libunity-2d-private/src/inputshaperectangle.cpp (+2/-2)
libunity-2d-private/src/inputshaperectangle.h (+4/-4)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d_qrectf_for_qml
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
Review via email: mp+94385@code.launchpad.net

Description of the change

Change QRect to QRectF and QPoint to QPointF

It is what Qt.rect and Qt.point in Qml return so keep in line with it

To post a comment you must log in.
Revision history for this message
Michał Sawicz (saviq) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libunity-2d-private/src/inputshapemask.cpp'
2--- libunity-2d-private/src/inputshapemask.cpp 2012-02-08 14:02:37 +0000
3+++ libunity-2d-private/src/inputshapemask.cpp 2012-02-23 14:29:27 +0000
4@@ -59,7 +59,7 @@
5 return m_color;
6 }
7
8-QPoint InputShapeMask::position() const
9+QPointF InputShapeMask::position() const
10 {
11 return m_position;
12 }
13@@ -92,7 +92,7 @@
14 }
15 }
16
17-void InputShapeMask::setPosition(const QPoint &position)
18+void InputShapeMask::setPosition(const QPointF &position)
19 {
20 if (m_position != position) {
21 m_position = position;
22
23=== modified file 'libunity-2d-private/src/inputshapemask.h'
24--- libunity-2d-private/src/inputshapemask.h 2012-02-08 14:02:37 +0000
25+++ libunity-2d-private/src/inputshapemask.h 2012-02-23 14:29:27 +0000
26@@ -32,7 +32,7 @@
27 Q_OBJECT
28 Q_PROPERTY(QString source READ source WRITE setSource NOTIFY sourceChanged)
29 Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
30- Q_PROPERTY(QPoint position READ position WRITE setPosition NOTIFY positionChanged)
31+ Q_PROPERTY(QPointF position READ position WRITE setPosition NOTIFY positionChanged)
32 Q_PROPERTY(QBitmap shape READ shape NOTIFY shapeChanged)
33 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
34
35@@ -41,13 +41,13 @@
36
37 QString source() const;
38 QColor color() const;
39- QPoint position() const;
40+ QPointF position() const;
41 bool enabled() const;
42 QBitmap shape() const;
43
44 void setSource(const QString& source);
45 void setColor(const QColor& color);
46- void setPosition(const QPoint& position);
47+ void setPosition(const QPointF& position);
48 void setEnabled(bool enabled);
49
50 Q_SIGNALS:
51@@ -63,7 +63,7 @@
52 private:
53 QString m_source;
54 QColor m_color;
55- QPoint m_position;
56+ QPointF m_position;
57 bool m_enabled;
58 QBitmap m_shape;
59 };
60
61=== modified file 'libunity-2d-private/src/inputshaperectangle.cpp'
62--- libunity-2d-private/src/inputshaperectangle.cpp 2012-02-08 13:56:59 +0000
63+++ libunity-2d-private/src/inputshaperectangle.cpp 2012-02-23 14:29:27 +0000
64@@ -59,12 +59,12 @@
65 Q_EMIT shapeChanged();
66 }
67
68-QRect InputShapeRectangle::rectangle() const
69+QRectF InputShapeRectangle::rectangle() const
70 {
71 return m_rectangle;
72 }
73
74-void InputShapeRectangle::setRectangle(QRect rectangle)
75+void InputShapeRectangle::setRectangle(QRectF rectangle)
76 {
77 if (rectangle != m_rectangle) {
78 m_rectangle = rectangle;
79
80=== modified file 'libunity-2d-private/src/inputshaperectangle.h'
81--- libunity-2d-private/src/inputshaperectangle.h 2012-02-08 13:56:59 +0000
82+++ libunity-2d-private/src/inputshaperectangle.h 2012-02-23 14:29:27 +0000
83@@ -33,7 +33,7 @@
84 class InputShapeRectangle : public QObject
85 {
86 Q_OBJECT
87- Q_PROPERTY(QRect rectangle READ rectangle WRITE setRectangle NOTIFY rectangleChanged)
88+ Q_PROPERTY(QRectF rectangle READ rectangle WRITE setRectangle NOTIFY rectangleChanged)
89 Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
90 Q_PROPERTY(bool mirrorHorizontally READ mirrorHorizontally WRITE setMirrorHorizontally NOTIFY mirrorHorizontallyChanged)
91 Q_PROPERTY(QBitmap shape READ shape NOTIFY shapeChanged)
92@@ -43,8 +43,8 @@
93 public:
94 explicit InputShapeRectangle(QObject *parent = 0);
95
96- QRect rectangle() const;
97- void setRectangle(QRect rectangle);
98+ QRectF rectangle() const;
99+ void setRectangle(QRectF rectangle);
100 bool enabled() const;
101 void setEnabled(bool enabled);
102 QBitmap shape() const;
103@@ -65,7 +65,7 @@
104 void mirrorHorizontallyChanged(bool mirrorHorizontally);
105
106 private:
107- QRect m_rectangle;
108+ QRectF m_rectangle;
109 bool m_enabled;
110 bool m_mirrorHorizontally;
111 QBitmap m_shape;

Subscribers

People subscribed via source and target branches