Merge lp:~kalikiana/ubuntu-ui-toolkit/aliasdocs into lp:ubuntu-ui-toolkit

Proposed by Cris Dywan
Status: Merged
Approved by: Cris Dywan
Approved revision: 553
Merged at revision: 587
Proposed branch: lp:~kalikiana/ubuntu-ui-toolkit/aliasdocs
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 369 lines (+109/-93)
3 files modified
components.api (+93/-93)
modules/Ubuntu/Components/ModelSectionCounter.qml (+1/-0)
tests/qmlapicheck.py (+15/-0)
To merge this branch: bzr merge lp:~kalikiana/ubuntu-ui-toolkit/aliasdocs
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Tim Peeters Approve
Review via email: mp+171067@code.launchpad.net

Commit message

Include alias types in qmlapicheck

Description of the change

Include alias types in qmlapicheck

To post a comment you must log in.
Revision history for this message
Cris Dywan (kalikiana) wrote :

As per a quick survey internal properties don't require the type annotation and only show "internal" as their type because we don't support them.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Tim Peeters (tpeeters) wrote :

New type checking is good stuff. However, I don't see an advantage in listing internal property types as "internal" as opposed to their actual type.

Revision history for this message
Tim Peeters (tpeeters) wrote :

approved, just waiting for some other MRs to land and to merge this one with trunk.

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

Please merge trunk first, or the merge will fail.

553. By Cris Dywan

Merge lp:ubuntu-ui-toolkit trunk

[ Zsombor Egri ]
* Fix for re-parenting items that are anchor filled to an item in
  default layout.
* TextField API extended with API left out from TextInput. wrapMode is
  not inlcuded as does not make sense to be used in single line input.
  (LP: #1183265)
* Calculator example which turns from simple calculator (phone
  portrait mode) into scientific one (phone landscape mode) reflecting
  the use of Ubuntu.Layouts. .
* Removing common.pri from Layouts.pro and Layouts\plugin.pro causing
  qmake warnings when Ubuntu UI toolkit project is opened in
  QtCreator.
[ Leo Arias ]
* Replaced the MainWindow emulator for autopilot tests with a MainView
  emulator that the uses the custom emulator features of autopilot.
* Added the Toolbar Autopilot emulator. (LP: #1177341)
[ Juhapekka Piiroinen ]
* Fixed broken ubuntu-ui-toolkit-gallery.qmlproject file, which had an
  invalid value in mainFile field.
[ tpeeters ]
* Update header behavior: - Do not automatically hide the header when
  scrolling in a flickable that is not anchored to the top of the
  page. - Automatically show the header when flickable's contentHeight
  becomes less than flickable.height. - Update documentation for
  Page.flickable. (LP: #1156573, #1160175)
[ Kaleo ]
* Removed common.pri and coverage.pri files that were cluttering
  QtCreator making it harder to understand the real structure of the
  project. coverage.pri has been transformed into a feature file
  (coverage.prf) which works the same way as before.
* Removed antiquated TextCustom class.
* Removed unused old-style tabs delegate.
* Removed UbuntuShape.qml and transferred code & documentation to
  shapeitem.cpp ShapeItem: renamed baseColor property into color.
* UbuntuShape: simplified gradient implementation; gradientColor is
  now the same as color by default. .
* Simplified theming infrastructure. There are no stylesheets anymore
  (.qmltheme file), only delegates remain. A theme is a QML module
  containing delegates whose names are standardized. The default theme
  is called 'Ambiance' and available from QML through 'import
  Ubuntu.Components.Themes.Ambiance 0.1'. The name of the current
  theme is set in ~/.config/ubuntu-ui-toolkit/theme.ini Writing a new
  theme is done by creating a QML module and adding it in the
  Ubuntu/Components/Themes folder. A theme inherits from another theme
  by containing a text file name 'parent_theme' whose first and only
  line is the name of the parent theme. * Moved themes/ directory to
  Ubuntu/Components/Themes so that themes are importable. * Simplified
  ThemeEngine and ThemeSettings class, removed the rest of the theming
  infrastructure (ItemStyle, Style, QmlThemeLoader, Selector,
  StyleCache). * Adapted all widgets to use the simplified theming
  technique: - new StyledItem class that has a 'style' Component
  property representing the delegate - all widgets that have delegates
  inherit from StyledItem - all widgets set the 'style' property to
  the corresponding delegate in the current theme by using
  Theme.createStyleComponent() - Ambiance's stylesheet property/values
  have been moved to where they are used (mostly to the delegates) -
  TextAreaDelegate: exposed background as Component property - Added a
  delegate specific to TextField: TextFieldDelegate - Renamed
  delegates so that they match their widget's name (e.g.
  EditorCursorDelegate.qml renamed to TextCursorDelegate.qml since
  it's the delegate of TextCursor.qml) * Renamed UITK_THEME_PATH into
  UBUNTU_UI_TOOLKIT_THEMES_PATH. (LP: #1152160, #1152161, #1152162,
  #1185950, #1081038, #1167998, #1137210, #1152154, #1152158)
* New UbuntuColors singleton defining the standard Ubuntu color
  palette. (LP: #1098209)
* debian/control: specify same architecture for ubuntu-ui-toolkit-
  theme as for qtdeclarative5-ubuntu-ui-toolkit-plugin so that the
  files end up in the same folder. (LP: #1197164)
* Button: - implementation clean up - updated visual design - new
  'gradient' property.
* When looking up the plugin's directory
  (UbuntuComponentsPlugin::baseUrl), a case was omitted: if another
  Ubuntu/Components directory exists and is present in the
  QML2_IMPORT_PATH then the lookup failed. This fix is temporary until
  Qt 5.1. (LP: #1197293)
* Reverted revisions 562 & 569 that broke the autopilot tests. Fixed
  button related autopilot test. (LP: #1197355)
[ Ubuntu daily release ]
* Automatic snapshot from revision 580
[ Kaleo ]
* Button: do not display a background when the color set is fully
  transparent.
* TextField: new clear icon imported from the icon theme (lp:ubuntu-
  themes).
[ Christian Dywan ]
* Implement bread crumbs in API docs. (LP: #1168026)
[ Ubuntu daily release ]
* Automatic snapshot from revision 560
[ Sebastien Bacher ]
* List.Item.Standard: set the height and verticalCenter of the
  control. (LP: #1190196)
[ Ubuntu daily release ]
* Automatic snapshot from revision 555
[ Zsombor Egri ]
* [layouts] Layout factoring.
[ Ubuntu daily release ]
* Automatic snapshot from revision 552

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'components.api'
2--- components.api 2013-07-04 20:30:21 +0000
3+++ components.api 2013-07-05 07:17:28 +0000
4@@ -5,7 +5,7 @@
5 property bool pressed
6 property bool hovered
7 property bool __acceptEvents
8- property alias __mouseArea
9+ property internal __mouseArea
10 modules/Ubuntu/Components/Action.qml
11 QtObject
12 property string text
13@@ -22,7 +22,7 @@
14 signal triggered(var caller)
15 modules/Ubuntu/Components/ActionList.qml
16 QtObject
17- default property alias children
18+ default property list<Action> children
19 property list<Action> actions
20 modules/Ubuntu/Components/ActivityIndicator.qml
21 AnimatedItem
22@@ -65,34 +65,34 @@
23 modules/Ubuntu/Components/Icon.qml
24 Item
25 property string name
26- property alias color
27- property alias keyColor
28+ property color color
29+ property color keyColor
30 modules/Ubuntu/Components/Label.qml
31 Text
32 property string fontSize
33 modules/Ubuntu/Components/MainView.qml
34 PageTreeNode
35 property string applicationName
36- property alias automaticOrientation
37- default property alias contentsItem
38+ property bool automaticOrientation
39+ default property internal contentsItem
40 property ToolbarActions tools
41 onToolsChanged
42 modules/Ubuntu/Components/ModelSectionCounter.qml
43 Object
44 property var view
45 property int count
46- readonly property alias sectionHeight
47+ readonly property real sectionHeight
48 property bool cacheSections
49 property var cache
50 modules/Ubuntu/Components/Object.qml
51 QtObject
52- default property alias children
53+ default property internal children
54 modules/Ubuntu/Components/OrientationHelper.qml
55 Item
56 property bool automaticOrientation
57 property bool transitionEnabled
58 property alias rotating
59- property alias __orientationAngle
60+ property int __orientationAngle
61 property int orientationAngle
62 modules/Ubuntu/Components/Page.qml
63 PageTreeNode
64@@ -126,7 +126,7 @@
65 function destroyObject()
66 modules/Ubuntu/Components/Panel.qml
67 Item
68- default property alias contents
69+ default property list<Object> contents
70 property int align
71 property bool opened
72 property bool locked
73@@ -144,7 +144,7 @@
74 property Flickable flickableItem
75 property int align
76 property bool __interactive
77- property alias __private
78+ property internal __private
79 modules/Ubuntu/Components/Slider.qml
80 AbstractButton
81 property real minimumValue
82@@ -153,7 +153,7 @@
83 property bool live
84 signal touched(bool onThumb)
85 function formatValue(v)
86- property alias __internals
87+ property internal __internals
88 modules/Ubuntu/Components/StyledItem.qml
89 FocusScope
90 property Component style
91@@ -173,14 +173,14 @@
92 property Component __headerContents
93 property ToolbarActions tools
94 onToolsChanged
95- property alias __tabs
96- default property alias tabChildren
97+ property internal __tabs
98+ default property list<Item> tabChildren
99 signal modelChanged()
100 modules/Ubuntu/Components/TextArea.qml
101 StyledItem
102 property bool highlighted
103- property alias placeholderText
104- readonly property alias displayText
105+ property string placeholderText
106+ readonly property string displayText
107 property bool selectByMouse
108 property bool autoExpand
109 property bool autoSize
110@@ -189,35 +189,35 @@
111 property real contentHeight
112 property var popover
113 property bool activeFocusOnPress
114- property alias baseUrl
115- property alias canPaste
116- property alias canRedo
117- property alias canUndo
118- property alias color
119- property alias cursorDelegate
120- property alias cursorPosition
121- property alias cursorRectangle
122- property alias cursorVisible
123- property alias effectiveHorizontalAlignment
124- property alias font
125- property alias horizontalAlignment
126- property alias inputMethodComposing
127- property alias inputMethodHints
128- property alias length
129- property alias lineCount
130- property alias mouseSelectionMode
131- property alias persistentSelection
132- property alias readOnly
133- property alias renderType
134- property alias selectedText
135- property alias selectedTextColor
136- property alias selectionColor
137- property alias selectionEnd
138- property alias selectionStart
139- property alias text
140- property alias textFormat
141- property alias verticalAlignment
142- property alias wrapMode
143+ property url baseUrl
144+ property bool canPaste
145+ property bool canRedo
146+ property bool canUndo
147+ property color color
148+ property Component cursorDelegate
149+ property int cursorPosition
150+ property rectangle cursorRectangle
151+ property bool cursorVisible
152+ property enumeration effectiveHorizontalAlignment
153+ property font font
154+ property enumeration horizontalAlignment
155+ property bool inputMethodComposing
156+ property enumeration inputMethodHints
157+ property int length
158+ property int lineCount
159+ property enumeration mouseSelectionMode
160+ property enumeration persistentSelection
161+ property bool readOnly
162+ property enumeration renderType
163+ property string selectedText
164+ property color selectedTextColor
165+ property color selectionColor
166+ property int selectionEnd
167+ property int selectionStart
168+ property string text
169+ property enumeration textFormat
170+ property enumeration verticalAlignment
171+ property enumeration wrapMode
172 signal linkActivated(string link)
173 function copy()
174 function cut()
175@@ -237,7 +237,7 @@
176 function remove(start, end)
177 function undo()
178 function forceActiveFocus()
179- property alias __internal
180+ property internal __internal
181 modules/Ubuntu/Components/TextCursor.qml
182 StyledItem
183 property var editorItem
184@@ -247,50 +247,50 @@
185 modules/Ubuntu/Components/TextField.qml
186 StyledItem
187 property bool highlighted
188- property alias placeholderText
189+ property string placeholderText
190 property bool hasClearButton
191 property Component customSoftwareInputPanel
192 property var popover
193- property alias primaryItem
194- property alias secondaryItem
195+ property list<Object> primaryItem
196+ property list<Object> secondaryItem
197 property bool errorHighlight
198- property alias acceptableInput
199- property alias activeFocusOnPress
200- property alias autoScroll
201- property alias canPaste
202- property alias canRedo
203- property alias canUndo
204- property alias color
205- property alias contentHeight
206- property alias contentWidth
207- property alias cursorDelegate
208- property alias cursorPosition
209- property alias cursorRectangle
210- property alias cursorVisible
211- property alias displayText
212- property alias echoMode
213- property alias font
214- property alias inputMask
215- property alias inputMethodComposing
216- property alias inputMethodHints
217- property alias length
218- property alias maximumLength
219- property alias mouseSelectionMode
220- property alias persistentSelection
221- property alias readOnly
222- property alias renderType
223- property alias selectByMouse
224- readonly property alias selectedText
225- property alias selectionStart
226- property alias selectionEnd
227- property alias text
228- property alias validator
229- property alias horizontalAlignment
230- property alias effectiveHorizontalAlignment
231- property alias verticalAlignment
232- property alias passwordCharacter
233- property alias selectionColor
234- property alias selectedTextColor
235+ property bool acceptableInput
236+ property bool activeFocusOnPress
237+ property bool autoScroll
238+ property bool canPaste
239+ property bool canRedo
240+ property bool canUndo
241+ property color color
242+ property real contentHeight
243+ property real contentWidth
244+ property Component cursorDelegate
245+ property int cursorPosition
246+ property rectangle cursorRectangle
247+ property bool cursorVisible
248+ property string displayText
249+ property enumeration echoMode
250+ property font font
251+ property string inputMask
252+ property bool inputMethodComposing
253+ property enumeration inputMethodHints
254+ property int length
255+ property int maximumLength
256+ property enumeration mouseSelectionMode
257+ property bool persistentSelection
258+ property bool readOnly
259+ property enumeration renderType
260+ property bool selectByMouse
261+ readonly property string selectedText
262+ property int selectionStart
263+ property int selectionEnd
264+ property string text
265+ property Validator validator
266+ property enumeration horizontalAlignment
267+ property internal effectiveHorizontalAlignment
268+ property internal verticalAlignment
269+ property string passwordCharacter
270+ property color selectionColor
271+ property color selectedTextColor
272 signal accepted()
273 function copy()
274 function cut()
275@@ -309,7 +309,7 @@
276 function undo()
277 function remove(start, end)
278 function getText(start, end)
279- property alias __internal
280+ property internal __internal
281 modules/Ubuntu/Components/TextInputPopover.qml
282 ActionSelectionPopover
283 modules/Ubuntu/Components/Toolbar.qml
284@@ -319,7 +319,7 @@
285 property Item tools
286 modules/Ubuntu/Components/ToolbarActions.qml
287 Item
288- default property alias children
289+ default property list<Action> children
290 property list<Action> actions
291 property Action back
292 property Item __pageStack
293@@ -332,7 +332,7 @@
294 ActionItem
295 modules/Ubuntu/Components/ToolbarItems.qml
296 Item
297- default property alias contents
298+ default property list<Object> contents
299 property Item back
300 property Item pageStack
301 property bool opened
302@@ -341,11 +341,11 @@
303 NumberAnimation
304 modules/Ubuntu/Components/UbuntuShape.qml
305 Item
306- property alias color
307- property alias gradientColor
308- property alias radius
309+ property color color
310+ property color gradientColor
311+ property string radius
312 property Item image
313- property alias borderSource
314+ property url borderSource
315 plugins.qmltypes
316 name: "InverseMouseAreaType"
317 prototype: "QQuickItem"
318
319=== modified file 'modules/Ubuntu/Components/ModelSectionCounter.qml'
320--- modules/Ubuntu/Components/ModelSectionCounter.qml 2013-01-08 09:50:42 +0000
321+++ modules/Ubuntu/Components/ModelSectionCounter.qml 2013-07-05 07:17:28 +0000
322@@ -41,6 +41,7 @@
323
324 /*!
325 \preliminary
326+ \qmlproperty real sectionHeight
327 The property contains the section Item height.
328 */
329 readonly property alias sectionHeight: internals.sectionHeight
330
331=== modified file 'tests/qmlapicheck.py'
332--- tests/qmlapicheck.py 2013-05-21 11:40:46 +0000
333+++ tests/qmlapicheck.py 2013-07-05 07:17:28 +0000
334@@ -36,6 +36,7 @@
335 if fileinput.isfirstline():
336 in_block = 0
337 in_comment = False
338+ annotated_type = None
339 if fileinput.filename()[-3:] == 'qml':
340 filetype = 'qml'
341 keywords = ['signal', 'property', 'function']
342@@ -48,6 +49,12 @@
343 print('%s' % fileinput.filename())
344
345 line = line.split('//')[0]
346+ # alias properties only define their type through qdoc comments
347+ if '\\qmlproperty' in line:
348+ annotated_type = line
349+ elif '\\internal' in line:
350+ annotated_type = 'internal internal internal'
351+
352 if '/*' in line and not '*/' in line:
353 in_comment = True
354 continue
355@@ -77,6 +84,14 @@
356 if word in keywords:
357 if filetype == 'qml':
358 signature = line.split(':')[0].split('{')[0].strip()
359+ if 'alias' in line:
360+ if not annotated_type:
361+ print(' %s' % (signature))
362+ print('Error: Missing \\qmlproperty annotation')
363+ sys.exit (1)
364+ real_type = annotated_type.strip().split(' ')[1]
365+ signature = signature.replace('alias', real_type)
366+ annotated_type = None
367 elif filetype == 'qmltypes':
368 signature = line.strip()
369 print(' %s' % (signature))

Subscribers

People subscribed via source and target branches

to status/vote changes: