diff options
-rw-r--r-- | src/activeqt/container/qaxbase.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qaxobject/tst_qaxobject.cpp | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index d26cd6d..c313a42 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -1693,7 +1693,7 @@ private: } if (flags & Writable) flags |= Stored; - prop.flags = flags; + prop.flags |= flags; } inline bool hasProperty(const QByteArray &name) 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" |