Merge lp:~zeller-benjamin/ubuntu-sdk-ide/QTCREATORBUG-16585-backport into lp:ubuntu-sdk-ide

Proposed by Benjamin Zeller
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 151
Merged at revision: 151
Proposed branch: lp:~zeller-benjamin/ubuntu-sdk-ide/QTCREATORBUG-16585-backport
Merge into: lp:ubuntu-sdk-ide
Diff against target: 62 lines (+49/-0)
2 files modified
debian/patches/qml_circular_dependencies.diff (+48/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~zeller-benjamin/ubuntu-sdk-ide/QTCREATORBUG-16585-backport
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Zoltan Balogh Approve
Review via email: mp+304758@code.launchpad.net

Commit message

Backport of fix for QTCREATORBUG-16585 "QmlJs: circular dependencies handling"

Description of the change

Backport of fix for QTCREATORBUG-16585 "QmlJs: circular dependencies handling"

To post a comment you must log in.
Revision history for this message
Zoltan Balogh (bzoltan) :
review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'debian/patches/qml_circular_dependencies.diff'
2--- debian/patches/qml_circular_dependencies.diff 1970-01-01 00:00:00 +0000
3+++ debian/patches/qml_circular_dependencies.diff 2016-09-02 10:33:20 +0000
4@@ -0,0 +1,48 @@
5+diff --git a/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.cpp b/src/libs/qmljs/qmljsplugindumper.cpp
6+index 7d13482..8ef89eb 100644
7+--- a/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.cpp
8++++ b/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.cpp
9+@@ -458,19 +458,27 @@ QString PluginDumper::buildQmltypesPath(const QString &name) const
10+ void PluginDumper::loadDependencies(const QStringList &dependencies,
11+ QStringList &errors,
12+ QStringList &warnings,
13+- QList<FakeMetaObject::ConstPtr> &objects) const
14++ QList<FakeMetaObject::ConstPtr> &objects,
15++ QSet<QString> *visited) const
16+ {
17++ if (dependencies.isEmpty())
18++ return;
19++
20++ QScopedPointer<QSet<QString>> visitedPtr(visited ? visited : new QSet<QString>());
21++
22+ QStringList dependenciesPaths;
23+ QString path;
24+ for (const QString &name: dependencies) {
25+ path = buildQmltypesPath(name);
26+ if (!path.isNull())
27+ dependenciesPaths << path;
28++ visitedPtr->insert(name);
29+ }
30+ QStringList newDependencies;
31+ loadQmlTypeDescription(dependenciesPaths, errors, warnings, objects, 0, &newDependencies);
32++ newDependencies = (newDependencies.toSet() - *visitedPtr).toList();
33+ if (!newDependencies.isEmpty())
34+- loadDependencies(newDependencies, errors, warnings, objects);
35++ loadDependencies(newDependencies, errors, warnings, objects, visitedPtr.take());
36+ }
37+
38+ void PluginDumper::loadQmltypesFile(const QStringList &qmltypesFilePaths,
39+diff --git a/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.h b/src/libs/qmljs/qmljsplugindumper.h
40+index 7d29e6e..586275f 100644
41+--- a/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.h
42++++ b/dist/qtcreator/src/libs/qmljs/qmljsplugindumper.h
43+@@ -83,7 +83,8 @@ private:
44+ void loadDependencies(const QStringList &dependencies,
45+ QStringList &errors,
46+ QStringList &warnings,
47+- QList<LanguageUtils::FakeMetaObject::ConstPtr> &objects) const;
48++ QList<LanguageUtils::FakeMetaObject::ConstPtr> &objects,
49++ QSet<QString> *visited=0) const;
50+ void loadQmltypesFile(const QStringList &qmltypesFilePaths,
51+ const QString &libraryPath,
52+ QmlJS::LibraryInfo libraryInfo);
53
54=== modified file 'debian/patches/series'
55--- debian/patches/series 2016-08-24 16:00:57 +0000
56+++ debian/patches/series 2016-09-02 10:33:20 +0000
57@@ -9,4 +9,5 @@
58 # remove_libexec.diff
59 # Ubuntu patches.
60 skip_failing_unit_tests.diff
61+qml_circular_dependencies.diff
62 cmake_ubuntuspecificbits.diff

Subscribers

People subscribed via source and target branches