src/gui/image/qpixmapdata_p.h
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
child 33 3e2da88830cd
--- a/src/gui/image/qpixmapdata_p.h	Tue Feb 02 00:43:10 2010 +0200
+++ b/src/gui/image/qpixmapdata_p.h	Wed Mar 31 11:06:36 2010 +0300
@@ -1,6 +1,6 @@
 /****************************************************************************
 **
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
 ** All rights reserved.
 ** Contact: Nokia Corporation (qt-info@nokia.com)
 **
@@ -117,6 +117,14 @@
     inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); }
     inline int depth() const { return d; }
     inline bool isNull() const { return is_null; }
+    inline qint64 cacheKey() const {
+        int classKey = id;
+        if (classKey >= 1024)
+            classKey = -(classKey >> 10);
+        return ((((qint64) classKey) << 56)
+                | (((qint64) ser_no) << 32)
+                | ((qint64) detach_no));
+    }
 
 #if defined(Q_OS_SYMBIAN)
     virtual void* toNativeType(NativeType type);