From 67ff892b7336c7f295366419bd517af06ae78cff Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 17 Mar 2014 19:00:08 +0900 Subject: Enabled operator->() for class QValueListIterator. --- src/tools/ntqvaluelist.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/tools') diff --git a/src/tools/ntqvaluelist.h b/src/tools/ntqvaluelist.h index fd14437b5..9ee9ee5e5 100644 --- a/src/tools/ntqvaluelist.h +++ b/src/tools/ntqvaluelist.h @@ -55,10 +55,6 @@ //#define QT_CHECK_VALUELIST_RANGE -#if defined(Q_CC_MSVC) -#pragma warning(disable:4284) // "return type for operator -> is not a UDT" -#endif - template class TQValueListNode { @@ -112,8 +108,8 @@ class TQValueListIterator bool operator!=( const TQValueListIterator& it ) const { return node != it.node; } const T& operator*() const { return node->data; } T& operator*() { return node->data; } - // UDT for T = x* - // T* operator->() const { return &node->data; } + const T* operator->() const { return &node->data; } + T* operator->() { return &node->data; } TQValueListIterator& operator++() { node = node->next; -- cgit v1.2.1