aboutsummaryrefslogtreecommitdiff
path: root/tests/client/modeltest.cpp
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-13 14:14:56 -0300
committerRenato Araujo Oliveira Filho <renato.filho@canonical.com>2012-09-13 14:14:56 -0300
commita03360ce3fa4b2de50917188a8a816992e864ba1 (patch)
tree9c84e059c6011304328480b52ea215c2bd8818ef /tests/client/modeltest.cpp
parentd2e99cfb78dfcdad000faf9c1c7d4e5a40d53f95 (diff)
downloadqmenumodel-a03360ce3fa4b2de50917188a8a816992e864ba1.tar.gz
qmenumodel-a03360ce3fa4b2de50917188a8a816992e864ba1.tar.bz2
qmenumodel-a03360ce3fa4b2de50917188a8a816992e864ba1.zip
Created class QStateAction to use as GAction proxy.
Diffstat (limited to 'tests/client/modeltest.cpp')
-rw-r--r--tests/client/modeltest.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/client/modeltest.cpp b/tests/client/modeltest.cpp
index 4cf7f54..347676e 100644
--- a/tests/client/modeltest.cpp
+++ b/tests/client/modeltest.cpp
@@ -144,55 +144,55 @@ private Q_SLOTS:
QVariant e = m_model.data(m_model.index(0, 0), QMenuModel::Extra);
QVERIFY(e.isValid());
- QObject *extra = e.value<QObject*>();
+ QVariantMap extra = e.toMap();
// Boolean
- QVariant v = extra->property("boolean");
+ QVariant v = extra["boolean"];
QCOMPARE(v.type(), QVariant::Bool);
QCOMPARE(v.toBool(), true);
// Byte
- v = extra->property("byte");
+ v = extra["byte"];
QCOMPARE(v.typeName(), "uchar");
QCOMPARE(v.value<uchar>(), (uchar)42);
// Int16
- v = extra->property("int16");
+ v = extra["int16"];
QCOMPARE(v.typeName(), "short");
QCOMPARE(v.value<short>(), (short)-42);
// UInt16
- v = extra->property("uint16");
+ v = extra["uint16"];
QCOMPARE(v.typeName(), "ushort");
QCOMPARE(v.value<ushort>(), (ushort)42);
// Int32
- v = extra->property("int32");
+ v = extra["int32"];
QCOMPARE(v.type(), QVariant::Int);
QCOMPARE(v.toInt(), -42);
// UInt32
- v = extra->property("uint32");
+ v = extra["uint32"];
QCOMPARE(v.type(), QVariant::UInt);
QCOMPARE(v.toUInt(), (uint) 42);
// Int64
- v = extra->property("int64");
+ v = extra["int64"];
QCOMPARE(v.typeName(), "long");
QCOMPARE(v.value<long>(), (long) -42);
// UInt64
- v = extra->property("uint64");
+ v = extra["uint64"];
QCOMPARE(v.typeName(), "ulong");
QCOMPARE(v.value<ulong>(), (ulong) 42);
// Double
- v = extra->property("double");
+ v = extra["double"];
QCOMPARE(v.type(), QVariant::Double);
QCOMPARE(v.toDouble(), 42.42);
// String
- v = extra->property("string");
+ v = extra["string"];
QCOMPARE(v.type(), QVariant::String);
QCOMPARE(v.toString(), QString("42"));
}