Merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/externalImageType into lp:ubuntu-ui-toolkit/staging

Proposed by Cris Dywan
Status: Merged
Approved by: Zsombor Egri
Approved revision: 1694
Merged at revision: 1696
Proposed branch: lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/externalImageType
Merge into: lp:ubuntu-ui-toolkit/staging
Diff against target: 79 lines (+13/-20)
2 files modified
components.api (+0/-18)
tests/apicheck/apicheck.cpp (+13/-2)
To merge this branch: bzr merge lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/externalImageType
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Timo Jyrinki Approve
Zsombor Egri Approve
Review via email: mp+275320@code.launchpad.net

Commit message

Special-case leaked QQuickImageBase properties

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote :

Looks reasonable change, thanks for it!

review: Approve
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :
Revision history for this message
Timo Jyrinki (timo-jyrinki) :
review: Approve
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 2015-10-20 16:13:48 +0000
3+++ components.api 2015-10-22 11:57:22 +0000
4@@ -366,25 +366,7 @@
5 property string text
6 property string title
7 Ubuntu.Components.ListItems.Divider 1.0 0.1: QQuickImageBase
8- property FillMode fillMode
9- property HAlignment horizontalAlignment
10- signal horizontalAlignmentChanged(HAlignment alignment)
11- signal verticalAlignmentChanged(VAlignment alignment)
12- signal mipmapChanged(bool )
13- property bool mipmap
14- readonly property double paintedHeight
15- readonly property double paintedWidth
16- property VAlignment verticalAlignment
17 Ubuntu.Components.ListItems.Divider 1.3: QQuickImageBase
18- property FillMode fillMode
19- property HAlignment horizontalAlignment
20- signal horizontalAlignmentChanged(HAlignment alignment)
21- signal verticalAlignmentChanged(VAlignment alignment)
22- signal mipmapChanged(bool )
23- property bool mipmap
24- readonly property double paintedHeight
25- readonly property double paintedWidth
26- property VAlignment verticalAlignment
27 Ubuntu.Components.ListItems.Empty 1.0 0.1: AbstractButton
28 readonly property Item backgroundIndicator
29 property bool confirmRemoval
30
31=== modified file 'tests/apicheck/apicheck.cpp'
32--- tests/apicheck/apicheck.cpp 2015-09-01 08:44:11 +0000
33+++ tests/apicheck/apicheck.cpp 2015-10-22 11:57:22 +0000
34@@ -359,11 +359,17 @@
35
36 void writeMetaContent(QJsonObject* object, const QMetaObject *meta, KnownAttributes *knownAttributes = 0)
37 {
38+ QSet<QString> internalSignals;
39 QSet<QString> implicitSignals;
40 for (int index = meta->propertyOffset(); index < meta->propertyCount(); ++index) {
41 const QMetaProperty &property = meta->property(index);
42 const QMetaObject* superClass(meta->superClass());
43- if (!(superClass && superClass->indexOfProperty(property.name()) > -1))
44+ // FIXME: Work-around to omit properties from Qt superclasses
45+ bool isQtAPI(QString(superClass->className()) == "QQuickImageBase"
46+ && QString("autoTransform,fillMode,horizontalAlignment,mipmap,paintedWidth,paintedHeight,verticalAlignment").contains(property.name()));
47+ if (isQtAPI)
48+ internalSignals.insert(property.notifySignal().name());
49+ else if (!(superClass && superClass->indexOfProperty(property.name()) > -1))
50 dump(object, property, knownAttributes);
51 if (knownAttributes)
52 knownAttributes->knownMethod(property.notifySignal().name(),
53@@ -415,6 +421,8 @@
54 QByteArray methName(meth.name());
55 if (!methName.isEmpty() && methName.endsWith("Changed") && !meth.parameterCount())
56 continue;
57+ if (internalSignals.contains(methName))
58+ continue;
59 dump(object, &methods, meta->method(index), implicitSignals, knownAttributes);
60 }
61 }
62@@ -904,7 +912,8 @@
63 // Create a component with all QML types to add them to the type system
64 QByteArray code = importCode;
65 Q_FOREACH(const QString& version, importVersions) {
66- QString pluginAlias(QString("%1.%2").arg(pluginImportUri).arg(version).replace(".", "_"));
67+ // First letter must be uppercase
68+ QString pluginAlias(QString("A%1.%2").arg(pluginImportUri).arg(version).replace(".", "_"));
69 code += QString("import %1 %2 as %3\n").arg(pluginImportUri).arg(version).arg(pluginAlias);
70 }
71 code += "Item {\n";
72@@ -923,6 +932,8 @@
73 std::cerr << "Public QML type " << qPrintable(c.typeName) << " in qmldir has no version!" << std::endl;
74 return EXIT_IMPORTERROR;
75 }
76+ if (exportedTypes.contains(QFileInfo(c.fileName).fileName()))
77+ continue;
78 exportedTypes.append(QFileInfo(c.fileName).fileName());
79 }
80

Subscribers

People subscribed via source and target branches