summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--demos/browser/browser.pro2
-rw-r--r--demos/browser/networkaccessmanager.cpp3
-rw-r--r--demos/browser/webview.cpp14
-rw-r--r--dist/changes-4.6.2274
-rw-r--r--doc/src/deployment/deployment.qdoc84
-rw-r--r--doc/src/platforms/platform-notes.qdoc3
-rw-r--r--src/gui/painting/qdrawhelper.cpp36
-rw-r--r--src/gui/painting/qdrawhelper_mmx_p.h45
-rw-r--r--src/gui/painting/qdrawhelper_p.h3
-rw-r--r--src/network/access/qhttpnetworkreply.cpp68
-rw-r--r--src/network/access/qnetworkcookie.h2
-rw-r--r--src/network/access/qnetworkcookiejar.h2
-rw-r--r--src/xmlpatterns/data/qatomicvalue.cpp2
-rw-r--r--tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp1
-rw-r--r--tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp64
-rw-r--r--tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp14
-rw-r--r--tools/designer/src/lib/shared/actionrepository.cpp21
-rw-r--r--tools/designer/src/lib/shared/actionrepository_p.h9
-rw-r--r--tools/designer/src/lib/shared/iconloader.cpp3
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu.cpp11
-rw-r--r--tools/designer/src/lib/shared/qdesigner_menu_p.h2
-rw-r--r--tools/linguist/linguist/messagemodel.cpp48
-rw-r--r--tools/linguist/linguist/messagemodel.h2
-rw-r--r--translations/qt_de.ts8
-rw-r--r--util/qlalr/cppgenerator.cpp2
25 files changed, 377 insertions, 346 deletions
diff --git a/demos/browser/browser.pro b/demos/browser/browser.pro
index a42aa60..f038c61 100644
--- a/demos/browser/browser.pro
+++ b/demos/browser/browser.pro
@@ -6,8 +6,6 @@ CONFIG += qt warn_on
contains(QT_BUILD_PARTS, tools):!embedded: CONFIG += uitools
else: DEFINES += QT_NO_UITOOLS
-release:DEFINES+=QT_NO_DEBUG_OUTPUT QT_NO_WARNING_OUTPUT
-
FORMS += \
addbookmarkdialog.ui \
bookmarks.ui \
diff --git a/demos/browser/networkaccessmanager.cpp b/demos/browser/networkaccessmanager.cpp
index b0b00a2..70a9305 100644
--- a/demos/browser/networkaccessmanager.cpp
+++ b/demos/browser/networkaccessmanager.cpp
@@ -112,8 +112,9 @@ void NetworkAccessManager::requestFinished(QNetworkReply *reply)
double pctCached = (double(requestFinishedFromCacheCount) * 100.0/ double(requestFinishedCount));
double pctPipelined = (double(requestFinishedPipelinedCount) * 100.0/ double(requestFinishedCount));
double pctSecure = (double(requestFinishedSecureCount) * 100.0/ double(requestFinishedCount));
+#ifdef QT_DEBUG
qDebug("STATS [%lli requests total] [%3.2f%% from cache] [%3.2f%% pipelined] [%3.2f%% SSL/TLS]", requestFinishedCount, pctCached, pctPipelined, pctSecure);
-
+#endif
}
void NetworkAccessManager::loadSettings()
diff --git a/demos/browser/webview.cpp b/demos/browser/webview.cpp
index 1a7e38a..2f9b3e6 100644
--- a/demos/browser/webview.cpp
+++ b/demos/browser/webview.cpp
@@ -143,11 +143,19 @@ QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const QS
void WebPage::handleUnsupportedContent(QNetworkReply *reply)
{
- if (reply->error() == QNetworkReply::NoError) {
- BrowserApplication::downloadManager()->handleUnsupportedContent(reply);
+ QString errorString = reply->errorString();
+
+ if (m_loadingUrl != reply->url()) {
+ // sub resource of this page
+ qWarning() << "Resource" << reply->url().toEncoded() << "has unknown Content-Type, will be ignored.";
+ reply->deleteLater();
return;
}
+ if (reply->error() == QNetworkReply::NoError && !reply->header(QNetworkRequest::ContentTypeHeader).isValid()) {
+ errorString = "Unknown Content-Type";
+ }
+
QFile file(QLatin1String(":/notfound.html"));
bool isOpened = file.open(QIODevice::ReadOnly);
Q_ASSERT(isOpened);
@@ -156,7 +164,7 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
QString title = tr("Error loading page: %1").arg(reply->url().toString());
QString html = QString(QLatin1String(file.readAll()))
.arg(title)
- .arg(reply->errorString())
+ .arg(errorString)
.arg(reply->url().toString());
QBuffer imageBuffer;
diff --git a/dist/changes-4.6.2 b/dist/changes-4.6.2
index aaaaacc..657aafc 100644
--- a/dist/changes-4.6.2
+++ b/dist/changes-4.6.2
@@ -16,22 +16,6 @@ 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 *
@@ -42,98 +26,88 @@ QtCore
- QAtomicPointer
* [QTBUG-7356] Fixed a compilation failure when using the Intel
- compiler on IA-64
-
+ compiler on IA-64
- QFile
* Fixed double-buffering issue when opening files in buffered mode.
- * [QTBUG-7285] QFile::remove would fail if an unrelated operation on the
- same instance had been previously failed. This manisfested itself in
- QTemporaryFile failing to auto-remove files and QFile::copy leaving
+ * [QTBUG-7285] QFile::remove would() fail if an unrelated operation on the
+ same instance had been previously failed. This manifested itself in
+ QTemporaryFile failing to auto-remove files and QFile::copy() leaving
temporary files behind in certain situations.
-
- QFSFileEngine
- * Fix typo that made realpath() not being used
-
+ * Fix typo that made realpath() not be used.
- QIODevice
- * Optimized readAll()
-
+ * Optimized readAll().
- QReadWriteLock
- * [MR 426] Fixed documentation
-
+ * [MR 426] Fixed documentation.
- QXmlStreamWriter
- * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a xml file.
+ * [QTBUG-6893] Fixed adding extra Byte Order Marks when writing to a
+ .xml file.
QtGui
-----
+ - QApplication
+ * [QTBUG-6098] Added a flag to avoid construction of application panes.
+ * [QTBUG-7029] Fixed a crash when re-creating QApplication object due
+ to a dangling gesture manager pointer.
- QAbstractScrollArea
- * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical scrollbar is hidden
-
+ * [QTBUG-1760] Reverted horizontal scrolling with mouse wheel when vertical
+ scrollbar is hidden
- QBmpHandler
- * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid BMP images.
-
+ * [QTBUG-7530] Fixed an infinite loop that could occur when reading invalid
+ BMP images.
- QGraphicsEffect
* [QTBUG-6901] Fixed performance problem when translating items with
graphics effects.
-
- QImage
* [QTBUG-7231] Avoid an unnecessary copy in QImage::scaled().
-
- - QPDFEngine
- * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF engine.
-
- - QApplication
- * [QTBUG-6098] Added a flag to avoid construction of application panes.
- QInputContext
- * [QTBUG-7439] Avoided the loss of preedit text when losing focus on Symbian.
-
- * [QT-2629] Implemented event filter functions for Symbian.
- * [QTBUG-7029] Fixed a crash when re-creating QApplication object due to a
- dangling gesture manager pointer.
- * [QTBUG-7198] Setting a style sheet could break the checkbox position in item views.
- * [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using a QPen
- with a style other than SolidLine.
-
-
- * [MR 2077] Integrated merge request 2077
+ * [QTBUG-7439] Avoided the loss of preedit text when losing focus on
+ Symbian.
+ - QPDFEngine
+ * [QTBUG-7249] Fixed the encoding of the Tile and Creator tags in the PDF
+ engine.
+ - [QT-2629] Implemented event filter functions for Symbian.
+ - [QTBUG-7198] Setting a style sheet could break the checkbox position in
+ item views.
+ - [QTBUG-7253] Fixed wrong stroke clipping with the raster engine when using
+ a QPen with a style other than SolidLine.
QtDBus
------
- QDBusConnection
- * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui
+ * [QT-2307] Fixed sending of D-Bus method calls with QDBus::BlockWithGui.
QtNetwork
---------
- QNetworkAccessManager
* Optimizations
- * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed
- * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all layers
- * [QTBUG-7713] HTTP: Fix bug related to re-sending a request
+ * HTTP: Get rid of QAbstractSocket warnings that were sometimes displayed.
+ * HTTP: setReadBufferSize() of the QNetworkReply finally is working on all
+ layers.
+ * [QTBUG-7713] HTTP: Fix bug related to re-sending a request.
* [QTBUG-7060] Fixed an issue with parsing of HTTP headers like
- "private, max-age=300"
-
+ "private, max-age=300".
- QSslCertificate
- * [QTBUG-6466] Fix issuerInfo() and subjectInfo()
-
+ * [QTBUG-6466] Fix issuerInfo() and subjectInfo().
- QTcpSocket
- * [QTBUG-7344] Fix performance degredation with write() on Windows
- * [QTBUG-7316,QTBUG-7317] Also handle unknown errors from socket engine
+ * [QTBUG-7344] Fix performance degredation with write() on Windows.
+ * [QTBUG-7316,QTBUG-7317] Handle unknown errors from socket engine.
QtOpenGL
--------
- [QTBUG-7490] Better support for user-generated binary shaders.
-
- - QGLWidget
- * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows.
-
- QGLPixelBuffer
- * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to QGLPixelBuffers.
-
+ * [QTBUG-7476] Fixed a crash under X11 when drawing QPixmaps to
+ QGLPixelBuffers.
- QGL2PaintEngineEx
* [QTBUG-7203] Reset the GL stencil mask, op and function in resetGLState().
+ - QGLWidget
+ * [QTBUG-7213] Fixed QGLWidget::renderPixmap() on Windows.
+
QtOpenVG
--------
@@ -141,137 +115,89 @@ QtOpenVG
- [QTBUG-7791] Optimize single-rect IntersectClip in OpenVG using the scissor.
- [QTBUG-7864] Use OpenVG scissor on 90/180/270 rotations and simple clips.
-QtScript
---------
-
- - foo
- * bar
-
-QtSql
------
-
- - foo
- * bar
-
-QtXml
------
-
- - foo
- * bar
-
QtMultimedia
------------
- QAudioInput
- * [QTBUG-7044]: QAudioInput stopped working correctly after suspend()/resume() on linux.
-
-Qt Plugins
-----------
-
- - foo
- * bar
+ * [QTBUG-7044]: QAudioInput stopped working correctly after
+ suspend()/resume() on linux.
Examples
--------
- QtMultimedia
- * [MR 418] Fixed the example for QAudioOutput
-
+ * [MR 418] Fixed the example for QAudioOutput.
- WebKit
- * [MR 2235] Added the framecapture example to the default build
-
-Third party components
-----------------------
-
- - Updated foo to version 2.3.9.
-
- - Updated bar to the latest version from baz.org.
+ * [MR 2235] Added the framecapture example to the default build.
****************************************************************************
* Platform Specific Changes *
****************************************************************************
-Qt for Unix (X11 and Mac OS X)
-------------------------------
-
- -
-
Qt for Linux/X11
----------------
- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
- in Qt/X11.
-
- * Fixed a crash when an input method tries to create a widget after the
- application is destroyed.
-
- - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle
- - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with
- some GTK+ themes.
- - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes.
-
-Qt for Windows
---------------
+ - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in Qt/X11.
+ - Fixed a crash when an input method tries to create a widget after the
+ application is destroyed.
+ - [QTBUG-6952] Fixed a problem using NoButtons in spinbox with QGtkStyle.
+ - [QTBUG-7504] Fixed missing focus rect on check- and radiobutton with
+ some GTK+ themes.
+ - [QTBUG-6522] Fixed missing menu separator in some GTK+ themes.
Qt for Mac OS X
---------------
- [QTBUG-7832]: Restored missing margins around non-unified toolbars.
- - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget on Cocoa.
- - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for Mac/Carbon.
- - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4 lead to crash.
- - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results in top menu hiding.
- - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode changes.
- - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with native toolbar.
- - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar on Cocoa.
- - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left mode.
-
-
-Qt for Embedded Linux
----------------------
-
- -
+ - [QTBUG-7312]: Menubar and dock disappear after hiding a fullscreen widget
+ on Cocoa.
+ - [QTBUG-7481]: Re-added the Close button in QPrintPreviewDialog for
+ Mac/Carbon.
+ - [QTBUG-7522]: Drawing fake buttons using QMacStyle+QStyleOptionViewItemV4
+ lead to crash.
+ - [QTBUG-7625]: Calling showFullScreen() then showNormal() on a widget results
+ in top menu hiding.
+ - [QTBUG-7086]: QFileDialog now correctly responds to fileMode & acceptMode
+ changes.
+ - [QTBUG-7162]: Fixed a crash in Designer when previewing a QMainWindow with
+ native toolbar.
+ - [QTBUG-7305]: Fixed a crash when deleting QMainWindow with native toolbar
+ on Cocoa.
+ - [QTBUG-6882]: Fixed a text layout issue with QHeaderView in right-to-left
+ mode.
DirectFB
--------
- * Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
- in DirectFB.
- * Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes
- QPixmap::scroll
- * Fix a rendering issue for semi-transparent top level windows in DirectFB.
- * Make it possible to fall back to the raster engine for stretch blits in
- DirectFB using QT_NO_DIRECTFB_STRETCHBLIT
- -
-
-Qt for Windows CE
------------------
- -
+ - Fix a bug where QPixmap::serialNumber was not set on a transformed pixmap
+ in DirectFB.
+ - Reimplement QPixmapData::scroll for QDirectFBPixmapData which optimizes
+ QPixmap::scroll.
+ - Fix a rendering issue for semi-transparent top level windows in DirectFB.
+ - Make it possible to fall back to the raster engine for stretch blits in
+ DirectFB using QT_NO_DIRECTFB_STRETCHBLIT.
Qt for Symbian
--------------
- * [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/
- disable of DEF file usage (for use _during development only_ to decouple
- the need to update the DEF files at the precise point that symbols are
- removed, therefore allowing builds by CI systems to succeed even if symbols
- have been removed. This does not remove the need to update the DEF files
- before release. NOTE: Builds generated using this flag are not binary
- compatible with previous versions of Qt.)
-
-- QProcess
- * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished.
-
-- qmake
- * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated
- pkg files.
- * [QTBUG-7908] Smart installer package generation support
-
-- Patch_capabilities script
+ - [QTBUG-6556] Improve the DEF file handling scheme, to allow simple enable/
+ disable of DEF file usage (for use _during development only_ to decouple
+ the need to update the DEF files at the precise point that symbols are
+ removed, therefore allowing builds by CI systems to succeed even if symbols
+ have been removed. This does not remove the need to update the DEF files
+ before release. NOTE: Builds generated using this flag are not binary
+ compatible with previous versions of Qt.)
+ - QProcess
+ * [QTBUG-7667] Fixed no-timeout case for QProcess::waitForFinished.
+ - qmake
+ * [QTBUG-7695] Added support for ifdeffing for manufacturer in generated
+ pkg files.
+ * [QTBUG-7908] Smart installer package generation support.
+ - Patch_capabilities script
* Added support for embedded sis name/uid patching.
-
-- Qt deployment
- * [QTBUG-7518] Backup and restore support for Qt libs
+ - Qt deployment
+ * [QTBUG-7518] Backup and restore support for Qt libs.
****************************************************************************
@@ -279,28 +205,22 @@ Qt for Symbian
****************************************************************************
- Designer
- * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties
+ * [QTBUG-6965] Enabled editing seconds of QDateTime-type properties.
* [QTBUG-6757] Fixed bug where selection handles would be affected by
a style sheet set on the main form.
- uic3
* [QTBUG-7404] Added option to preserve layout names set by Qt 3 Designer.
- - qdoc3
- * bar
-
- - Linguist
- * baz
-
****************************************************************************
* Important Behavior Changes *
****************************************************************************
- QNetworkAccessManager cache
- * QNetworkAccessManager will no longer return expired pages, as
- stated in the documentation
- * The behaviour of PreferCache and PreferNetwork modes now match
- the documentation more closely
+ * QNetworkAccessManager will no longer return expired pages, as
+ stated in the documentation
+ * The behaviour of PreferCache and PreferNetwork modes now match
+ the documentation more closely
- QUrl
* QUrl will now accept hostnames ending in dot and will not treat
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index 43f5d33..bf0bc74 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -963,14 +963,14 @@
\title Deploying an Application on Mac OS X
- Starting with version 4.5, Qt now includes a \l {macdeploy}{deployment tool}
- that automates the prodecures described in this document.
-
- This documentation will describe how to create a bundle, and how
- to make sure that the application will find the resources it needs
- at run-time. We will demonstrate the procedures in terms of
- deploying the \l {tools/plugandpaint}{Plug & Paint} application
- that is provided in Qt's examples directory.
+ Beginning with Qt 4.5, a \l {macdeploy}{deployment tool} is
+ included that automates the prodecures described here.
+
+ This document describes how to create a bundle and how to make
+ sure that the application will find the resources it needs at
+ run-time. We demonstrate the procedures in terms of deploying the
+ \l {tools/plugandpaint}{Plug & Paint} application that is provided
+ in Qt's examples directory.
\tableofcontents
@@ -1380,63 +1380,38 @@
\section2 Mac OS X Version Dependencies
- Qt 4.2 has been designed to be built and deployed on Mac OS X 10.3
- up until the current version as of this writing, Mac OS X 10.4 and
- all their minor releases. Qt achieves this by using "weak
- linking." This means that Qt tests if a function added in newer
- versions of Mac OS X is available on the computer it is running on
- before it uses it. This results in getting access to newer
- features when running on newer versions of OS X while still
- remaining compatible on older versions.
+ From Qt 4.6, Mac OS X 10.3 (Panther) is no longer supported. Qt
+ 4.6 applications can be built and deployed on Mac OS X 10.4
+ (Tiger) and higher. This is achieved using \e{weak linking}. In
+ \e{weak linking}, Qt tests whether a function added in a newer
+ version of Mac OS X is available on the computer it is running
+ on. This allows Qt to use newer features, when it runs on a newer
+ version of OS X, while remaining compatible on the older versions.
For more information about cross development issues on Mac OS X,
see \l
{http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/index.html}{Apple's Developer Website}.
- Since the linker is set to be compatible with all OS X version, you have to
- change the \c MACOSX_DEPLOYMENT_TARGET environment variable to get weak
- linking to work for your application. You can add:
+ Since the linker is set to be compatible with all OS X versions,
+ you must change the \c MACOSX_DEPLOYMENT_TARGET environment
+ variable to get \e{weak linking} to work for your application. You
+ can add:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 51
- to your .pro file and qmake will take care of this for you.
-
- However, there is a bit of a wrinkle to keep in mind when your are
- deploying. Mac OS X 10.4 ("Tiger") ships GCC 4.0 as its default
- compiler. This is also the GCC compiler we use for building the
- binary Qt package. If you use GCC 4.0 to build your application,
- it will link against a dynamic libstdc++ that is only available on
- Mac OS X 10.4 and Mac OS X 10.3.9. The application will refuse to
- run on older versions of the operating system.
+ to your .pro file, and qmake will take care of this for you.
For more information about C++ runtime environment, see \l
{http://developer.apple.com/documentation/DeveloperTools/Conceptual/CppRuntimeEnv/index.html}{Apple's Developer Website}
- If you want to deploy to versions of Mac OS X earlier than 10.3.9,
- you must build with GCC 3.3 which is the default on Mac OS X
- 10.3. GCC 3.3 is also available on the Mac OS X 10.4 "Xcode Tools"
- CD and as a download for earlier versions of Mac OS X from Apple
- (\l {https://connect.apple.com/}{connect.apple.com}). You can use
- Apple's \c gcc_select(1) command line tool to switch the default
- complier on your system.
-
\section3 Deploying Phonon Applications on Mac OS X
\list
- \o If you build your Phonon application on Tiger, it will work on
- Tiger, Leopard and Panther.
- \o If you build your application on Leopard, it will \bold not work
- on Panther unless you rename the libraries with the following command
- after you have built your application:
-
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51a
- This command must be invoked in the directory where
- \c{libphonon_qt7.dylib} is located, usually in
- \c{yourapp.app/Contents/plugins/phonon_backend/}.
- \o The \l {macdeploy}{deployment tool} will perform this step for you.
+ \o If you build your Qt 4.6 Phonon application on OS X 10.4
+ (Tiger), it will run on OS X 10.4 and higher.
- \o If you are using Leopard, but would like to build your application
+ \o If you are using Leopard but would like to build your application
against Tiger, you can use:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 51b
@@ -1444,12 +1419,13 @@
\section2 Architecture Dependencies
- The Qt for Mac OS X libraries, tools, and examples can be built "universal"
- (i.e. they run natively on both Intel and PowerPC machines). This
- is accomplished by passing \c -universal on the \c configure line
- of the source package, and requires that you use GCC 4.0.x. On
- PowerPC hardware you will need to pass the universal SDK as a
- command line argument to the Qt configure command. For example:
+ The Qt for Mac OS X libraries, tools, and examples can be built
+ "universal" (i.e. they run natively on both Intel and PowerPC
+ machines). This is accomplished by passing \c -universal on the
+ \c configure line of the source package, and requires that you use
+ GCC 4.0.x. On PowerPC hardware you will need to pass the universal
+ SDK as a command line argument to the Qt configure command. For
+ example:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 52
diff --git a/doc/src/platforms/platform-notes.qdoc b/doc/src/platforms/platform-notes.qdoc
index e08bf1a..f513181 100644
--- a/doc/src/platforms/platform-notes.qdoc
+++ b/doc/src/platforms/platform-notes.qdoc
@@ -293,6 +293,9 @@
\section1 General Information
+ Qt 4.6 applications can only be deployed on Mac OS X 10.4 (Tiger)
+ and higher.
+
Qt 4.4 and Qt 4.5 development is only supported on Mac OS X 10.4 and up.
Applications built against these version of Qt can be deployed on Mac OS X
10.3, but cannot be developed on that version of the operating system due
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index 660a2a8..7a3da20 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1267,32 +1267,28 @@ static const uint L2CacheLineLengthInInts = L2CacheLineLength/sizeof(uint);
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ QT_MEMFILL_UINT(dest, length, 0);\
+ } else {\
+ int ialpha = 255 - const_alpha;\
+ PRELOAD_INIT(dest)\
+ for (int i = 0; i < length; ++i) {\
+ PRELOAD_COND(dest)\
+ dest[i] = BYTE_MUL(dest[i], ialpha);\
+ }\
+ }\
+}
+
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- QT_MEMFILL_UINT(dest, length, 0);
- } else {
- int ialpha = 255 - const_alpha;
- PRELOAD_INIT(dest)
- for (int i = 0; i < length; ++i) {
- PRELOAD_COND(dest)
- dest[i] = BYTE_MUL(dest[i], ialpha);
- }
- }
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
diff --git a/src/gui/painting/qdrawhelper_mmx_p.h b/src/gui/painting/qdrawhelper_mmx_p.h
index 8482262..59b3804 100644
--- a/src/gui/painting/qdrawhelper_mmx_p.h
+++ b/src/gui/painting/qdrawhelper_mmx_p.h
@@ -146,36 +146,30 @@ struct QMMXCommonIntrinsics
result = 0
d = d * cia
*/
+#define comp_func_Clear_impl(dest, length, const_alpha)\
+{\
+ if (const_alpha == 255) {\
+ qt_memfill(static_cast<quint32*>(dest), quint32(0), length);\
+ } else {\
+ C_FF; C_80; C_00;\
+ m64 ia = MM::negate(MM::load_alpha(const_alpha));\
+ for (int i = 0; i < length; ++i) {\
+ dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));\
+ }\
+ MM::end();\
+ }\
+}
+
template <class MM>
static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint const_alpha)
{
- if (!length)
- return;
-
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i) {
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
template <class MM>
static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
- if (const_alpha == 255) {
- qt_memfill(static_cast<quint32*>(dest), quint32(0), length);
- } else {
- C_FF; C_80; C_00;
- m64 ia = MM::negate(MM::load_alpha(const_alpha));
- for (int i = 0; i < length; ++i)
- dest[i] = MM::store(MM::byte_mul(MM::load(dest[i]), ia));
- }
- MM::end();
+ comp_func_Clear_impl(dest, length, const_alpha);
}
/*
@@ -246,7 +240,10 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
C_FF; C_80; C_00;
if (const_alpha == 255) {
for (int i = 0; i < length; ++i) {
- if ((0xff000000 & src[i]) == 0xff000000) {
+ const uint alphaMaskedSource = 0xff000000 & src[i];
+ if (alphaMaskedSource == 0)
+ continue;
+ if (alphaMaskedSource == 0xff000000) {
dest[i] = src[i];
} else {
m64 s = MM::load(src[i]);
@@ -257,6 +254,8 @@ static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int le
} else {
m64 ca = MM::load_alpha(const_alpha);
for (int i = 0; i < length; ++i) {
+ if ((0xff000000 & src[i]) == 0)
+ continue;
m64 s = MM::byte_mul(MM::load(src[i]), ca);
m64 ia = MM::negate(MM::alpha(s));
dest[i] = MM::store(MM::add(s, MM::byte_mul(MM::load(dest[i]), ia)));
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 6c47aac..cb0db4f 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -1549,6 +1549,9 @@ template<> inline void qt_memfill(quint8 *dest, quint8 color, int count)
template <class T>
inline void qt_memfill(T *dest, T value, int count)
{
+ if (!count)
+ return;
+
int n = (count + 7) / 8;
switch (count & 0x07)
{
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index a5223d1..512c045 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -423,13 +423,26 @@ int QHttpNetworkReplyPrivate::gunzipBodyPartially(QByteArray &compressed, QByteA
qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // reserve bytes for the status line. This is better than always append() which reallocs the byte array
+ fragment.reserve(32);
+ }
+
qint64 bytes = 0;
char c;
+ qint64 haveRead = 0;
+
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == -1)
+ return -1; // unexpected EOF
+ else if (haveRead == 0)
+ break; // read more later
+
+ bytes++;
- while (socket->bytesAvailable()) {
// allow both CRLF & LF (only) line endings
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- bytes += socket->read(&c, 1); // read the "n"
+ if (c == '\n') {
// remove the CR at the end
if (fragment.endsWith('\r')) {
fragment.truncate(fragment.length()-1);
@@ -442,11 +455,6 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
}
break;
} else {
- c = 0;
- int haveRead = socket->read(&c, 1);
- if (haveRead == -1)
- return -1;
- bytes += haveRead;
fragment.append(c);
}
@@ -456,8 +464,7 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
fragment.clear();
return -1;
}
-
- }
+ } while (haveRead == 1);
return bytes;
}
@@ -500,20 +507,41 @@ bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
{
+ if (fragment.isEmpty()) {
+ // according to http://dev.opera.com/articles/view/mama-http-headers/ the average size of the header
+ // block is 381 bytes.
+ // reserve bytes. This is better than always append() which reallocs the byte array.
+ fragment.reserve(512);
+ }
+
qint64 bytes = 0;
char c = 0;
bool allHeaders = false;
- while (!allHeaders && socket->bytesAvailable()) {
- if (socket->peek(&c, 1) == 1 && c == '\n') {
- // check for possible header endings. As per HTTP rfc,
- // the header endings will be marked by CRLFCRLF. But
- // we will allow CRLFLF, LFLF & CRLFCRLF
- if (fragment.endsWith("\n\r") || fragment.endsWith('\n'))
- allHeaders = true;
+ qint64 haveRead = 0;
+ do {
+ haveRead = socket->read(&c, 1);
+ if (haveRead == 0) {
+ // read more later
+ break;
+ } else if (haveRead == -1) {
+ // connection broke down
+ return -1;
+ } else {
+ fragment.append(c);
+ bytes++;
+
+ if (c == '\n') {
+ // check for possible header endings. As per HTTP rfc,
+ // the header endings will be marked by CRLFCRLF. But
+ // we will allow CRLFCRLF, CRLFLF, LFLF
+ if (fragment.endsWith("\r\n\r\n")
+ || fragment.endsWith("\r\n\n")
+ || fragment.endsWith("\n\n"))
+ allHeaders = true;
+ }
}
- bytes += socket->read(&c, 1);
- fragment.append(c);
- }
+ } while (!allHeaders && haveRead > 0);
+
// we received all headers now parse them
if (allHeaders) {
parseHeader(fragment);
diff --git a/src/network/access/qnetworkcookie.h b/src/network/access/qnetworkcookie.h
index f34396f..3cc4cee 100644
--- a/src/network/access/qnetworkcookie.h
+++ b/src/network/access/qnetworkcookie.h
@@ -114,7 +114,7 @@ Q_NETWORK_EXPORT QDebug operator<<(QDebug, const QNetworkCookie &);
QT_END_NAMESPACE
// ### Qt5 remove this include
-#include "qnetworkcookiejar.h"
+#include <QtNetwork/QNetworkCookieJar>
Q_DECLARE_METATYPE(QNetworkCookie)
Q_DECLARE_METATYPE(QList<QNetworkCookie>)
diff --git a/src/network/access/qnetworkcookiejar.h b/src/network/access/qnetworkcookiejar.h
index 813bf3e..8086f38 100644
--- a/src/network/access/qnetworkcookiejar.h
+++ b/src/network/access/qnetworkcookiejar.h
@@ -46,7 +46,7 @@
#include <QtCore/QUrl>
// ### Qt5 remove this include
-#include "qnetworkcookie.h"
+#include <QtNetwork/QNetworkCookie>
QT_BEGIN_HEADER
diff --git a/src/xmlpatterns/data/qatomicvalue.cpp b/src/xmlpatterns/data/qatomicvalue.cpp
index 6858e27..c4f3578 100644
--- a/src/xmlpatterns/data/qatomicvalue.cpp
+++ b/src/xmlpatterns/data/qatomicvalue.cpp
@@ -226,6 +226,8 @@ ItemType::Ptr AtomicValue::qtToXDMType(const QXmlItem &item)
/* Fallthrough. */
case QVariant::Time:
return BuiltinTypes::xsDateTime;
+ case QMetaType::Float:
+ return BuiltinTypes::xsFloat;
case QVariant::Double:
return BuiltinTypes::xsDouble;
default:
diff --git a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
index 8e26696..ac9ca46 100644
--- a/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
+++ b/tests/auto/qscriptengineagent/tst_qscriptengineagent.cpp
@@ -832,6 +832,7 @@ void tst_QScriptEngineAgent::functionEntryAndExit_builtin_data()
/** check behaiviour of built-in function */
void tst_QScriptEngineAgent::functionEntryAndExit_builtin()
{
+ QSKIP("The test fails on platforms others than Linux. The issue will be fixed with next JSC update", SkipAll);
QFETCH(QString, script);
QFETCH(QString, result);
QScriptEngine eng;
diff --git a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
index b2a85d7..41df98c 100644
--- a/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
+++ b/tests/auto/qscriptjstestsuite/tst_qscriptjstestsuite.cpp
@@ -683,8 +683,72 @@ tst_Suite::tst_Suite()
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 7", willFixInNextReleaseMessage);
addExpectedFailure("ecma_3/String/15.5.4.11.js", "Section 26", willFixInNextReleaseMessage);
+#ifndef Q_CC_MINGW
addExpectedFailure("ecma/Expressions/11.4.7-02.js", "-(-2147483648) == 2147483648", willFixInNextReleaseMessage);
addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "- -\"0x80000000\"", willFixInNextReleaseMessage);
+#endif
+
+#ifdef Q_OS_WIN
+ addExpectedFailure("ecma_3/Expressions/11.7.3-01.js", "11.7.3 - >>> should evaluate operands in order: order", "QTBUG-8056");
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.7.3 >>>", "QTBUG-8056");
+ addExpectedFailure("ecma_3/Operators/order-01.js", "operator evaluation order: 11.13.2 >>>=", "QTBUG-8056");
+#endif
+
+#ifdef Q_CC_MINGW
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(Infinity, -Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, Infinity)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-Infinity, -Infinity)", willFixInNextReleaseMessage);
+#endif
+
+#ifdef Q_OS_SOLARIS
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -0; VAR2= -Infinity; VAR2 /= VAR1", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = 1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.13.2-2.js", "VAR1 = -1; VAR2= -0; VAR1 /= VAR2", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.POSITIVE_INFINITY / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "Number.NEGATIVE_INFINITY / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "1 / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Expressions/11.5.2.js", "-1 / -0", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-0.0000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.10.js", "Math.log(-1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.11.js", "Infinity/Math.max(-0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.12.js", "Infinity/Math.min(-0,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(NaN,-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-Infinity, -1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(0, -1000)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Infinity/Math.pow(-0, 3)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.13.js", "Math.pow(-0, -2)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.49)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.15.js", "Infinity/Math.round(-0.5)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.17.js", "Infinity/Math.sqrt(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.18.js", "Infinity/Math.tan(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(1.00000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.2.js", "Math.acos(11.00000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(1.000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Math.asin(-1.000001)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.3.js", "Infinity/Math.asin(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.4.js", "Infinity/Math.atan(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(0, -0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Infinity/Math.atan2(-0, 1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.5.js", "Math.atan2(-0,\t-1)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil('-0')", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-Number.MIN_VALUE)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.6.js", "Infinity/Math.ceil(-0.9)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/Math/15.8.2.9.js", "Infinity/Math.floor(-0)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "var z = 0; print(1/-z)", willFixInNextReleaseMessage);
+ addExpectedFailure("ecma/TypeConversion/9.3.1-3.js", "1/-1e-2000", willFixInNextReleaseMessage);
+#endif
static const char klass[] = "tst_QScriptJsTestSuite";
diff --git a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
index 147896e..a3dfd6c 100644
--- a/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
+++ b/tests/auto/qscriptv8testsuite/tst_qscriptv8testsuite.cpp
@@ -236,6 +236,16 @@ tst_Suite::tst_Suite()
addExpectedFailure("global-const-var-conflicts", "false", "true", willFixInNextReleaseMessage);
addExpectedFailure("string-lastindexof", "0", "-1", "test is wrong?");
+#ifndef Q_OS_LINUX
+ addExpectedFailure("to-precision", "1.235e+27", "1.234e+27", "QTBUG-8053: toPrecision(4) gives wrong result on Mac");
+#endif
+
+#ifdef Q_OS_SOLARIS
+ addExpectedFailure("math-min-max", "Infinity", "-Infinity", willFixInNextReleaseMessage);
+ addExpectedFailure("negate-zero", "false", "true", willFixInNextReleaseMessage);
+ addExpectedFailure("str-to-num", "Infinity", "-Infinity", willFixInNextReleaseMessage);
+#endif
+
addTestExclusion("debug-*", "not applicable");
addTestExclusion("mirror-*", "not applicable");
@@ -245,6 +255,10 @@ tst_Suite::tst_Suite()
addTestExclusion("string-case", "V8-specific behavior? (Doesn't pass on SpiderMonkey either)");
+#ifdef Q_CC_MINGW
+ addTestExclusion("date$", "QTBUG-7698: Date.prototype.setMonth() crashes on win32-g++");
+#endif
+
#ifdef Q_OS_WINCE
addTestExclusion("deep-recursion", "Demands too much memory on WinCE");
addTestExclusion("nested-repetition-count-overflow", "Demands too much memory on WinCE");
diff --git a/tools/designer/src/lib/shared/actionrepository.cpp b/tools/designer/src/lib/shared/actionrepository.cpp
index e3ff2c1..1076ff4 100644
--- a/tools/designer/src/lib/shared/actionrepository.cpp
+++ b/tools/designer/src/lib/shared/actionrepository.cpp
@@ -77,18 +77,12 @@ static inline QAction *actionOfItem(const QStandardItem* item)
return qvariant_cast<QAction*>(item->data(qdesigner_internal::ActionModel::ActionRole));
}
-static QIcon fixActionIcon(const QIcon &icon)
-{
- if (icon.isNull())
- return qdesigner_internal::emptyIcon();
- return icon;
-}
-
namespace qdesigner_internal {
// ----------- ActionModel
ActionModel::ActionModel(QWidget *parent ) :
QStandardItemModel(parent),
+ m_emptyIcon(emptyIcon()),
m_core(0)
{
QStringList headers;
@@ -127,7 +121,7 @@ void ActionModel::update(int row)
for (int i = 0; i < NumColumns; i++)
list += item(row, i);
- setItems(m_core, actionOfItem(list.front()), list);
+ setItems(m_core, actionOfItem(list.front()), m_emptyIcon, list);
}
void ActionModel::remove(int row)
@@ -150,7 +144,7 @@ QModelIndex ActionModel::addAction(QAction *action)
item->setFlags(flags);
items.push_back(item);
}
- setItems(m_core, action, items);
+ setItems(m_core, action, m_emptyIcon, items);
appendRow(items);
return indexFromItem(items.front());
}
@@ -185,7 +179,9 @@ PropertySheetKeySequenceValue ActionModel::actionShortCut(const QDesignerPropert
return qvariant_cast<PropertySheetKeySequenceValue>(sheet->property(index));
}
-void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action, QStandardItemList &sl)
+void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action,
+ const QIcon &defaultIcon,
+ QStandardItemList &sl)
{
// Tooltip, mostly for icon view mode
@@ -200,7 +196,10 @@ void ActionModel::setItems(QDesignerFormEditorInterface *core, QAction *action,
QStandardItem *item = sl[NameColumn];
item->setText(action->objectName());
- item->setIcon(fixActionIcon(action->icon()));
+ QIcon icon = action->icon();
+ if (icon.isNull())
+ icon = defaultIcon;
+ item->setIcon(icon);
item->setToolTip(firstTooltip);
item->setWhatsThis(firstTooltip);
// Used
diff --git a/tools/designer/src/lib/shared/actionrepository_p.h b/tools/designer/src/lib/shared/actionrepository_p.h
index 65adc5d..6e17e7b 100644
--- a/tools/designer/src/lib/shared/actionrepository_p.h
+++ b/tools/designer/src/lib/shared/actionrepository_p.h
@@ -59,6 +59,7 @@
#include <QtGui/QTreeView>
#include <QtGui/QListView>
#include <QtGui/QStackedWidget>
+#include <QtGui/QIcon>
QT_BEGIN_NAMESPACE
@@ -110,10 +111,14 @@ signals:
void resourceImageDropped(const QString &path, QAction *action);
private:
+ typedef QList<QStandardItem *> QStandardItemList;
+
void initializeHeaders();
+ static void setItems(QDesignerFormEditorInterface *core, QAction *a,
+ const QIcon &defaultIcon,
+ QStandardItemList &sl);
- typedef QList<QStandardItem *> QStandardItemList;
- static void setItems(QDesignerFormEditorInterface *core, QAction *a, QStandardItemList &sl);
+ const QIcon m_emptyIcon;
QDesignerFormEditorInterface *m_core;
};
diff --git a/tools/designer/src/lib/shared/iconloader.cpp b/tools/designer/src/lib/shared/iconloader.cpp
index df0bb7e..ed312b8 100644
--- a/tools/designer/src/lib/shared/iconloader.cpp
+++ b/tools/designer/src/lib/shared/iconloader.cpp
@@ -70,8 +70,7 @@ QDESIGNER_SHARED_EXPORT QIcon createIconSet(const QString &name)
QDESIGNER_SHARED_EXPORT QIcon emptyIcon()
{
- static const QIcon empty_icon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
- return empty_icon;
+ return QIcon(QLatin1String(":/trolltech/formeditor/images/emptyicon.png"));
}
} // namespace qdesigner_internal
diff --git a/tools/designer/src/lib/shared/qdesigner_menu.cpp b/tools/designer/src/lib/shared/qdesigner_menu.cpp
index c83abad..ba512e4 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_menu.cpp
@@ -88,6 +88,7 @@ static inline void extendClickableArea(QRect *subMenuRect, Qt::LayoutDirection d
QDesignerMenu::QDesignerMenu(QWidget *parent) :
QMenu(parent),
+ m_subMenuPixmap(QPixmap(QLatin1String(":/trolltech/formeditor/images/submenu.png"))),
m_currentIndex(0),
m_addItem(new SpecialMenuAction(this)),
m_addSeparator(new SpecialMenuAction(this)),
@@ -550,11 +551,10 @@ void QDesignerMenu::deleteAction(QAction *a)
QRect QDesignerMenu::subMenuPixmapRect(QAction *action) const
{
- static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png"));
const QRect g = actionGeometry(action);
- const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - pm.width() - 2) : 2;
- const int y = g.top() + (g.height() - pm.height())/2 + 1;
- return QRect(x, y, pm.width(), pm.height());
+ const int x = layoutDirection() == Qt::LeftToRight ? (g.right() - m_subMenuPixmap.width() - 2) : 2;
+ const int y = g.top() + (g.height() - m_subMenuPixmap.height())/2 + 1;
+ return QRect(x, y, m_subMenuPixmap.width(), m_subMenuPixmap.height());
}
bool QDesignerMenu::hasSubMenuPixmap(QAction *action) const
@@ -591,8 +591,7 @@ void QDesignerMenu::paintEvent(QPaintEvent *event)
p.fillRect(g, lg);
} else if (hasSubMenuPixmap(a)) {
- static const QPixmap pm(QLatin1String(":/trolltech/formeditor/images/submenu.png"));
- p.drawPixmap(subMenuPixmapRect(a).topLeft(), pm);
+ p.drawPixmap(subMenuPixmapRect(a).topLeft(), m_subMenuPixmap);
}
}
diff --git a/tools/designer/src/lib/shared/qdesigner_menu_p.h b/tools/designer/src/lib/shared/qdesigner_menu_p.h
index 9c9a311..ae1e0e7 100644
--- a/tools/designer/src/lib/shared/qdesigner_menu_p.h
+++ b/tools/designer/src/lib/shared/qdesigner_menu_p.h
@@ -57,6 +57,7 @@
#include <QtGui/QAction>
#include <QtGui/QMenu>
+#include <QtGui/QPixmap>
#include <QtCore/QHash>
QT_BEGIN_NAMESPACE
@@ -183,6 +184,7 @@ protected:
private:
bool hideSubMenuOnCursorKey();
bool showSubMenuOnCursorKey();
+ const QPixmap m_subMenuPixmap;
QPoint m_startPosition;
int m_currentIndex;
diff --git a/tools/linguist/linguist/messagemodel.cpp b/tools/linguist/linguist/messagemodel.cpp
index 6572059..4e2b473 100644
--- a/tools/linguist/linguist/messagemodel.cpp
+++ b/tools/linguist/linguist/messagemodel.cpp
@@ -584,12 +584,16 @@ void MultiContextItem::putMessageItem(int pos, MessageItem *m)
m_messageLists.last()[pos] = m;
}
-void MultiContextItem::appendMessageItem(MessageItem *m)
+void MultiContextItem::appendMessageItems(const QList<MessageItem *> &m)
{
+ QList<MessageItem *> nullItems = m; // Basically, just a reservation
+ for (int i = 0; i < nullItems.count(); ++i)
+ nullItems[i] = 0;
for (int i = 0; i < m_messageLists.count() - 1; ++i)
- m_messageLists[i].append(0);
- m_messageLists.last().append(m);
- m_multiMessageList.append(MultiMessageItem(m));
+ m_messageLists[i] += nullItems;
+ m_messageLists.last() += m;
+ foreach (MessageItem *mi, m)
+ m_multiMessageList.append(MultiMessageItem(mi));
}
void MultiContextItem::removeMultiMessageItem(int pos)
@@ -710,33 +714,43 @@ void MultiDataModel::append(DataModel *dm, bool readWrite)
m_msgModel->endInsertColumns();
}
m_msgModel->endInsertColumns();
+ int appendedContexts = 0;
for (int i = 0; i < dm->contextCount(); ++i) {
ContextItem *c = dm->contextItem(i);
int mcx = findContextIndex(c->context());
if (mcx >= 0) {
MultiContextItem *mc = multiContextItem(mcx);
mc->assignLastModel(c, readWrite);
+ QList<MessageItem *> appendItems;
for (int j = 0; j < c->messageCount(); ++j) {
MessageItem *m = c->messageItem(j);
int msgIdx = mc->findMessage(m->text(), m->comment());
- if (msgIdx >= 0) {
+ if (msgIdx >= 0)
mc->putMessageItem(msgIdx, m);
- } else {
- int msgCnt = mc->messageCount();
- m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0), msgCnt, msgCnt);
- mc->appendMessageItem(m);
- m_msgModel->endInsertRows();
- ++m_numMessages;
- }
+ else
+ appendItems << m;
+ }
+ if (!appendItems.isEmpty()) {
+ int msgCnt = mc->messageCount();
+ m_msgModel->beginInsertRows(m_msgModel->createIndex(mcx, 0, 0),
+ msgCnt, msgCnt + appendItems.size() - 1);
+ mc->appendMessageItems(appendItems);
+ m_msgModel->endInsertRows();
+ m_numMessages += appendItems.size();
}
} else {
- MultiContextItem item(modelCount() - 1, c, readWrite);
- m_msgModel->beginInsertRows(QModelIndex(), contextCount(), contextCount());
- m_multiContextList.append(item);
- m_msgModel->endInsertRows();
- m_numMessages += item.messageCount();
+ m_multiContextList << MultiContextItem(modelCount() - 1, c, readWrite);
+ m_numMessages += c->messageCount();
+ ++appendedContexts;
}
}
+ if (appendedContexts) {
+ // Do that en block to avoid itemview inefficiency. It doesn't hurt that we
+ // announce the availability of the data "long" after it was actually added.
+ m_msgModel->beginInsertRows(QModelIndex(),
+ contextCount() - appendedContexts, contextCount() - 1);
+ m_msgModel->endInsertRows();
+ }
dm->setWritable(readWrite);
updateCountsOnAdd(modelCount() - 1, readWrite);
connect(dm, SIGNAL(modifiedChanged()), SLOT(onModifiedChanged()));
diff --git a/tools/linguist/linguist/messagemodel.h b/tools/linguist/linguist/messagemodel.h
index 3e0107e..7d98873 100644
--- a/tools/linguist/linguist/messagemodel.h
+++ b/tools/linguist/linguist/messagemodel.h
@@ -332,7 +332,7 @@ private:
void removeModel(int pos);
void moveModel(int oldPos, int newPos); // newPos is *before* removing at oldPos
void putMessageItem(int pos, MessageItem *m);
- void appendMessageItem(MessageItem *m);
+ void appendMessageItems(const QList<MessageItem *> &m);
void removeMultiMessageItem(int pos);
void incrementFinishedCount() { ++m_finishedCount; }
void decrementFinishedCount() { --m_finishedCount; }
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 8cbf402..6447451 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -7572,7 +7572,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<location line="+2"/>
<source>Play movie in full-screen mode</source>
<comment>Media controller element</comment>
- <translation>FIlm im Vollbildmodus abspielen</translation>
+ <translation>Film im Vollbildmodus abspielen</translation>
</message>
<message>
<location line="+2"/>
@@ -8245,7 +8245,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location filename="../src/xmlpatterns/api/qcoloringmessagehandler.cpp" line="+87"/>
<source>Warning in %1, at line %2, column %3: %4</source>
- <translation>Fehler in %1, bei Zeile %2, Spalte %3: %4</translation>
+ <translation>Warnung in %1, bei Zeile %2, Spalte %3: %4</translation>
</message>
<message>
<location line="+7"/>
@@ -9466,7 +9466,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<location line="-470"/>
<location line="+451"/>
<source>%1 is not allowed to derive from %2 by list as the latter defines it as final.</source>
- <translation>%1 darf nicht durch Listen von %2 abgeleitet werden, da sie letzterer sie als final deklariert.</translation>
+ <translation>%1 darf nicht durch Listen von %2 abgeleitet werden, da letzterer sie als final deklariert.</translation>
</message>
<message>
<location line="-431"/>
@@ -9917,7 +9917,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+6"/>
<source>Complex type %1 cannot be derived by extension from %2 as the latter contains %3 element in its content model.</source>
- <translation>Der komplexe Typ % kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein &apos;%3&apos;-Element in seinem Inhaltsmodell hat.</translation>
+ <translation>Der komplexe Typ %1 kann nicht durch Erweiterung von %2 abgeleitet werden, da letzterer ein &apos;%3&apos;-Element in seinem Inhaltsmodell hat.</translation>
</message>
<message>
<location line="+101"/>
diff --git a/util/qlalr/cppgenerator.cpp b/util/qlalr/cppgenerator.cpp
index a95f5e4..f52a86f 100644
--- a/util/qlalr/cppgenerator.cpp
+++ b/util/qlalr/cppgenerator.cpp
@@ -457,7 +457,7 @@ void CppGenerator::generateDecl (QTextStream &out)
out << "class " << grammar.table_name << endl
<< "{" << endl
<< "public:" << endl
- << " enum {" << endl;
+ << " enum VariousConstants {" << endl;
foreach (Name t, grammar.terminals)
{