summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-02-01 17:47:40 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-02-01 17:47:40 (GMT)
commit364ecfa36d6d4dc0aa917a223e88869028d8219c (patch)
tree5bcb9a3504340c11213132897a4e59f6384704b9 /src/gui/image/qpixmap.cpp
parent5067683704580fcfedef4e68f19acedb133936e8 (diff)
parent3bc1dc6d3d609166af0532b9f75734aee232cded (diff)
downloadQt-364ecfa36d6d4dc0aa917a223e88869028d8219c.zip
Qt-364ecfa36d6d4dc0aa917a223e88869028d8219c.tar.gz
Qt-364ecfa36d6d4dc0aa917a223e88869028d8219c.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Placate pedantic compiler warning modes on QGLBuffer Promote QPixmap::convertFromImage() to public API from Qt3Support Add the QGLBuffer class to Qt 4.7 for VBO's
Diffstat (limited to 'src/gui/image/qpixmap.cpp')
-rw-r--r--src/gui/image/qpixmap.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 5626485..fe03c93 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1379,10 +1379,26 @@ void QPixmap::deref()
*/
/*!
- \fn bool QPixmap::convertFromImage(const QImage &image, Qt::ImageConversionFlags flags)
+ Replaces this pixmap's data with the given \a image using the specified
+ \a flags to control the conversion. The \a flags argument is a
+ bitwise-OR of the \l{Qt::ImageConversionFlags}. Passing 0 for \a
+ flags sets all the default options.
- Use the static fromImage() function instead.
+ Note: this function was part of Qt 3 support in Qt 4.6 and earlier.
+ It has been promoted to official API status in 4.7 to support updating
+ the pixmap's image without creating a new QPixmap as fromImage() would.
+
+ \sa fromImage()
+ \since 4.7
*/
+bool QPixmap::convertFromImage(const QImage &image, Qt::ImageConversionFlags flags)
+{
+ if (image.isNull() || !data)
+ *this = QPixmap::fromImage(image, flags);
+ else
+ data->fromImage(image, flags);
+ return !isNull();
+}
/*!
\fn QPixmap QPixmap::xForm(const QMatrix &matrix) const