File: typecheck.js

package info (click to toggle)
kjsembed 5.103.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 24,300 kB
  • sloc: cpp: 9,163; javascript: 701; sh: 21; makefile: 3
file content (28 lines) | stat: -rw-r--r-- 523 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function isObjectOrVariant(foo)
{
    if (isVariant(foo))
    {
        println(' is a variant.');
    }
    else if (isObject(foo))
    {
        println(' is an object.');
    }
    else
    {
        println(' is a yahoo?');
    }
}

var color = new QColor("red");
println('color ');
isObjectOrVariant(color);

var frame = new QWidget("QFrame", this );
println('frame ');
isObjectOrVariant(frame);

var settings = new QSettings("test.ini", QSettings.IniFormat, this);
println('settings ');
isObjectOrVariant(settings);