Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix access to context properties within TextEdit.cursorDelegate
Don't create the cursorDelegate instance before componentComplete as the context may not be fully populated prior to that. Task-number: QTBUG-21780 Change-Id: I6ca8a24989bc28e5c5ca06d61a85e32ff630ce7c Reviewed-by: Martin Jones <martin.jones@nokia.com>
- Loading branch information
Andrew den Exter
authored and
Qt by Nokia
committed
Feb 14, 2012
1 parent
452be83
commit a4b0ac2
Showing
9 changed files
with
95 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { | ||
property string localProperty | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/auto/qtquick2/qquicktextedit/data/cursorTestExternal.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { width: 300; height: 300; color: "white" | ||
property string contextualProperty: "Hello" | ||
TextEdit { | ||
text: "Hello world!" | ||
id: textEditObject; | ||
objectName: "textEditObject" | ||
cursorDelegate: Cursor { | ||
id:cursorInstance; | ||
objectName: "cursorInstance"; | ||
localProperty: contextualProperty; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/auto/qtquick2/qquicktextedit/data/cursorTestInline.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { width: 300; height: 300; color: "white" | ||
property string contextualProperty: "Hello" | ||
TextEdit { | ||
text: "Hello world!" | ||
id: textEditObject | ||
objectName: "textEditObject" | ||
cursorDelegate: Item { | ||
id:cursorInstance | ||
objectName: "cursorInstance" | ||
property string localProperty: contextualProperty | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { | ||
property string localProperty | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/auto/qtquick2/qquicktextinput/data/cursorTestExternal.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { width: 300; height: 300; color: "white" | ||
property string contextualProperty: "Hello" | ||
TextInput { | ||
text: "Hello world!" | ||
id: textInputObject; | ||
objectName: "textInputObject" | ||
cursorDelegate: Cursor { | ||
id:cursorInstance; | ||
objectName: "cursorInstance"; | ||
localProperty: contextualProperty; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/auto/qtquick2/qquicktextinput/data/cursorTestInline.qml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import QtQuick 2.0 | ||
|
||
Rectangle { width: 300; height: 300; color: "white" | ||
property string contextualProperty: "Hello" | ||
TextInput { | ||
text: "Hello world!" | ||
id: textInputObject | ||
objectName: "textInputObject" | ||
cursorDelegate: Item { | ||
id:cursorInstance | ||
objectName: "cursorInstance" | ||
property string localProperty: contextualProperty | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters