summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-02 23:57:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-02 23:57:07 (GMT)
commite970b88cab8f071f3dbaac5f0d520d7196241ab7 (patch)
tree98ba73d7dd0f0b9127d6d3e116f35351a7ca3fd7 /src/gui/text
parent32ecf8e8ad326ea13ec9a430c99ce540e8b4efac (diff)
parent2d6258a30f4326b600ccdd7cf1cbf9afcc0a7972 (diff)
downloadQt-e970b88cab8f071f3dbaac5f0d520d7196241ab7.zip
Qt-e970b88cab8f071f3dbaac5f0d520d7196241ab7.tar.gz
Qt-e970b88cab8f071f3dbaac5f0d520d7196241ab7.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Fix project file generation for MSVC 2010 Fix wrong translation and clip for the raster paint-engine on Mac Return the correct library name in qt_gl_library_name for GLES* qmake: remove useless evaluation of variables from VS project generators Fix QT_NO_LIBRARY Documentation for the Elastic Nodes example. qmake: fix duplicate linker options in VS project files Ensured that WA_InputMethodEnabled was set before FocusInEvent was sent. qmake: fix duplicate compiler options in VS project files Documentation for the Drag and Drop Robot example. Fix crash in styles example when running with opengl graphicssystem Fixed the sizehint for cols/rows in qtableview QUrl: parsing of host name with an undercore. Null pointer check Revert "Try to use multisampled opengl graphicssystem on all platforms" A small mistake when comparing the flag. Add unit tests covering most of QVector's API. Fix crash when CoreText fails to shape text for us Fix crash when using opengl graphicssystem on desktop Revert "Revert "Implement heightForWidth support for QTabWidget and QStackedLayout.""
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfontengine_mac.mm15
-rw-r--r--src/gui/text/qtextcontrol.cpp4
2 files changed, 16 insertions, 3 deletions
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 0bfdbc0..a6510cb 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -226,8 +226,19 @@ bool QCoreTextFontEngineMulti::stringToCMap(const QChar *str, int len, QGlyphLay
QFixed *outAdvances_y = glyphs->advances_y;
glyph_t *initialGlyph = outGlyphs;
- if (arraySize == 0)
- return false;
+ if (arraySize == 0) {
+ // CoreText failed to shape the text we gave it, so we assume one glyph
+ // per character and build a list of invalid glyphs with zero advance
+ *nglyphs = len;
+ for (int i = 0; i < len; ++i) {
+ outGlyphs[i] = 0;
+ logClusters[i] = i;
+ outAdvances_x[i] = QFixed();
+ outAdvances_y[i] = QFixed();
+ outAttributes[i].clusterStart = true;
+ }
+ return true;
+ }
const bool rtl = (CTRunGetStatus(static_cast<CTRunRef>(CFArrayGetValueAtIndex(array, 0))) & kCTRunStatusRightToLeft);
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index 3c596e5..a2ee659 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -885,8 +885,10 @@ void QTextControl::processEvent(QEvent *e, const QPointF &coordinateOffset, QWid
void QTextControl::processEvent(QEvent *e, const QMatrix &matrix, QWidget *contextWidget)
{
Q_D(QTextControl);
- if (d->interactionFlags & Qt::NoTextInteraction)
+ if (d->interactionFlags == Qt::NoTextInteraction) {
+ e->ignore();
return;
+ }
d->contextWidget = contextWidget;