diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-22 12:29:40 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-22 12:29:40 (GMT) |
commit | 61d324fae094680c0ce48d4b0cc23073790f383c (patch) | |
tree | dd8048175d015e68eb60d9946a7cab99e8524b8e /src/3rdparty | |
parent | da7c6cc8995f063435b25938ac10739a6e7f0067 (diff) | |
parent | f725e2b9cae1866ff6510cb339cc4ada363f9e4f (diff) | |
download | Qt-61d324fae094680c0ce48d4b0cc23073790f383c.zip Qt-61d324fae094680c0ce48d4b0cc23073790f383c.tar.gz Qt-61d324fae094680c0ce48d4b0cc23073790f383c.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (78 commits)
Moc: Add support for rvalue references in signals and slots.
Add support for polyphonic greek
Fix build failure on WinCE.
Autotests: if you use X11 libs, you must link to X11 libs explicitly.
Disable C++0x mode for QtWebKit and QtScript since WebKit will not compile any time soon with C++0x
Compile Phonon in C++0x mode.
Compile Qt in C++0x mode.
Avoid a data relocation by not trying to store a pointer in the .data section of plugins.
Fix cast-from-ascii warning
Fix compilation on Linux
Fix compilation with WINSCW: #include doesn't find files in the same dir
Rename m_volume to m_vol
Add 2 signals, introduce side widget, make it possible to reset startId
Do not create native window handle just because a parent has one.
Tab color fix for document mode on Snow Leopard.
Revert "Don't emit open signal on session close/error."
Rename networkAccess property to networkAccessible.
Don't emit open signal on session close/error.
Rename private signal.
Autotest: fix instability by accepting rounding errors
...
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/harfbuzz/src/Makefile.am | 3 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp | 1 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h | 1 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/harfbuzz/tests/shaping/main.cpp | 127 | ||||
-rw-r--r-- | src/3rdparty/javascriptcore/JavaScriptCore/config.h | 2 | ||||
-rw-r--r-- | src/3rdparty/phonon/gstreamer/glrenderer.cpp | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/WebCore.pro | 3 |
8 files changed, 115 insertions, 26 deletions
diff --git a/src/3rdparty/harfbuzz/src/Makefile.am b/src/3rdparty/harfbuzz/src/Makefile.am index 2b0fb1d..51d0652 100644 --- a/src/3rdparty/harfbuzz/src/Makefile.am +++ b/src/3rdparty/harfbuzz/src/Makefile.am @@ -12,7 +12,8 @@ MAINSOURCES = \ harfbuzz-impl.c \ harfbuzz-open.c \ harfbuzz-shaper.cpp \ - harfbuzz-tibetan.c \ + harfbuzz-greek.c \ + harfbuzz-tibetan.c \ harfbuzz-khmer.c \ harfbuzz-indic.cpp \ harfbuzz-hebrew.c \ diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp index d2f902f..2dae501 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-all.cpp @@ -25,6 +25,7 @@ #include "harfbuzz-shaper.cpp" #include "harfbuzz-indic.cpp" extern "C" { +#include "harfbuzz-greek.c" #include "harfbuzz-tibetan.c" #include "harfbuzz-khmer.c" #include "harfbuzz-hebrew.c" diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h index 80bccf8..11ed753 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper-private.h @@ -100,6 +100,7 @@ typedef struct { extern const HB_ScriptEngine hb_scriptEngines[]; extern HB_Bool HB_BasicShape(HB_ShaperItem *shaper_item); +extern HB_Bool HB_GreekShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_TibetanShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_HebrewShape(HB_ShaperItem *shaper_item); extern HB_Bool HB_ArabicShape(HB_ShaperItem *shaper_item); diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp index bfc7bd4..4bc53c8 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.cpp @@ -587,7 +587,7 @@ const HB_ScriptEngine HB_ScriptEngines[] = { // Common { HB_BasicShape, 0}, // Greek - { HB_BasicShape, 0}, + { HB_GreekShape, 0}, // Cyrillic { HB_BasicShape, 0}, // Armenian diff --git a/src/3rdparty/harfbuzz/tests/shaping/main.cpp b/src/3rdparty/harfbuzz/tests/shaping/main.cpp index 827ac30..b48b0a9 100644 --- a/src/3rdparty/harfbuzz/tests/shaping/main.cpp +++ b/src/3rdparty/harfbuzz/tests/shaping/main.cpp @@ -136,13 +136,13 @@ HB_Error hb_getPointInOutline(HB_Font font, HB_Glyph glyph, int flags, hb_uint32 return HB_Err_Ok; } -void hb_getGlyphMetrics(HB_Font font, HB_Glyph glyph, HB_GlyphMetrics *metrics) +void hb_getGlyphMetrics(HB_Font, HB_Glyph, HB_GlyphMetrics *metrics) { // ### metrics->x = metrics->y = metrics->width = metrics->height = metrics->xOffset = metrics->yOffset = 0; } -HB_Fixed hb_getFontMetric(HB_Font font, HB_FontMetric metric) +HB_Fixed hb_getFontMetric(HB_Font, HB_FontMetric ) { return 0; // #### } @@ -169,6 +169,8 @@ public slots: void initTestCase(); void cleanupTestCase(); private slots: + void greek(); + void devanagari(); void bengali(); void gurmukhi(); @@ -203,18 +205,25 @@ void tst_QScriptEngine::cleanupTestCase() FT_Done_FreeType(freetype); } -struct ShapeTable { - unsigned short unicode[16]; - unsigned short glyphs[16]; +class Shaper +{ +public: + Shaper(FT_Face face, HB_Script script, const QString &str); + + HB_FontRec hbFont; + HB_ShaperItem shaper_item; + QVarLengthArray<HB_Glyph> hb_glyphs; + QVarLengthArray<HB_GlyphAttributes> hb_attributes; + QVarLengthArray<HB_Fixed> hb_advances; + QVarLengthArray<HB_FixedPoint> hb_offsets; + QVarLengthArray<unsigned short> hb_logClusters; + }; -static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) +Shaper::Shaper(FT_Face face, HB_Script script, const QString &str) { - QString str = QString::fromUtf16( s->unicode ); - HB_Face hbFace = HB_NewFace(face, hb_getSFntTable); - HB_FontRec hbFont; hbFont.klass = &hb_fontClass; hbFont.userData = face; hbFont.x_ppem = face->size->metrics.x_ppem; @@ -222,7 +231,6 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) hbFont.x_scale = face->size->metrics.x_scale; hbFont.y_scale = face->size->metrics.y_scale; - HB_ShaperItem shaper_item; shaper_item.kerning_applied = false; shaper_item.string = reinterpret_cast<const HB_UChar16 *>(str.constData()); shaper_item.stringLength = str.length(); @@ -237,11 +245,6 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) shaper_item.glyphIndicesPresent = false; shaper_item.initialGlyphCount = 0; - QVarLengthArray<HB_Glyph> hb_glyphs(shaper_item.num_glyphs); - QVarLengthArray<HB_GlyphAttributes> hb_attributes(shaper_item.num_glyphs); - QVarLengthArray<HB_Fixed> hb_advances(shaper_item.num_glyphs); - QVarLengthArray<HB_FixedPoint> hb_offsets(shaper_item.num_glyphs); - QVarLengthArray<unsigned short> hb_logClusters(shaper_item.num_glyphs); while (1) { hb_glyphs.resize(shaper_item.num_glyphs); @@ -263,10 +266,68 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) if (HB_ShapeItem(&shaper_item)) break; - } HB_FreeFace(hbFace); +} + + +#if defined(Q_WS_X11) +static bool decomposedShaping(FT_Face face, HB_Script script, const QChar &ch) +{ + QString uc = QString().append(ch); + Shaper shaper(face, script, uc); + + uc = uc.normalized(QString::NormalizationForm_D); + Shaper decomposed(face, script, uc); + + if( shaper.shaper_item.num_glyphs != decomposed.shaper_item.num_glyphs ) + goto error; + + for (unsigned int i = 0; i < shaper.shaper_item.num_glyphs; ++i) { + if ((shaper.shaper_item.glyphs[i]&0xffffff) != (decomposed.shaper_item.glyphs[i]&0xffffff)) + goto error; + } + return true; + error: + QString str = ""; + int i = 0; + while (i < uc.length()) { + str += QString("%1 ").arg(uc[i].unicode(), 4, 16); + ++i; + } + qDebug("%s: decomposedShaping of char %4x failed\n decomposedString: %s\n nglyphs=%d, decomposed nglyphs %d", + face->family_name, + ch.unicode(), str.toLatin1().data(), + shaper.shaper_item.num_glyphs, + decomposed.shaper_item.num_glyphs); + + str = ""; + i = 0; + while (i < shaper.shaper_item.num_glyphs) { + str += QString("%1 ").arg(shaper.shaper_item.glyphs[i], 4, 16); + ++i; + } + qDebug(" composed glyph result = %s", str.toLatin1().constData()); + str = ""; + i = 0; + while (i < decomposed.shaper_item.num_glyphs) { + str += QString("%1 ").arg(decomposed.shaper_item.glyphs[i], 4, 16); + ++i; + } + qDebug(" decomposed glyph result = %s", str.toLatin1().constData()); + return false; +} +#endif + +struct ShapeTable { + unsigned short unicode[16]; + unsigned short glyphs[16]; +}; + +static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) +{ + Shaper shaper(face, script, QString::fromUtf16( s->unicode )); hb_uint32 nglyphs = 0; const unsigned short *g = s->glyphs; @@ -275,16 +336,16 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) g++; } - if( nglyphs != shaper_item.num_glyphs ) + if( nglyphs != shaper.shaper_item.num_glyphs ) goto error; for (hb_uint32 i = 0; i < nglyphs; ++i) { - if ((shaper_item.glyphs[i]&0xffffff) != s->glyphs[i]) + if ((shaper.shaper_item.glyphs[i]&0xffffff) != s->glyphs[i]) goto error; } return true; error: - str = ""; + QString str = ""; const unsigned short *uc = s->unicode; while (*uc) { str += QString("%1 ").arg(*uc, 4, 16); @@ -293,18 +354,40 @@ static bool shaping(FT_Face face, const ShapeTable *s, HB_Script script) qDebug("%s: shaping of string %s failed, nglyphs=%d, expected %d", face->family_name, str.toLatin1().constData(), - shaper_item.num_glyphs, nglyphs); + shaper.shaper_item.num_glyphs, nglyphs); str = ""; hb_uint32 i = 0; - while (i < shaper_item.num_glyphs) { - str += QString("%1 ").arg(shaper_item.glyphs[i], 4, 16); + while (i < shaper.shaper_item.num_glyphs) { + str += QString("%1 ").arg(shaper.shaper_item.glyphs[i], 4, 16); ++i; } qDebug(" glyph result = %s", str.toLatin1().constData()); return false; } + +void tst_QScriptEngine::greek() +{ + FT_Face face = loadFace("DejaVuSans.ttf"); + if (face) { + for (int uc = 0x1f00; uc <= 0x1fff; ++uc) { + QString str; + str.append(uc); + if (str.normalized(QString::NormalizationForm_D).normalized(QString::NormalizationForm_C) != str) { + //qDebug() << "skipping" << hex << uc; + continue; + } + if (uc == 0x1fc1 || uc == 0x1fed) + continue; + QVERIFY( decomposedShaping(face, HB_Script_Greek, QChar(uc)) ); + } + } else { + QSKIP("couln't find DejaVu Sans", SkipAll); + } +} + + void tst_QScriptEngine::devanagari() { { diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/config.h b/src/3rdparty/javascriptcore/JavaScriptCore/config.h index d5fdfe9..2af2e71 100644 --- a/src/3rdparty/javascriptcore/JavaScriptCore/config.h +++ b/src/3rdparty/javascriptcore/JavaScriptCore/config.h @@ -25,7 +25,7 @@ #include <wtf/Platform.h> -#if OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC) +#if !defined(QT_BUILD_SCRIPT_LIB) && OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC) #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) #define JS_EXPORTDATA __declspec(dllexport) #else diff --git a/src/3rdparty/phonon/gstreamer/glrenderer.cpp b/src/3rdparty/phonon/gstreamer/glrenderer.cpp index 6cf3459..0203028 100644 --- a/src/3rdparty/phonon/gstreamer/glrenderer.cpp +++ b/src/3rdparty/phonon/gstreamer/glrenderer.cpp @@ -304,7 +304,7 @@ void GLRenderWidgetImplementation::paintEvent(QPaintEvent *) const float tx_array[] = { 0, 0, 1, 0, 1, 1, 0, 1}; const QRectF r = drawFrameRect(); - const float v_array[] = { r.left(), r.top(), r.right(), r.top(), r.right(), r.bottom(), r.left(), r.bottom() }; + const float v_array[] = { float(r.left()), float(r.top()), float(r.right()), float(r.top()), float(r.right()), float(r.bottom()), float(r.left()), float(r.bottom()) }; glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, m_texture[0]); diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index a80eed4..2f85100 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -3424,3 +3424,6 @@ symbian { } } } + +# WebKit doesn't compile in C++0x mode +*-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x |