summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlist.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-06-10 12:36:58 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-06-10 13:09:58 (GMT)
commita293cab198f51ca8920c3da1b671f51b26a9cb4a (patch)
tree02e4eae518fe749b9f08fbc55a8a105e98f26e8b /src/corelib/tools/qlist.h
parent84a8024b6b6c81cf20ead9de0bacaeec3ad4e136 (diff)
downloadQt-a293cab198f51ca8920c3da1b671f51b26a9cb4a.zip
Qt-a293cab198f51ca8920c3da1b671f51b26a9cb4a.tar.gz
Qt-a293cab198f51ca8920c3da1b671f51b26a9cb4a.tar.bz2
Build fix for GCCE. I believe all auto tests for GCCE were previously failing
because of this. Reviewed-by: Brad
Diffstat (limited to 'src/corelib/tools/qlist.h')
-rw-r--r--src/corelib/tools/qlist.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index 89e082b..7540035 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -117,7 +117,14 @@ public:
inline int size() const { return p.size(); }
inline void detach() { if (d->ref != 1) detach_helper(); }
- inline void detachShared() { if (d->ref != 1 && d != &QListData::shared_null) detach_helper(); }
+
+ inline void detachShared()
+ {
+ // The "this->" qualification is needed for GCCE.
+ if (d->ref != 1 && this->d != &QListData::shared_null)
+ detach_helper();
+ }
+
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }