summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-09-22 12:55:00 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-09-22 12:55:00 (GMT)
commit9a5a12a5fe5bdf848756ddad20dabe288a6873de (patch)
tree4116fe2b23d8689f7f10688d338c7fc8abe46b1e /src
parent0d446ec758aacd131f2da0fa67a081fd93cff898 (diff)
parentb7ba409b0dabd382876310a6c110a96cf0e3c6bf (diff)
downloadQt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.zip
Qt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.tar.gz
Qt-9a5a12a5fe5bdf848756ddad20dabe288a6873de.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: src/gui/painting/qtextureglyphcache_p.h src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/libjpeg.pri15
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro4
-rw-r--r--src/3rdparty/webkit/WebKit.pri2
-rw-r--r--src/corelib/io/qurl.cpp1
-rw-r--r--src/corelib/tools/qbytearray.cpp1
-rw-r--r--src/corelib/tools/qchar.cpp17
-rw-r--r--src/corelib/tools/qstringmatcher.cpp1
-rw-r--r--src/corelib/tools/qunicodetables.cpp119
-rw-r--r--src/corelib/tools/qunicodetables_p.h28
-rw-r--r--src/gui/dialogs/qfiledialog.cpp1
-rw-r--r--src/gui/image/qjpeghandler.cpp41
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_x11.cpp1
-rw-r--r--src/gui/painting/qbezier.cpp41
-rw-r--r--src/gui/painting/qprintengine_ps.cpp1
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp20
-rw-r--r--src/gui/painting/qtextureglyphcache_p.h6
-rw-r--r--src/gui/styles/qs60style.cpp3
-rw-r--r--src/gui/text/qtextdocumentfragment.cpp1
-rw-r--r--src/gui/text/qtexthtmlparser.cpp1
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp9
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h2
-rw-r--r--src/opengl/qgl_x11.cpp1
-rw-r--r--src/opengl/qpaintengine_opengl.cpp8
-rw-r--r--src/plugins/graphicssystems/meego/qmeegoextensions.h6
-rw-r--r--src/plugins/imageformats/jpeg/jpeg.pro14
-rw-r--r--src/qt3support/dialogs/q3filedialog.cpp1
-rw-r--r--src/qt3support/text/q3richtext.cpp1
28 files changed, 153 insertions, 195 deletions
diff --git a/src/3rdparty/libjpeg.pri b/src/3rdparty/libjpeg.pri
index 4551d7b..63f2aca 100644
--- a/src/3rdparty/libjpeg.pri
+++ b/src/3rdparty/libjpeg.pri
@@ -1,3 +1,18 @@
+wince*: {
+ DEFINES += NO_GETENV
+ contains(CE_ARCH,x86):CONFIG -= stl exceptions
+ contains(CE_ARCH,x86):CONFIG += exceptions_off
+}
+
+#Disable warnings in 3rdparty code due to unused arguments
+symbian: {
+ QMAKE_CXXFLAGS.CW += -W nounusedarg
+ TARGET.UID3=0x2001E61B
+} else:contains(QMAKE_CC, gcc): {
+ QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
+}
+
+
INCLUDEPATH += $$PWD/libjpeg
SOURCES += \
$$PWD/libjpeg/jaricom.c \
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index 5f688f3..981dba2 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -104,7 +104,7 @@ freebsd-*: DEFINES += HAVE_PTHREAD_NP_H
DEFINES += BUILD_WEBKIT
# Remove whole program optimizations due to miscompilations
-win32-msvc2005|win32-msvc2008:{
+win32-msvc2005|win32-msvc2008|wince*:{
QMAKE_CFLAGS_RELEASE -= -GL
QMAKE_CXXFLAGS_RELEASE -= -GL
}
@@ -2952,7 +2952,7 @@ HEADERS += $$WEBKIT_API_HEADERS
}
}
-CONFIG(QTDIR_build) {
+!CONFIG(webkit-debug):CONFIG(QTDIR_build) {
# Remove the following 2 lines if you want debug information in WebCore
CONFIG -= separate_debug_info
CONFIG += no_debug_info
diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri
index a080c43..bb3fd71 100644
--- a/src/3rdparty/webkit/WebKit.pri
+++ b/src/3rdparty/webkit/WebKit.pri
@@ -79,5 +79,5 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools
# Disable a few warnings on Windows. The warnings are also
# disabled in WebKitLibraries/win/tools/vsprops/common.vsprops
-win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
+win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index b122cd2..6452c0f 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -176,7 +176,6 @@
*/
#include "qplatformdefs.h"
#include "qurl.h"
-#include "private/qunicodetables_p.h"
#include "qatomic.h"
#include "qbytearray.h"
#include "qdir.h"
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 0a4aad2..6be3416 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -46,7 +46,6 @@
#include "qlist.h"
#include "qlocale.h"
#include "qlocale_p.h"
-#include "qunicodetables_p.h"
#include "qscopedpointer.h"
#include <qdatastream.h>
diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp
index ed0af4e..bb777cd 100644
--- a/src/corelib/tools/qchar.cpp
+++ b/src/corelib/tools/qchar.cpp
@@ -1630,21 +1630,4 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in
}
}
-int QT_FASTCALL QUnicodeTables::script(unsigned int uc)
-{
- if (uc > 0xffff)
- return Common;
- int script = uc_scripts[uc >> 7];
- if (script < ScriptSentinel)
- return script;
- script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount);
- script = uc_scripts[script + (uc & 0x7f)];
- return script;
-}
-
-Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)
-{
- return (QUnicodeTables::LineBreakClass) qGetProp(ucs4)->line_break_class;
-}
-
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index 80a8457..d445ed4 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -40,7 +40,6 @@
****************************************************************************/
#include "qstringmatcher.h"
-#include "qunicodetables_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp
index 9df31e5..68e72cc 100644
--- a/src/corelib/tools/qunicodetables.cpp
+++ b/src/corelib/tools/qunicodetables.cpp
@@ -4345,6 +4345,11 @@ Q_CORE_EXPORT const QUnicodeTables::Properties * QT_FASTCALL QUnicodeTables::pro
return uc_properties + index;
}
+Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)
+{
+ return (QUnicodeTables::LineBreakClass)qGetProp(ucs4)->line_break_class;
+}
+
static const ushort specialCaseMap[] = {
0x53, 0x73, 0x0,
0x53, 0x53, 0x0,
@@ -8561,7 +8566,7 @@ static const unsigned char uc_scripts[] = {
Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited,
Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited,
Common, Common, Common, Common, Greek, Greek, Common, Common,
- Common, Common, Greek, Greek, Greek, Greek, Common, Common,
+ Common, Common, Greek, Greek, Greek, Greek, Common, Common,
/* U+0380-03ff at offset 640 */
Common, Common, Common, Common, Greek, Greek, Greek, Common,
@@ -8579,7 +8584,7 @@ static const unsigned char uc_scripts[] = {
Greek, Greek, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic,
Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic,
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
- Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
+ Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
/* U+0480-04ff at offset 768 */
Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Common,
@@ -8597,7 +8602,7 @@ static const unsigned char uc_scripts[] = {
Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
- Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
+ Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
/* U+0500-057f at offset 896 */
Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic,
@@ -8615,7 +8620,7 @@ static const unsigned char uc_scripts[] = {
Common, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
- Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
+ Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
/* U+0580-05ff at offset 1024 */
Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian,
@@ -8633,7 +8638,7 @@ static const unsigned char uc_scripts[] = {
Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew,
Hebrew, Hebrew, Hebrew, Common, Common, Common, Common, Common,
Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0600-067f at offset 1152 */
Common, Common, Common, Common, Common, Common, Common, Common,
@@ -8651,7 +8656,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Inherited, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+0680-06ff at offset 1280 */
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
@@ -8669,7 +8674,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+0700-077f at offset 1408 */
Syriac, Syriac, Syriac, Syriac, Syriac, Syriac, Syriac, Syriac,
@@ -8687,7 +8692,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0780-07ff at offset 1536 */
Thaana, Thaana, Thaana, Thaana, Thaana, Thaana, Thaana, Thaana,
@@ -8705,7 +8710,7 @@ static const unsigned char uc_scripts[] = {
Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko,
Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko,
Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko,
- Nko, Nko, Nko, Common, Common, Common, Common, Common,
+ Nko, Nko, Nko, Common, Common, Common, Common, Common,
/* U+0900-097f at offset 1664 */
Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari,
@@ -8723,7 +8728,7 @@ static const unsigned char uc_scripts[] = {
Devanagari, Devanagari, Devanagari, Devanagari, Common, Common, Devanagari, Devanagari,
Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari,
+ Common, Common, Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari,
/* U+0980-09ff at offset 1792 */
Common, Bengali, Bengali, Bengali, Common, Bengali, Bengali, Bengali,
@@ -8741,7 +8746,7 @@ static const unsigned char uc_scripts[] = {
Bengali, Bengali, Bengali, Bengali, Common, Common, Bengali, Bengali,
Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali,
Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali,
- Bengali, Bengali, Bengali, Common, Common, Common, Common, Common,
+ Bengali, Bengali, Bengali, Common, Common, Common, Common, Common,
/* U+0a00-0a7f at offset 1920 */
Common, Gurmukhi, Gurmukhi, Gurmukhi, Common, Gurmukhi, Gurmukhi, Gurmukhi,
@@ -8759,7 +8764,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Gurmukhi, Gurmukhi,
Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi,
Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0a80-0aff at offset 2048 */
Common, Gujarati, Gujarati, Gujarati, Common, Gujarati, Gujarati, Gujarati,
@@ -8777,7 +8782,7 @@ static const unsigned char uc_scripts[] = {
Gujarati, Gujarati, Gujarati, Gujarati, Common, Common, Gujarati, Gujarati,
Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati,
Common, Gujarati, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0b00-0b7f at offset 2176 */
Common, Oriya, Oriya, Oriya, Common, Oriya, Oriya, Oriya,
@@ -8795,7 +8800,7 @@ static const unsigned char uc_scripts[] = {
Oriya, Oriya, Common, Common, Common, Common, Oriya, Oriya,
Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya,
Oriya, Oriya, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0b80-0bff at offset 2304 */
Common, Common, Tamil, Tamil, Common, Tamil, Tamil, Tamil,
@@ -8813,7 +8818,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Tamil, Tamil,
Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil,
Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil,
- Tamil, Tamil, Tamil, Common, Common, Common, Common, Common,
+ Tamil, Tamil, Tamil, Common, Common, Common, Common, Common,
/* U+0c00-0c7f at offset 2432 */
Common, Telugu, Telugu, Telugu, Common, Telugu, Telugu, Telugu,
@@ -8831,7 +8836,7 @@ static const unsigned char uc_scripts[] = {
Telugu, Telugu, Common, Common, Common, Common, Telugu, Telugu,
Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0c80-0cff at offset 2560 */
Common, Common, Kannada, Kannada, Common, Kannada, Kannada, Kannada,
@@ -8849,7 +8854,7 @@ static const unsigned char uc_scripts[] = {
Kannada, Kannada, Kannada, Kannada, Common, Common, Kannada, Kannada,
Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada,
Common, Kannada, Kannada, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0d00-0d7f at offset 2688 */
Common, Common, Malayalam, Malayalam, Common, Malayalam, Malayalam, Malayalam,
@@ -8867,7 +8872,7 @@ static const unsigned char uc_scripts[] = {
Malayalam, Malayalam, Common, Common, Common, Common, Malayalam, Malayalam,
Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0d80-0dff at offset 2816 */
Common, Common, Sinhala, Sinhala, Common, Sinhala, Sinhala, Sinhala,
@@ -8885,7 +8890,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Sinhala, Sinhala, Sinhala, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0e00-0e7f at offset 2944 */
Common, Thai, Thai, Thai, Thai, Thai, Thai, Thai,
@@ -8903,7 +8908,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0e80-0eff at offset 3072 */
Common, Lao, Lao, Common, Lao, Common, Common, Lao,
@@ -8921,7 +8926,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+0f00-0f7f at offset 3200 */
Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
@@ -8939,7 +8944,7 @@ static const unsigned char uc_scripts[] = {
Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
Tibetan, Tibetan, Tibetan, Common, Common, Common, Common, Common,
Common, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
- Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
+ Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
/* U+0f80-0fff at offset 3328 */
Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan,
@@ -8957,7 +8962,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+1000-107f at offset 3456 */
Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar,
@@ -8975,7 +8980,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+1080-10ff at offset 3584 */
Common, Common, Common, Common, Common, Common, Common, Common,
@@ -8993,7 +8998,7 @@ static const unsigned char uc_scripts[] = {
Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian,
Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian,
Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian,
- Georgian, Georgian, Georgian, Common, Georgian, Common, Common, Common,
+ Georgian, Georgian, Georgian, Common, Georgian, Common, Common, Common,
/* U+1100-117f at offset 3712 */
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
@@ -9011,7 +9016,7 @@ static const unsigned char uc_scripts[] = {
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
- Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
/* U+1180-11ff at offset 3840 */
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
@@ -9029,7 +9034,7 @@ static const unsigned char uc_scripts[] = {
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
- Hangul, Hangul, Common, Common, Common, Common, Common, Common,
+ Hangul, Hangul, Common, Common, Common, Common, Common, Common,
/* U+1680-16ff at offset 3968 */
Ogham, Ogham, Ogham, Ogham, Ogham, Ogham, Ogham, Ogham,
@@ -9047,7 +9052,7 @@ static const unsigned char uc_scripts[] = {
Runic, Runic, Runic, Runic, Runic, Runic, Runic, Runic,
Runic, Runic, Runic, Common, Common, Common, Runic, Runic,
Runic, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+1780-17ff at offset 4096 */
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
@@ -9065,7 +9070,7 @@ static const unsigned char uc_scripts[] = {
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
Khmer, Khmer, Common, Common, Common, Common, Common, Common,
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
- Khmer, Khmer, Common, Common, Common, Common, Common, Common,
+ Khmer, Khmer, Common, Common, Common, Common, Common, Common,
/* U+1980-19ff at offset 4224 */
NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue,
@@ -9083,7 +9088,7 @@ static const unsigned char uc_scripts[] = {
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
- Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
+ Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer,
/* U+1d00-1d7f at offset 4352 */
Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin,
@@ -9101,7 +9106,7 @@ static const unsigned char uc_scripts[] = {
Greek, Greek, Latin, Latin, Latin, Latin, Greek, Greek,
Greek, Greek, Greek, Latin, Latin, Latin, Latin, Latin,
Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin,
- Cyrillic, Latin, Latin, Latin, Latin, Latin, Latin, Latin,
+ Cyrillic, Latin, Latin, Latin, Latin, Latin, Latin, Latin,
/* U+1d80-1dff at offset 4480 */
Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin,
@@ -9119,7 +9124,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Inherited, Inherited,
+ Common, Common, Common, Common, Common, Common, Inherited, Inherited,
/* U+1f00-1f7f at offset 4608 */
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
@@ -9137,7 +9142,7 @@ static const unsigned char uc_scripts[] = {
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
- Greek, Greek, Greek, Greek, Greek, Greek, Common, Common,
+ Greek, Greek, Greek, Greek, Greek, Greek, Common, Common,
/* U+1f80-1fff at offset 4736 */
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
@@ -9155,7 +9160,7 @@ static const unsigned char uc_scripts[] = {
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek,
Common, Common, Greek, Greek, Greek, Common, Greek, Greek,
- Greek, Greek, Greek, Greek, Greek, Greek, Greek, Common,
+ Greek, Greek, Greek, Greek, Greek, Greek, Greek, Common,
/* U+2000-207f at offset 4864 */
Common, Common, Common, Common, Common, Common, Common, Common,
@@ -9173,7 +9178,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Latin, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Latin,
+ Common, Common, Common, Common, Common, Common, Common, Latin,
/* U+2080-20ff at offset 4992 */
Common, Common, Common, Common, Common, Common, Common, Common,
@@ -9191,7 +9196,7 @@ static const unsigned char uc_scripts[] = {
Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited,
Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+2100-217f at offset 5120 */
Common, Common, Common, Common, Common, Common, Common, Common,
@@ -9209,7 +9214,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+2d00-2d7f at offset 5248 */
Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian,
@@ -9227,7 +9232,7 @@ static const unsigned char uc_scripts[] = {
Tifinagh, Tifinagh, Tifinagh, Tifinagh, Tifinagh, Tifinagh, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Tifinagh,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+3000-307f at offset 5376 */
Common, Common, Common, Common, Common, Han, Common, Han,
@@ -9245,7 +9250,7 @@ static const unsigned char uc_scripts[] = {
Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
- Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
+ Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
/* U+3080-30ff at offset 5504 */
Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana,
@@ -9263,7 +9268,7 @@ static const unsigned char uc_scripts[] = {
Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
- Katakana, Katakana, Katakana, Common, Common, Katakana, Katakana, Katakana,
+ Katakana, Katakana, Katakana, Common, Common, Katakana, Katakana, Katakana,
/* U+3100-317f at offset 5632 */
Common, Common, Common, Common, Common, Bopomofo, Bopomofo, Bopomofo,
@@ -9281,7 +9286,7 @@ static const unsigned char uc_scripts[] = {
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
- Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
/* U+3180-31ff at offset 5760 */
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
@@ -9299,7 +9304,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
- Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
+ Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
/* U+3200-327f at offset 5888 */
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
@@ -9317,7 +9322,7 @@ static const unsigned char uc_scripts[] = {
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
- Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Common, Common,
+ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Common, Common,
/* U+d780-d7ff at offset 6016 */
Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul,
@@ -9335,7 +9340,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common,
+ Common, Common, Common, Common, Common, Common, Common, Common,
/* U+fb00-fb7f at offset 6144 */
Latin, Latin, Latin, Latin, Latin, Latin, Latin, Common,
@@ -9353,7 +9358,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+fb80-fbff at offset 6272 */
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
@@ -9371,7 +9376,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+fd00-fd7f at offset 6400 */
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
@@ -9389,7 +9394,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+fd80-fdff at offset 6528 */
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
@@ -9407,7 +9412,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common,
/* U+fe00-fe7f at offset 6656 */
Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited,
@@ -9425,7 +9430,7 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Arabic, Arabic, Arabic, Arabic, Arabic, Common, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
/* U+fe80-feff at offset 6784 */
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
@@ -9443,7 +9448,7 @@ static const unsigned char uc_scripts[] = {
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic,
- Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common,
+ Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common,
/* U+ff80-ffff at offset 6912 */
Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana,
@@ -9461,9 +9466,21 @@ static const unsigned char uc_scripts[] = {
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
Common, Common, Common, Common, Common, Common, Common, Common,
- Common, Common, Common, Common, Common, Common, Common, Common
+ Common, Common, Common, Common, Common, Common, Common, Common
};
} // namespace QUnicodeTables
+Q_CORE_EXPORT int QT_FASTCALL QUnicodeTables::script(uint ucs4)
+{
+ if (ucs4 > 0xffff)
+ return Common;
+ int script = uc_scripts[ucs4 >> 7];
+ if (script < ScriptSentinel)
+ return script;
+ script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount);
+ script = uc_scripts[script + (ucs4 & 0x7f)];
+ return script;
+}
+
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h
index 5c7cc08..be52bf9 100644
--- a/src/corelib/tools/qunicodetables_p.h
+++ b/src/corelib/tools/qunicodetables_p.h
@@ -162,20 +162,6 @@ namespace QUnicodeTables {
enum { ScriptSentinel = 32 };
- // see http://www.unicode.org/reports/tr14/tr14-19.html
- // we don't use the XX, AI and CB properties and map them to AL instead.
- // as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well.
- enum LineBreakClass {
- LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS,
- LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO,
- LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY,
- LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM,
- LineBreak_WJ, LineBreak_H2, LineBreak_H3, LineBreak_JL, LineBreak_JV,
- LineBreak_JT, LineBreak_SA, LineBreak_SG,
- LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK
- };
-
-
enum GraphemeBreak {
GraphemeBreakOther,
GraphemeBreakCR,
@@ -217,6 +203,20 @@ namespace QUnicodeTables {
};
+ // see http://www.unicode.org/reports/tr14/tr14-19.html
+ // we don't use the XX, AI and CB properties and map them to AL instead.
+ // as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well.
+ enum LineBreakClass {
+ LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS,
+ LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO,
+ LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY,
+ LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM,
+ LineBreak_WJ, LineBreak_H2, LineBreak_H3, LineBreak_JL, LineBreak_JV,
+ LineBreak_JT, LineBreak_SA, LineBreak_SG,
+ LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK
+ };
+
+
Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4);
inline int lineBreakClass(const QChar &ch)
{ return lineBreakClass(ch.unicode()); }
diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp
index a0dca5d..624610b 100644
--- a/src/gui/dialogs/qfiledialog.cpp
+++ b/src/gui/dialogs/qfiledialog.cpp
@@ -302,7 +302,6 @@ QT_BEGIN_INCLUDE_NAMESPACE
#endif
#include <qshortcut.h>
#ifdef Q_WS_MAC
-#include <private/qunicodetables_p.h>
#include <qmacstyle_mac.h>
#endif
QT_END_INCLUDE_NAMESPACE
diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp
index e685694..b9eda05 100644
--- a/src/gui/image/qjpeghandler.cpp
+++ b/src/gui/image/qjpeghandler.cpp
@@ -515,29 +515,10 @@ inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device)
free_in_buffer = max_buf;
}
-static bool can_write_format(QImage::Format fmt)
-{
- switch (fmt) {
- case QImage::Format_Mono:
- case QImage::Format_MonoLSB:
- case QImage::Format_Indexed8:
- case QImage::Format_RGB888:
- case QImage::Format_RGB32:
- case QImage::Format_ARGB32:
- case QImage::Format_ARGB32_Premultiplied:
- return true;
- break;
- default:
- break;
- }
- return false;
-}
-static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int sourceQuality)
+static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQuality)
{
bool success = false;
- const QImage image = can_write_format(sourceImage.format()) ?
- sourceImage : sourceImage.convertToFormat(QImage::Format_RGB888);
const QVector<QRgb> cmap = image.colorTable();
struct jpeg_compress_struct cinfo;
@@ -614,7 +595,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
case QImage::Format_Mono:
case QImage::Format_MonoLSB:
if (gray) {
- const uchar* data = image.scanLine(cinfo.next_scanline);
+ const uchar* data = image.constScanLine(cinfo.next_scanline);
if (image.format() == QImage::Format_MonoLSB) {
for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7)));
@@ -627,7 +608,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
}
}
} else {
- const uchar* data = image.scanLine(cinfo.next_scanline);
+ const uchar* data = image.constScanLine(cinfo.next_scanline);
if (image.format() == QImage::Format_MonoLSB) {
for (int i=0; i<w; i++) {
bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7)));
@@ -647,13 +628,13 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
break;
case QImage::Format_Indexed8:
if (gray) {
- const uchar* pix = image.scanLine(cinfo.next_scanline);
+ const uchar* pix = image.constScanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) {
*row = qRed(cmap[*pix]);
++row; ++pix;
}
} else {
- const uchar* pix = image.scanLine(cinfo.next_scanline);
+ const uchar* pix = image.constScanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) {
*row++ = qRed(cmap[*pix]);
*row++ = qGreen(cmap[*pix]);
@@ -663,12 +644,12 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
}
break;
case QImage::Format_RGB888:
- memcpy(row, image.scanLine(cinfo.next_scanline), w * 3);
+ memcpy(row, image.constScanLine(cinfo.next_scanline), w * 3);
break;
case QImage::Format_RGB32:
case QImage::Format_ARGB32:
case QImage::Format_ARGB32_Premultiplied: {
- QRgb* rgb = (QRgb*)image.scanLine(cinfo.next_scanline);
+ const QRgb* rgb = (const QRgb*)image.constScanLine(cinfo.next_scanline);
for (int i=0; i<w; i++) {
*row++ = qRed(*rgb);
*row++ = qGreen(*rgb);
@@ -678,8 +659,12 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s
break;
}
default:
- qWarning("QJpegHandler: unable to write image of format %i",
- image.format());
+ for (int i=0; i<w; i++) {
+ QRgb pix = image.pixel(i, cinfo.next_scanline);
+ *row++ = qRed(pix);
+ *row++ = qGreen(pix);
+ *row++ = qBlue(pix);
+ }
break;
}
jpeg_write_scanlines(&cinfo, row_pointer, 1);
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 18ec0df..636829e 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -528,12 +528,12 @@ public:
#ifndef QT_NO_GESTURES
QGestureManager *gestureManager;
QWidget *gestureWidget;
+#endif
#if defined(Q_WS_X11) || defined(Q_WS_WIN)
QPixmap *move_cursor;
QPixmap *copy_cursor;
QPixmap *link_cursor;
#endif
-#endif
#if defined(Q_WS_WIN)
QPixmap *ignore_cursor;
#endif
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
index b4cebd7..d905639 100644
--- a/src/gui/kernel/qapplication_x11.cpp
+++ b/src/gui/kernel/qapplication_x11.cpp
@@ -74,7 +74,6 @@
#include "qevent_p.h"
#include "qvarlengtharray.h"
#include "qdebug.h"
-#include <private/qunicodetables_p.h>
#include <private/qcrashhandler_p.h>
#include <private/qcolor_p.h>
#include <private/qcursor_p.h>
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp
index 2a9b31a..54c81ba 100644
--- a/src/gui/painting/qbezier.cpp
+++ b/src/gui/painting/qbezier.cpp
@@ -293,36 +293,6 @@ static ShiftResult good_offset(const QBezier *b1, const QBezier *b2, qreal offse
return Ok;
}
-static inline QLineF qline_shifted(const QPointF &p1, const QPointF &p2, qreal offset)
-{
- QLineF l(p1, p2);
- QLineF ln = l.normalVector().unitVector();
- l.translate(ln.dx() * offset, ln.dy() * offset);
- return l;
-}
-
-static bool qbezier_is_line(QPointF *points, int pointCount)
-{
- Q_ASSERT(pointCount > 2);
-
- qreal dx13 = points[2].x() - points[0].x();
- qreal dy13 = points[2].y() - points[0].y();
-
- qreal dx12 = points[1].x() - points[0].x();
- qreal dy12 = points[1].y() - points[0].y();
-
- if (pointCount == 3) {
- return qFuzzyCompare(dx12 * dy13, dx13 * dy12);
- } else if (pointCount == 4) {
- qreal dx14 = points[3].x() - points[0].x();
- qreal dy14 = points[3].y() - points[0].y();
-
- return (qFuzzyCompare(dx12 * dy13, dx13 * dy12) && qFuzzyCompare(dx12 * dy14, dx14 * dy12));
- }
-
- return false;
-}
-
static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold)
{
int map[4];
@@ -353,17 +323,6 @@ static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qr
if (np == 1)
return Discard;
- // We need to specialcase lines of 3 or 4 points due to numerical
- // instability in intersections below
- if (np > 2 && qbezier_is_line(points, np)) {
- if (points[0] == points[np-1])
- return Discard;
-
- QLineF l = qline_shifted(points[0], points[np-1], offset);
- *shifted = QBezier::fromPoints(l.p1(), l.pointAt(qreal(0.33)), l.pointAt(qreal(0.66)), l.p2());
- return Ok;
- }
-
QRectF b = orig->bounds();
if (np == 4 && b.width() < .1*offset && b.height() < .1*offset) {
qreal l = (orig->x1 - orig->x2)*(orig->x1 - orig->x2) +
diff --git a/src/gui/painting/qprintengine_ps.cpp b/src/gui/painting/qprintengine_ps.cpp
index 28e9a7a..ca694ae 100644
--- a/src/gui/painting/qprintengine_ps.cpp
+++ b/src/gui/painting/qprintengine_ps.cpp
@@ -64,7 +64,6 @@
#include "qbitmap.h"
#include "qregion.h"
#include "qimagewriter.h"
-#include <private/qunicodetables_p.h>
#include <private/qpainterpath_p.h>
#include <qdebug.h>
#include <private/qdrawhelper_p.h>
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index e992bb2..2bb8cce 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -47,10 +47,6 @@
#include "private/qnativeimage_p.h"
#include "private/qfontengine_ft_p.h"
-#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH
-#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256
-#endif
-
QT_BEGIN_NAMESPACE
// #define CACHE_DEBUG
@@ -212,10 +208,18 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
m_currentRowHeight = qMax(m_currentRowHeight, c.h + margin * 2);
if (m_cx + c.w > m_w) {
- // no room on the current line, start new glyph strip
- m_cx = 0;
- m_cy += m_currentRowHeight + paddingDoubled;
- m_currentRowHeight = 0; // New row
+ int new_width = m_w*2;
+ while (new_width < m_cx + c.w)
+ new_width *= 2;
+ if (new_width <= maxTextureWidth()) {
+ resizeTextureData(new_width, m_h);
+ m_w = new_width;
+ } else {
+ // no room on the current line, start new glyph strip
+ m_cx = 0;
+ m_cy += m_currentRowHeight + paddingDoubled;
+ m_currentRowHeight = 0; // New row
+ }
}
c.x = m_cx;
diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h
index 4131003..82aaf0d 100644
--- a/src/gui/painting/qtextureglyphcache_p.h
+++ b/src/gui/painting/qtextureglyphcache_p.h
@@ -64,6 +64,10 @@
# undef m_type
#endif
+#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH
+#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256
+#endif
+
struct glyph_metrics_t;
typedef unsigned int glyph_t;
@@ -132,6 +136,8 @@ public:
inline bool isNull() const { return m_h == 0; }
QHash<GlyphAndSubPixelPosition, Coord> coords;
+ virtual int maxTextureWidth() const { return QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH; }
+ virtual int maxTextureHeight() const { return 32768; }
QImage textureMapForGlyph(glyph_t g, QFixed subPixelPosition) const;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 9116a1e..3ec6e10 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -3436,8 +3436,7 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event)
break;
}
case QEvent::MouseButtonRelease: {
- const QWidget *w = QApplication::widgetAt(QCursor::pos());
- if (w && d->m_pressedWidget) {
+ if (d->m_pressedWidget) {
d->m_pressedWidget->update();
d->m_pressedWidget = 0;
}
diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp
index d2e2c9f..e36a6f0 100644
--- a/src/gui/text/qtextdocumentfragment.cpp
+++ b/src/gui/text/qtextdocumentfragment.cpp
@@ -43,7 +43,6 @@
#include "qtextdocumentfragment_p.h"
#include "qtextcursor_p.h"
#include "qtextlist.h"
-#include "private/qunicodetables_p.h"
#include <qdebug.h>
#include <qtextcodec.h>
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp
index 27f647c..5b9ab90 100644
--- a/src/gui/text/qtexthtmlparser.cpp
+++ b/src/gui/text/qtexthtmlparser.cpp
@@ -53,7 +53,6 @@
#include "qtextdocument_p.h"
#include "qtextcursor.h"
#include "qfont_p.h"
-#include "private/qunicodetables_p.h"
#include "private/qfunctions_p.h"
#ifndef QT_NO_TEXTHTMLPARSER
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
index 3dc7789..952427c 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp
@@ -291,4 +291,13 @@ int QGLTextureGlyphCache::glyphPadding() const
return 1;
}
+int QGLTextureGlyphCache::maxTextureWidth() const
+{
+ return ctx->d_ptr->maxTextureSize();
+}
+
+int QGLTextureGlyphCache::maxTextureHeight() const
+{
+ return ctx->d_ptr->maxTextureSize();
+}
QT_END_NAMESPACE
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
index 345684d..ada47e9 100644
--- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
+++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h
@@ -108,6 +108,8 @@ public:
virtual void resizeTextureData(int width, int height);
virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition);
virtual int glyphPadding() const;
+ virtual int maxTextureWidth() const;
+ virtual int maxTextureHeight() const;
inline GLuint texture() const {
QGLTextureGlyphCache *that = const_cast<QGLTextureGlyphCache *>(this);
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index bfb232d..f3a4c95 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -54,6 +54,7 @@
#include <private/qt_x11_p.h>
#include <private/qpixmap_x11_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
+#include <private/qunicodetables_p.h>
#ifdef Q_OS_HPUX
// for GLXPBuffer
#include <private/qglpixelbuffer_p.h>
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index a5ec12f..58778ea 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -4735,9 +4735,11 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine,
font_cache = new QGLFontGlyphHash;
// qDebug() << "new context" << context << font_cache;
qt_context_cache.insert(context, font_cache);
- if (context->isValid() && context->device()->devType() == QInternal::Widget) {
- QWidget *widget = static_cast<QWidget *>(context->device());
- connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)));
+ if (context->isValid()) {
+ if (context->device()->devType() == QInternal::Widget) {
+ QWidget *widget = static_cast<QWidget *>(context->device());
+ connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*)));
+ }
connect(QGLSignalProxy::instance(),
SIGNAL(aboutToDestroyContext(const QGLContext*)),
SLOT(cleanupContext(const QGLContext*)));
diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.h b/src/plugins/graphicssystems/meego/qmeegoextensions.h
index f1a74f5..ee20bd8 100644
--- a/src/plugins/graphicssystems/meego/qmeegoextensions.h
+++ b/src/plugins/graphicssystems/meego/qmeegoextensions.h
@@ -42,12 +42,12 @@
#ifndef MEXTENSIONS_H
#define MEXTENSIONS_H
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
#include <private/qgl_p.h>
#include <private/qeglcontext_p.h>
#include <private/qpixmapdata_gl_p.h>
+#include <EGL/egl.h>
+#include <GLES2/gl2.h>
+#include <GLES2/gl2ext.h>
/* Extensions decls */
diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro
index c5671c3..fb254b8 100644
--- a/src/plugins/imageformats/jpeg/jpeg.pro
+++ b/src/plugins/imageformats/jpeg/jpeg.pro
@@ -3,20 +3,6 @@ include(../../qpluginbase.pri)
QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)"
-wince*: {
- DEFINES += NO_GETENV
- contains(CE_ARCH,x86):CONFIG -= stl exceptions
- contains(CE_ARCH,x86):CONFIG += exceptions_off
-}
-
-#Disable warnings in 3rdparty code due to unused arguments
-symbian: {
- QMAKE_CXXFLAGS.CW += -W nounusedarg
- TARGET.UID3=0x2001E61B
-} else:contains(QMAKE_CC, gcc): {
- QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main
-}
-
include(../../../gui/image/qjpeghandler.pri)
SOURCES += main.cpp
diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp
index 35f7890..f9dfaa1 100644
--- a/src/qt3support/dialogs/q3filedialog.cpp
+++ b/src/qt3support/dialogs/q3filedialog.cpp
@@ -106,7 +106,6 @@
#ifdef Q_WS_MAC
#include "qmacstyle_mac.h"
#include "private/qt_mac_p.h"
-#include "private/qunicodetables_p.h"
#undef check
#endif
diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp
index 625dd95..d84a85b 100644
--- a/src/qt3support/text/q3richtext.cpp
+++ b/src/qt3support/text/q3richtext.cpp
@@ -64,7 +64,6 @@
#include "q3stylesheet.h"
#include "qtextstream.h"
#include <private/qtextengine_p.h>
-#include <private/qunicodetables_p.h>
#include <stdlib.h>