Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add .arg() for Javascript String type
Change-Id: I973032189c40bfa4d5450396f5bad1a7c81ac68b Task-number:QTBUG-16734 Reviewed-by:Michael Brasser Reviewed-on: http://codereview.qt.nokia.com/2134 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
- Loading branch information
1 parent
ea0cb11
commit b1200f4
Showing
4 changed files
with
47 additions
and
1 deletion.
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
16 changes: 16 additions & 0 deletions
16
tests/auto/declarative/qdeclarativeecmascript/data/dynamicString.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,16 @@ | ||
import Qt.test 1.0 | ||
import QtQuick 2.0 | ||
|
||
MyTypeObject { | ||
stringProperty:"string:%0 false:%1 true:%2 uint32:%3 int32:%4 double:%5 date:%6!" | ||
Component.onCompleted: { | ||
var date = new Date(); | ||
date.setDate(11); | ||
date.setMonth(1); | ||
date.setFullYear(2011); | ||
date.setHours(5); | ||
date.setMinutes(30); | ||
date.setSeconds(50); | ||
stringProperty = stringProperty.arg("Hello World").arg(false).arg(true).arg(100).arg(-100).arg(3.1415926).arg(Qt.formatDateTime(date, "yyyy-MM-dd hh::mm:ss")); | ||
} | ||
} |
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