diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-01-24 15:19:40 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:12:55 -0300 |
commit | 70a863eb2da935505ffa325c1772b13f4a80bded (patch) | |
tree | 6e8b5bfb18d0e951d047b04ec2be29cd1bf09758 /tests/libsample | |
parent | 9d36585f19bf858db10bee4c8b1933ed81301a98 (diff) |
Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'tests/libsample')
-rw-r--r-- | tests/libsample/pen.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/libsample/pen.h b/tests/libsample/pen.h index 9c97c2e36..a0c13ef50 100644 --- a/tests/libsample/pen.h +++ b/tests/libsample/pen.h @@ -29,9 +29,13 @@ class LIBSAMPLE_API Color { public: - Color() {} - Color(SampleNamespace::InValue arg) {} - Color(unsigned int arg) {} + Color() : m_null(true) {} + Color(SampleNamespace::InValue arg) : m_null(false) {} + Color(unsigned int arg) : m_null(false) {} + + bool isNull() const { return m_null; } +private: + bool m_null; }; class LIBSAMPLE_API Pen |