From 70a863eb2da935505ffa325c1772b13f4a80bded Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Mon, 24 Jan 2011 15:19:40 -0200 Subject: Fix bug#633 - "bool of null QDate (possibly other empty QString/null QObj types?) returns True for empty instance; probably should be False" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewer: Marcelo Lira Renato Araújo --- tests/libsample/pen.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/libsample') 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 -- cgit v1.2.3