From fd6f82f5ea6b46aedc26a71b97793e065df09b73 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Thu, 23 Oct 2014 18:31:45 +0200 Subject: In some controls the property can be listed twice so merge the flags In the remote desktop client control there were separate entries for the getter and setter of the properties and the flags for the getter would override the other. Therefore the flags should be combined as the relevant function would be used anyway for the purpose. Change-Id: I212b23cf69c96be71dcd8a7493e8a57cb69ff5fe Reviewed-by: Joerg Bornemann --- tests/auto/qaxobject/tst_qaxobject.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests') diff --git a/tests/auto/qaxobject/tst_qaxobject.cpp b/tests/auto/qaxobject/tst_qaxobject.cpp index 00032da..2190590 100644 --- a/tests/auto/qaxobject/tst_qaxobject.cpp +++ b/tests/auto/qaxobject/tst_qaxobject.cpp @@ -43,6 +43,7 @@ class tst_QAxObject : public QObject private slots: void propertyByRefWritable(); void setPropertyByRef(); + void multiplePropertiesDuplicateName(); }; void tst_QAxObject::propertyByRefWritable() @@ -65,5 +66,17 @@ void tst_QAxObject::setPropertyByRef() QVERIFY(speak.setProperty("Voice", speak.property("Voice"))); } +void tst_QAxObject::multiplePropertiesDuplicateName() +{ + // Remote desktop client control has two instances for most properties, + // one for the setter and one for the getter + QAxObject ax("MsTscAx.MsTscAx.4"); + if (ax.isNull()) + QSKIP("MsTscAx control was not found so test cannot be run", SkipAll); + int newDesktopHeight = 768; + QVERIFY(ax.setProperty("DesktopHeight", newDesktopHeight)); + QCOMPARE(ax.property("DesktopHeight").toInt(), newDesktopHeight); +} + QTEST_MAIN(tst_QAxObject) #include "tst_qaxobject.moc" -- cgit v1.2.1