~ubuntu-branches/ubuntu/saucy/qtdeclarative-opensource-src/saucy

« back to all changes in this revision

Viewing changes to tests/auto/qml/qqmlcomponent/data/NestedDirectories/NDTLC.qml

  • Committer: Package Import Robot
  • Author(s): Timo Jyrinki
  • Date: 2013-02-05 14:17:19 UTC
  • Revision ID: package-import@ubuntu.com-20130205141719-qqeyml8wslpyez52
Tags: upstream-5.0.1
ImportĀ upstreamĀ versionĀ 5.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import QtQuick 2.0
 
2
import "NestedDirOne"
 
3
import "NestedDirOne/NestedDirTwo/../../../SpecificComponent"
 
4
 
 
5
// NestedDirectoriesTopLevelComponent
 
6
 
 
7
Item {
 
8
    id: ndtlcId
 
9
    property NDComponentOne a: NDComponentOne { }
 
10
    property NDComponentOne b: NDComponentOne { }
 
11
    property SpecificComponent scOne: SpecificComponent { }
 
12
    property SpecificComponent scTwo
 
13
 
 
14
    function assignScTwo() {
 
15
        // It seems that doing this in onCompleted doesn't work,
 
16
        // since that handler will be evaluated after the
 
17
        // componentUrlCanonicalization.3.qml onCompleted handler.
 
18
        // So, call this function manually....
 
19
        var c1 = Qt.createComponent("NestedDirOne/NestedDirTwo/NDComponentTwo.qml");
 
20
        var o1 = c1.createObject(ndtlcId);
 
21
        scTwo = o1.sc;
 
22
    }
 
23
}