summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpicture.cpp2
-rw-r--r--src/gui/image/qpicture.h2
-rw-r--r--src/gui/image/qpixmap.cpp2
-rw-r--r--src/gui/image/qpixmapcache.cpp5
-rw-r--r--src/gui/image/qpixmapdatafactory.cpp2
6 files changed, 11 insertions, 4 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index c1c5631..0377ca7 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4763,7 +4763,7 @@ QDataStream &operator>>(QDataStream &s, QImage &image)
image = QImageReader(s.device(), 0).read();
return s;
}
-#endif
+#endif // QT_NO_DATASTREAM
#ifdef QT3_SUPPORT
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 92023e0..23baa96 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -1143,6 +1143,7 @@ QPaintEngine *QPicture::paintEngine() const
QPicture stream functions
*****************************************************************************/
+#ifndef QT_NO_DATASTREAM
/*!
\relates QPicture
@@ -1188,6 +1189,7 @@ QDataStream &operator>>(QDataStream &s, QPicture &r)
r.d_func()->resetFormat();
return s;
}
+#endif // QT_NO_DATASTREAM
#ifndef QT_NO_PICTUREIO
diff --git a/src/gui/image/qpicture.h b/src/gui/image/qpicture.h
index fe86e8d..edfac71 100644
--- a/src/gui/image/qpicture.h
+++ b/src/gui/image/qpicture.h
@@ -184,8 +184,10 @@ private:
QPicture stream functions
*****************************************************************************/
+#ifndef QT_NO_DATASTREAM
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QPicture &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPicture &);
+#endif
#endif // QT_NO_PICTURE
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 8ed9e93..f6b5de2 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1317,7 +1317,7 @@ QDataStream &operator>>(QDataStream &stream, QPixmap &pixmap)
return stream;
}
-#endif //QT_NO_DATASTREAM
+#endif // QT_NO_DATASTREAM
#ifdef QT3_SUPPORT
Q_GUI_EXPORT void copyBlt(QPixmap *dst, int dx, int dy,
diff --git a/src/gui/image/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 82b42b4..bdcddfd 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -65,7 +65,10 @@ QT_BEGIN_NAMESPACE
object for caching the pixmaps.
The cache associates a pixmap with a string as a key or with a QPixmapCache::Key.
- The QPixmapCache::Key is faster than using strings as key.
+ The QPixmapCache::Key is faster than using strings as key. The string API is
+ very convenient for complex keys but the QPixmapCache::Key API will be very efficient
+ and convenient for a 1 object <-> 1 pixmap mapping (then you can store the key as
+ a member).
If two pixmaps are inserted into the cache using equal keys, then the
last pixmap will hide the first pixmap. The QHash and QCache classes do
exactly the same.
diff --git a/src/gui/image/qpixmapdatafactory.cpp b/src/gui/image/qpixmapdatafactory.cpp
index 699489d..bba7378 100644
--- a/src/gui/image/qpixmapdatafactory.cpp
+++ b/src/gui/image/qpixmapdatafactory.cpp
@@ -84,7 +84,7 @@ QPixmapData* QSimplePixmapDataFactory::create(QPixmapData::PixelType type)
#endif
}
-Q_GLOBAL_STATIC(QSimplePixmapDataFactory, factory);
+Q_GLOBAL_STATIC(QSimplePixmapDataFactory, factory)
#endif // !defined(Q_WS_QWS)