1
function runTest(label, condition1, condition2) {
3
if (condition1 == condition2) {
4
rtxt += "\n<font color=\"green\"> Success</font> <em>" + label + "</em> : (" + condition1 + ")";
6
rtxt += "\n<font color=\"red\"> Failed</font> <em>" + label + "</em> :(" + condition1 + " != " + condition2 + ")";
12
function defaultValues() {
13
// Fill the example config with default values
15
// This serves as example how you can write data in a somewhat type-safe manner
16
// into a KConfigGroup
19
configGroup.writeEntry("fakeString", "Some _fake_ string.");
21
// Url -> QUrl (FIXME)
22
configGroup.writeEntry("fakeUrl", Url("http://planetkde.org"));
25
configGroup.writeEntry("fakeBool", true);
28
configGroup.writeEntry("fakeInt", 23);
31
configGroup.writeEntry("fakeReal", 1.87);
33
// point, using the QML basic type point
34
configGroup.writeEntry("fakePoint", Qt.point(30,40));
36
// rect, using the QML basic type rect
37
configGroup.writeEntry("fakeRect", Qt.rect(12, 24, 600, 400));
40
configGroup.writeEntry("fakeDateTime", new Date(2003, 12, 27, 13, 37, 17));
41
print(" == " + new Date(2003, 9, 27, 13, 37, 17).toUTCString());
44
//configGroup.writeEntry("fakeDate", Qt.date("2003-09-27"));
46
// list<Type> -. QVariantList (FIXME)
47
configGroup.writeEntry("fakeList", ["one", "two", "three" ]);
50
function convertDate(d) {
51
var splitDate = d.toString().split(',');
52
print(" out of config: " + d.toString());
53
var someday = new Date(splitDate[0], splitDate[1], splitDate[2], splitDate[3], splitDate[4], splitDate[5]);
54
print (" ....." + someday.valueOf());