diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2012-09-24 15:21:57 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-09-29 02:31:35 +0200 |
commit | abcdc7fd878675bc5efdcfe77ea47eaed8f2531f (patch) | |
tree | bc0023a1cdf12912edcbe063cd0ecb09f91d2a18 /src/corelib/kernel/qvariant.cpp | |
parent | 42b88337121151a99b60d8a785e896437cdcd971 (diff) |
Make documentation of QVariant::isNull more explicit.
Task-number: QTBUG-22933
Change-Id: I1d8d3fc778ba00bcad11caaaf8af7d87186f18e8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/corelib/kernel/qvariant.cpp')
-rw-r--r-- | src/corelib/kernel/qvariant.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index d7969160d3..96f2ff682d 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -2808,6 +2808,10 @@ bool QVariant::convert(const int type, void *ptr) const \a v1. See \l{QVariant::}{canConvert()} for a list of possible conversions. + The result of the function is not affected by the result of QVariant::isNull, + which means that two values can be equal even if one of them is null and + another is not. + \warning This function doesn't support custom types registered with qRegisterMetaType(). */ @@ -2902,7 +2906,13 @@ void* QVariant::data() /*! - Returns true if this is a NULL variant, false otherwise. + Returns true if this is a null variant, false otherwise. A variant is + considered null if it contains a default constructed value or a built-in + type instance that has an isNull method, in which case the result + would be the same as calling isNull on the wrapped object. + + \warning The result of the function doesn't affect == operator, which means + that two values can be equal even if one of them is null and another is not. */ bool QVariant::isNull() const { |