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

Proposed by Cris Dywan
Status: Merged
Approved by: Timo Jyrinki
Approved revision: 883
Merged at revision: 887
Proposed branch: lp:~kalikiana/ubuntu-ui-toolkit/docConditionals
Merge into: lp:ubuntu-ui-toolkit
Diff against target: 246 lines (+58/-28)
8 files modified
components.api (+3/-3)
documentation/ubuntu-ui-toolkit-offline.qdocconf (+5/-5)
modules/Ubuntu/Components/ListItems/Empty.qml (+1/-1)
modules/Ubuntu/Components/Popups/Popover.qml (+1/-2)
modules/Ubuntu/Components/TextField.qml (+1/-3)
tests/qmlapicheck.py (+34/-8)
tests/unit/add_qmlmakecheck.pri (+2/-1)
ubuntu-sdk.pro (+11/-5)
To merge this branch: bzr merge lp:~kalikiana/ubuntu-ui-toolkit/docConditionals
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Timo Jyrinki Approve
Zsombor Egri Approve
Review via email: mp+197489@code.launchpad.net

Commit message

Conditionally define doc folder containing resources

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

This branch is more related to Qt 5.1 and the doc parts mentioned at bug #1217331, but not sure if those changes are even relevant or at least the bug #1256779 is bumped into first with Qt 5.2.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Ah, correction, this probably fixes the "not found" errors also on Qt 5.2, but it still stops at the No documentation for 'global'.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks fine, works with 5.0.2 too, so let's get it in. Thanks!

review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Ah, just a second, wrong PPA...

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
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-12-09 06:27:48 +0000
3+++ components.api 2013-12-11 11:30:05 +0000
4@@ -300,7 +300,7 @@
5 PopupBase
6 default property list<Object> container
7 property real contentWidth
8- property internal contentHeight
9+ property real contentHeight
10 property Item caller
11 property Item pointerTarget
12 property real edgeMargins
13@@ -488,8 +488,8 @@
14 property string text
15 property Validator validator
16 property enumeration horizontalAlignment
17- property internal effectiveHorizontalAlignment
18- property internal verticalAlignment
19+ property enumeration effectiveHorizontalAlignment
20+ property enumeration verticalAlignment
21 property string passwordCharacter
22 property color selectionColor
23 property color selectedTextColor
24
25=== modified file 'documentation/ubuntu-ui-toolkit-offline.qdocconf'
26--- documentation/ubuntu-ui-toolkit-offline.qdocconf 2013-06-25 15:38:56 +0000
27+++ documentation/ubuntu-ui-toolkit-offline.qdocconf 2013-12-11 11:30:05 +0000
28@@ -2,11 +2,11 @@
29 HTML.nobreadcrumbs = "true"
30
31 HTML.stylesheets = \
32- documentation/css/breadcrumbs.js \
33- documentation/css/reset.css \
34- documentation/css/qtquick.css \
35- documentation/css/base.css \
36- documentation/css/scratch.css
37+ $SRC/css/breadcrumbs.js \
38+ $SRC/css/reset.css \
39+ $SRC/css/qtquick.css \
40+ $SRC/css/base.css \
41+ $SRC/css/scratch.css
42
43 HTML.headerstyles = \
44 "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/reset.css\" />\n" \
45
46=== modified file 'modules/Ubuntu/Components/ListItems/Empty.qml'
47--- modules/Ubuntu/Components/ListItems/Empty.qml 2013-11-18 11:27:49 +0000
48+++ modules/Ubuntu/Components/ListItems/Empty.qml 2013-12-11 11:30:05 +0000
49@@ -158,7 +158,7 @@
50
51 /*!
52 \preliminary
53- \qmlproperty ThinDivider bottomDividerLine
54+ \qmlproperty ThinDivider divider
55 Exposes our the bottom line divider.
56 */
57 property alias divider: bottomDividerLine
58
59=== modified file 'modules/Ubuntu/Components/Popups/Popover.qml'
60--- modules/Ubuntu/Components/Popups/Popover.qml 2013-08-21 15:27:14 +0000
61+++ modules/Ubuntu/Components/Popups/Popover.qml 2013-12-11 11:30:05 +0000
62@@ -104,7 +104,6 @@
63 The properties can be used to alter the default content width and heights.
64 */
65 property alias contentWidth: foreground.width
66- /*! \internal */
67 property alias contentHeight: foreground.height
68
69 /*!
70@@ -144,7 +143,7 @@
71 property bool autoClose: true
72
73 /*!
74- \qmlproperty Component style
75+ \qmlproperty Component foregroundStyle
76 Exposes the style property of the \l StyledItem contained in the Popover.
77 Refer to \l StyledItem how to use it.
78 */
79
80=== modified file 'modules/Ubuntu/Components/TextField.qml'
81--- modules/Ubuntu/Components/TextField.qml 2013-11-06 22:52:15 +0000
82+++ modules/Ubuntu/Components/TextField.qml 2013-12-11 11:30:05 +0000
83@@ -543,9 +543,7 @@
84 \qmlproperty enumeration verticalAlignment
85 */
86 property alias horizontalAlignment: editor.horizontalAlignment
87- /*! \internal */
88 property alias effectiveHorizontalAlignment: editor.effectiveHorizontalAlignment
89- /*! \internal */
90 property alias verticalAlignment: editor.verticalAlignment
91
92 /*!
93@@ -570,7 +568,7 @@
94 /*!
95 The highlighted text color, used in selections.
96
97- \qmlproperty color selctedTextColor
98+ \qmlproperty color selectedTextColor
99 */
100 property alias selectedTextColor: editor.selectedTextColor
101
102
103=== modified file 'tests/qmlapicheck.py'
104--- tests/qmlapicheck.py 2013-11-29 16:58:22 +0000
105+++ tests/qmlapicheck.py 2013-12-11 11:30:05 +0000
106@@ -70,7 +70,8 @@
107 if fileinput.isfirstline():
108 in_block = 0
109 in_comment = in_builtin_type = False
110- annotated_type = None
111+ block_meta = {}
112+ annotated_properties = {}
113 if fileinput.filename()[-3:] == 'qml':
114 filetype = 'qml'
115 keywords = ['signal', 'property', 'function']
116@@ -89,9 +90,16 @@
117 line = line.split('//')[0]
118 # alias properties only define their type through qdoc comments
119 if '\\qmlproperty' in line:
120- annotated_type = line
121+ words = line.strip().split(' ')
122+ name = words[2]
123+ # Strip namespace
124+ if '::' in name:
125+ name = name.split('::')[1]
126+ type = words[1]
127+ annotated_properties[name] = type
128 elif '\\internal' in line:
129- annotated_type = 'internal internal internal'
130+ # internal without type always relates to the next declared property
131+ annotated_properties['internal'] = 'internal'
132
133 if '/*' in line and not '*/' in line:
134 in_comment = True
135@@ -110,6 +118,7 @@
136 # End of function/ signal/ Item block
137 if '}' in line:
138 in_block -= 1
139+ block_meta = {}
140 if in_block == 1 and in_builtin_type:
141 in_builtin_type = False
142 continue
143@@ -120,7 +129,7 @@
144 declaration = line.split(':')[0]
145 words = declaration.strip().split(' ')
146 # Skip types with prefixes considered builtin
147- if words[0] == 'name':
148+ if filetype == 'qmltypes' and words[0] == 'name':
149 found_builtin_type = False
150 for builtin in builtins:
151 if '"' + builtin in line:
152@@ -129,6 +138,15 @@
153 if found_builtin_type:
154 in_builtin_type = True
155 continue
156+ if 'prototype' in block_meta:
157+ print(' ' + block_meta['prototype'].strip())
158+ print(' ' + line.strip())
159+ continue
160+
161+ block_meta[words[0]] = line
162+ # Omit prototype if it comes before the name since we may skip it
163+ if not 'name' in block_meta and words[0] == 'prototype':
164+ continue
165
166 # Don't consider the qml variable name as a keyword
167 if filetype == 'qml':
168@@ -142,13 +160,20 @@
169 if filetype == 'qml':
170 signature = declaration.split('{')[0].strip()
171 if 'alias' in line:
172- if not annotated_type:
173+ no_mods = signature
174+ for mod in ['readonly', 'default']:
175+ no_mods = no_mods.replace(mod, '')
176+ name = no_mods.strip().split(' ')[2]
177+ if 'internal' in annotated_properties:
178+ if not name in annotated_properties:
179+ annotated_properties[name] = 'internal'
180+ del annotated_properties['internal']
181+ if not name in annotated_properties:
182 print(' %s' % (signature))
183- print('Error: Missing \\qmlproperty annotation')
184+ print('Error: Missing \\qmlproperty for %s' % name)
185 sys.exit(1)
186- real_type = annotated_type.strip().split(' ')[1]
187+ real_type = annotated_properties[name]
188 signature = signature.replace('alias', real_type)
189- annotated_type = None
190 elif filetype == 'qmltypes':
191 signature = line.strip()
192 if not in_builtin_type:
193@@ -158,6 +183,7 @@
194 # Start of function/ signal/ Item block
195 if '{' in line:
196 in_block += 1
197+ block_meta = {}
198 # The parent type can affect API
199 if in_block == 1 and filetype == 'qml':
200 print(line.split('{')[0].strip())
201
202=== modified file 'tests/unit/add_qmlmakecheck.pri'
203--- tests/unit/add_qmlmakecheck.pri 2013-12-02 11:23:19 +0000
204+++ tests/unit/add_qmlmakecheck.pri 2013-12-11 11:30:05 +0000
205@@ -9,5 +9,6 @@
206 }
207 check.commands += cd ../../..;
208 check.commands += qmlplugindump Ubuntu.Components 0.1 modules > plugins.qmltypes;
209-check.commands += BUILTINS=QQuick,QQml,U1db:: python tests/qmlapicheck.py modules/Ubuntu/Components/qmldir modules/Ubuntu/Components/Colors/UbuntuColors.qml modules/Ubuntu/Components/*/qmldir plugins.qmltypes > components.api.new;
210+# Palette gets included in Qt 5.2 qmlplugindump even though it's qml
211+check.commands += BUILTINS=QQuick,QQml,U1db::,Palette python tests/qmlapicheck.py modules/Ubuntu/Components/qmldir modules/Ubuntu/Components/Colors/UbuntuColors.qml modules/Ubuntu/Components/*/qmldir plugins.qmltypes > components.api.new;
212 check.commands += diff -Fqml -u components.api components.api.new || exit 1; cd tests/unit
213
214=== modified file 'ubuntu-sdk.pro'
215--- ubuntu-sdk.pro 2013-12-09 11:33:51 +0000
216+++ ubuntu-sdk.pro 2013-12-11 11:30:05 +0000
217@@ -35,19 +35,25 @@
218 license.commands = ./tests/license/checklicense.sh
219 QMAKE_EXTRA_TARGETS += license
220
221+DOC_SRC = .
222+equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 2) {
223+ DOC_SRC = documentation
224+}
225+
226 DOC_PATH=$$system(pwd)/documentation
227 docs.target = docs
228 # Offline docs for QtCreator
229-docs.commands += qdoc $$DOC_PATH/ubuntu-ui-toolkit-qtcreator.qdocconf 2> $$DOC_PATH/qdoc.err;
230-docs.commands += cat $$DOC_PATH/qdoc.err;
231+docs.commands += SRC=$$DOC_SRC qdoc $$DOC_PATH/ubuntu-ui-toolkit-qtcreator.qdocconf 2> $$DOC_PATH/qdoc.err;
232+# FIXME: With Qt 5.2 this warning shows up, forcibly omit it from errors
233+docs.commands += cat $$DOC_PATH/qdoc.err | grep -v \"qdoc: warning: No documentation for \'global\'\" > $$DOC_PATH/qdoc.err;
234 docs.commands += test ! -s $$DOC_PATH/qdoc.err || exit 1;
235 docs.commands += qhelpgenerator -o "$$DOC_PATH/html/ubuntuuserinterfacetoolkit.qch" "$$DOC_PATH/html/ubuntuuserinterfacetoolkit.qhp";
236 # Online docs. Run qdoc twice: the second run with indexes for cross-referencing
237 # other APIs but discard errors because qdoc inherits all doc bugs otherwise
238-docs.commands += qdoc $$DOC_PATH/ubuntu-ui-toolkit-online.qdocconf 2> $$DOC_PATH/qdoc.err;
239-docs.commands += cat $$DOC_PATH/qdoc.err;
240+docs.commands += SRC=$$DOC_SRC qdoc $$DOC_PATH/ubuntu-ui-toolkit-online.qdocconf 2> $$DOC_PATH/qdoc.err;
241+docs.commands += cat $$DOC_PATH/qdoc.err | grep -v \"qdoc: warning: No documentation for \'global\'\" > $$DOC_PATH/qdoc.err;
242 docs.commands += test ! -s $$DOC_PATH/qdoc.err || exit 1;
243-docs.commands += qdoc $$DOC_PATH/ubuntu-ui-toolkit-online-indexes.qdocconf 2> /dev/null;
244+docs.commands += SRC=$$DOC_SRC qdoc $$DOC_PATH/ubuntu-ui-toolkit-online-indexes.qdocconf 2> /dev/null;
245 docs.commands += $$DOC_PATH/fix-markup.sh $$DOC_PATH;
246 QMAKE_EXTRA_TARGETS += docs
247

Subscribers

People subscribed via source and target branches

to status/vote changes: