MCPcopy Create free account
hub / github.com/KDE/kdevelop / main

Function main

plugins/debuggercommon/tests/debuggees/qvariant.cpp:10–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8Q_DECLARE_METATYPE(SomeCustomType)
9
10int main()
11{
12 QObject myObj;
13 QVariant v;
14
15 v = QString::fromUtf8("KDevelop (QString)");
16 v = QByteArray("KDevelop (QByteArray)");
17
18 v = QVariant::fromValue(qint8(-8));
19 v = QVariant::fromValue(quint8(8));
20 v = QVariant::fromValue(qint16(-16));
21 v = QVariant::fromValue(quint16(16));
22 v = QVariant::fromValue(qint32(-32));
23 v = QVariant::fromValue(quint32(32));
24 v = QVariant::fromValue(qint64(-64));
25 v = QVariant::fromValue(quint64(64));
26
27 v = QVariant::fromValue(true);
28
29 v = QVariant::fromValue(4.5f);
30 v = QVariant::fromValue(42.5);
31
32 v = QVariant::fromValue(&myObj);
33
34 v = QVariant::fromValue(SomeCustomType());
35
36 Q_UNUSED(v); // prevent compiler optimizing away unused object
37 return 0;
38}

Callers

nothing calls this directly

Calls 2

SomeCustomTypeClass · 0.85
QByteArrayClass · 0.50

Tested by

no test coverage detected