Skip to content

Commit

Permalink
qmldirsContents contains QtQuick by default
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelvasev committed Aug 1, 2015
1 parent 57c847f commit f869b53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/qtcore.js
Expand Up @@ -961,6 +961,10 @@ QMLEngine = function (element, options) {

// Base path of qml engine (used for resource loading)
this.$basePath = "";

// Cache of content of loaded qmldir files. Used in engine.loadImports method.
// We init it with blank content of QtQuick module, because Qmlweb by default provides all the things from QtQuick.
this.qmldirsContents = { "QtQuick":{} };


//----------Public Methods----------
Expand Down Expand Up @@ -1103,7 +1107,7 @@ QMLEngine = function (element, options) {
TODO We have to keep results in component scope.
We have to add module "as"-names to component's names (which is possible after keeping imports in component scope).
*/

this.loadImports = function(importsArray, currentFileDir) {
if (!engine.qmldirsContents) engine.qmldirsContents = {}; // cache
if (!engine.qmldirs) engine.qmldirs = {}; // resulting components lookup table
Expand Down

0 comments on commit f869b53

Please sign in to comment.