summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/image/qimagereader.cpp5
-rw-r--r--src/gui/image/qpnghandler.cpp1
-rw-r--r--src/gui/image/qtiffhandler.cpp6
-rw-r--r--src/gui/painting/qbackingstore.cpp2
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp10
-rw-r--r--src/gui/painting/qgraphicssystemfactory.cpp2
6 files changed, 20 insertions, 6 deletions
diff --git a/src/gui/image/qimagereader.cpp b/src/gui/image/qimagereader.cpp
index 411e5e9..2b56e49 100644
--- a/src/gui/image/qimagereader.cpp
+++ b/src/gui/image/qimagereader.cpp
@@ -1473,11 +1473,16 @@ QByteArray QImageReader::imageFormat(QIODevice *device)
\row \o XBM \o X11 Bitmap
\row \o XPM \o X11 Pixmap
\row \o SVG \o Scalable Vector Graphics
+ \row \o TGA \o Targa Image Format
\endtable
Reading and writing SVG files is supported through Qt's
\l{QtSvg Module}{SVG Module}.
+ TGA support only extends to reading non-RLE compressed files. In particular
+ calls to \l{http://doc.qt.nokia.com/4.7-snapshot/qimageioplugin.html#capabilities}{capabilities}
+ for the tga plugin returns only QImageIOPlugin::CanRead, not QImageIOPlugin::CanWrite.
+
To configure Qt with GIF support, pass \c -qt-gif to the \c
configure script or check the appropriate option in the graphical
installer.
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 1714442..5a4a4d7 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -53,6 +53,7 @@
#ifdef QT_USE_BUNDLED_LIBPNG
#include <../../3rdparty/libpng/png.h>
#include <../../3rdparty/libpng/pngconf.h>
+using namespace PrivatePng;
#else
#include <png.h>
#include <pngconf.h>
diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp
index 4dc9775..51a500d 100644
--- a/src/gui/image/qtiffhandler.cpp
+++ b/src/gui/image/qtiffhandler.cpp
@@ -158,7 +158,13 @@ bool QTiffHandler::canRead(QIODevice *device)
// current implementation uses TIFFClientOpen which needs to be
// able to seek, so sequential devices are not supported
+ int pos = device->pos();
+ if (pos != 0)
+ device->seek(0); // need the magic from the beginning
QByteArray header = device->peek(4);
+ if (pos != 0)
+ device->seek(pos); // put it back where we found it
+
return header == QByteArray::fromRawData("\x49\x49\x2A\x00", 4)
|| header == QByteArray::fromRawData("\x4D\x4D\x00\x2A", 4);
}
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index 6fbb59f..d79be41 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -1625,7 +1625,7 @@ void QWidgetPrivate::repaint_sys(const QRegion &rgn)
extra->staticContentsSize = data.crect.size();
}
-#ifdef Q_WS_QPA //Dont even call q->p
+#ifdef Q_WS_QPA //Don't even call q->p
QPaintEngine *engine = 0;
#else
QPaintEngine *engine = q->paintEngine();
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp
index 19b29a1..6d3f16e 100644
--- a/src/gui/painting/qgraphicssystem_runtime.cpp
+++ b/src/gui/painting/qgraphicssystem_runtime.cpp
@@ -330,11 +330,15 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem()
{
QApplicationPrivate::runtime_graphics_system = true;
+ if (!qgetenv("QT_DEFAULT_RUNTIME_SYSTEM").isEmpty()) {
+ m_graphicsSystemName = QString::fromLocal8Bit(qgetenv("QT_DEFAULT_RUNTIME_SYSTEM"));
+ } else {
#ifdef QT_DEFAULT_RUNTIME_SYSTEM
- m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM);
- if (m_graphicsSystemName.isNull())
+ m_graphicsSystemName = QLatin1String(QT_DEFAULT_RUNTIME_SYSTEM);
+ if (m_graphicsSystemName.isNull())
#endif
- m_graphicsSystemName = QLatin1String("raster");
+ m_graphicsSystemName = QLatin1String("raster");
+ }
#ifdef Q_OS_SYMBIAN
m_windowSurfaceDestroyPolicy = DestroyAfterFirstFlush;
diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp
index 01ece09..b817a90 100644
--- a/src/gui/painting/qgraphicssystemfactory.cpp
+++ b/src/gui/painting/qgraphicssystemfactory.cpp
@@ -45,7 +45,6 @@
#include "qmutex.h"
#include "qapplication.h"
-#include <private/qapplication_p.h>
#include "qgraphicssystem_raster_p.h"
#include "qgraphicssystem_runtime_p.h"
#include "qdebug.h"
@@ -80,7 +79,6 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key)
}
#endif
- QApplicationPrivate::graphics_system_name = system;
if (system == QLatin1String("raster"))
return new QRasterGraphicsSystem;
else if (system == QLatin1String("runtime"))