summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpixmap.cpp2
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--src/gui/painting/painting.pri7
-rw-r--r--src/gui/painting/qgraphicssystem.cpp16
-rw-r--r--src/gui/painting/qgraphicssystem_p.h3
-rw-r--r--src/gui/painting/qgraphicssystemex_p.h66
-rw-r--r--src/gui/painting/qgraphicssystemex_symbian.cpp87
-rw-r--r--src/gui/painting/qgraphicssystemex_symbian_p.h73
-rw-r--r--src/network/access/qnetworkreplyimpl.cpp2
-rw-r--r--src/opengl/qgraphicssystem_gl.cpp10
-rw-r--r--src/opengl/qgraphicssystem_gl_p.h13
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp8
-rw-r--r--src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h12
-rw-r--r--src/plugins/plugins.pro4
-rw-r--r--tests/auto/qimage/tst_qimage.cpp8
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp8
19 files changed, 313 insertions, 15 deletions
diff --git a/configure b/configure
index 5bdf8af..326ba88 100755
--- a/configure
+++ b/configure
@@ -5759,7 +5759,7 @@ if [ "$PLATFORM_X11" = "yes" -o "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "ye
fi # X11/QWS/Lighthouse
# X11
-if [ "$PLATFORM_X11" = "yes" ]; then
+if [ "$PLATFORM_X11" = "yes" -a "$CFG_GUI" != "no" ]; then
x11tests="$relpath/config.tests/x11"
X11TESTS_FLAGS=
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index 50b372e..25f6295 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4449,6 +4449,8 @@ QImage QImage::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Transf
QSize newSize = size();
newSize.scale(s, aspectMode);
+ newSize.rwidth() = qMax(newSize.width(), 1);
+ newSize.rheight() = qMax(newSize.height(), 1);
if (newSize == size())
return *this;
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index c34f6ac..640864d 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1514,6 +1514,8 @@ QPixmap QPixmap::scaled(const QSize& s, Qt::AspectRatioMode aspectMode, Qt::Tran
QSize newSize = size();
newSize.scale(s, aspectMode);
+ newSize.rwidth() = qMax(newSize.width(), 1);
+ newSize.rheight() = qMax(newSize.height(), 1);
if (newSize == size())
return *this;
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index ca6983d..acf1860 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -232,6 +232,7 @@ struct QTLWExtra {
#elif defined(Q_OS_SYMBIAN)
uint inExpose : 1; // Prevents drawing recursion
uint nativeWindowTransparencyEnabled : 1; // Tracks native window transparency
+ uint forcedToRaster : 1;
#elif defined(Q_WS_QPA)
QPlatformWindow *platformWindow;
QPlatformWindowFormat platformWindowFormat;
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 24dd00a..1e99687 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -838,7 +838,8 @@ void QWidgetPrivate::s60UpdateIsOpaque()
RWindow *const window = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow());
#ifdef Q_SYMBIAN_SEMITRANSPARENT_BG_SURFACE
- if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces) {
+ if (QApplicationPrivate::instance()->useTranslucentEGLSurfaces
+ && !extra->topextra->forcedToRaster) {
window->SetSurfaceTransparency(!isOpaque);
extra->topextra->nativeWindowTransparencyEnabled = !isOpaque;
return;
@@ -1022,6 +1023,7 @@ void QWidgetPrivate::createTLSysExtra()
{
extra->topextra->inExpose = 0;
extra->topextra->nativeWindowTransparencyEnabled = 0;
+ extra->topextra->forcedToRaster = 0;
}
void QWidgetPrivate::deleteTLSysExtra()
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri
index 65e7af4..f1496b1 100644
--- a/src/gui/painting/painting.pri
+++ b/src/gui/painting/painting.pri
@@ -9,6 +9,7 @@ HEADERS += \
painting/qdrawutil.h \
painting/qemulationpaintengine_p.h \
painting/qgraphicssystem_p.h \
+ painting/qgraphicssystemex_p.h \
painting/qmatrix.h \
painting/qmemrotate_p.h \
painting/qoutlinemapper_p.h \
@@ -249,8 +250,10 @@ embedded {
symbian {
HEADERS += painting/qwindowsurface_s60_p.h \
- painting/qdrawhelper_arm_simd_p.h
- SOURCES += painting/qwindowsurface_s60.cpp
+ painting/qdrawhelper_arm_simd_p.h \
+ painting/qgraphicssystemex_symbian_p.h
+ SOURCES += painting/qwindowsurface_s60.cpp \
+ painting/qgraphicssystemex_symbian.cpp
armccIfdefBlock = \
"$${LITERAL_HASH}if defined(ARMV6)" \
"MACRO QT_HAVE_ARM_SIMD" \
diff --git a/src/gui/painting/qgraphicssystem.cpp b/src/gui/painting/qgraphicssystem.cpp
index 171ef46..d82fdc9 100644
--- a/src/gui/painting/qgraphicssystem.cpp
+++ b/src/gui/painting/qgraphicssystem.cpp
@@ -55,6 +55,9 @@
#endif
#ifdef Q_OS_SYMBIAN
# include <private/qpixmap_s60_p.h>
+# include <private/qgraphicssystemex_symbian_p.h>
+#else
+# include <private/qgraphicssystemex_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -89,9 +92,18 @@ QPixmapData *QGraphicsSystem::createPixmapData(QPixmapData *origin)
return createPixmapData(origin->pixelType());
}
-void QGraphicsSystem::releaseCachedResources()
+#ifdef Q_OS_SYMBIAN
+Q_GLOBAL_STATIC(QSymbianGraphicsSystemEx, symbianPlatformExtension)
+#endif
+
+QGraphicsSystemEx* QGraphicsSystem::platformExtension()
{
- // Do nothing here
+#ifdef Q_OS_SYMBIAN
+ // this is used on raster graphics systems. HW accelerated
+ // graphics systems will overwrite this function.
+ return symbianPlatformExtension();
+#endif
+ return 0;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystem_p.h b/src/gui/painting/qgraphicssystem_p.h
index 0f99a31..275f9eb 100644
--- a/src/gui/painting/qgraphicssystem_p.h
+++ b/src/gui/painting/qgraphicssystem_p.h
@@ -63,6 +63,7 @@ QT_BEGIN_NAMESPACE
class QPixmapFilter;
class QBlittable;
+class QGraphicsSystemEx;
class Q_GUI_EXPORT QGraphicsSystem
{
@@ -77,7 +78,7 @@ public:
// to have a graphics system.
static QPixmapData *createDefaultPixmapData(QPixmapData::PixelType type);
- virtual void releaseCachedResources();
+ virtual QGraphicsSystemEx* platformExtension();
};
QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystemex_p.h b/src/gui/painting/qgraphicssystemex_p.h
new file mode 100644
index 0000000..6feb116
--- /dev/null
+++ b/src/gui/painting/qgraphicssystemex_p.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QGRAPHICSSYSTEMEX_P_H
+#define QGRAPHICSSYSTEMEX_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <qglobal.h>
+
+QT_BEGIN_NAMESPACE
+
+class Q_GUI_EXPORT QGraphicsSystemEx
+{
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/gui/painting/qgraphicssystemex_symbian.cpp b/src/gui/painting/qgraphicssystemex_symbian.cpp
new file mode 100644
index 0000000..54d21ac
--- /dev/null
+++ b/src/gui/painting/qgraphicssystemex_symbian.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qgraphicssystemex_symbian_p.h"
+#include "private/qwidget_p.h"
+#include "private/qbackingstore_p.h"
+#include "private/qapplication_p.h"
+#include "qwidget_p.h"
+
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+void QSymbianGraphicsSystemEx::releaseCachedGpuResources()
+{
+ // Do nothing here
+ // This is implemented in graphics system specific plugin
+}
+
+void QSymbianGraphicsSystemEx::releaseAllGpuResources()
+{
+ releaseCachedGpuResources();
+
+ foreach (QWidget *widget, QApplication::topLevelWidgets()) {
+ if (QTLWExtra *topExtra = qt_widget_private(widget)->maybeTopData())
+ topExtra->backingStore.destroy();
+ }
+}
+
+bool QSymbianGraphicsSystemEx::hasBCM2727()
+{
+ return !QApplicationPrivate::instance()->useTranslucentEGLSurfaces;
+}
+
+void QSymbianGraphicsSystemEx::forceToRaster(QWidget *window)
+{
+ if (window && window->isWindow()) {
+ qt_widget_private(window)->createTLExtra();
+ if (QTLWExtra *topExtra = qt_widget_private(window)->maybeTopData()) {
+ topExtra->forcedToRaster = 1;
+ if (topExtra->backingStore.data()) {
+ topExtra->backingStore.create(window);
+ topExtra->backingStore.registerWidget(window);
+ }
+ }
+ }
+}
+
+QT_END_NAMESPACE
diff --git a/src/gui/painting/qgraphicssystemex_symbian_p.h b/src/gui/painting/qgraphicssystemex_symbian_p.h
new file mode 100644
index 0000000..0b1e39e
--- /dev/null
+++ b/src/gui/painting/qgraphicssystemex_symbian_p.h
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QSYMBIANGRAPHICSSYSTEMEX_P_H
+#define QSYMBIANGRAPHICSSYSTEMEX_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "private/qgraphicssystemex_p.h"
+
+QT_BEGIN_NAMESPACE
+
+class QWidget;
+
+class Q_GUI_EXPORT QSymbianGraphicsSystemEx : public QGraphicsSystemEx
+{
+public:
+ virtual void releaseCachedGpuResources();
+ virtual void releaseAllGpuResources();
+ virtual bool hasBCM2727();
+ virtual void forceToRaster(QWidget *window);
+};
+
+QT_END_NAMESPACE
+
+#endif
diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp
index f73058b..db57e90 100644
--- a/src/network/access/qnetworkreplyimpl.cpp
+++ b/src/network/access/qnetworkreplyimpl.cpp
@@ -860,6 +860,8 @@ void QNetworkReplyImpl::abort()
if (d->state != QNetworkReplyImplPrivate::Finished) {
// call finished which will emit signals
d->error(OperationCanceledError, tr("Operation canceled"));
+ if (d->state == QNetworkReplyImplPrivate::WaitingForSession)
+ d->state = QNetworkReplyImplPrivate::Working;
d->finished();
}
d->state = QNetworkReplyImplPrivate::Aborted;
diff --git a/src/opengl/qgraphicssystem_gl.cpp b/src/opengl/qgraphicssystem_gl.cpp
index 0aa3c2e..5a01d8c 100644
--- a/src/opengl/qgraphicssystem_gl.cpp
+++ b/src/opengl/qgraphicssystem_gl.cpp
@@ -104,11 +104,17 @@ QWindowSurface *QGLGraphicsSystem::createWindowSurface(QWidget *widget) const
return new QGLWindowSurface(widget);
}
-#ifdef QGL_USE_TEXTURE_POOL
-void QGLGraphicsSystem::releaseCachedResources()
+#ifdef Q_OS_SYMBIAN
+void QGLGraphicsSystem::releaseCachedGpuResources()
{
QGLTexturePool::instance()->hibernate();
}
+
+QGraphicsSystemEx* QGLGraphicsSystem::platformExtension()
+{
+ return this;
+}
#endif
+
QT_END_NAMESPACE
diff --git a/src/opengl/qgraphicssystem_gl_p.h b/src/opengl/qgraphicssystem_gl_p.h
index 5829dcc..5372443 100644
--- a/src/opengl/qgraphicssystem_gl_p.h
+++ b/src/opengl/qgraphicssystem_gl_p.h
@@ -55,11 +55,19 @@
#include "private/qgraphicssystem_p.h"
+#ifdef Q_OS_SYMBIAN
+#include "private/qgraphicssystemex_symbian_p.h"
+#endif
+
#include <QMap>
QT_BEGIN_NAMESPACE
class Q_OPENGL_EXPORT QGLGraphicsSystem : public QGraphicsSystem
+#ifdef Q_OS_SYMBIAN
+ , public QSymbianGraphicsSystemEx
+#endif
+
{
public:
QGLGraphicsSystem(bool useX11GL);
@@ -67,8 +75,9 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
-#ifdef QGL_USE_TEXTURE_POOL
- void releaseCachedResources();
+#ifdef Q_OS_SYMBIAN
+ void releaseCachedGpuResources();
+ QGraphicsSystemEx* platformExtension();
#endif
private:
bool m_useX11GL;
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
index 4b4f677..bf29dd4 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp
@@ -80,9 +80,15 @@ QWindowSurface *QVGGraphicsSystem::createWindowSurface(QWidget *widget) const
return new QVGWindowSurface(widget);
}
-void QVGGraphicsSystem::releaseCachedResources()
+#ifdef Q_OS_SYMBIAN
+void QVGGraphicsSystem::releaseCachedGpuResources()
{
QVGImagePool::instance()->hibernate();
}
+QGraphicsSystemEx *QVGGraphicsSystem::platformExtension()
+{
+ return this;
+}
+#endif
QT_END_NAMESPACE
diff --git a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
index 9c9b3e2..feff451 100644
--- a/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
+++ b/src/plugins/graphicssystems/openvg/qgraphicssystem_vg_p.h
@@ -55,9 +55,16 @@
#include <QtGui/private/qgraphicssystem_p.h>
+#ifdef Q_OS_SYMBIAN
+#include <QtGui/private/qgraphicssystemex_symbian_p.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QVGGraphicsSystem : public QGraphicsSystem
+#ifdef Q_OS_SYMBIAN
+ , public QSymbianGraphicsSystemEx
+#endif
{
public:
QVGGraphicsSystem();
@@ -65,7 +72,10 @@ public:
QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
QWindowSurface *createWindowSurface(QWidget *widget) const;
- void releaseCachedResources();
+#ifdef Q_OS_SYMBIAN
+ void releaseCachedGpuResources();
+ QGraphicsSystemEx* platformExtension();
+#endif
};
QT_END_NAMESPACE
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index 7479d2f..2d0c201 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -7,9 +7,9 @@ unix:!symbian {
SUBDIRS *= codecs
}
!contains(QT_CONFIG, no-gui): SUBDIRS *= imageformats iconengines
-!embedded:!qpa:SUBDIRS *= graphicssystems
+!embedded:!qpa:!contains(QT_CONFIG, no-gui):SUBDIRS *= graphicssystems
embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers
-!win32:!embedded:!mac:!symbian:SUBDIRS *= inputmethods
+!win32:!embedded:!mac:!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS *= inputmethods
!symbian:!contains(QT_CONFIG, no-gui):SUBDIRS += accessible
symbian:SUBDIRS += s60
contains(QT_CONFIG, phonon): SUBDIRS *= phonon
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index c5ded0d..ad85bf5 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -151,6 +151,7 @@ private slots:
void rgbSwapped();
void deepCopyWhenPaintingActive();
+ void scaled_QTBUG19157();
};
tst_QImage::tst_QImage()
@@ -2029,5 +2030,12 @@ void tst_QImage::deepCopyWhenPaintingActive()
QVERIFY(copy != image);
}
+void tst_QImage::scaled_QTBUG19157()
+{
+ QImage foo(5000, 1, QImage::Format_RGB32);
+ foo = foo.scaled(1024, 1024, Qt::KeepAspectRatio);
+ QVERIFY(!foo.isNull());
+}
+
QTEST_MAIN(tst_QImage)
#include "tst_qimage.moc"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index 98f7839..f9cd254 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -198,6 +198,7 @@ private slots:
#endif
void drawPixmapWhilePainterOpen();
+ void scaled_QTBUG19157();
};
static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
@@ -1958,5 +1959,12 @@ void tst_QPixmap::drawPixmapWhilePainterOpen()
}
}
+void tst_QPixmap::scaled_QTBUG19157()
+{
+ QPixmap foo(5000, 1);
+ foo = foo.scaled(1024, 1024, Qt::KeepAspectRatio);
+ QVERIFY(!foo.isNull());
+}
+
QTEST_MAIN(tst_QPixmap)
#include "tst_qpixmap.moc"