summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-01-21 18:38:53 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-01-21 18:38:53 (GMT)
commit8e65adce9ced8f3b1d42b938e4d65e1af4768c33 (patch)
tree042094137a842b98a41474ce99192b67a822820c
parent613be7cd75663ab8227de80d75d8f01e92c5c7d2 (diff)
parent2ae6b44e4242c60bd882661e104bb53fa6670556 (diff)
downloadQt-8e65adce9ced8f3b1d42b938e4d65e1af4768c33.zip
Qt-8e65adce9ced8f3b1d42b938e4d65e1af4768c33.tar.gz
Qt-8e65adce9ced8f3b1d42b938e4d65e1af4768c33.tar.bz2
Merge branch '4.6'
Conflicts: tools/assistant/lib/qhelpsearchquerywidget.cpp
-rw-r--r--demos/embedded/anomaly/anomaly.pro6
-rw-r--r--demos/embedded/anomaly/src/BrowserView.cpp5
-rw-r--r--demos/embedded/anomaly/src/BrowserView.h4
-rw-r--r--demos/embedded/anomaly/src/webview.cpp80
-rw-r--r--demos/embedded/anomaly/src/webview.h66
-rw-r--r--dist/changes-4.6.1263
-rw-r--r--dist/changes-4.6.2159
-rw-r--r--doc/src/getting-started/examples.qdoc6
-rw-r--r--doc/src/modules.qdoc2
-rw-r--r--doc/src/snippets/qstring/main.cpp2
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp1
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.h2
-rw-r--r--qmake/generators/symbian/symmake.cpp32
-rw-r--r--qmake/generators/symbian/symmake.h5
-rw-r--r--qmake/project.cpp14
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog11
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h6
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog45
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp10
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog10
-rw-r--r--src/corelib/animation/qpropertyanimation.cpp17
-rw-r--r--src/corelib/io/qfile.cpp103
-rw-r--r--src/corelib/kernel/qcoreevent.cpp2
-rw-r--r--src/corelib/kernel/qmetaobject_p.h6
-rw-r--r--src/corelib/kernel/qobject.cpp28
-rw-r--r--src/corelib/kernel/qobjectdefs.h2
-rw-r--r--src/corelib/tools/qbytearray.cpp4
-rw-r--r--src/gui/dialogs/qcolordialog.cpp45
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp9
-rw-r--r--src/gui/image/qpixmap.cpp21
-rw-r--r--src/gui/kernel/qapplication_p.h6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp47
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm2
-rw-r--r--src/gui/kernel/qformlayout.cpp6
-rw-r--r--src/gui/kernel/qwidget_mac.mm45
-rw-r--r--src/gui/painting/qpainter.cpp3
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm11
-rw-r--r--src/network/access/qfilenetworkreply.cpp94
-rw-r--r--src/network/access/qfilenetworkreply_p.h10
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp4
-rw-r--r--src/network/access/qnetworkreply.cpp5
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp17
-rw-r--r--src/network/ssl/qsslcertificate.cpp14
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp2
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/qgl_x11.cpp6
-rw-r--r--src/opengl/qpixmapdata_gl.cpp12
-rw-r--r--src/opengl/qpixmapdata_x11gl_egl.cpp51
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp3
-rw-r--r--src/s60installs/qt.iby26
-rw-r--r--src/s60installs/s60installs.pro5
-rw-r--r--src/script/bridge/qscriptqobject.cpp12
-rw-r--r--src/tools/uic3/converter.cpp20
-rw-r--r--src/tools/uic3/form.cpp8
-rw-r--r--src/tools/uic3/main.cpp18
-rw-r--r--src/tools/uic3/ui3reader.cpp22
-rw-r--r--src/tools/uic3/ui3reader.h16
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser.cpp2
-rw-r--r--src/xmlpatterns/parser/qquerytransformparser_p.h2
-rw-r--r--src/xmlpatterns/parser/qxslttokenlookup.cpp2
-rw-r--r--src/xmlpatterns/parser/qxslttokenlookup_p.h2
-rw-r--r--tests/auto/auto.pro18
-rw-r--r--tests/auto/maketestselftest/tst_maketestselftest.cpp2
-rw-r--r--tests/auto/mediaobject/dummy/dummy.pro2
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp23
-rw-r--r--tests/auto/qobject/tst_qobject.cpp73
-rw-r--r--tests/auto/qpixmap/tst_qpixmap.cpp38
-rw-r--r--tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp34
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp13
-rw-r--r--tests/auto/selftests/expected_xunit.txt4
-rw-r--r--tests/auto/uic/baseline/config_fromuic3.ui2
-rw-r--r--tests/auto/uic/baseline/config_fromuic3.ui.h4
-rw-r--r--tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp35
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.cpp71
-rw-r--r--tools/assistant/lib/qhelpsearchquerywidget.h3
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.cpp8
-rw-r--r--tools/assistant/lib/qhelpsearchresultwidget.h1
-rw-r--r--tools/designer/src/lib/shared/widgetfactory.cpp2
-rw-r--r--tools/runonphone/main.cpp4
-rw-r--r--tools/runonphone/runonphone.pro6
-rw-r--r--tools/runonphone/serenum_stub.cpp53
-rw-r--r--tools/runonphone/serenum_unix.cpp64
-rw-r--r--translations/translations.pri8
-rw-r--r--translations/translations.pro8
-rw-r--r--util/qlalr/doc/qlalr.qdocconf2
89 files changed, 1427 insertions, 504 deletions
diff --git a/demos/embedded/anomaly/anomaly.pro b/demos/embedded/anomaly/anomaly.pro
index 2871ba7..165ce89 100644
--- a/demos/embedded/anomaly/anomaly.pro
+++ b/demos/embedded/anomaly/anomaly.pro
@@ -8,7 +8,8 @@ HEADERS += src/BrowserWindow.h \
src/BookmarksView.h \
src/flickcharm.h \
src/ZoomStrip.h \
- src/ControlStrip.h
+ src/ControlStrip.h \
+ src/webview.h
SOURCES += src/Main.cpp \
src/BrowserWindow.cpp \
src/BrowserView.cpp \
@@ -18,7 +19,8 @@ SOURCES += src/Main.cpp \
src/BookmarksView.cpp \
src/flickcharm.cpp \
src/ZoomStrip.cpp \
- src/ControlStrip.cpp
+ src/ControlStrip.cpp \
+ src/webview.cpp
RESOURCES += src/anomaly.qrc
symbian {
diff --git a/demos/embedded/anomaly/src/BrowserView.cpp b/demos/embedded/anomaly/src/BrowserView.cpp
index ab52e81..0945b89 100644
--- a/demos/embedded/anomaly/src/BrowserView.cpp
+++ b/demos/embedded/anomaly/src/BrowserView.cpp
@@ -48,6 +48,7 @@
#include "ControlStrip.h"
#include "TitleBar.h"
#include "flickcharm.h"
+#include "webview.h"
#include "ZoomStrip.h"
#if defined (Q_OS_SYMBIAN)
@@ -62,7 +63,7 @@ BrowserView::BrowserView(QWidget *parent)
, m_currentZoom(100)
{
m_titleBar = new TitleBar(this);
- m_webView = new QWebView(this);
+ m_webView = new WebView(this);
m_zoomStrip = new ZoomStrip(this);
m_controlStrip = new ControlStrip(this);
@@ -95,7 +96,7 @@ void BrowserView::initialize()
connect(m_webView, SIGNAL(loadFinished(bool)), SLOT(finish(bool)));
connect(m_webView, SIGNAL(urlChanged(QUrl)), SLOT(updateTitleBar()));
- m_webView->setHtml("Will try to load page soon!");
+ m_webView->setHtml("about:blank");
m_webView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
m_webView->setFocus();
#ifdef Q_OS_SYMBIAN
diff --git a/demos/embedded/anomaly/src/BrowserView.h b/demos/embedded/anomaly/src/BrowserView.h
index fdc126d..5ab1dd7 100644
--- a/demos/embedded/anomaly/src/BrowserView.h
+++ b/demos/embedded/anomaly/src/BrowserView.h
@@ -49,6 +49,7 @@ class QUrl;
class QWebView;
class TitleBar;
class ControlStrip;
+class WebView;
class ZoomStrip;
class BrowserView : public QWidget
@@ -81,7 +82,7 @@ protected:
private:
TitleBar *m_titleBar;
- QWebView *m_webView;
+ WebView *m_webView;
ZoomStrip *m_zoomStrip;
ControlStrip *m_controlStrip;
int m_progress;
@@ -90,3 +91,4 @@ private:
};
#endif // BROWSERVIEW_H
+
diff --git a/demos/embedded/anomaly/src/webview.cpp b/demos/embedded/anomaly/src/webview.cpp
new file mode 100644
index 0000000..5cb913b
--- /dev/null
+++ b/demos/embedded/anomaly/src/webview.cpp
@@ -0,0 +1,80 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demos 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 "webview.h"
+
+#include <QPaintEvent>
+#include <QWebFrame>
+
+WebView::WebView(QWidget *parent)
+ : QWebView(parent)
+ , inLoading(false)
+{
+ connect(this, SIGNAL(loadStarted()), this, SLOT(newPageLoading()));
+ connect(this, SIGNAL(loadFinished(bool)), this, SLOT(pageLoaded(bool)));
+ page()->setPreferredContentsSize(QSize(1024, 768));
+}
+
+void WebView::paintEvent(QPaintEvent *event)
+{
+ if (inLoading && loadingTime.elapsed() < 750) {
+ QPainter painter(this);
+ painter.setBrush(Qt::white);
+ painter.setPen(Qt::NoPen);
+ foreach (const QRect &rect, event->region().rects()) {
+ painter.drawRect(rect);
+ }
+ } else {
+ QWebView::paintEvent(event);
+ }
+}
+
+void WebView::newPageLoading()
+{
+ inLoading = true;
+ loadingTime.start();
+}
+
+void WebView::pageLoaded(bool)
+{
+ inLoading = false;
+ update();
+}
diff --git a/demos/embedded/anomaly/src/webview.h b/demos/embedded/anomaly/src/webview.h
new file mode 100644
index 0000000..ecd9f5a
--- /dev/null
+++ b/demos/embedded/anomaly/src/webview.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the demos 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 WEBVIEW_H
+#define WEBVIEW_H
+
+#include <QWebView>
+#include <QTime>
+
+class WebView : public QWebView
+{
+ Q_OBJECT
+public:
+ WebView(QWidget *parent = 0);
+
+protected:
+ void paintEvent(QPaintEvent *event);
+
+private slots:
+ void newPageLoading();
+ void pageLoaded(bool ok);
+
+private:
+ QTime loadingTime;
+ bool inLoading;
+};
+
+#endif // WEBVIEW_H
diff --git a/dist/changes-4.6.1 b/dist/changes-4.6.1
index 6e95fd5..4a567bb 100644
--- a/dist/changes-4.6.1
+++ b/dist/changes-4.6.1
@@ -20,12 +20,6 @@ Merge Request: http://qt.gitorious.org
* General *
****************************************************************************
-New features
-------------
-
- - SomeClass, SomeOtherClass
- * New classes for foo, bar and baz
-
Optimizations
-------------
@@ -44,8 +38,8 @@ QtCore
- QFile
* Improve performance of getting the canonical filename on Linux
- and Symbian by using realpath() system call
- * Avoid stat() when opening a file
+ and Symbian by using realpath() system call.
+ * Avoid stat() when opening a file.
- QLibrary and QPluginLoader
* Do not look at the Qt patch-level version embedded in plugins'
@@ -60,7 +54,7 @@ QtCore
- QXmlStreamreader
* [merge request 1926] Fix parsing of DTDs that contain empty markup
- declarations
+ declarations.
QtGui
-----
@@ -68,32 +62,21 @@ QtGui
- QApplication
* [QTBUG-6654] Fix crashes when deleting QWidgets in touch event
handlers.
- - QPixmapCache
- * Fixed a small leak when using the new QPixmapCAche::Key based API.
- - QPixmap
- * load() and loadFromData() can now support compressed GL textures
- in the DDS, ETC1, PVRTC2, and PVRTC4 formats if the OpenGL graphics
- system is active and the appropriate extensions are present in the
- GL implementation.
- * [QTBUG-6840] Fixed load() to not modify referenced copies.
- * [QTBUG-5840] Fixed a crash in fromImage() when passing in a null image.
- * [QTBUG-6116] Fixed memory leak where a global object was not destroyed
- at program exit.
- - QRasterPixmapData
- * [QTBUG-6985] Fixed metric() to return the correct height in mm.
- - QGraphicsObject
- * 'id' property was removed. Use the 'objectName' property instead.
- - QPrinter
- * [QTBUG-3412] QGraphicsProxyWidgets are now rendered correctly when
- printing a QGraphicsScene to PDF format.
- - QPainter
- * [QTBUG-5939] Fixed incorrect redirection matrix that was causing
- wrong transformation for QGraphicsProxyWidgets.
- * [QTBUG-6684] Added optimizations of 32-bit blend functions
- for ARM platforms with NEON support.
- QGraphicsEffect
* [QTBUG-5918] Fixed redraw bugs when using graphics effects on
items while animating them by transformations.
+ - QGraphicsItem
+ * [QTBUG-5917] Fixed memory leaks when removing a QGraphicsEffect from
+ a QGraphicsItem or QWidget with setGraphicsEffect(0).
+ * [QTBUG-5859] Fixes incorrect rounding of the exposed rectangle of the
+ QGraphicsItem causing painting issues when scaling the QGraphicsView.
+ * [QTBUG-5071] Fixes transformation problems when grouping/ungrouping
+ the item with a QGraphicsItemGroup.
+ - QGraphicsObject
+ * 'id' property was removed. Use the 'objectName' property instead.
+ - QGraphicsScene
+ * [QTBUG-6654] Fix crashes when deleting QGraphicsItems in touch
+ event handlers.
- QGraphicsView
* [QTBUG-6935] When using CacheBackground, the background is now
correctly repainted after the QGraphicsView is shown after being
@@ -101,29 +84,37 @@ QtGui
* [QTBUG-6835] Mouse tracking is now automatically enabled when using
AnchorUnderMouse for view transformation.
* [QTBUG-6958] Fix speed regression in _q_polishItems()
- * [QTBUG-6544] Fix a crash on the focus chain when removing items from the scene.
+ * [QTBUG-6544] Fix a crash on the focus chain when removing items from
+ the scene.
* Fix a crash in KDE/Plasma with QGraphicsView with topLevels.
- - QGraphicsItem
- * [QTBUG-5917] Fixed memory leaks when removing a QGraphicsEffect from
- a QGraphicsItem or QWidget with setGraphicsEffect(0).
- * [QTBUG-5859] Fixes incorrect rounding of the exposed rectangle of the
- QGraphicsItem causing painting issues when scaling the QGraphicsView.
- * [QTBUG-5071] Fixes transformation problems when grouping/ungrouping
- the item with a QGraphicsItemGroup.
- QGraphicsWidget
- * [QTBUG-6272] Only call updateFont if the font have changed.
+ * [QTBUG-6272] Only call updateFont if the font has changed.
+ - QPainter
+ * [QTBUG-5939] Fixed incorrect redirection matrix that was causing
+ wrong transformation for QGraphicsProxyWidgets.
+ * [QTBUG-6684] Added optimizations of 32-bit blend functions
+ for ARM platforms with NEON support.
+ - QPixmap
+ * load() and loadFromData() can now support compressed GL textures
+ in the DDS, ETC1, PVRTC2, and PVRTC4 formats if the OpenGL graphics
+ system is active and the appropriate extensions are present in the
+ GL implementation.
+ * [QTBUG-6840] Fixed load() to not modify referenced copies.
+ * [QTBUG-5840] Fixed a crash in fromImage() when passing in a null image.
+ * [QTBUG-6116] Fixed memory leak where a global object was not destroyed
+ at program exit.
+ - QPixmapCache
+ * Fixed a small leak when using the new QPixmapCache::Key based API.
+ - QPrinter
+ * [QTBUG-3412] QGraphicsProxyWidgets are now rendered correctly when
+ printing a QGraphicsScene to PDF format.
+ - QRasterPixmapData
+ * [QTBUG-6985] Fixed metric() to return the correct height in mm.
- QTextDocument
* [QTBUG-5397] Fixed printing of QTextDocuments not including custom
text objects.
-
- - QTextDocument
* [QTBUG-6051] Fixed an endless loop when printing a QTextDocument.
- - QGraphicsScene
- * [QTBUG-6654] Fix crashes when deleting QGraphicsItems in touch
- event handlers.
-
-
QtDBus
------
@@ -132,49 +123,54 @@ QtDBus
correctly when the sender name changes/appears on the bus.
* [QTBUG-7041] Fixed marshalling of booleans in release mode.
* [QT-2307] Fixed calls with the QDBus::BlockWithGui mode.
-
- QDBusInterface
* Made it continue working even when the remote object
introspection fails.
-
- QDBusInterface and qdbuscpp2xml
* [QTBUG-5563] Fixed an issue with generating annotations in
- signals
-
+ signals.
- QDBusPendingReply and QDBusReply
* [QTBUG-6571] Fixed a crash that would happen if you tried to
- make a call with a disconnected QDBusConnection
+ make a call with a disconnected QDBusConnection.
QtMultimedia
------------
- QAudioOutput
* [Merge request 418] Fixed compilation the example provided for
- QAudioOutput::start
+ QAudioOutput::start.
QtNetwork
---------
- QNetworkAccessManager
- * HTTP: Smaller improvements
- * HTTP: Send our locale with the HTTP request
- * HTTP: Start Accept-language and Authorization header with capital letter
- * HTTP: Fix caching algorithm, matching RFC 2612 and the documentation
- * HTTP [QTBUG-7060]: Fix an issue with headers like "private, max-age=300"
- * file: Introduce special subclass for higher performance with file:// URLs
+ * HTTP: Send our locale with the HTTP request.
+ * HTTP: Start Accept-language and Authorization header with capital letter.
+ * HTTP: Fix caching algorithm, matching RFC 2612 and the documentation.
+ * HTTP [QTBUG-7060]: Fix an issue with headers like "private, max-age=300".
+ * file: Introduce special subclass for higher performance with file:// URLs.
- QTcpSocket
- * [QTBUG-5799] Fix waitForConnected() on Windows
+ * [QTBUG-5799] Fix waitForConnected() on Windows.
- QNetworkProxyFactory
* Fixed systemProxyForQuery(), it could sometimes return invalid empty list
- on Windows
+ on Windows.
- QNetworkCookieJar
- * [QTBUG-5815] do not check paths when accepting cookies
+ * [QTBUG-5815] Do not check paths when accepting cookies.
- QHostInfo
- * Use 5 parallel threads for host lookup instead of 1
+ * Use five parallel threads for host lookup instead of one.
QtOpenGL
--------
+ - QGL2PaintEngineEx
+ * Performance: Don't mark brush as dirty if it hasn't changed.
+ * Performance: Use 3x3 PMV matrices rather than 4x4.
+ * Performance: Move the 0.5 offset we add for aliased rendering to
+ updateMatrix().
+ * Performance: Remove superfluous enable/disable vertex attrib arrays.
+ * Performance: Track the glVertexAttribPointer and only update it if it's
+ changed.
+ * [QTBUG-7094] Introduce new "snapToPixelGrid" flag for drawText.
- QGLContext
* bindTexture(QString) now supports DDS, ETC1, PVRTC2, and PVRTC4
compressed textures if the appropriate extensions are present
@@ -187,31 +183,24 @@ QtOpenGL
* bindTexture(QImage): Fix GL_BGRA formats under OpenGL/ES by using
the same value for both internal and external texture formats.
* [QTBUG-5041] Disable depth testing while in renderText().
- - QGLPaintDevice
- * [QTBUG-6204] Rebind window surface fbo after native GL rendering.
- QGLEngineSelector
* [QTBUG-5638] Detect GL2 based on fragment shaders, not programs.
Fragment programs are a GL1 feature.
- QGLFramebufferObject
* [QTBUG-6712] Update docs to better explain how QPainter changes
the GL state when used on an FBO.
- - QGLPixmapData
- * [QTBUG-6902] Align GL_RGB data on a 4-byte line boundary.
- - QTriangulatingStroker
- * [QTBUG-6045] Crash in dashed line handling in the GL stroker.
- QGLGlyphCache
* [QTBUG-6936] Fix memory leak of QGLGlyphCoord objects.
+ - QGLPaintDevice
+ * [QTBUG-6204] Rebind window surface FBO after native GL rendering.
+ - QGLPixmapData
+ * [QTBUG-6902] Align GL_RGB data on a 4-byte line boundary.
- QGLWidget
* [QTBUG-5002, QTBUG-6931] Fixed QGLWidget::renderText().
- * Fixed WA_TranslucentBackground for QGLWidgets on X11/EGL
- * Fix EGL surface leaks when re-parenting on X11/EGL
- - QGL2PaintEngineEx
- * Performance: Don't mark brush as dirty if it hasn't changed
- * Performance: Use 3x3 PMV matrices rather than 4x4
- * Performance: Move the 0.5 offset we add for aliased rendering to updateMatrix()
- * Performance: Remove superfluous enable/disable vertex arrtib arrays
- * Performance: Track the glVertexAttribPointer and only update it if it's changed
- * [QTBUG-7094] Introduce new "snapToPixelGrid" flag for drawText
+ * Fixed WA_TranslucentBackground for QGLWidgets on X11/EGL.
+ * Fix EGL surface leaks when re-parenting on X11/EGL.
+ - QTriangulatingStroker
+ * [QTBUG-6045] Crash in dashed line handling in the GL stroker.
QtOpenVG
--------
@@ -227,32 +216,29 @@ QtOpenVG
QtWebKit
--------
- - Fixed user agent string on Symbian (webkit.org/b/31961)
- - QWebInspector: Don't disable when hiding (webkit.org/b/31851)
- - Fix JavaScript prompt behaviour for empty/null strings (webkit.org/b/30914)
- - Fixed lastIndexOf() on Symbian (webkit.org/b/31773)
- - Fixed crash with Flash on Windows with MinGW
- - Fixed wrapping of QObjects with recurring identity (webkit.org/b/31681)
- - Fixed compilation with ICC
- - Fixed assertion when dragging SVG images (webkit.org/b/32511)
- - Fixed crash with ACID3 test on Symbian
- - Fixed security issue XSL stylesheets and security origins.
- - Added the framecapture example to the default build (merge request 2235)
-
-QtScript
---------
-
- - foo
- * bar
+ - Fixed user agent string on Symbian (webkit.org/b/31961).
+ - QWebInspector: Don't disable when hiding (webkit.org/b/31851).
+ - Fix JavaScript prompt behaviour for empty/null strings (webkit.org/b/30914).
+ - Fixed lastIndexOf() on Symbian (webkit.org/b/31773).
+ - Fixed crash with Flash on Windows with MinGW.
+ - Fixed wrapping of QObjects with recurring identity (webkit.org/b/31681).
+ - Fixed compilation with ICC.
+ - Fixed assertion when dragging SVG images (webkit.org/b/32511).
+ - Added the framecapture example to the default build (merge request 2235)
+ - Fixed crash with ACID3 test on Symbian
+ - Fixed security issue XSL stylesheets and security origins.
QtSql
-----
- - [QTBUG-5373] Fixed QSqlRelationalTableModel doesn't correctly work with relation in other database schema.
- - [QTBUG-5298] (OCI) Fixed QSqlDatabase.tables() does not work with system tables.
- - [QTBUG-6421] Fixed setForwardOnly() for both OCI and SQLite
- - [QTBUG-6618] (ODBC) Fixed segfault when error string is larger than 256 chars.
- - [QTBUG-4461] (OCI) Fixed problem with clobs being handled as binary
+ - [QTBUG-5373] Fixed QSqlRelationalTableModel doesn't correctly work with
+ relation in other database schema.
+ - [QTBUG-5298] (OCI) Fixed QSqlDatabase.tables() does not work with system
+ tables.
+ - [QTBUG-6421] Fixed setForwardOnly() for both OCI and SQLite.
+ - [QTBUG-6618] (ODBC) Fixed segfault when error string is larger than 256
+ chars.
+ - [QTBUG-4461] (OCI) Fixed problem with clobs being handled as binary.
QtSvg
-----
@@ -261,13 +247,8 @@ QtSvg
* [QTBUG-6867] Fixed regression in the parsing of paths with relative
offsets.
* [QTBUG-6899] Fixed crash when parsing invalid coordinate list.
-
-
-QtXml
------
-
- - foo
- * bar
+ - QtXmlPatterns
+ * [QTBUG-6771] Fixed static builds.
Qt Plugins
----------
@@ -283,13 +264,6 @@ Qt Plugins
- PNG plugin
* [QTBUG-7161] Avoid a deep copy of QImage::bits() in the png writer.
-Third party components
-----------------------
-
- - Updated foo to version 2.3.9.
-
- - Updated bar to the latest version from baz.org.
-
****************************************************************************
* Platform Specific Changes *
@@ -300,89 +274,70 @@ Qt for Unix (X11 and Mac OS X)
- [QTBUG-6755] Ensure we don't call select(2) with a negative timeout
if the timer expires during timeout recalculation.
-
- Added mkspecs for Sun CC that enable -library=stlport by default,
to restore STL capability with that compiler.
-
- - [QTBUG-6576] Fixed compilation on HP-UX 11.11
-
- - [QTBUG-6961] Fixed compilation on HURD
+ - [QTBUG-6576] Fixed compilation on HP-UX 11.11.
+ - [QTBUG-6961] Fixed compilation on HURD.
Qt for Linux/X11
----------------
- [QTBUG-5732] Fixed querying of GLX extensions under X11.
- [QTBUG-5547] Fixed handling of the "..." button.
- - Added new mkspec for Maemo targets (linux-g++-maemo)
- - Added new mkspec for Scratchbox host compiler (unsupported/linux-host-g++)
-
+ - Added new mkspec for Maemo targets (linux-g++-maemo).
+ - Added new mkspec for Scratchbox host compiler (unsupported/linux-host-g++).
- QGuiEventDispatcherGlib (internal class)
* Fix regression introduced in 4.6.0 that could cause X11 event
processing to starve timer events.
-
- QFileSystemWatcher
* [QTBUG-4840] Fix memory leak in the dnotify implementation.
-
- QIcon
* [QTBUG-6121] Fixed a problem causing svg-based icon themes to look fuzzy.
-
- QGtkStyle
* [QTBUG-6484] Ensure that gtk-enable-mnemonics is respected.
Qt for Windows
--------------
- - [QTBUG-5145] Compile fixes for win32-icc.
+ - [QTBUG-5145] Compile fixes for win32-icc.
- QAtomicPointer
* [QTBUG-6079] Fix compilation for 64-bit Windows targets.
-
- QEventDispatchWin32 (internal class)
* [QTBUG-6083] Fix a performance regression introduced in 4.6.0
that would cause all Qt posted events to be sent at 15-16ms
intervals (instead of as quickly as possible).
- Vista/XP styles
* [QTBUG-6271] Fixed a compatibility issue with MDI windows in
- certain non-standard themes.
+ certain non-standard themes.
Qt for Mac OS X
---------------
- QPixmap
* [QTBUG-5070] Fixed a crash on Mac that could occur when loading
- pixmaps of different sizes into the same QPixmap object.
- - [QTBUG-6973] Fixed a memory leak when using QWidget::setWindowIcon() in carbon.
+ pixmaps of different sizes into the same QPixmap object.
+ - [QTBUG-6973] Fixed a memory leak when using QWidget::setWindowIcon() in
+ Carbon.
- [QTBUG-5186] Fixed a bug which caused drag and drop icons to show
incorrectly.
- - [QTBUG-6636] Fixed a crash due to stack overflow in QColorDialog on cocoa.
+ - [QTBUG-6636] Fixed a crash due to stack overflow in QColorDialog on Cocoa.
- [QTBUG-6378] Fix a text cursor rendering bug.
- - [QTBUG-6636] Fixed a crash when calling removeToolBar on Mac native toolbars using cocoa.
- - [QTBUG-5613] Fixed a bug where the application refued to quit when showing a single modal dialog.
- - Gestures are now available for the Carbon port also when building Qt against SDK < 10.6
-
-Qt for Embedded Linux
----------------------
-
- -
-
-DirectFB
---------
-
- -
-
-Qt for Windows CE
------------------
-
- -
+ - [QTBUG-6636] Fixed a crash when calling removeToolBar on Mac native toolbars
+ using Cocoa.
+ - [QTBUG-5613] Fixed a bug where the application refused to quit when showing
+ a single modal dialog.
+ - Gestures are now available for the Carbon port also when building Qt against
+ SDK < 10.6
Qt for Symbian
--------------
- QApplication
* [QTBUG-6098] Added a flag to avoid construction of application panes.
-
- Other:
* [QTBUG-4990] Rewrote most of the regular pointer handling.
+
****************************************************************************
* Tools *
****************************************************************************
@@ -397,12 +352,6 @@ Qt for Symbian
* [QTBUG-5824] Fixed code generation to generate a call to
QMainWindow::setCentralWidget() for promoted widgets as well.
- - qdoc3
- * bar
-
- - Linguist
- * baz
-
****************************************************************************
* Important Behavior Changes *
****************************************************************************
diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2
new file mode 100644
index 0000000..d35f945
--- /dev/null
+++ b/dist/changes-4.6.2
@@ -0,0 +1,159 @@
+Qt 4.6.2 is a bug-fix release. It maintains both forward and backward
+compatibility (source and binary) with Qt 4.6.0. For more details,
+refer to the online documentation included in this distribution. The
+documentation is also available online:
+
+ http://qt.nokia.com/doc/4.6
+
+The Qt version 4.6 series is binary compatible with the 4.5.x series.
+Applications compiled for 4.5 will continue to run with 4.6.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker, the (now obsolete) Task
+Tracker, or the Merge Request queue of the public source repository.
+
+Qt Bug Tracker: http://bugreports.qt.nokia.com
+Task Tracker: http://qt.nokia.com/developer/task-tracker
+Merge Request: http://qt.gitorious.org
+
+****************************************************************************
+* General *
+****************************************************************************
+
+New features
+------------
+
+ - SomeClass, SomeOtherClass
+ * New classes for foo, bar and baz
+
+Optimizations
+-------------
+
+ - Optimized foo in QSomeClass
+ * See list of Important Behavior Changes below
+
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtCore
+------
+
+ - foo
+ * bar
+
+QtGui
+-----
+
+ - foo
+ * bar
+
+QtDBus
+------
+
+ - foo
+ * bar
+
+QtNetwork
+---------
+
+ - foo
+ * bar
+
+QtOpenGL
+--------
+
+ - foo
+ * bar
+
+QtScript
+--------
+
+ - foo
+ * bar
+
+QtSql
+-----
+
+ - foo
+ * bar
+
+QtXml
+-----
+
+ - foo
+ * bar
+
+Qt Plugins
+----------
+
+ - foo
+ * bar
+
+Third party components
+----------------------
+
+ - Updated foo to version 2.3.9.
+
+ - Updated bar to the latest version from baz.org.
+
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+Qt for Unix (X11 and Mac OS X)
+------------------------------
+
+ -
+
+Qt for Linux/X11
+----------------
+
+ -
+
+Qt for Windows
+--------------
+
+ -
+
+Qt for Mac OS X
+---------------
+
+ -
+
+Qt for Embedded Linux
+---------------------
+
+ -
+
+DirectFB
+--------
+
+ -
+
+Qt for Windows CE
+-----------------
+
+ -
+
+****************************************************************************
+* Tools *
+****************************************************************************
+
+ - Designer
+ * foo
+
+ - qdoc3
+ * bar
+
+ - Linguist
+ * baz
+
+****************************************************************************
+* Important Behavior Changes *
+****************************************************************************
+
+ -
+
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index bdc6558..9cda95a 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -648,10 +648,10 @@
These examples show the use of graphics widgets and layouts.
\list
- \o \l{graphicsview/anchorlayouts}{Anchor Layouts}
+ \o \l{graphicsview/anchorlayout}{Anchor Layout}
\o \l{graphicsview/flowlayout}{Flow Layout}
- \o \l{graphicsview/simpleanchorlayouts}{Simple Anchor Layouts}
- \o \l{graphicsview/weatheranchorlayouts}{Weather Anchor Layouts}
+ \o \l{graphicsview/simpleanchorlayout}{Simple Anchor Layout}
+ \o \l{graphicsview/weatheranchorlayout}{Weather Anchor Layout}
\endlist
Some examples demonstrate the use of graphics effects with canvas items.
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 34f2b4b..48e1358 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -1046,7 +1046,7 @@
distributed under the following license.
\legalese
- Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).\br
+ Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).\br
All rights reserved.\br
Contact: Nokia Corporation (qt-info@nokia.com)
diff --git a/doc/src/snippets/qstring/main.cpp b/doc/src/snippets/qstring/main.cpp
index 629586e..3be504c 100644
--- a/doc/src/snippets/qstring/main.cpp
+++ b/doc/src/snippets/qstring/main.cpp
@@ -802,7 +802,7 @@ void Widget::toLowerFunction()
{
//! [75]
QString str = "Qt by NOKIA";
- str = str.toLower(); // str == "qy by nokia"
+ str = str.toLower(); // str == "qt by nokia"
//! [75]
}
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index 755f73f..f3e3c3a 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -46,7 +46,6 @@
#include <qsettings.h>
#include <qdebug.h>
-#define PLUGIN_STUB_DIR "qmakepluginstubs"
#define SYSBIN_DIR "\\sys\\bin"
#define SUFFIX_DLL "dll"
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.h b/qmake/generators/symbian/initprojectdeploy_symbian.h
index 2f43818..e23e6a9 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.h
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.h
@@ -52,6 +52,8 @@
#include "epocroot.h"
+#define PLUGIN_STUB_DIR "qmakepluginstubs"
+
struct CopyItem
{
CopyItem(const QString& f, const QString& t) : from(f) , to(t) { }
diff --git a/qmake/generators/symbian/symmake.cpp b/qmake/generators/symbian/symmake.cpp
index 6e76c9e..20e2d0e 100644
--- a/qmake/generators/symbian/symmake.cpp
+++ b/qmake/generators/symbian/symmake.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "symmake.h"
-#include "initprojectdeploy_symbian.h"
#include <qstring.h>
#include <qhash.h>
@@ -62,6 +61,7 @@
#define BLD_INF_TAG_MMPFILES "prj_mmpfiles"
#define BLD_INF_TAG_TESTMMPFILES "prj_testmmpfiles"
#define BLD_INF_TAG_EXTENSIONS "prj_extensions"
+#define BLD_INF_TAG_EXPORTS "prj_exports"
#define RSS_RULES "RSS_RULES"
#define RSS_RULES_BASE "RSS_RULES."
@@ -202,6 +202,8 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
// Generate pkg files if there are any actual files to deploy
bool generatePkg = false;
+ DeploymentList depList;
+
if (targetType == TypeExe) {
generatePkg = true;
} else {
@@ -214,10 +216,10 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
}
if (generatePkg) {
- generatePkgFile(iconFile);
+ generatePkgFile(iconFile, depList);
}
- writeBldInfContent(t, generatePkg, iconFile);
+ writeBldInfContent(t, generatePkg, iconFile, depList);
// Generate empty wrapper makefile here, because wrapper makefile must exist before writeMkFile,
// but all required data is not yet available.
@@ -272,7 +274,7 @@ bool SymbianMakefileGenerator::writeMakefile(QTextStream &t)
return true;
}
-void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
+void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile, DeploymentList &depList)
{
QString pkgFilename = QString("%1_template.%2")
.arg(fixedTarget)
@@ -396,7 +398,6 @@ void SymbianMakefileGenerator::generatePkgFile(const QString &iconFile)
}
// deploy any additional DEPLOYMENT files
- DeploymentList depList;
QString remoteTestPath;
remoteTestPath = QString("!:\\private\\%1").arg(privateDirUid);
@@ -1171,7 +1172,7 @@ void SymbianMakefileGenerator::writeMmpFileRulesPart(QTextStream& t)
}
}
-void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile)
+void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploymentExtension, const QString &iconFile, DeploymentList &depList)
{
// Read user defined bld inf rules
@@ -1300,6 +1301,25 @@ void SymbianMakefileGenerator::writeBldInfContent(QTextStream &t, bool addDeploy
t << item << endl;
userBldInfRules.remove(BLD_INF_TAG_EXTENSIONS);
+ t << endl << BLD_INF_TAG_EXPORTS << endl << endl;
+
+ // Generate export rules
+
+ // Export any deployed plugin stubs under /epoc32/data/z to support ROM builds
+ for (int i = 0; i < depList.size(); ++i) {
+ int index = depList.at(i).from.indexOf(PLUGIN_STUB_DIR);
+ if (index != -1) {
+ t << QString("%1 /epoc32/data/z%2")
+ .arg(QString(depList.at(i).from).mid(index).replace('\\','/'))
+ .arg(QString(depList.at(i).to).mid(2).replace('\\','/')) << endl;
+ }
+ }
+
+ userItems = userBldInfRules.value(BLD_INF_TAG_EXPORTS);
+ foreach(QString item, userItems)
+ t << item << endl;
+ userBldInfRules.remove(BLD_INF_TAG_EXPORTS);
+
// Add rest of the user defined content
for (QMap<QString, QStringList>::iterator it = userBldInfRules.begin(); it != userBldInfRules.end(); ++it) {
diff --git a/qmake/generators/symbian/symmake.h b/qmake/generators/symbian/symmake.h
index 45209d1..77d61da 100644
--- a/qmake/generators/symbian/symmake.h
+++ b/qmake/generators/symbian/symmake.h
@@ -42,6 +42,7 @@
#ifndef SYMMAKEFILE_H
#define SYMMAKEFILE_H
+#include "initprojectdeploy_symbian.h"
#include <makefile.h>
QT_BEGIN_NAMESPACE
@@ -86,7 +87,7 @@ protected:
QString canonizePath(const QString& origPath);
virtual bool writeMakefile(QTextStream &t);
- void generatePkgFile(const QString &iconFile);
+ void generatePkgFile(const QString &iconFile, DeploymentList &depList);
bool containsStartWithItem(const QChar &c, const QStringList& src);
virtual void init();
@@ -106,7 +107,7 @@ protected:
QString &checkString);
void writeHeader(QTextStream &t);
- void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile);
+ void writeBldInfContent(QTextStream& t, bool addDeploymentExtension, const QString &iconFile, DeploymentList &depList);
static bool removeDuplicatedStrings(QStringList& stringList);
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 2ad6112..c2e033e 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -79,7 +79,7 @@ enum ExpandFunc { E_MEMBER=1, E_FIRST, E_LAST, E_CAT, E_FROMFILE, E_EVAL, E_LIST
E_SPRINTF, E_JOIN, E_SPLIT, E_BASENAME, E_DIRNAME, E_SECTION,
E_FIND, E_SYSTEM, E_UNIQUE, E_QUOTE, E_ESCAPE_EXPAND,
E_UPPER, E_LOWER, E_FILES, E_PROMPT, E_RE_ESCAPE, E_REPLACE,
- E_SIZE };
+ E_SIZE, E_GENERATE_UID };
QMap<QString, ExpandFunc> qmake_expandFunctions()
{
static QMap<QString, ExpandFunc> *qmake_expand_functions = 0;
@@ -111,6 +111,7 @@ QMap<QString, ExpandFunc> qmake_expandFunctions()
qmake_expand_functions->insert("prompt", E_PROMPT);
qmake_expand_functions->insert("replace", E_REPLACE);
qmake_expand_functions->insert("size", E_SIZE);
+ qmake_expand_functions->insert("generate_uid", E_GENERATE_UID);
}
return *qmake_expand_functions;
}
@@ -1864,6 +1865,9 @@ QMakeProject::doProjectExpand(QString func, QStringList args,
return doProjectExpand(func, args_list, place);
}
+// defined in symbian generator
+extern QString generate_test_uid(const QString& target);
+
QStringList
QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
QMap<QString, QStringList> &place)
@@ -2301,6 +2305,14 @@ QMakeProject::doProjectExpand(QString func, QList<QStringList> args_list,
ret += QString::number(size);
}
break; }
+ case E_GENERATE_UID:
+ if (args.count() != 1) {
+ fprintf(stderr, "%s:%d: generate_uid(var) requires one argument.\n",
+ parser.file.toLatin1().constData(), parser.line_no);
+ } else {
+ ret += generate_test_uid(args.first());
+ }
+ break;
default: {
fprintf(stderr, "%s:%d: Unknown replace function: %s\n",
parser.file.toLatin1().constData(), parser.line_no,
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index e292418..b943840 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -10,17 +10,6 @@
(OpaqueJSClass::OpaqueJSClass):
(OpaqueJSClassContextData::OpaqueJSClassContextData):
-2010-01-07 Norbert Leser <norbert.leser@nokia.com>
-
- Reviewed by NOBODY (OOPS!).
-
- Added time-based optimization and increased optimization level to O3,
- conditionally for COMPILER(RVCT),
- for increasing performance of JavaScript execution.
- (Default settings are Ospace and O2)
-
- * runtime/Structure.h:
-
2009-11-19 Thiago Macieira <thiago.macieira@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
index ecdd997..f355c53 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Structure.h
@@ -45,12 +45,6 @@
#define DUMP_PROPERTYMAP_STATS 0
#endif
-#if COMPILER(RVCT)
-#pragma arm
-#pragma Otime
-#pragma O3
-#endif
-
namespace JSC {
class MarkStack;
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 4f33e22..9dd9377 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- 8f6992f4e8f027818429d428393b08068eca9ffa
+ e15bd5454732bab9ffff4e1e5a755f41fd4e2eff
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 02daf86..8e1c965 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,48 @@
+2010-01-17 Srinidhi Shreedhara <srinidhi.shreedhara@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] [Symbian] SetWindow call in npapi plugin does not happen when the cooridnates are negative
+ https://bugs.webkit.org/show_bug.cgi?id=33573
+
+ * plugins/symbian/PluginViewSymbian.cpp:
+ (WebCore::PluginView::setNPWindowIfNeeded): Remove tests for negative
+ coordinates for early return.
+
+2010-01-14 Norbert Leser <norbert.leser@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Platform Symbian specific:
+ Added time-based optimization (-Otime) and increased optimization level to -O3,
+ conditionally for RVCT compiler (for ARM), for increasing performance
+ (primarily affecting JavaScript execution).
+ Default settings are -Ospace and -O2.
+
+ No new tests needed because no new funtionality is introduced,
+ only potential regression on existing tests needs to be evaluated.
+
+ * WebCore.pro:
+
+2010-01-13 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt/Win] Flash in QGraphicsWebView does not process hover correctly.
+
+ https://bugs.webkit.org/show_bug.cgi?id=33591
+
+ Mouse hover does not work as expected with the flash in some sites.
+ - http://www.bbc.co.uk/ Hover over the map
+ - http://www.barbie.com/ Hover over the menu items (Games, Videos)
+ The problem appears to be that Flash queries NPNVnetscapeWindow on every
+ mouse hover. I do not how flash uses this value but returning 0 when flash
+ is in windowless mode solves the problem (When using QGraphicsWebView we
+ inject wmode opaque, thereby putting the plugin in windowless mode).
+
+ * plugins/win/PluginViewWin.cpp:
+ (windowHandleForPageClient):
+
2010-01-13 Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 1489fa0..04aba62 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -23,7 +23,9 @@ symbian: {
TARGET.UID3 = 0x200267C2
# RO text (code) section in qtwebkit.dll exceeds allocated space for gcce udeb target.
# Move RW-section base address to start from 0xE00000 instead of the toolchain default 0x400000.
- QMAKE_LFLAGS.ARMCC += --rw-base 0xE00000
+ MMP_RULES += "LINKEROPTION armcc --rw-base 0xE00000"
+ MMP_RULES += ALWAYS_BUILD_AS_ARM
+ QMAKE_CXXFLAGS.ARMCC += -OTime -O3
}
include($$PWD/../WebKit.pri)
diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
index 14e25b1..cf69723 100644
--- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp
@@ -280,8 +280,6 @@ void PluginView::setNPWindowIfNeeded()
m_npWindow.width = m_windowRect.width();
m_npWindow.height = m_windowRect.height();
- if (m_npWindow.x < 0 || m_npWindow.y < 0 || m_npWindow.width <= 0 || m_npWindow.height <= 0)
- return;
PluginView::setCurrentPluginView(this);
JSC::JSLock::DropAllLocks dropAllLocks(JSC::SilenceAssertionsOnly);
diff --git a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
index b313afb..ab71273 100644
--- a/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/win/PluginViewWin.cpp
@@ -86,7 +86,9 @@ static inline HWND windowHandleForPageClient(PlatformPageClient client)
#if PLATFORM(QT)
if (!client)
return 0;
- return client->ownerWidget()->winId();
+ if (QWidget* pluginParent = qobject_cast<QWidget*>(client->pluginParent()))
+ return pluginParent->winId();
+ return 0;
#else
return client;
#endif
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 6d08c32..a289ec0 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -1708,8 +1708,14 @@ QWebPage::~QWebPage()
FrameLoader *loader = d->mainFrame->d->frame->loader();
if (loader)
loader->detachFromParent();
- if (d->inspector)
- d->inspector->setPage(0);
+ if (d->inspector) {
+ // Since we have to delete an internal inspector,
+ // call setInspector(0) directly to prevent potential crashes
+ if (d->inspectorIsInternalOnly)
+ d->setInspector(0);
+ else
+ d->inspector->setPage(0);
+ }
delete d;
}
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index cd47982..ee555f3 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-19 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Fix QWebInspector destruction problem.
+ https://bugs.webkit.org/show_bug.cgi?id=31664
+
+ * Api/qwebpage.cpp:
+ (QWebPage::~QWebPage):
+
2010-01-14 Simon Hausmann <simon.hausmann@nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/src/corelib/animation/qpropertyanimation.cpp b/src/corelib/animation/qpropertyanimation.cpp
index ea807db..19b493d 100644
--- a/src/corelib/animation/qpropertyanimation.cpp
+++ b/src/corelib/animation/qpropertyanimation.cpp
@@ -256,7 +256,8 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
Q_D(QPropertyAnimation);
if (!d->target && oldState == Stopped) {
- qWarning("QPropertyAnimation::updateState: Changing state of an animation without target");
+ qWarning("QPropertyAnimation::updateState (%s): Changing state of an animation without target",
+ d->propertyName.constData());
return;
}
@@ -281,10 +282,16 @@ void QPropertyAnimation::updateState(QAbstractAnimation::State newState,
if (oldState == Stopped) {
d->setDefaultStartEndValue(d->targetValue->property(d->propertyName.constData()));
//let's check if we have a start value and an end value
- if (!startValue().isValid() && (d->direction == Backward || !d->defaultStartEndValue.isValid()))
- qWarning("QPropertyAnimation::updateState: starting an animation without start value");
- if (!endValue().isValid() && (d->direction == Forward || !d->defaultStartEndValue.isValid()))
- qWarning("QPropertyAnimation::updateState: starting an animation without end value");
+ if (!startValue().isValid() && (d->direction == Backward || !d->defaultStartEndValue.isValid())) {
+ qWarning("QPropertyAnimation::updateState (%s, %s, %s): starting an animation without start value",
+ d->propertyName.constData(), d->target.data()->metaObject()->className(),
+ qPrintable(d->target.data()->objectName()));
+ }
+ if (!endValue().isValid() && (d->direction == Forward || !d->defaultStartEndValue.isValid())) {
+ qWarning("QPropertyAnimation::updateState (%s, %s, %s): starting an animation without end value",
+ d->propertyName.constData(), d->target.data()->metaObject()->className(),
+ qPrintable(d->target.data()->objectName()));
+ }
}
} else if (hash.value(key) == this) {
hash.remove(key);
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 4c7f3f0..728c316 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -650,7 +650,7 @@ QFile::remove()
unsetError();
return true;
}
- d->setError(QFile::RemoveError, fileEngine()->errorString());
+ d->setError(QFile::RemoveError, d->fileEngine->errorString());
}
return false;
}
@@ -704,7 +704,7 @@ QFile::rename(const QString &newName)
if (fileEngine()->rename(newName)) {
unsetError();
// engine was able to handle the new name so we just reset it
- fileEngine()->setFileName(newName);
+ d->fileEngine->setFileName(newName);
d->fileName = newName;
return true;
}
@@ -740,7 +740,7 @@ QFile::rename(const QString &newName)
if (error) {
out.remove();
} else {
- fileEngine()->setFileName(newName);
+ d->fileEngine->setFileName(newName);
setPermissions(permissions());
unsetError();
setFileName(newName);
@@ -805,7 +805,7 @@ QFile::link(const QString &linkName)
unsetError();
return true;
}
- d->setError(QFile::RenameError, fileEngine()->errorString());
+ d->setError(QFile::RenameError, d->fileEngine->errorString());
return false;
}
@@ -994,10 +994,10 @@ bool QFile::open(OpenMode mode)
seek(size());
return true;
}
- QFile::FileError err = fileEngine()->error();
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::OpenError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
return false;
}
@@ -1152,12 +1152,11 @@ bool QFile::open(int fd, OpenMode mode)
int
QFile::handle() const
{
- if (!isOpen())
+ Q_D(const QFile);
+ if (!isOpen() || !d->fileEngine)
return -1;
- if (QAbstractFileEngine *engine = fileEngine())
- return engine->handle();
- return -1;
+ return d->fileEngine->handle();
}
/*!
@@ -1189,13 +1188,12 @@ QFile::handle() const
uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags)
{
Q_D(QFile);
- QAbstractFileEngine *engine = fileEngine();
- if (engine
- && engine->supportsExtension(QAbstractFileEngine::MapExtension)) {
+ if (fileEngine()
+ && d->fileEngine->supportsExtension(QAbstractFileEngine::MapExtension)) {
unsetError();
- uchar *address = engine->map(offset, size, flags);
+ uchar *address = d->fileEngine->map(offset, size, flags);
if (address == 0)
- d->setError(engine->error(), engine->errorString());
+ d->setError(d->fileEngine->error(), d->fileEngine->errorString());
return address;
}
return 0;
@@ -1212,13 +1210,12 @@ uchar *QFile::map(qint64 offset, qint64 size, MemoryMapFlags flags)
bool QFile::unmap(uchar *address)
{
Q_D(QFile);
- QAbstractFileEngine *engine = fileEngine();
- if (engine
- && engine->supportsExtension(QAbstractFileEngine::UnMapExtension)) {
+ if (fileEngine()
+ && d->fileEngine->supportsExtension(QAbstractFileEngine::UnMapExtension)) {
unsetError();
- bool success = engine->unmap(address);
+ bool success = d->fileEngine->unmap(address);
if (!success)
- d->setError(engine->error(), engine->errorString());
+ d->setError(d->fileEngine->error(), d->fileEngine->errorString());
return success;
}
return false;
@@ -1251,13 +1248,14 @@ QFile::resize(qint64 sz)
Q_D(QFile);
if (!d->ensureFlushed())
return false;
- if (isOpen() && fileEngine()->pos() > sz)
+ fileEngine();
+ if (isOpen() && d->fileEngine->pos() > sz)
seek(sz);
- if(fileEngine()->setSize(sz)) {
+ if(d->fileEngine->setSize(sz)) {
unsetError();
return true;
}
- d->setError(QFile::ResizeError, fileEngine()->errorString());
+ d->setError(QFile::ResizeError, d->fileEngine->errorString());
return false;
}
@@ -1321,7 +1319,7 @@ QFile::setPermissions(Permissions permissions)
unsetError();
return true;
}
- d->setError(QFile::PermissionsError, fileEngine()->errorString());
+ d->setError(QFile::PermissionsError, d->fileEngine->errorString());
return false;
}
@@ -1354,23 +1352,27 @@ bool
QFile::flush()
{
Q_D(QFile);
+ if (!d->fileEngine) {
+ qWarning("QFile::flush: No file engine. Is IODevice open?");
+ return false;
+ }
+
if (!d->writeBuffer.isEmpty()) {
qint64 size = d->writeBuffer.size();
- if (_qfile_writeData(d->fileEngine ? d->fileEngine : fileEngine(),
- &d->writeBuffer) != size) {
- QFile::FileError err = fileEngine()->error();
+ if (_qfile_writeData(d->fileEngine, &d->writeBuffer) != size) {
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::WriteError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
return false;
}
}
- if (!fileEngine()->flush()) {
- QFile::FileError err = fileEngine()->error();
+ if (!d->fileEngine->flush()) {
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::WriteError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
return false;
}
return true;
@@ -1395,10 +1397,10 @@ QFile::close()
d->writeBuffer.clear();
// keep earlier error from flush
- if (fileEngine()->close() && flushed)
+ if (d->fileEngine->close() && flushed)
unsetError();
else if (flushed)
- d->setError(fileEngine()->error(), fileEngine()->errorString());
+ d->setError(d->fileEngine->error(), d->fileEngine->errorString());
}
/*!
@@ -1451,10 +1453,10 @@ bool QFile::atEnd() const
return false;
// If the file engine knows best, say what it says.
- if (fileEngine()->supportsExtension(QAbstractFileEngine::AtEndExtension)) {
+ if (d->fileEngine->supportsExtension(QAbstractFileEngine::AtEndExtension)) {
// Check if the file engine supports AtEndExtension, and if it does,
// check if the file engine claims to be at the end.
- return fileEngine()->atEnd();
+ return d->fileEngine->atEnd();
}
// Fall back to checking how much is available (will stat files).
@@ -1476,11 +1478,11 @@ bool QFile::seek(qint64 off)
if (!d->ensureFlushed())
return false;
- if (!fileEngine()->seek(off) || !QIODevice::seek(off)) {
- QFile::FileError err = fileEngine()->error();
+ if (!d->fileEngine->seek(off) || !QIODevice::seek(off)) {
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::PositionError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
return false;
}
unsetError();
@@ -1496,8 +1498,8 @@ qint64 QFile::readLineData(char *data, qint64 maxlen)
if (!d->ensureFlushed())
return -1;
- if (fileEngine()->supportsExtension(QAbstractFileEngine::FastReadLineExtension))
- return fileEngine()->readLine(data, maxlen);
+ if (d->fileEngine->supportsExtension(QAbstractFileEngine::FastReadLineExtension))
+ return d->fileEngine->readLine(data, maxlen);
// Fall back to QIODevice's readLine implementation if the engine
// cannot do it faster.
@@ -1515,18 +1517,14 @@ qint64 QFile::readData(char *data, qint64 len)
if (!d->ensureFlushed())
return -1;
- qint64 ret = -1;
- qint64 read = fileEngine()->read(data, len);
- if (read != -1)
- ret = read;
-
- if(ret < 0) {
- QFile::FileError err = fileEngine()->error();
+ qint64 read = d->fileEngine->read(data, len);
+ if(read < 0) {
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::ReadError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
}
- return ret;
+ return read;
}
/*!
@@ -1606,13 +1604,12 @@ QFile::writeData(const char *data, qint64 len)
// Write directly to the engine if the block size is larger than
// the write buffer size.
if (!buffered || len > QFILE_WRITEBUFFER_SIZE) {
- QAbstractFileEngine *fe = d->fileEngine ? d->fileEngine : fileEngine();
- qint64 ret = fe->write(data, len);
+ qint64 ret = d->fileEngine->write(data, len);
if(ret < 0) {
- QFile::FileError err = fileEngine()->error();
+ QFile::FileError err = d->fileEngine->error();
if(err == QFile::UnspecifiedError)
err = QFile::WriteError;
- d->setError(err, fileEngine()->errorString());
+ d->setError(err, d->fileEngine->errorString());
}
return ret;
}
diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp
index 1b167e2..3f69b4f 100644
--- a/src/corelib/kernel/qcoreevent.cpp
+++ b/src/corelib/kernel/qcoreevent.cpp
@@ -107,13 +107,13 @@ QT_BEGIN_NAMESPACE
\value ApplicationLayoutDirectionChange The default application layout direction has changed.
\value ApplicationPaletteChange The default application palette has changed.
\value ApplicationWindowIconChange The application's icon has changed.
- \value CloseSoftwareInputPanel A widget wants to close the software input panel (SIP).
\value ChildAdded An object gets a child (QChildEvent).
\value ChildInserted An object gets a child (QChildEvent). Qt3Support only, use ChildAdded instead.
\value ChildPolished A widget child gets polished (QChildEvent).
\value ChildRemoved An object loses a child (QChildEvent).
\value Clipboard The clipboard contents have changed (QClipboardEvent).
\value Close Widget was closed (QCloseEvent).
+ \value CloseSoftwareInputPanel A widget wants to close the software input panel (SIP).
\value ContentsRectChange The margins of the widget's content rect changed.
\value ContextMenu Context popup menu (QContextMenuEvent).
\value CursorChange The widget's cursor has changed.
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index 4bd924e..a176149 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -130,14 +130,16 @@ struct QMetaObjectPrivate
#ifndef QT_NO_QOBJECT
//defined in qobject.cpp
+ enum DisconnectType { DisconnectAll, DisconnectOne };
static bool connect(const QObject *sender, int signal_index,
const QObject *receiver, int method_index,
int type = 0, int *types = 0);
static bool disconnect(const QObject *sender, int signal_index,
- const QObject *receiver, int method_index);
+ const QObject *receiver, int method_index,
+ DisconnectType = DisconnectAll);
static inline bool disconnectHelper(QObjectPrivate::Connection *c,
const QObject *receiver, int method_index,
- QMutex *senderMutex);
+ QMutex *senderMutex, DisconnectType);
#endif
};
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index def9b86..761b31f 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -2959,7 +2959,6 @@ bool QMetaObjectPrivate::connect(const QObject *sender, int signal_index,
return true;
}
-
/*!\internal
*/
bool QMetaObject::disconnect(const QObject *sender, int signal_index,
@@ -2970,12 +2969,27 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index,
receiver, method_index);
}
+/*!\internal
+
+Disconnect a single signal connection. If QMetaObject::connect() has been called
+multiple times for the same sender, signal_index, receiver and method_index only
+one of these connections will be removed.
+ */
+bool QMetaObject::disconnectOne(const QObject *sender, int signal_index,
+ const QObject *receiver, int method_index)
+{
+ signal_index = methodIndexToSignalIndex(sender->metaObject(), signal_index);
+ return QMetaObjectPrivate::disconnect(sender, signal_index,
+ receiver, method_index,
+ QMetaObjectPrivate::DisconnectOne);
+}
+
/*! \internal
Helper function to remove the connection from the senders list and setting the receivers to 0
*/
bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
const QObject *receiver, int method_index,
- QMutex *senderMutex)
+ QMutex *senderMutex, DisconnectType disconnectType)
{
bool success = false;
while (c) {
@@ -3001,6 +3015,9 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
c->receiver = 0;
success = true;
+
+ if (disconnectType == DisconnectOne)
+ return success;
}
c = c->nextConnectionList;
}
@@ -3011,7 +3028,8 @@ bool QMetaObjectPrivate::disconnectHelper(QObjectPrivate::Connection *c,
Same as the QMetaObject::disconnect, but \a signal_index must be the result of QObjectPrivate::signalIndex
*/
bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index,
- const QObject *receiver, int method_index)
+ const QObject *receiver, int method_index,
+ DisconnectType disconnectType)
{
if (!sender)
return false;
@@ -3035,7 +3053,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index,
for (signal_index = -1; signal_index < connectionLists->count(); ++signal_index) {
QObjectPrivate::Connection *c =
(*connectionLists)[signal_index].first;
- if (disconnectHelper(c, receiver, method_index, senderMutex)) {
+ if (disconnectHelper(c, receiver, method_index, senderMutex, disconnectType)) {
success = true;
connectionLists->dirty = true;
}
@@ -3043,7 +3061,7 @@ bool QMetaObjectPrivate::disconnect(const QObject *sender, int signal_index,
} else if (signal_index < connectionLists->count()) {
QObjectPrivate::Connection *c =
(*connectionLists)[signal_index].first;
- if (disconnectHelper(c, receiver, method_index, senderMutex)) {
+ if (disconnectHelper(c, receiver, method_index, senderMutex, disconnectType)) {
success = true;
connectionLists->dirty = true;
}
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index a0d9cf3..8ed7f3f 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -334,6 +334,8 @@ struct Q_CORE_EXPORT QMetaObject
// internal index-based disconnect
static bool disconnect(const QObject *sender, int signal_index,
const QObject *receiver, int method_index);
+ static bool disconnectOne(const QObject *sender, int signal_index,
+ const QObject *receiver, int method_index);
// internal slot-name based connect
static void connectSlotsByName(QObject *o);
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index ba5ef5d..5dc931b 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -538,7 +538,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
forever {
ulong alloc = len;
- d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + alloc))));
+ d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.take(), sizeof(QByteArray::Data) + alloc))));
if (!d) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");
@@ -551,7 +551,7 @@ QByteArray qUncompress(const uchar* data, int nbytes)
switch (res) {
case Z_OK:
if (len != alloc) {
- d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.data(), sizeof(QByteArray::Data) + len))));
+ d.reset(q_check_ptr(static_cast<QByteArray::Data *>(qRealloc(d.take(), sizeof(QByteArray::Data) + len))));
if (!d) {
// we are not allowed to crash here when compiling with QT_NO_EXCEPTIONS
qWarning("qUncompress: could not allocate enough memory to uncompress data");
diff --git a/src/gui/dialogs/qcolordialog.cpp b/src/gui/dialogs/qcolordialog.cpp
index e9031ac..83ecc30 100644
--- a/src/gui/dialogs/qcolordialog.cpp
+++ b/src/gui/dialogs/qcolordialog.cpp
@@ -68,6 +68,10 @@
#include "private/qt_s60_p.h"
#endif
+#if defined(Q_WS_S60) || defined(Q_WS_MAEMO_5)
+# define QT_SMALL_COLORDIALOG
+#endif
+
QT_BEGIN_NAMESPACE
//////////// QWellArray BEGIN
@@ -1072,14 +1076,17 @@ QColorShower::QColorShower(QColorDialog *parent)
gl->setMargin(gl->spacing());
lab = new QColorShowLabel(this);
-#ifdef Q_WS_S60
+#ifdef QT_SMALL_COLORDIALOG
+# ifdef Q_WS_S60
QS60Data s60Data = QS60Data();
const bool nonTouchUI = !s60Data.hasTouchscreen;
+# elif defined Q_WS_MAEMO_5
+ const bool nonTouchUI = false;
+# endif
#endif
-
#ifndef Q_WS_WINCE
-#ifdef Q_WS_S60
+#ifdef QT_SMALL_COLORDIALOG
lab->setMinimumHeight(60);
#endif
lab->setMinimumWidth(60);
@@ -1090,7 +1097,7 @@ QColorShower::QColorShower(QColorDialog *parent)
// In S60, due to small screen and different screen layouts need to re-arrange the widgets.
// For QVGA screens only the comboboxes and color label are visible.
// For nHD screens only color and luminence pickers and color label are visible.
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lab, 0, 0, -1, 1);
#else
if (nonTouchUI)
@@ -1108,7 +1115,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblHue->setBuddy(hEd);
#endif
lblHue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblHue, 0, 1);
gl->addWidget(hEd, 0, 2);
#else
@@ -1127,7 +1134,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblSat->setBuddy(sEd);
#endif
lblSat->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblSat, 1, 1);
gl->addWidget(sEd, 1, 2);
#else
@@ -1146,7 +1153,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblVal->setBuddy(vEd);
#endif
lblVal->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblVal, 2, 1);
gl->addWidget(vEd, 2, 2);
#else
@@ -1165,7 +1172,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblRed->setBuddy(rEd);
#endif
lblRed->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblRed, 0, 3);
gl->addWidget(rEd, 0, 4);
#else
@@ -1184,7 +1191,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblGreen->setBuddy(gEd);
#endif
lblGreen->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblGreen, 1, 3);
gl->addWidget(gEd, 1, 4);
#else
@@ -1203,7 +1210,7 @@ QColorShower::QColorShower(QColorDialog *parent)
lblBlue->setBuddy(bEd);
#endif
lblBlue->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(lblBlue, 2, 3);
gl->addWidget(bEd, 2, 4);
#else
@@ -1222,7 +1229,7 @@ QColorShower::QColorShower(QColorDialog *parent)
alphaLab->setBuddy(alphaEd);
#endif
alphaLab->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
-#ifndef Q_WS_S60
+#if !defined(QT_SMALL_COLORDIALOG)
gl->addWidget(alphaLab, 3, 1, 1, 3);
gl->addWidget(alphaEd, 3, 4);
#else
@@ -1467,7 +1474,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay = 0;
-#if (defined(Q_WS_WINCE) || defined(Q_WS_S60))
+#if defined(Q_WS_WINCE) || defined(QT_SMALL_COLORDIALOG)
smallDisplay = true;
const int lumSpace = 20;
#else
@@ -1497,9 +1504,13 @@ void QColorDialogPrivate::init(const QColor &initial)
}
#endif
-#if defined(Q_WS_S60)
+#if defined(QT_SMALL_COLORDIALOG)
+# if defined(Q_WS_S60)
QS60Data s60Data = QS60Data();
const bool nonTouchUI = !s60Data.hasTouchscreen;
+# elif defined(Q_WS_MAEMO_5)
+ const bool nonTouchUI = false;
+# endif
#endif
if (!smallDisplay) {
@@ -1532,7 +1543,7 @@ void QColorDialogPrivate::init(const QColor &initial)
leftLay->addWidget(addCusBt);
} else {
// better color picker size for small displays
-#ifdef Q_WS_S60
+#if defined(QT_SMALL_COLORDIALOG)
QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
pWidth = pHeight = qMin(screenSize.width(), screenSize.height());
pHeight -= 20;
@@ -1558,7 +1569,7 @@ void QColorDialogPrivate::init(const QColor &initial)
cp->setFrameStyle(QFrame::Panel + QFrame::Sunken);
-#if defined(Q_WS_S60)
+#if defined(QT_SMALL_COLORDIALOG)
if (!nonTouchUI) {
pickLay->addWidget(cp);
cLay->addSpacing(lumSpace);
@@ -1572,7 +1583,7 @@ void QColorDialogPrivate::init(const QColor &initial)
cLay->addSpacing(lumSpace);
lp = new QColorLuminancePicker(q);
-#if defined(Q_WS_S60)
+#if defined(QT_SMALL_COLORDIALOG)
QSize screenSize = QApplication::desktop()->availableGeometry(QCursor::pos()).size();
const int minDimension = qMin(screenSize.height(), screenSize.width());
//set picker to be finger-usable
@@ -1596,7 +1607,7 @@ void QColorDialogPrivate::init(const QColor &initial)
QObject::connect(cs, SIGNAL(newCol(QRgb)), q, SLOT(_q_newColorTypedIn(QRgb)));
QObject::connect(cs, SIGNAL(currentColorChanged(QColor)),
q, SIGNAL(currentColorChanged(QColor)));
-#if defined(Q_WS_S60)
+#if defined(QT_SMALL_COLORDIALOG)
if (!nonTouchUI)
pWidth -= cp->size().width();
topLay->addWidget(cs);
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index cae9660..1361a89 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2997,9 +2997,16 @@ void QGraphicsItem::setActive(bool active)
*/
bool QGraphicsItem::hasFocus() const
{
+ if (!d_ptr->scene || !d_ptr->scene->isActive())
+ return false;
+
if (d_ptr->focusProxy)
return d_ptr->focusProxy->hasFocus();
- return isActive() && (d_ptr->scene && d_ptr->scene->focusItem() == this);
+
+ if (d_ptr->scene->d_func()->focusItem != this)
+ return false;
+
+ return panel() == d_ptr->scene->d_func()->activePanel;
}
/*!
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index ce9629c..5626485 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -833,14 +833,21 @@ bool QPixmap::load(const QString &fileName, const char *format, Qt::ImageConvers
if (QPixmapCache::find(key, *this))
return true;
- QPixmapData *tmp = QPixmapData::create(0, 0, QPixmapData::PixmapType);
- if (tmp->fromFile(fileName, format, flags)) {
- data = tmp;
- QPixmapCache::insert(key, *this);
- return true;
+ bool ok;
+
+ if (data) {
+ ok = data->fromFile(fileName, format, flags);
+ } else {
+ QScopedPointer<QPixmapData> tmp(QPixmapData::create(0, 0, QPixmapData::PixmapType));
+ ok = tmp->fromFile(fileName, format, flags);
+ if (ok)
+ data = tmp.take();
}
- delete tmp;
- return false;
+
+ if (ok)
+ QPixmapCache::insert(key, *this);
+
+ return ok;
}
/*!
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 2cda8e2..a796048 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -504,9 +504,9 @@ public:
static TUint resolveS60ScanCode(TInt scanCode, TUint keysym);
QSet<WId> nativeWindows;
- int symbianProcessWsEvent(const TWsEvent *event);
- int symbianHandleCommand(int command);
- int symbianResourceChange(int type);
+ int symbianProcessWsEvent(const QSymbianEvent *symbianEvent);
+ int symbianHandleCommand(const QSymbianEvent *symbianEvent);
+ int symbianResourceChange(const QSymbianEvent *symbianEvent);
#endif
#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS)
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8c77728..361d231 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1528,6 +1528,12 @@ void QApplication::beep()
qt_S60Beep->Play();
}
+static inline bool callSymbianEventFilters(const QSymbianEvent *event)
+{
+ long unused;
+ return qApp->filterEvent(const_cast<QSymbianEvent *>(event), &unused);
+}
+
/*!
\warning This function is only available on Symbian.
\since 4.6
@@ -1544,6 +1550,9 @@ int QApplication::symbianProcessEvent(const QSymbianEvent *event)
QScopedLoopLevelCounter counter(d->threadData);
+ if (d->eventDispatcher->filterEvent(const_cast<QSymbianEvent *>(event)))
+ return 1;
+
QWidget *w = qApp ? qApp->focusWidget() : 0;
if (w) {
QInputContext *ic = w->inputContext();
@@ -1556,29 +1565,34 @@ int QApplication::symbianProcessEvent(const QSymbianEvent *event)
switch (event->type()) {
case QSymbianEvent::WindowServerEvent:
- return d->symbianProcessWsEvent(event->windowServerEvent());
+ return d->symbianProcessWsEvent(event);
case QSymbianEvent::CommandEvent:
- return d->symbianHandleCommand(event->command());
+ return d->symbianHandleCommand(event);
case QSymbianEvent::ResourceChangeEvent:
- return d->symbianResourceChange(event->resourceChangeType());
+ return d->symbianResourceChange(event);
default:
return -1;
}
}
-int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
+int QApplicationPrivate::symbianProcessWsEvent(const QSymbianEvent *symbianEvent)
{
// Qt event handling. Handle some events regardless of if the handle is in our
// widget map or not.
+ const TWsEvent *event = symbianEvent->windowServerEvent();
CCoeControl* control = reinterpret_cast<CCoeControl*>(event->Handle());
const bool controlInMap = QWidgetPrivate::mapper && QWidgetPrivate::mapper->contains(control);
switch (event->Type()) {
case EEventPointerEnter:
- if (controlInMap)
+ if (controlInMap) {
+ callSymbianEventFilters(symbianEvent);
return 1; // Qt::Enter will be generated in HandlePointerL
+ }
break;
case EEventPointerExit:
if (controlInMap) {
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
if (S60) {
// mouseEvent outside our window, send leave event to last focused widget
QMouseEvent mEvent(QEvent::Leave, S60->lastPointerEventPos, S60->lastCursorPos,
@@ -1591,6 +1605,8 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
}
break;
case EEventScreenDeviceChanged:
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
if (S60)
S60->updateScreenSize();
if (qt_desktopWidget) {
@@ -1603,6 +1619,8 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
return 0; // Propagate to CONE
case EEventWindowVisibilityChanged:
if (controlInMap) {
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
const TWsVisibilityChangedEvent *visChangedEvent = event->VisibilityChanged();
QWidget *w = QWidgetPrivate::mapper->value(control);
if (!w->d_func()->maybeTopData())
@@ -1620,6 +1638,8 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
}
break;
case EEventFocusGained:
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
#ifndef QT_NO_CURSOR
//re-enable mouse interaction
if (S60->mouseInteractionEnabled) {
@@ -1633,6 +1653,8 @@ int QApplicationPrivate::symbianProcessWsEvent(const TWsEvent *event)
#endif
break;
case EEventFocusLost:
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
#ifndef QT_NO_CURSOR
//disable mouse as may be moving to application that does not support it
if (S60->mouseInteractionEnabled) {
@@ -1684,11 +1706,16 @@ bool QApplication::symbianEventFilter(const QSymbianEvent *event)
\sa s60EventFilter(), s60ProcessEvent()
*/
-int QApplicationPrivate::symbianHandleCommand(int command)
+int QApplicationPrivate::symbianHandleCommand(const QSymbianEvent *symbianEvent)
{
Q_Q(QApplication);
int ret = 0;
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
+
+ int command = symbianEvent->command();
+
switch (command) {
#ifdef Q_WS_S60
case EAknSoftkeyExit: {
@@ -1728,14 +1755,18 @@ int QApplicationPrivate::symbianHandleCommand(int command)
Currently, KEikDynamicLayoutVariantSwitch and
KAknsMessageSkinChange are handled.
*/
-int QApplicationPrivate::symbianResourceChange(int type)
+int QApplicationPrivate::symbianResourceChange(const QSymbianEvent *symbianEvent)
{
int ret = 0;
+ int type = symbianEvent->resourceChangeType();
+
switch (type) {
#ifdef Q_WS_S60
case KEikDynamicLayoutVariantSwitch:
{
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
if (S60)
S60->updateScreenSize();
@@ -1760,6 +1791,8 @@ int QApplicationPrivate::symbianResourceChange(int type)
#ifndef QT_NO_STYLE_S60
case KAknsMessageSkinChange:
+ if (callSymbianEventFilters(symbianEvent))
+ return 1;
if (QS60Style *s60Style = qobject_cast<QS60Style*>(QApplication::style())) {
s60Style->d_func()->handleSkinChange();
ret = 1;
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 477d4b7..b4bb8bf 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -464,7 +464,7 @@ extern "C" {
}
// Make sure the opengl context is updated on resize.
- if (0 && qwidgetprivate->isGLWidget) {
+ if (qwidgetprivate->isGLWidget) {
qwidgetprivate->needWindowChange = true;
QEvent event(QEvent::MacGLWindowChange);
qApp->sendEvent(qwidget, &event);
diff --git a/src/gui/kernel/qformlayout.cpp b/src/gui/kernel/qformlayout.cpp
index b44cd50..aebc3a5 100644
--- a/src/gui/kernel/qformlayout.cpp
+++ b/src/gui/kernel/qformlayout.cpp
@@ -1925,11 +1925,11 @@ void QFormLayoutPrivate::arrangeWidgets(const QVector<QLayoutStruct>& layouts, Q
/*
If the field on the right-hand side is tall,
we want the label to be top-aligned, but not too
- much. So we introduce a 5 / 4 factor so that it
- gets a few extra pixels at the top.
+ much. So we introduce a 7 / 4 factor so that it
+ gets some extra pixels at the top.
*/
height = qMin(height,
- qMin(label->sizeHint.height() * 5 / 4,
+ qMin(label->sizeHint.height() * 7 / 4,
label->maxSize.height()));
}
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e30bf95..d52ac77 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -110,6 +110,7 @@
#include "qevent_p.h"
#include "qdnd_p.h"
#include <QtGui/qgraphicsproxywidget.h>
+#include "qmainwindow.h"
QT_BEGIN_NAMESPACE
@@ -1721,6 +1722,15 @@ bool QWidgetPrivate::qt_widget_rgn(QWidget *widget, short wcode, RgnHandle rgn,
void QWidgetPrivate::determineWindowClass()
{
Q_Q(QWidget);
+#if !defined(QT_NO_MAINWINDOW) && !defined(QT_NO_TOOLBAR)
+ // Make sure that QMainWindow has the MacWindowToolBarButtonHint when the
+ // unifiedTitleAndToolBarOnMac property is ON. This is to avoid reentry of
+ // setParent() triggered by the QToolBar::event(QEvent::ParentChange).
+ QMainWindow *mainWindow = qobject_cast<QMainWindow *>(q);
+ if (mainWindow && mainWindow->unifiedTitleAndToolBarOnMac()) {
+ data.window_flags |= Qt::MacWindowToolBarButtonHint;
+ }
+#endif
#ifndef QT_MAC_USE_COCOA
// ### COCOA:Interleave these better!
@@ -2808,7 +2818,9 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
}
if (wasWindow) {
oldToolbar = [oldWindow toolbar];
+ [oldToolbar retain];
oldToolbarVisible = [oldToolbar isVisible];
+ [oldWindow setToolbar:nil];
}
#endif
}
@@ -2852,6 +2864,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f)
if (oldToolbar && !(f & Qt::FramelessWindowHint)) {
OSWindowRef newWindow = qt_mac_window_for(q);
[newWindow setToolbar:oldToolbar];
+ [oldToolbar release];
[oldToolbar setVisible:oldToolbarVisible];
}
#endif
@@ -3474,6 +3487,38 @@ void QWidgetPrivate::hide_sys()
ShowHide(window, false);
#else
[window orderOut:window];
+ // Unfortunately it is not as easy as just hiding the window, we need
+ // to find out if we were in full screen mode. If we were and this is
+ // the last window in full screen mode then we need to unset the full screen
+ // mode. If this is not the last visible window in full screen mode then we
+ // don't change the full screen mode.
+ if(q->isFullScreen())
+ {
+ bool keepFullScreen = false;
+ QWidgetList windowList = qApp->topLevelWidgets();
+ int windowCount = windowList.count();
+ for(int i = 0; i < windowCount; i++)
+ {
+ QWidget *w = windowList[i];
+ // If it is the same window, we don't need to check :-)
+ if(q == w)
+ continue;
+ // If they are not visible or if they are minimized then
+ // we just ignore them.
+ if(!w->isVisible() || w->isMinimized())
+ continue;
+ // Is it full screen?
+ // Notice that if there is one window in full screen mode then we
+ // cannot switch the full screen mode off, therefore we just abort.
+ if(w->isFullScreen()) {
+ keepFullScreen = true;
+ break;
+ }
+ }
+ // No windows in full screen mode, so let just unset that flag.
+ if(!keepFullScreen)
+ qt_mac_set_fullscreen_mode(false);
+ }
#endif
toggleDrawers(false);
#ifndef QT_MAC_USE_COCOA
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index a9dcea0..31132d9 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1374,9 +1374,6 @@ void QPainterPrivate::updateState(QPainterState *newState)
opacity with non-smooth transformation mode
(\c QPainter::SmoothPixmapTransform not enabled as a render hint).
- \o Text drawing with regular font sizes with simple
- transformations with solid colors using no or 8-bit antialiasing.
-
\o Rectangle fills with solid color, two-color linear gradients
and simple transforms.
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index e41c2be..ee79f5a 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -476,6 +476,17 @@ void QMainWindowLayout::cleanUpMacToolbarItems()
CFRelease(toolbarItemsCopy.at(i));
toolbarItemsCopy.clear();
unifiedToolbarHash.clear();
+
+#ifdef QT_MAC_USE_COCOA
+ QMacCocoaAutoReleasePool pool;
+
+ OSWindowRef window = qt_mac_window_for(layoutState.mainWindow);
+ NSToolbar *macToolbar = [window toolbar];
+ if (macToolbar) {
+ [[macToolbar delegate] release];
+ [macToolbar setDelegate:nil];
+ }
+#endif
}
void QMainWindowLayout::fixSizeInUnifiedToolbar(QToolBar *tb) const
diff --git a/src/network/access/qfilenetworkreply.cpp b/src/network/access/qfilenetworkreply.cpp
index 44dd9e7..8c5065c 100644
--- a/src/network/access/qfilenetworkreply.cpp
+++ b/src/network/access/qfilenetworkreply.cpp
@@ -44,35 +44,32 @@
#include "QtCore/qdatetime.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QFileInfo>
+#include <QDebug>
QT_BEGIN_NAMESPACE
QFileNetworkReplyPrivate::QFileNetworkReplyPrivate()
- : QNetworkReplyPrivate(), realFileSize(0), finished(false)
+ : QNetworkReplyPrivate(), realFileSize(0)
{
}
-QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req)
+QFileNetworkReply::~QFileNetworkReply()
+{
+}
+
+QFileNetworkReply::QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op)
: QNetworkReply(*new QFileNetworkReplyPrivate(), parent)
{
setRequest(req);
setUrl(req.url());
- setOperation(QNetworkAccessManager::GetOperation);
- QMetaObject::invokeMethod(this, "_q_startOperation", Qt::QueuedConnection);
+ setOperation(op);
QNetworkReply::open(QIODevice::ReadOnly);
-}
-QFileNetworkReply::~QFileNetworkReply()
-{
-}
+ qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
-// This code is mostly inspired by QNetworkAccessFileBackend
-// We also use its translation context for error messages
-void QFileNetworkReplyPrivate::_q_startOperation()
-{
- Q_Q(QFileNetworkReply);
+ QFileNetworkReplyPrivate *d = (QFileNetworkReplyPrivate*) d_func();
- QUrl url = q->url();
+ QUrl url = req.url();
if (url.host() == QLatin1String("localhost"))
url.setHost(QString());
@@ -81,81 +78,75 @@ void QFileNetworkReplyPrivate::_q_startOperation()
if (!url.host().isEmpty()) {
// we handle only local files
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Request for opening non-local file %1").arg(url.toString());
- q->setError(QNetworkReply::ProtocolInvalidOperationError, msg);
- emit q->error(QNetworkReply::ProtocolInvalidOperationError);
- doFinished();
+ setError(QNetworkReply::ProtocolInvalidOperationError, msg);
+ QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ProtocolInvalidOperationError));
+ QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
return;
}
#endif
if (url.path().isEmpty())
url.setPath(QLatin1String("/"));
- q->setUrl(url);
+ setUrl(url);
QString fileName = url.toLocalFile();
if (fileName.isEmpty()) {
fileName = url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery);
}
- realFile.setFileName(fileName);
+ d->realFile.setFileName(fileName);
- QFileInfo fi(realFile);
+ QFileInfo fi(d->realFile);
if (fi.isDir()) {
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Cannot open %1: Path is a directory").arg(url.toString());
- q->setError(QNetworkReply::ContentOperationNotPermittedError, msg);
- emit q->error(QNetworkReply::ContentOperationNotPermittedError);
- doFinished();
+ setError(QNetworkReply::ContentOperationNotPermittedError, msg);
+ QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentOperationNotPermittedError));
+ QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
return;
}
- bool opened = realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
+ bool opened = d->realFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
// could we open the file?
if (!opened) {
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend", "Error opening %1: %2")
- .arg(realFile.fileName(), realFile.errorString());
+ .arg(d->realFile.fileName(), d->realFile.errorString());
- if (realFile.exists()) {
- q->setError(QNetworkReply::ContentAccessDenied, msg);
- emit q->error(QNetworkReply::ContentAccessDenied);
+ if (d->realFile.exists()) {
+ setError(QNetworkReply::ContentAccessDenied, msg);
+ QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentAccessDenied));
} else {
- q->setError(QNetworkReply::ContentNotFoundError, msg);
- emit q->error(QNetworkReply::ContentNotFoundError);
+ setError(QNetworkReply::ContentNotFoundError, msg);
+ QMetaObject::invokeMethod(this, "error", Qt::QueuedConnection,
+ Q_ARG(QNetworkReply::NetworkError, QNetworkReply::ContentNotFoundError));
}
- doFinished();
+ QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
return;
}
- realFileSize = fi.size();
- q->setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified());
- q->setHeader(QNetworkRequest::ContentLengthHeader, realFileSize);
+ d->realFileSize = fi.size();
+ setHeader(QNetworkRequest::LastModifiedHeader, fi.lastModified());
+ setHeader(QNetworkRequest::ContentLengthHeader, d->realFileSize);
- emit q->metaDataChanged();
- emit q->downloadProgress(realFileSize, realFileSize);
- emit q->readyRead();
- doFinished();
+ QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, "downloadProgress", Qt::QueuedConnection,
+ Q_ARG(qint64, d->realFileSize), Q_ARG(qint64, d->realFileSize));
+ QMetaObject::invokeMethod(this, "readyRead", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection);
}
bool QFileNetworkReplyPrivate::isFinished() const
{
- return finished;
-}
-
-void QFileNetworkReplyPrivate::doFinished()
-{
- Q_Q(QFileNetworkReply);
- finished = true;
- emit q->finished();
+ return true;
}
-
void QFileNetworkReply::close()
{
Q_D(QFileNetworkReply);
QNetworkReply::close();
d->realFile.close();
-
- if (!d->finished)
- d->doFinished();
}
void QFileNetworkReply::abort()
@@ -163,9 +154,6 @@ void QFileNetworkReply::abort()
Q_D(QFileNetworkReply);
QNetworkReply::close();
d->realFile.close();
-
- if (!d->finished)
- d->doFinished();
}
qint64 QFileNetworkReply::bytesAvailable() const
diff --git a/src/network/access/qfilenetworkreply_p.h b/src/network/access/qfilenetworkreply_p.h
index 6f10672..125fa2e 100644
--- a/src/network/access/qfilenetworkreply_p.h
+++ b/src/network/access/qfilenetworkreply_p.h
@@ -66,7 +66,7 @@ class QFileNetworkReply: public QNetworkReply
{
Q_OBJECT
public:
- QFileNetworkReply(QObject *parent, const QNetworkRequest &req);
+ QFileNetworkReply(QObject *parent, const QNetworkRequest &req, const QNetworkAccessManager::Operation op);
~QFileNetworkReply();
virtual void abort();
@@ -76,12 +76,9 @@ public:
virtual bool isSequential () const;
qint64 size() const;
-
virtual qint64 readData(char *data, qint64 maxlen);
Q_DECLARE_PRIVATE(QFileNetworkReply)
- Q_PRIVATE_SLOT(d_func(), void _q_startOperation())
-
};
class QFileNetworkReplyPrivate: public QNetworkReplyPrivate
@@ -92,12 +89,7 @@ public:
QFile realFile;
qint64 realFileSize;
- void _q_startOperation();
-
virtual bool isFinished() const;
- void doFinished();
- bool finished;
-
Q_DECLARE_PUBLIC(QFileNetworkReply)
};
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index d27fbe7..e16aedc 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -687,10 +687,10 @@ QNetworkReply *QNetworkAccessManager::createRequest(QNetworkAccessManager::Opera
// Also if the scheme is empty we consider it a file.
// The QNetworkAccessFileBackend will right now only be used
// for PUT or qrc://
- if (op == QNetworkAccessManager::GetOperation
+ if ((op == QNetworkAccessManager::GetOperation || op == QNetworkAccessManager::HeadOperation)
&& (req.url().scheme() == QLatin1String("file")
|| req.url().scheme().isEmpty())) {
- return new QFileNetworkReply(this, req);
+ return new QFileNetworkReply(this, req, op);
}
QNetworkRequest request = req;
diff --git a/src/network/access/qnetworkreply.cpp b/src/network/access/qnetworkreply.cpp
index 3624bcb..be4339c 100644
--- a/src/network/access/qnetworkreply.cpp
+++ b/src/network/access/qnetworkreply.cpp
@@ -239,7 +239,10 @@ QNetworkReplyPrivate::QNetworkReplyPrivate()
\note Do not delete the object in the slot connected to this
signal. Use deleteLater().
- \sa QNetworkAccessManager::finished()
+ You can also use isFinished() to check if a QNetworkReply
+ has finished even before you receive the finished() signal.
+
+ \sa QNetworkAccessManager::finished(), isFinished()
*/
/*!
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index 81bffd9..7088a57 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -994,9 +994,9 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len)
{
Q_Q(QNativeSocketEngine);
qint64 ret = 0;
- // don't send more than 49152 per call to WSASendTo to avoid getting a WSAENOBUFS
+ qint64 bytesToSend = len;
+
for (;;) {
- qint64 bytesToSend = qMin<qint64>(49152, len - ret);
WSABUF buf;
buf.buf = (char*)data + ret;
buf.len = bytesToSend;
@@ -1007,15 +1007,21 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len)
ret += qint64(bytesWritten);
+ int err;
if (socketRet != SOCKET_ERROR) {
if (ret == len)
break;
else
continue;
- } else if (WSAGetLastError() == WSAEWOULDBLOCK) {
+ } else if ((err = WSAGetLastError()) == WSAEWOULDBLOCK) {
break;
+ } else if (err == WSAENOBUFS) {
+ // this function used to not send more than 49152 per call to WSASendTo
+ // to avoid getting a WSAENOBUFS. However this is a performance regression
+ // and we think it only appears with old windows versions. We now handle the
+ // WSAENOBUFS and hope it never appears anyway.
+ // just go on, the next loop run we will try a smaller number
} else {
- int err = WSAGetLastError();
WS_ERROR_DEBUG(err);
switch (err) {
case WSAECONNRESET:
@@ -1029,6 +1035,9 @@ qint64 QNativeSocketEnginePrivate::nativeWrite(const char *data, qint64 len)
}
break;
}
+
+ // for next send:
+ bytesToSend = qMin<qint64>(49152, len - ret);
}
#if defined (QNATIVESOCKETENGINE_DEBUG)
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index dd50c38..8993e72 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -304,6 +304,7 @@ static QString _q_SubjectInfoToString(QSslCertificate::SubjectInfo info)
*/
QString QSslCertificate::issuerInfo(SubjectInfo info) const
{
+ // lazy init
if (d->issuerInfo.isEmpty() && d->x509)
d->issuerInfo =
_q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_issuer_name(d->x509), 0, 0));
@@ -320,7 +321,11 @@ QString QSslCertificate::issuerInfo(SubjectInfo info) const
*/
QString QSslCertificate::issuerInfo(const QByteArray &tag) const
{
- // ### Use a QByteArray for the keys in the map
+ // lazy init
+ if (d->issuerInfo.isEmpty() && d->x509)
+ d->issuerInfo =
+ _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_issuer_name(d->x509), 0, 0));
+
return d->issuerInfo.value(QString::fromLatin1(tag));
}
@@ -335,6 +340,7 @@ QString QSslCertificate::issuerInfo(const QByteArray &tag) const
*/
QString QSslCertificate::subjectInfo(SubjectInfo info) const
{
+ // lazy init
if (d->subjectInfo.isEmpty() && d->x509)
d->subjectInfo =
_q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_subject_name(d->x509), 0, 0));
@@ -350,7 +356,11 @@ QString QSslCertificate::subjectInfo(SubjectInfo info) const
*/
QString QSslCertificate::subjectInfo(const QByteArray &tag) const
{
- // ### Use a QByteArray for the keys in the map
+ // lazy init
+ if (d->subjectInfo.isEmpty() && d->x509)
+ d->subjectInfo =
+ _q_mapFromOnelineName(q_X509_NAME_oneline(q_X509_get_subject_name(d->x509), 0, 0));
+
return d->subjectInfo.value(QString::fromLatin1(tag));
}
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index a9dc3cb..6cb76ee 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 393893c..2a8a782 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index f4cc7c7..61a16be 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -1651,8 +1651,12 @@ static bool qt_resolveTextureFromPixmap(QPaintDevice *paintDevice)
{
return false; // Can't use TFP without NPOT
}
+
const QX11Info *xinfo = qt_x11Info(paintDevice);
- QGLExtensionMatcher extensions(glXQueryExtensionsString(xinfo->display(), xinfo->screen()));
+ Display *display = xinfo ? xinfo->display() : X11->display;
+ int screen = xinfo ? xinfo->screen() : X11->defaultScreen;
+
+ QGLExtensionMatcher extensions(glXQueryExtensionsString(display, screen));
if (extensions.match("GLX_EXT_texture_from_pixmap")) {
glXBindTexImageEXT = (qt_glXBindTexImageEXT) qglx_getProcAddress("glXBindTexImageEXT");
glXReleaseTexImageEXT = (qt_glXReleaseTexImageEXT) qglx_getProcAddress("glXReleaseTexImageEXT");
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index 1bfb6e3..6d47687 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -252,6 +252,10 @@ QGLPixmapData::QGLPixmapData(PixelType type)
{
setSerialNumber(++qt_gl_pixmap_serial);
m_glDevice.setPixmapData(this);
+
+ // Set InteralBindOptions minus the memory managed, since this
+ // QGLTexture is not managed as part of the internal texture cache
+ m_texture.options = QGLContext::PremultipliedAlphaBindOption;
}
QGLPixmapData::~QGLPixmapData()
@@ -340,18 +344,18 @@ void QGLPixmapData::ensureCreated() const
}
if (!m_source.isNull()) {
+ glBindTexture(target, m_texture.id);
if (external_format == GL_RGB) {
const QImage tx = m_source.convertToFormat(QImage::Format_RGB888);
-
- glBindTexture(target, m_texture.id);
glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
GL_UNSIGNED_BYTE, tx.bits());
} else {
const QImage tx = ctx->d_func()->convertToGLFormat(m_source, true, external_format);
-
- glBindTexture(target, m_texture.id);
glTexSubImage2D(target, 0, 0, 0, w, h, external_format,
GL_UNSIGNED_BYTE, tx.bits());
+ // convertToGLFormat will flip the Y axis, so it needs to
+ // be drawn upside down
+ m_texture.options |= QGLContext::InvertedYBindOption;
}
if (useFramebufferObjects())
diff --git a/src/opengl/qpixmapdata_x11gl_egl.cpp b/src/opengl/qpixmapdata_x11gl_egl.cpp
index a5e0239..55aa1d0 100644
--- a/src/opengl/qpixmapdata_x11gl_egl.cpp
+++ b/src/opengl/qpixmapdata_x11gl_egl.cpp
@@ -39,10 +39,19 @@
**
****************************************************************************/
+#include <QDebug>
+
#include <private/qgl_p.h>
#include <private/qegl_p.h>
#include <private/qeglproperties_p.h>
+
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
#include <private/qpaintengineex_opengl2_p.h>
+#endif
+
+#ifndef QT_OPENGL_ES_2
+#include <private/qpaintengine_opengl_p.h>
+#endif
#include "qpixmapdata_x11gl_p.h"
@@ -187,7 +196,14 @@ QX11GLPixmapData::~QX11GLPixmapData()
{
}
-static QGL2PaintEngineEx* qt_gl2_engine_for_pixmaps = 0;
+#if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL)
+Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_pixmap_2_engine)
+#endif
+
+#ifndef QT_OPENGL_ES_2
+Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_pixmap_engine)
+#endif
+
QPaintEngine* QX11GLPixmapData::paintEngine() const
{
@@ -202,18 +218,41 @@ QPaintEngine* QX11GLPixmapData::paintEngine() const
: qPixmapRGBSharedEglContext);
}
- if (!qt_gl2_engine_for_pixmaps)
- qt_gl2_engine_for_pixmaps = new QGL2PaintEngineEx();
+ QPaintEngine* engine;
+
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+ engine = qt_gl_pixmap_engine();
+#elif defined(QT_OPENGL_ES_2)
+ engine = qt_gl_pixmap_2_engine();
+#else
+ if (qt_gl_preferGL2Engine())
+ engine = qt_gl_pixmap_2_engine();
+ else
+ engine = qt_gl_pixmap_engine();
+#endif
+
+
// Support multiple painters on multiple pixmaps simultaniously
- if (qt_gl2_engine_for_pixmaps->isActive()) {
+ if (engine->isActive()) {
qWarning("Pixmap paint engine already active");
- QPaintEngine* engine = new QGL2PaintEngineEx();
+
+#if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL)
+ engine = new QOpenGLPaintEngine;
+#elif defined(QT_OPENGL_ES_2)
+ engine = new QGL2PaintEngineEx;
+#else
+ if (qt_gl_preferGL2Engine())
+ engine = new QGL2PaintEngineEx;
+ else
+ engine = new QOpenGLPaintEngine;
+#endif
+
engine->setAutoDestruct(true);
return engine;
}
- return qt_gl2_engine_for_pixmaps;
+ return engine;
}
void QX11GLPixmapData::beginPaint()
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
index cb9c921..6764e75 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp
@@ -378,9 +378,6 @@ void QDirectFBWindowSurface::flush(QWidget *widget, const QRegion &region,
return;
}
screen->flipSurface(dfbSurface, flipFlags, region, offset);
- if (noSystemBackground) {
- dfbSurface->Clear(dfbSurface, 0, 0, 0, 0);
- }
#else
setOpaque(windowOpacity != 0xff);
if (mode == Offscreen) {
diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby
index f24ac4b..bdd668c 100644
--- a/src/s60installs/qt.iby
+++ b/src/s60installs/qt.iby
@@ -90,27 +90,27 @@ file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll
S60_APP_RESOURCE(s60main)
// imageformats stubs
-data=\epoc32\data\qt\qtlibspluginstubs\qgif.qtplugin resource\qt\plugins\imageformats\qgif.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qico.qtplugin resource\qt\plugins\imageformats\qico.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qjpeg.qtplugin resource\qt\plugins\imageformats\qjpeg.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qmng.qtplugin resource\qt\plugins\imageformats\qmng.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qsvg.qtplugin resource\qt\plugins\imageformats\qsvg.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qtiff.qtplugin resource\qt\plugins\imageformats\qtiff.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qgif.qtplugin resource\qt\plugins\imageformats\qgif.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qico.qtplugin resource\qt\plugins\imageformats\qico.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qjpeg.qtplugin resource\qt\plugins\imageformats\qjpeg.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qmng.qtplugin resource\qt\plugins\imageformats\qmng.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qsvg.qtplugin resource\qt\plugins\imageformats\qsvg.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\imageformats\qtiff.qtplugin resource\qt\plugins\imageformats\qtiff.qtplugin
// codecs stubs
-data=\epoc32\data\qt\qtlibspluginstubs\qcncodecs.qtplugin resource\qt\plugins\codecs\qcncodecs.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qjpcodecs.qtplugin resource\qt\plugins\codecs\qjpcodecs.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qkrcodecs.qtplugin resource\qt\plugins\codecs\qkrcodecs.qtplugin
-data=\epoc32\data\qt\qtlibspluginstubs\qtwcodecs.qtplugin resource\qt\plugins\codecs\qtwcodecs.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\codecs\qcncodecs.qtplugin resource\qt\plugins\codecs\qcncodecs.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\codecs\qjpcodecs.qtplugin resource\qt\plugins\codecs\qjpcodecs.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\codecs\qkrcodecs.qtplugin resource\qt\plugins\codecs\qkrcodecs.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\codecs\qtwcodecs.qtplugin resource\qt\plugins\codecs\qtwcodecs.qtplugin
// iconengines stubs
-data=\epoc32\data\qt\qtlibspluginstubs\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\iconengines\qsvgicon.qtplugin resource\qt\plugins\iconengines\qsvgicon.qtplugin
// Phonon MMF backend
-data=\epoc32\data\qt\qtlibspluginstubs\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin resource\qt\plugins\phonon_backend\phonon_mmf.qtplugin
// graphicssystems
-data=\epoc32\data\qt\qtlibspluginstubs\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
+data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin resource\qt\plugins\graphicssystems\qvggraphicssystem.qtplugin
// Stub sis file
data=ZSYSTEM\install\qt.sis System\Install\qt.sis
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index bbc758b..55eaee1 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -112,9 +112,4 @@ symbian: {
BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)"
BLD_INF_RULES.prj_exports += "qtdemoapps.iby $$CORE_APP_LAYER_IBY_EXPORT_PATH(qtdemoapps.iby)"
- PLUGIN_STUBS = $$files(qmakepluginstubs/*)
- for(STUB, PLUGIN_STUBS) {
- STUB_FILENAME = $$basename(STUB)
- BLD_INF_RULES.prj_exports += "qmakepluginstubs/$${STUB_FILENAME} /epoc32/data/qt/qtlibspluginstubs/$${STUB_FILENAME}"
- }
}
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index fb0dddb..db312bc 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -978,7 +978,8 @@ JSC::JSValue QtFunction::execute(JSC::ExecState *exec, JSC::JSValue thisValue,
QScriptObjectDelegate *delegate = scriptObject->delegate();
Q_ASSERT(delegate && (delegate->type() == QScriptObjectDelegate::QtObject));
QObject *qobj = static_cast<QScript::QObjectDelegate*>(delegate)->value();
- Q_ASSERT_X(qobj != 0, "QtFunction::call", "handle the case when QObject has been deleted");
+ if (!qobj)
+ return JSC::throwError(exec, JSC::GeneralError, QString::fromLatin1("cannot call function of deleted QObject"));
QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
const QMetaObject *meta = qobj->metaObject();
@@ -2219,7 +2220,14 @@ void QObjectConnectionManager::execute(int slotIndex, void **argv)
JSC::call(exec, slot, callType, callData, thisObject, jscArgs);
if (exec->hadException()) {
- engine->emitSignalHandlerException();
+ if (slot.inherits(&QtFunction::info) && !static_cast<QtFunction*>(JSC::asObject(slot))->qobject()) {
+ // The function threw an error because the target QObject has been deleted.
+ // The connections list is stale; remove the signal handler and ignore the exception.
+ removeSignalHandler(sender(), signalIndex, receiver, slot);
+ exec->clearException();
+ } else {
+ engine->emitSignalHandlerException();
+ }
}
}
diff --git a/src/tools/uic3/converter.cpp b/src/tools/uic3/converter.cpp
index 8fe2a24..2bf293d 100644
--- a/src/tools/uic3/converter.cpp
+++ b/src/tools/uic3/converter.cpp
@@ -121,7 +121,7 @@ static inline bool isKDEClass(const QString &className)
return className.at(1) .isUpper() && className.at(2).isLower();
}
-DomUI *Ui3Reader::generateUi4(const QDomElement &widget, bool implicitIncludes)
+DomUI *Ui3Reader::generateUi4(const QDomElement &widget)
{
QDomNodeList nl;
candidateCustomWidgets.clear();
@@ -474,7 +474,7 @@ DomUI *Ui3Reader::generateUi4(const QDomElement &widget, bool implicitIncludes)
// Magic header generation feature for legacy KDE forms
// (for example, filesharing/advanced/kcm_sambaconf/share.ui)
- if (implicitIncludes && isKDEClass(customClass)) {
+ if ((m_options & ImplicitIncludes) && isKDEClass(customClass)) {
QString header = customClass.toLower();
header += QLatin1String(".h");
DomHeader *domHeader = new DomHeader;
@@ -710,10 +710,13 @@ DomWidget *Ui3Reader::createWidget(const QDomElement &w, const QString &widgetCl
ui_action_list.append(a);
} else if (t == QLatin1String("property")) {
// skip the property it is already handled by createProperties
-
- QString name = e.attribute(QLatin1String("name")); // change the varname this widget
- if (name == QLatin1String("name"))
- ui_widget->setAttributeName(DomTool::readProperty(w, QLatin1String("name"), QVariant()).toString());
+ const QString name = e.attribute(QLatin1String("name")); // change the varname this widget
+ if (name == QLatin1String("name")) {
+ // Do not name QLayoutWidget if layout names are to be used.
+ const bool applyName = !(m_options & PreserveLayoutNames) || className != QLatin1String("QLayoutWidget");
+ if (applyName)
+ ui_widget->setAttributeName(DomTool::readProperty(w, QLatin1String("name"), QVariant()).toString());
+ }
} else if (t == QLatin1String("row")) {
DomRow *row = new DomRow();
row->read(e);
@@ -797,6 +800,11 @@ DomLayout *Ui3Reader::createLayout(const QDomElement &w)
createProperties(w, &ui_property_list, className);
createAttributes(w, &ui_attribute_list, className);
+ if (m_options & PreserveLayoutNames) {
+ const QString layoutName = getLayoutName(w);
+ if (!layoutName.isEmpty())
+ lay->setAttributeName(layoutName);
+ }
QDomElement e = w.firstChild().toElement();
while (!e.isNull()) {
diff --git a/src/tools/uic3/form.cpp b/src/tools/uic3/form.cpp
index ac2668b..df1314f 100644
--- a/src/tools/uic3/form.cpp
+++ b/src/tools/uic3/form.cpp
@@ -100,7 +100,7 @@ QByteArray combinePath(const char *infile, const char *outfile)
\sa createFormImpl()
*/
-void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes)
+void Ui3Reader::createFormDecl(const QDomElement &e)
{
QDomElement body = e;
@@ -138,7 +138,7 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes)
QString tagName = n3.tagName().toLower();
if (tagName == QLatin1String("class")) {
cl = n3.firstChild().toText().data();
- if (!nofwd)
+ if (m_options & CustomWidgetForwardDeclarations)
forwardDecl << cl;
customWidgets.insert(cl, 0);
} else if (tagName == QLatin1String("header")) {
@@ -257,10 +257,10 @@ void Ui3Reader::createFormDecl(const QDomElement &e, bool implicitIncludes)
d.option().copyrightHeader = false;
d.option().extractImages = m_extractImages;
d.option().qrcOutputFile = m_qrcOutputFile;
- d.option().implicitIncludes = implicitIncludes;
+ d.option().implicitIncludes = (m_options & ImplicitIncludes) ? 1 : 0;
if (trmacro.size())
d.option().translateFunction = trmacro;
- DomUI *ui = generateUi4(e, implicitIncludes);
+ DomUI *ui = generateUi4(e);
d.uic(fileName, ui, &out);
delete ui;
diff --git a/src/tools/uic3/main.cpp b/src/tools/uic3/main.cpp
index ecc345e..6acc94f 100644
--- a/src/tools/uic3/main.cpp
+++ b/src/tools/uic3/main.cpp
@@ -78,13 +78,11 @@ int runUic3(int argc, char * argv[])
QByteArray image_tmpfile;
const char* projectName = 0;
const char* trmacro = 0;
- bool nofwd = false;
bool fix = false;
bool deps = false;
- bool implicitIncludes = true;
+ unsigned readerOptions = Ui3Reader::ImplicitIncludes|Ui3Reader::CustomWidgetForwardDeclarations;
QByteArray pchFile;
-
QApplication app(argc, argv, false);
for (int n = 1; n < argc && error == 0; n++) {
@@ -146,9 +144,11 @@ int runUic3(int argc, char * argv[])
} else if (opt == "d") {
deps = true;
} else if (opt == "no-implicit-includes") {
- implicitIncludes = false;
+ readerOptions &= ~Ui3Reader::ImplicitIncludes;
} else if (opt == "nofwd") {
- nofwd = true;
+ readerOptions &= ~Ui3Reader::CustomWidgetForwardDeclarations;
+ } else if (opt == "layout-names") {
+ readerOptions |= Ui3Reader::PreserveLayoutNames;
} else if (opt == "nounload") {
// skip
} else if (opt == "convert") {
@@ -253,6 +253,7 @@ int runUic3(int argc, char * argv[])
"\t-extract qrcFile Create resource file and extract embedded images into \"image\" dir\n"
"\t-pch file Add #include \"file\" as the first statement in implementation\n"
"\t-nofwd Omit forward declarations of custom classes\n"
+ "\t-layout-names Preserve layout names of Qt Designer 3\n"
"\t-no-implicit-includes Do not generate #include-directives for custom classes\n"
"\t-nounload Do not unload plugins after processing\n"
"\t-tr func Use func() instead of tr() for i18n\n"
@@ -289,9 +290,8 @@ int runUic3(int argc, char * argv[])
QTextStream out(&fileOut);
- Ui3Reader ui3(out);
+ Ui3Reader ui3(out, readerOptions);
ui3.setExtractImages(extract, qrcOutputFile);
-
if (projectName && imagecollection) {
out.setEncoding(QTextStream::Latin1);
ui3.embed(projectName, images);
@@ -349,7 +349,7 @@ int runUic3(int argc, char * argv[])
return 0;
} else if (convert) {
- ui3.generateUi4(QFile::decodeName(fileName), QFile::decodeName(outputFile), doc, implicitIncludes);
+ ui3.generateUi4(QFile::decodeName(fileName), QFile::decodeName(outputFile), doc);
return 0;
}
@@ -388,8 +388,6 @@ int runUic3(int argc, char * argv[])
subcl,
QString::fromUtf8(trmacro),
QString::fromUtf8(className),
- nofwd,
- implicitIncludes,
convertedUi);
if (!protector.isEmpty()) {
diff --git a/src/tools/uic3/ui3reader.cpp b/src/tools/uic3/ui3reader.cpp
index 6c5bda3..fd50a19 100644
--- a/src/tools/uic3/ui3reader.cpp
+++ b/src/tools/uic3/ui3reader.cpp
@@ -176,7 +176,6 @@ void Ui3Reader::init()
{
outputFileName.clear();
trmacro.clear();
- nofwd = false;
fileName.clear();
writeFunctImpl = true;
@@ -241,11 +240,10 @@ QDomElement Ui3Reader::parse(const QDomDocument &doc)
return widget;
}
-Ui3Reader::Ui3Reader(QTextStream &outStream)
- : out(outStream), trout(&languageChangeBody)
+Ui3Reader::Ui3Reader(QTextStream &outStream, unsigned options) :
+ m_options(options), out(outStream), trout(&languageChangeBody),
+ m_porting(new Porting), m_extractImages(false)
{
- m_porting = new Porting();
- m_extractImages = false;
}
Ui3Reader::~Ui3Reader()
@@ -255,14 +253,13 @@ Ui3Reader::~Ui3Reader()
void Ui3Reader::generate(const QString &fn, const QString &outputFn,
QDomDocument doc, bool decl, bool subcl, const QString &trm,
- const QString& subClass, bool omitForwardDecls, bool implicitIncludes, const QString &convertedUiFile)
+ const QString& subClass, const QString &convertedUiFile)
{
init();
fileName = fn;
outputFileName = outputFn;
trmacro = trm;
- nofwd = omitForwardDecls;
QDomElement e = parse(doc);
@@ -281,21 +278,21 @@ void Ui3Reader::generate(const QString &fn, const QString &outputFn,
createSubImpl(e, subClass);
} else {
if (decl)
- createFormDecl(e, implicitIncludes);
+ createFormDecl(e);
else
createFormImpl(e);
}
}
-void Ui3Reader::generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc, bool implicitIncludes)
+void Ui3Reader::generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc)
{
init();
fileName = fn;
outputFileName = outputFn;
- DomUI *ui = generateUi4(parse(doc), implicitIncludes);
+ DomUI *ui = generateUi4(parse(doc));
if (!ui)
return;
@@ -317,11 +314,6 @@ void Ui3Reader::setTrMacro(const QString &trmacro)
this->trmacro = trmacro;
}
-void Ui3Reader::setForwardDeclarationsEnabled(bool b)
-{
- nofwd = !b;
-}
-
void Ui3Reader::setOutputFileName(const QString &fileName)
{
outputFileName = fileName;
diff --git a/src/tools/uic3/ui3reader.h b/src/tools/uic3/ui3reader.h
index cd17835..144ef05 100644
--- a/src/tools/uic3/ui3reader.h
+++ b/src/tools/uic3/ui3reader.h
@@ -68,23 +68,24 @@ typedef QList<QPair<int, Color> > ColorGroup;
class Ui3Reader
{
public:
- Ui3Reader(QTextStream &stream);
+ enum Options { CustomWidgetForwardDeclarations = 0x1, ImplicitIncludes = 0x2, PreserveLayoutNames = 0x4 };
+
+ explicit Ui3Reader(QTextStream &stream, unsigned options);
~Ui3Reader();
void computeDeps(const QDomElement &e, QStringList &globalIncludes, QStringList &localIncludes, bool impl = false);
- void generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc, bool implicitIncludes);
+ void generateUi4(const QString &fn, const QString &outputFn, QDomDocument doc);
void generate(const QString &fn, const QString &outputFn,
QDomDocument doc, bool decl, bool subcl, const QString &trm,
- const QString& subclname, bool omitForwardDecls, bool implicitIncludes, const QString &convertedUiFile);
+ const QString& subclname, const QString &convertedUiFile);
void embed(const char *project, const QStringList &images);
void setTrMacro(const QString &trmacro);
- void setForwardDeclarationsEnabled(bool b);
void setOutputFileName(const QString &fileName);
- void createFormDecl(const QDomElement &e, bool implicitIncludes);
+ void createFormDecl(const QDomElement &e);
void createFormImpl(const QDomElement &e);
void createWrapperDecl(const QDomElement &e, const QString &convertedUiFile);
@@ -125,7 +126,7 @@ private:
void errorInvalidSlot(const QString &slot, const QString &widgetName, const QString &widgetClass,
int line, int col);
- DomUI *generateUi4(const QDomElement &e, bool implicitIncludes);
+ DomUI *generateUi4(const QDomElement &e);
DomWidget *createWidget(const QDomElement &w, const QString &widgetClass = QString());
void createProperties(const QDomElement &e, QList<DomProperty*> *properties, const QString &className);
void createAttributes(const QDomElement &e, QList<DomProperty*> *properties, const QString &className);
@@ -145,6 +146,8 @@ private:
void fixLayoutMargin(DomLayout *ui_layout);
+ const unsigned m_options;
+
QTextStream &out;
QTextOStream trout;
QString languageChangeBody;
@@ -157,7 +160,6 @@ private:
QString formName;
QString lastItem;
QString trmacro;
- bool nofwd;
struct Buddy
{
diff --git a/src/xmlpatterns/parser/qquerytransformparser.cpp b/src/xmlpatterns/parser/qquerytransformparser.cpp
index c250d0c..6daa470 100644
--- a/src/xmlpatterns/parser/qquerytransformparser.cpp
+++ b/src/xmlpatterns/parser/qquerytransformparser.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xmlpatterns/parser/qquerytransformparser_p.h b/src/xmlpatterns/parser/qquerytransformparser_p.h
index 204b6f8..0b316ec 100644
--- a/src/xmlpatterns/parser/qquerytransformparser_p.h
+++ b/src/xmlpatterns/parser/qquerytransformparser_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xmlpatterns/parser/qxslttokenlookup.cpp b/src/xmlpatterns/parser/qxslttokenlookup.cpp
index a46ec8a..781ba0d 100644
--- a/src/xmlpatterns/parser/qxslttokenlookup.cpp
+++ b/src/xmlpatterns/parser/qxslttokenlookup.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/src/xmlpatterns/parser/qxslttokenlookup_p.h b/src/xmlpatterns/parser/qxslttokenlookup_p.h
index b45407d..6d004b0 100644
--- a/src/xmlpatterns/parser/qxslttokenlookup_p.h
+++ b/src/xmlpatterns/parser/qxslttokenlookup_p.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index 9b91c7d..3198a65 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -569,3 +569,21 @@ contains(QT_CONFIG, webkit): SUBDIRS += \
qwebhistory
contains(QT_CONFIG, declarative): SUBDIRS += declarative
+
+# Following tests depends on private API
+!contains(QT_CONFIG, private_tests): SUBDIRS -= \
+ qcssparser \
+ qgraphicssceneindex \
+ qhttpnetworkconnection \
+ qhttpnetworkreply \
+ qnativesocketengine \
+ qnetworkreply \
+ qpathclipper \
+ qsocketnotifier \
+ qsocks5socketengine \
+ qstylesheetstyle \
+ qtextpiecetable \
+ xmlpatternsdiagnosticsts \
+ xmlpatternsview \
+ xmlpatternsxqts \
+ xmlpatternsxslts
diff --git a/tests/auto/maketestselftest/tst_maketestselftest.cpp b/tests/auto/maketestselftest/tst_maketestselftest.cpp
index ea7f36c..c674202 100644
--- a/tests/auto/maketestselftest/tst_maketestselftest.cpp
+++ b/tests/auto/maketestselftest/tst_maketestselftest.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/mediaobject/dummy/dummy.pro b/tests/auto/mediaobject/dummy/dummy.pro
index 5417b50..2f27c4a 100644
--- a/tests/auto/mediaobject/dummy/dummy.pro
+++ b/tests/auto/mediaobject/dummy/dummy.pro
@@ -1,7 +1,7 @@
TEMPLATE = lib
isEmpty(QT_MAJOR_VERSION) {
- VERSION=4.6.1
+ VERSION=4.6.2
} else {
VERSION=$${QT_MAJOR_VERSION}.$${QT_MINOR_VERSION}.$${QT_PATCH_VERSION}
}
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index 33753f1..eec4797 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -838,13 +838,20 @@ void tst_QNetworkReply::stateChecking()
QVERIFY(reply->isOpen());
QVERIFY(reply->isReadable());
QVERIFY(!reply->isWritable());
- QCOMPARE(reply->errorString(), QString("Unknown error"));
+
+ // both behaviours are OK since we might change underlying behaviour again
+ if (!reply->isFinished())
+ QCOMPARE(reply->errorString(), QString("Unknown error"));
+ else
+ QVERIFY(!reply->errorString().isEmpty());
+
QCOMPARE(reply->manager(), &manager);
QCOMPARE(reply->request(), req);
QCOMPARE(int(reply->operation()), int(QNetworkAccessManager::GetOperation));
- QCOMPARE(reply->error(), QNetworkReply::NoError);
- QCOMPARE(reply->isFinished(), false);
+ // error and not error are OK since we might change underlying behaviour again
+ if (!reply->isFinished())
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
QCOMPARE(reply->url(), url);
reply->abort();
@@ -1151,7 +1158,8 @@ void tst_QNetworkReply::getErrors()
QNetworkReplyPtr reply = manager.get(request);
reply->setParent(this); // we have expect-fails
- QCOMPARE(reply->error(), QNetworkReply::NoError);
+ if (!reply->isFinished())
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
// now run the request:
connect(reply, SIGNAL(finished()),
@@ -1512,6 +1520,7 @@ void tst_QNetworkReply::ioGetFromFile()
QNetworkRequest request(QUrl::fromLocalFile(file.fileName()));
QNetworkReplyPtr reply = manager.get(request);
+ QVERIFY(reply->isFinished()); // a file should immediatly be done
DataReader reader(reply);
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
@@ -3170,12 +3179,13 @@ void tst_QNetworkReply::ioPostToHttpEmptyUploadProgress()
void tst_QNetworkReply::lastModifiedHeaderForFile()
{
- QFileInfo fileInfo(SRCDIR "./bigfile");
+ QFileInfo fileInfo(SRCDIR "/bigfile");
+ QVERIFY(fileInfo.exists());
+
QUrl url = QUrl::fromLocalFile(fileInfo.filePath());
QNetworkRequest request(url);
QNetworkReplyPtr reply = manager.head(request);
- QSignalSpy spy(reply, SIGNAL(uploadProgress(qint64,qint64)));
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
@@ -3191,7 +3201,6 @@ void tst_QNetworkReply::lastModifiedHeaderForHttp()
QNetworkRequest request(url);
QNetworkReplyPtr reply = manager.head(request);
- QSignalSpy spy(reply, SIGNAL(uploadProgress(qint64,qint64)));
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
QTestEventLoop::instance().enterLoop(10);
QVERIFY(!QTestEventLoop::instance().timeout());
diff --git a/tests/auto/qobject/tst_qobject.cpp b/tests/auto/qobject/tst_qobject.cpp
index 7c172ef..3896d70 100644
--- a/tests/auto/qobject/tst_qobject.cpp
+++ b/tests/auto/qobject/tst_qobject.cpp
@@ -127,6 +127,7 @@ private slots:
void overloads();
void isSignalConnected();
void qMetaObjectConnect();
+ void qMetaObjectDisconnectOne();
protected:
};
@@ -3441,5 +3442,77 @@ void tst_QObject::qMetaObjectConnect()
}
+void tst_QObject::qMetaObjectDisconnectOne()
+{
+ SenderObject *s = new SenderObject;
+ ReceiverObject *r1 = new ReceiverObject;
+
+ int signal1Index = s->metaObject()->indexOfSignal("signal1()");
+ int signal3Index = s->metaObject()->indexOfSignal("signal3()");
+ int slot1Index = r1->metaObject()->indexOfSlot("slot1()");
+ int slot2Index = r1->metaObject()->indexOfSlot("slot2()");
+
+ QVERIFY(signal1Index > 0);
+ QVERIFY(signal3Index > 0);
+ QVERIFY(slot1Index > 0);
+ QVERIFY(slot2Index > 0);
+
+ QVERIFY( QMetaObject::connect(s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
+ QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
+ QVERIFY( QMetaObject::connect(s, signal3Index, r1, slot2Index) );
+
+ r1->reset();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ s->emitSignal1();
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ s->emitSignal3();
+ QCOMPARE( r1->count_slot1, 1 );
+ QCOMPARE( r1->count_slot2, 3 );
+
+ r1->reset();
+ QVERIFY( QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+
+ s->emitSignal1();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ s->emitSignal3();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 2 );
+
+ r1->reset();
+ QVERIFY( false == QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+
+ s->emitSignal1();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ s->emitSignal3();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 1 );
+
+ r1->reset();
+ QVERIFY( false == QMetaObject::disconnectOne(s, signal1Index, r1, slot1Index) );
+ QVERIFY( QMetaObject::disconnectOne(s, signal3Index, r1, slot2Index) );
+
+ s->emitSignal1();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ s->emitSignal3();
+ QCOMPARE( r1->count_slot1, 0 );
+ QCOMPARE( r1->count_slot2, 0 );
+
+ delete s;
+ delete r1;
+}
+
QTEST_MAIN(tst_QObject)
#include "tst_qobject.moc"
diff --git a/tests/auto/qpixmap/tst_qpixmap.cpp b/tests/auto/qpixmap/tst_qpixmap.cpp
index a1f20ca..d6bf900 100644
--- a/tests/auto/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/qpixmap/tst_qpixmap.cpp
@@ -172,6 +172,8 @@ private slots:
void preserveDepth();
void splash_crash();
+
+ void loadAsBitmapOrPixmap();
};
static bool lenientCompare(const QPixmap &actual, const QPixmap &expected)
@@ -1529,5 +1531,41 @@ void tst_QPixmap::preserveDepth()
QCOMPARE(depth, source.depth());
}
+void tst_QPixmap::loadAsBitmapOrPixmap()
+{
+ QImage tmp(10, 10, QImage::Format_RGB32);
+ tmp.save("tmp.png");
+
+ bool ok;
+
+ // Check that we can load the pixmap as a pixmap and that it then turns into a pixmap
+ QPixmap pixmap("tmp.png");
+ QVERIFY(!pixmap.isNull());
+ QVERIFY(pixmap.depth() > 1);
+ QVERIFY(!pixmap.isQBitmap());
+
+ pixmap = QPixmap();
+ ok = pixmap.load("tmp.png");
+ QVERIFY(ok);
+ QVERIFY(!pixmap.isNull());
+ QVERIFY(pixmap.depth() > 1);
+ QVERIFY(!pixmap.isQBitmap());
+
+ // The do the same check for bitmaps..
+ QBitmap bitmap("tmp.png");
+ QVERIFY(!bitmap.isNull());
+ QVERIFY(bitmap.depth() == 1);
+ QVERIFY(bitmap.isQBitmap());
+
+ bitmap = QBitmap();
+ ok = bitmap.load("tmp.png");
+ QVERIFY(ok);
+ QVERIFY(!bitmap.isNull());
+ QVERIFY(bitmap.depth() == 1);
+ QVERIFY(bitmap.isQBitmap());
+}
+
+
+
QTEST_MAIN(tst_QPixmap)
#include "tst_qpixmap.moc"
diff --git a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
index 3415163..b4ce561 100644
--- a/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
+++ b/tests/auto/qscriptextqobject/tst_qscriptextqobject.cpp
@@ -532,6 +532,7 @@ private slots:
void prototypes();
void objectDeleted();
void connectToDestroyedSignal();
+ void emitAfterReceiverDeleted();
private:
QScriptEngine *m_engine;
@@ -2913,7 +2914,8 @@ void tst_QScriptExtQObject::objectDeleted()
v.setProperty("intProperty", QScriptValue(&eng, 123));
QCOMPARE(qobj->intProperty(), 123);
qobj->resetQtFunctionInvoked();
- v.property("myInvokable").call(v);
+ QScriptValue invokable = v.property("myInvokable");
+ invokable.call(v);
QCOMPARE(qobj->qtFunctionInvoked(), 0);
// now delete the object
@@ -2951,6 +2953,14 @@ void tst_QScriptExtQObject::objectDeleted()
QCOMPARE(ret.toString(), QLatin1String("Error: cannot access member `myInvokableWithIntArg' of deleted QObject"));
}
+ // Meta-method wrappers are still valid, but throw error when called
+ QVERIFY(invokable.isFunction());
+ {
+ QScriptValue ret = invokable.call(v);
+ QVERIFY(ret.isError());
+ QCOMPARE(ret.toString(), QString::fromLatin1("Error: cannot call function of deleted QObject"));
+ }
+
// access from script
eng.globalObject().setProperty("o", v);
{
@@ -3011,5 +3021,27 @@ void tst_QScriptExtQObject::connectToDestroyedSignal()
#endif
}
+void tst_QScriptExtQObject::emitAfterReceiverDeleted()
+{
+ for (int x = 0; x < 2; ++x) {
+ MyQObject *obj = new MyQObject;
+ QScriptValue scriptObj = m_engine->newQObject(obj);
+ if (x == 0) {
+ // Connecting from JS
+ m_engine->globalObject().setProperty("obj", scriptObj);
+ QVERIFY(m_engine->evaluate("myObject.mySignal.connect(obj, 'mySlot()')").isUndefined());
+ } else {
+ // Connecting from C++
+ qScriptConnect(m_myObject, SIGNAL(mySignal()), scriptObj, scriptObj.property("mySlot"));
+ }
+ delete obj;
+ QSignalSpy signalHandlerExceptionSpy(m_engine, SIGNAL(signalHandlerException(QScriptValue)));
+ QVERIFY(!m_engine->hasUncaughtException());
+ m_myObject->emitMySignal();
+ QCOMPARE(signalHandlerExceptionSpy.count(), 0);
+ QVERIFY(!m_engine->hasUncaughtException());
+ }
+}
+
QTEST_MAIN(tst_QScriptExtQObject)
#include "tst_qscriptextqobject.moc"
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 892d745..44f8522 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -105,6 +105,7 @@ private slots:
void fromPath_data();
void fromPath();
void certInfo();
+ void certInfoQByteArray();
void task256066toPem();
void nulInCN();
void nulInSan();
@@ -697,6 +698,18 @@ void tst_QSslCertificate::certInfo()
QCOMPARE(cert, QSslCertificate(QByteArray::fromHex(der), QSsl::Der));
}
+void tst_QSslCertificate::certInfoQByteArray()
+{
+ QSslCertificate cert = QSslCertificate::fromPath("certificates/cert.pem", QSsl::Pem,
+ QRegExp::FixedString).first();
+ QVERIFY(!cert.isNull());
+
+ // in this test, check the bytearray variants before the enum variants to see if
+ // we fixed a bug we had with lazy initialization of the values.
+ QCOMPARE(cert.issuerInfo("CN"), QString("Test CA (1024 bit)"));
+ QCOMPARE(cert.subjectInfo("CN"), QString("name/with/slashes"));
+}
+
void tst_QSslCertificate::task256066toPem()
{
// a certificate whose PEM encoding's length is a multiple of 64
diff --git a/tests/auto/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index d5cd531..5ec4668 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="5" failures="3" tests="9" name="tst_Xunit">
<properties>
- <property value="4.6.1" name="QTestVersion"/>
- <property value="4.6.1" name="QtVersion"/>
+ <property value="4.6.2" name="QTestVersion"/>
+ <property value="4.6.2" name="QtVersion"/>
</properties>
<testcase result="pass" name="initTestCase"/>
<testcase result="pass" name="testFunc1">
diff --git a/tests/auto/uic/baseline/config_fromuic3.ui b/tests/auto/uic/baseline/config_fromuic3.ui
index 0bd6256..2e7addb 100644
--- a/tests/auto/uic/baseline/config_fromuic3.ui
+++ b/tests/auto/uic/baseline/config_fromuic3.ui
@@ -3,7 +3,7 @@
<author></author>
<comment>*********************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
diff --git a/tests/auto/uic/baseline/config_fromuic3.ui.h b/tests/auto/uic/baseline/config_fromuic3.ui.h
index ec20d05..6e22dc7 100644
--- a/tests/auto/uic/baseline/config_fromuic3.ui.h
+++ b/tests/auto/uic/baseline/config_fromuic3.ui.h
@@ -1,7 +1,7 @@
/*
*********************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -45,7 +45,7 @@
** Form generated from reading UI file 'config_fromuic3.ui'
**
** Created: Thu Dec 17 12:48:42 2009
-** by: Qt User Interface Compiler version 4.6.1
+** by: Qt User Interface Compiler version 4.6.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
diff --git a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp
index 907ffb7..23e07db 100644
--- a/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp
+++ b/tests/benchmarks/qfile_vs_qnetworkaccessmanager/main.cpp
@@ -55,11 +55,13 @@ class qfile_vs_qnetworkaccessmanager : public QObject
// but.. this is a manual test anyway, so :)
protected:
void qnamFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request);
+ void qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request);
void qfileFileRead_iteration();
static const int iterations = 10;
private slots:
void qnamFileRead();
+ void qnamImmediateFileRead();
void qfileFileRead();
void initTestCase();
@@ -124,6 +126,39 @@ void qfile_vs_qnetworkaccessmanager::qnamFileRead()
qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec";
}
+void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead_iteration(QNetworkAccessManager &manager, QNetworkRequest &request)
+{
+ QNetworkReply* reply = manager.get(request);
+ QVERIFY(reply->isFinished()); // should be like that!
+ QByteArray qba = reply->readAll();
+ delete reply;
+}
+
+void qfile_vs_qnetworkaccessmanager::qnamImmediateFileRead()
+{
+ QNetworkAccessManager manager;
+ QTime t;
+ QNetworkRequest request(QUrl(testFile.fileName()));
+
+ // do 3 dry runs for cache warmup
+ qnamImmediateFileRead_iteration(manager, request);
+ qnamImmediateFileRead_iteration(manager, request);
+ qnamImmediateFileRead_iteration(manager, request);
+
+ t.start();
+ // 10 real runs
+ QBENCHMARK_ONCE {
+ for (int i = 0; i < iterations; i++) {
+ qnamImmediateFileRead_iteration(manager, request);
+ }
+ }
+
+ qint64 elapsed = t.elapsed();
+ qDebug() << endl << "Finished!";
+ qDebug() << "Bytes:" << size;
+ qDebug() << "Speed:" << (qreal(size*iterations) / 1024.0) / (qreal(elapsed) / 1000.0) << "KB/sec";
+}
+
void qfile_vs_qnetworkaccessmanager::qfileFileRead_iteration()
{
testFile.reset();
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.cpp b/tools/assistant/lib/qhelpsearchquerywidget.cpp
index 193f3a5..ab48dac 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.cpp
+++ b/tools/assistant/lib/qhelpsearchquerywidget.cpp
@@ -119,6 +119,22 @@ private:
// nothing todo
}
+ void retranslate()
+ {
+ simpleSearchLabel->setText(tr("Search for:"));
+ prevQueryButton->setToolTip(tr("Previous search"));
+ nextQueryButton->setToolTip(tr("Next search"));
+ searchButton->setText(tr("Search"));
+#ifdef QT_CLUCENE_SUPPORT
+ advancedSearchLabel->setText(tr("Advanced search"));
+ similarLabel->setText(tr("words <B>similar</B> to:"));
+ withoutLabel->setText(tr("<B>without</B> the words:"));
+ exactLabel->setText(tr("with <B>exact phrase</B>:"));
+ allLabel->setText(tr("with <B>all</B> of the words:"));
+ atLeastLabel->setText(tr("with <B>at least one</B> of the words:"));
+#endif
+ }
+
QStringList buildTermList(const QString query)
{
bool s = false;
@@ -338,6 +354,13 @@ private:
friend class QHelpSearchQueryWidget;
bool simpleSearch;
+ QLabel *simpleSearchLabel;
+ QLabel *advancedSearchLabel;
+ QLabel *similarLabel;
+ QLabel *withoutLabel;
+ QLabel *exactLabel;
+ QLabel *allLabel;
+ QLabel *atLeastLabel;
QPushButton *searchButton;
QWidget* advancedSearchWidget;
QToolButton *showHideAdvancedSearchButton;
@@ -387,19 +410,17 @@ QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
vLayout->setMargin(0);
QHBoxLayout* hBoxLayout = new QHBoxLayout();
- QLabel *label = new QLabel(tr("Search for:"), this);
+ d->simpleSearchLabel = new QLabel(this);
d->defaultQuery = new QLineEdit(this);
d->defaultQuery->setCompleter(&d->searchCompleter);
d->prevQueryButton = new QToolButton(this);
d->prevQueryButton->setArrowType(Qt::LeftArrow);
- d->prevQueryButton->setToolTip(tr("Previous search"));
d->prevQueryButton->setEnabled(false);
d->nextQueryButton = new QToolButton(this);
d->nextQueryButton->setArrowType(Qt::RightArrow);
- d->nextQueryButton->setToolTip(tr("Next search"));
d->nextQueryButton->setEnabled(false);
- d->searchButton = new QPushButton(tr("Search"), this);
- hBoxLayout->addWidget(label);
+ d->searchButton = new QPushButton(this);
+ hBoxLayout->addWidget(d->simpleSearchLabel);
hBoxLayout->addWidget(d->defaultQuery);
hBoxLayout->addWidget(d->prevQueryButton);
hBoxLayout->addWidget(d->nextQueryButton);
@@ -418,15 +439,15 @@ QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
d->showHideAdvancedSearchButton->setText(QLatin1String("+"));
d->showHideAdvancedSearchButton->setMinimumSize(25, 20);
- label = new QLabel(tr("Advanced search"), this);
+ d->advancedSearchLabel = new QLabel(this);
QSizePolicy sizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
- sizePolicy.setHeightForWidth(label->sizePolicy().hasHeightForWidth());
- label->setSizePolicy(sizePolicy);
+ sizePolicy.setHeightForWidth(d->advancedSearchLabel->sizePolicy().hasHeightForWidth());
+ d->advancedSearchLabel->setSizePolicy(sizePolicy);
QFrame* hLine = new QFrame(this);
hLine->setFrameStyle(QFrame::HLine);
hBoxLayout->addWidget(d->showHideAdvancedSearchButton);
- hBoxLayout->addWidget(label);
+ hBoxLayout->addWidget(d->advancedSearchLabel);
hBoxLayout->addWidget(hLine);
vLayout->addLayout(hBoxLayout);
@@ -436,32 +457,32 @@ QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
QGridLayout *gLayout = new QGridLayout(d->advancedSearchWidget);
gLayout->setMargin(0);
- label = new QLabel(tr("words <B>similar</B> to:"), this);
- gLayout->addWidget(label, 0, 0);
+ d->similarLabel = new QLabel(this);
+ gLayout->addWidget(d->similarLabel, 0, 0);
d->similarQuery = new QLineEdit(this);
d->similarQuery->setCompleter(&d->searchCompleter);
gLayout->addWidget(d->similarQuery, 0, 1);
- label = new QLabel(tr("<B>without</B> the words:"), this);
- gLayout->addWidget(label, 1, 0);
+ d->withoutLabel = new QLabel(this);
+ gLayout->addWidget(d->withoutLabel, 1, 0);
d->withoutQuery = new QLineEdit(this);
d->withoutQuery->setCompleter(&d->searchCompleter);
gLayout->addWidget(d->withoutQuery, 1, 1);
- label = new QLabel(tr("with <B>exact phrase</B>:"), this);
- gLayout->addWidget(label, 2, 0);
+ d->exactLabel = new QLabel(this);
+ gLayout->addWidget(d->exactLabel, 2, 0);
d->exactQuery = new QLineEdit(this);
d->exactQuery->setCompleter(&d->searchCompleter);
gLayout->addWidget(d->exactQuery, 2, 1);
- label = new QLabel(tr("with <B>all</B> of the words:"), this);
- gLayout->addWidget(label, 3, 0);
+ d->allLabel = new QLabel(this);
+ gLayout->addWidget(d->allLabel, 3, 0);
d->allQuery = new QLineEdit(this);
d->allQuery->setCompleter(&d->searchCompleter);
gLayout->addWidget(d->allQuery, 3, 1);
- label = new QLabel(tr("with <B>at least one</B> of the words:"), this);
- gLayout->addWidget(label, 4, 0);
+ d->atLeastLabel = new QLabel(this);
+ gLayout->addWidget(d->atLeastLabel, 4, 0);
d->atLeastQuery = new QLineEdit(this);
d->atLeastQuery->setCompleter(&d->searchCompleter);
gLayout->addWidget(d->atLeastQuery, 4, 1);
@@ -469,6 +490,8 @@ QHelpSearchQueryWidget::QHelpSearchQueryWidget(QWidget *parent)
vLayout->addWidget(d->advancedSearchWidget);
d->advancedSearchWidget->hide();
+ d->retranslate();
+
connect(d->exactQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
connect(d->similarQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
connect(d->withoutQuery, SIGNAL(returnPressed()), this, SIGNAL(search()));
@@ -511,4 +534,14 @@ void QHelpSearchQueryWidget::focusInEvent(QFocusEvent *focusEvent)
}
}
+/*! \reimp
+*/
+void QHelpSearchQueryWidget::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ d->retranslate();
+ else
+ QWidget::changeEvent(event);
+}
+
QT_END_NAMESPACE
diff --git a/tools/assistant/lib/qhelpsearchquerywidget.h b/tools/assistant/lib/qhelpsearchquerywidget.h
index a99bae0..2afc4b4 100644
--- a/tools/assistant/lib/qhelpsearchquerywidget.h
+++ b/tools/assistant/lib/qhelpsearchquerywidget.h
@@ -74,7 +74,8 @@ Q_SIGNALS:
void search();
private:
- void focusInEvent(QFocusEvent *focusEvent);
+ virtual void focusInEvent(QFocusEvent *focusEvent);
+ virtual void changeEvent(QEvent *event);
private:
QHelpSearchQueryWidgetPrivate *d;
diff --git a/tools/assistant/lib/qhelpsearchresultwidget.cpp b/tools/assistant/lib/qhelpsearchresultwidget.cpp
index 3cac880..a3f5aed 100644
--- a/tools/assistant/lib/qhelpsearchresultwidget.cpp
+++ b/tools/assistant/lib/qhelpsearchresultwidget.cpp
@@ -408,6 +408,14 @@ QHelpSearchResultWidget::QHelpSearchResultWidget(QHelpSearchEngine *engine)
connect(engine, SIGNAL(searchingFinished(int)), d, SLOT(setResults(int)));
}
+/*! \reimp
+*/
+void QHelpSearchResultWidget::changeEvent(QEvent *event)
+{
+ if (event->type() == QEvent::LanguageChange)
+ d->setResults(d->searchEngine->hitCount());
+}
+
/*!
Destroys the search result widget.
*/
diff --git a/tools/assistant/lib/qhelpsearchresultwidget.h b/tools/assistant/lib/qhelpsearchresultwidget.h
index d078079..ff29adc 100644
--- a/tools/assistant/lib/qhelpsearchresultwidget.h
+++ b/tools/assistant/lib/qhelpsearchresultwidget.h
@@ -75,6 +75,7 @@ private:
QHelpSearchResultWidgetPrivate *d;
QHelpSearchResultWidget(QHelpSearchEngine *engine);
+ virtual void changeEvent(QEvent *event);
};
QT_END_NAMESPACE
diff --git a/tools/designer/src/lib/shared/widgetfactory.cpp b/tools/designer/src/lib/shared/widgetfactory.cpp
index eda551d..c7b13a1 100644
--- a/tools/designer/src/lib/shared/widgetfactory.cpp
+++ b/tools/designer/src/lib/shared/widgetfactory.cpp
@@ -774,6 +774,8 @@ void WidgetFactory::applyStyleTopLevel(const QString &styleName, QWidget *w)
void WidgetFactory::applyStyleToTopLevel(QStyle *style, QWidget *widget)
{
+ if (!style)
+ return;
const QPalette standardPalette = style->standardPalette();
if (widget->style() == style && widget->palette() == standardPalette)
return;
diff --git a/tools/runonphone/main.cpp b/tools/runonphone/main.cpp
index d8c306f..c7fc43f 100644
--- a/tools/runonphone/main.cpp
+++ b/tools/runonphone/main.cpp
@@ -175,7 +175,11 @@ int main(int argc, char *argv[])
}
if(loglevel > 0)
outstream << "Connecting to target via " << serialPortName << endl;
+#ifdef Q_OS_WIN
launcher->setTrkServerName(QString("\\\\.\\") + serialPortName);
+#else
+ launcher->setTrkServerName(serialPortName);
+#endif
launcher->setFileName(QString("c:\\sys\\bin\\") + exeFile);
launcher->setCommandLineArgs(cmdLine);
diff --git a/tools/runonphone/runonphone.pro b/tools/runonphone/runonphone.pro
index cf0c055..cb27d1b 100644
--- a/tools/runonphone/runonphone.pro
+++ b/tools/runonphone/runonphone.pro
@@ -18,3 +18,9 @@ windows {
-luuid \
-ladvapi32
}
+unix:!symbian {
+ SOURCES += serenum_unix.cpp
+}
+else {
+ SOURCES += serenum_stub.cpp
+}
diff --git a/tools/runonphone/serenum_stub.cpp b/tools/runonphone/serenum_stub.cpp
new file mode 100644
index 0000000..f39765e
--- /dev/null
+++ b/tools/runonphone/serenum_stub.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 "serenum.h"
+#include <QByteArray>
+#include <QString>
+#include <QDebug>
+
+QList<SerialPortId> enumerateSerialPorts()
+{
+ QList<SerialPortId> list;
+ qWarning() << "enumerateSerialPorts not implemented" << endl;
+ return list;
+}
+
diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp
new file mode 100644
index 0000000..ca6c437
--- /dev/null
+++ b/tools/runonphone/serenum_unix.cpp
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the tools applications 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 "serenum.h"
+#include <QByteArray>
+#include <QString>
+#include <QDebug>
+#include <QFileInfo>
+#include <QDir>
+
+QList<SerialPortId> enumerateSerialPorts()
+{
+ QList<SerialPortId> list;
+ QDir dir("/dev/serial/by-id/");
+ QFileInfoList ports(dir.entryInfoList());
+ foreach(QFileInfo info, ports) {
+ if (!info.isDir()) {
+ SerialPortId id;
+ id.friendlyName = info.fileName();
+ id.portName = info.canonicalFilePath();
+ list << id;
+ }
+ }
+ return list;
+}
+
diff --git a/translations/translations.pri b/translations/translations.pri
index 6849c8e..2b97a14 100644
--- a/translations/translations.pri
+++ b/translations/translations.pri
@@ -8,8 +8,12 @@ defineReplace(prependAll) {
return ($$result)
}
-LUPDATE = $$QT_BUILD_TREE/bin/lupdate -locations relative -no-ui-lines
-LUPDATE ~= s,/,$$QMAKE_DIR_SEP,
+LUPDATE = $$QT_BUILD_TREE/bin/lupdate
+win32 {
+ LUPDATE ~= s,/,$$QMAKE_DIR_SEP,
+ LUPDATE = $${LUPDATE}.exe
+}
+LUPDATE += -locations relative -no-ui-lines
###### Qt Libraries
diff --git a/translations/translations.pro b/translations/translations.pro
index ef09dc3..f1b9c99 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -1,7 +1,10 @@
TRANSLATIONS = $$files(*.ts)
LRELEASE = $$QT_BUILD_TREE/bin/lrelease
-LRELEASE ~= s,/,$$QMAKE_DIR_SEP,
+win32 {
+ LRELEASE ~= s,/,$$QMAKE_DIR_SEP,
+ LRELEASE = $${LRELEASE}.exe
+}
contains(TEMPLATE_PREFIX, vc):vcproj = 1
@@ -14,7 +17,8 @@ LIBS =
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_BASE}.qm
isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS
-updateqm.commands = @echo lrelease ${QMAKE_FILE_IN}; $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+updateqm.commands = $$LRELEASE ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
+silent:updateqm.commands = @echo lrelease ${QMAKE_FILE_IN} && $$updateqm.commands
updateqm.name = LRELEASE ${QMAKE_FILE_IN}
updateqm.CONFIG += no_link
QMAKE_EXTRA_COMPILERS += updateqm
diff --git a/util/qlalr/doc/qlalr.qdocconf b/util/qlalr/doc/qlalr.qdocconf
index 391844b..ea9eaa6 100644
--- a/util/qlalr/doc/qlalr.qdocconf
+++ b/util/qlalr/doc/qlalr.qdocconf
@@ -59,7 +59,7 @@ HTML.postheader = "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0
HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
"<table width=\"100%\" cellspacing=\"0\" border=\"0\"><tr class=\"address\">\n" \
- "<td width=\"30%\" align=\"left\">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
+ "<td width=\"30%\" align=\"left\">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>\n" \
"<td width=\"40%\" align=\"center\"><a href=\"trademarks.html\">Trademarks</a></td>\n" \
"<td width=\"30%\" align=\"right\"><div align=\"right\">Qt \\version</div></td>\n" \
"</tr></table></div></address>"