diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 00:57:59 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-03-18 00:57:59 (GMT) |
commit | 5134b700b7311e39b25bd783f213e374de5efaaa (patch) | |
tree | 80f7e31ed771271514dfd403b9e2f70145799772 /src/gui/image | |
parent | 8e26d4b87ad5e2e61d7692af5ee5040caa6ef71a (diff) | |
parent | ce33fe15dde2151905839196da9927f4c19b18be (diff) | |
download | Qt-5134b700b7311e39b25bd783f213e374de5efaaa.zip Qt-5134b700b7311e39b25bd783f213e374de5efaaa.tar.gz Qt-5134b700b7311e39b25bd783f213e374de5efaaa.tar.bz2 |
Merge branch 'staging-master' of scm.dev.nokia.troll.no:qt/qt-lighthouse into master-integration
* 'staging-master' of scm.dev.nokia.troll.no:qt/qt-lighthouse: (101 commits)
Fixes detected by the static-check
Fixup license headers in Lighthouse plugins
Mac: add autorelease pools to create_sys
Don't skip remaining events on unhandled events in xcb backend.
Lighthouse: Xcb, compile fix for the glx path
Lighthouse: Make sure we don't use xkbcommon
Lighthouse: Add pkg-config check for opengl es2
Rename qnaclunimplemented -> qfunctions_nacl
Rename qconfig-minimal-system-depenencies.h
Add QT_NO_FILESYSTEMITERATOR.
Add QT_NO_DYNAMIC_LIBRARY.
Compile.
NaCl: Dont force release builds.
NaCl: disable libtiff.
posix platformdefs: Add QT_NO_SOCKET_H.
qpnghandler: Compile with QT_NO_IMAGE_TEXT.
Lighthouse: Support Q_NO_CLIPBOARD.
Compile.
Fix CoreServices framework addition for qpa.
Update NaCl mkspecs.
...
Diffstat (limited to 'src/gui/image')
-rw-r--r-- | src/gui/image/qpixmap.cpp | 28 | ||||
-rw-r--r-- | src/gui/image/qpnghandler.cpp | 2 |
2 files changed, 25 insertions, 5 deletions
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index 6e13324..34804e5 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -71,6 +71,10 @@ # include "private/qpixmap_mac_p.h" #endif +#ifdef Q_WS_QPA +# include "qplatformintegration_qpa.h" +#endif + #if defined(Q_WS_X11) # include "qx11info_x11.h" # include <private/qt_x11_p.h> @@ -98,12 +102,26 @@ static bool qt_pixmap_thread_test() qFatal("QPixmap: Must construct a QApplication before a QPaintDevice"); return false; } -#ifndef Q_WS_WIN - if (!QApplication::testAttribute(Qt::AA_X11InitThreads) && qApp->thread() != QThread::currentThread()) { - qWarning("QPixmap: It is not safe to use pixmaps outside the GUI thread"); - return false; - } + + if (qApp->thread() != QThread::currentThread()) { + bool fail = false; +#if defined (Q_WS_X11) + if (!QApplication::testAttribute(Qt::AA_X11InitThreads)) + fail = true; +#elif defined (Q_WS_QPA) + if (!QApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedPixmaps)) { + printf("Lighthouse plugin does not support threaded pixmaps!\n"); + fail = true; + } +#else + if (QApplicationPrivate::graphics_system_name != QLatin1String("raster")) + fail = true; #endif + if (fail) { + qWarning("QPixmap: It is not safe to use pixmaps outside the GUI thread"); + return false; + } + } return true; } diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp index a9aad51..7e0355a 100644 --- a/src/gui/image/qpnghandler.cpp +++ b/src/gui/image/qpnghandler.cpp @@ -492,8 +492,10 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngImage(QImage *outImage) outImage->setDotsPerMeterX(png_get_x_pixels_per_meter(png_ptr,info_ptr)); outImage->setDotsPerMeterY(png_get_y_pixels_per_meter(png_ptr,info_ptr)); +#ifndef QT_NO_IMAGE_TEXT for (int i = 0; i < readTexts.size()-1; i+=2) outImage->setText(readTexts.at(i), readTexts.at(i+1)); +#endif state = ReadingEnd; png_read_end(png_ptr, end_info); |