aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-09-01 17:33:20 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:50 -0300
commitb55ea7fd5ebf58cb6d141c0091f7d47ef761a2ad (patch)
tree3bfea8d290dc5d11e180c7fff6ed760fa1ab945c
parente9de49255b6b4a1749b729a02e9fe643c66a042f (diff)
Fix bug 981 - "QSettings docs should empathize the behavior changes of value() on different platforms"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
-rw-r--r--PySide/QtCore/typesystem_core.xml5
1 files changed, 5 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index 6b8205e5a..bb675408c 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -2544,6 +2544,11 @@
<define-ownership class="target" owner="default"/>
</modify-argument>
</modify-function>
+ <modify-function signature="value(const QString&amp;, const QVariant&amp;)const">
+ <inject-documentation mode="append" format="target">
+ .. warning:: QSettings.value can return different types (QVariant types) depending on the platform it's running on, so the safest way to use it is always casting the result to the desired type, e.g.: int(settings.value("myKey"))
+ </inject-documentation>
+ </modify-function>
</object-type>
<object-type name="QEvent" polymorphic-id-expression="%1-&gt;type() == QEvent::None">
<enum-type name="Type" extensible="yes" />