diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-20 11:15:52 (GMT) |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2010-06-20 11:15:52 (GMT) |
commit | f5bab2bc74ed03fd1db99cba3830b6b21795a627 (patch) | |
tree | b10c428a9b482354c5366e920a2a3359b676f82c /src | |
parent | 489cface92f40f4e82866b5fabf57d29e9632811 (diff) | |
parent | a27f18db247a0456ca15ad58f8dcc6b3441d55d0 (diff) | |
download | Qt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.zip Qt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.tar.gz Qt-f5bab2bc74ed03fd1db99cba3830b6b21795a627.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/qt into qt-4.7-from-4.6
src/3rdparty/* is left untouched and not merged from 4.6. The corresponding
changes in Harfbuzz and WebKit are already in the 4.6 staging areas.
Conflicts:
src/3rdparty/webkit/VERSION
src/3rdparty/webkit/WebCore/ChangeLog
src/3rdparty/webkit/WebKit/qt/ChangeLog
src/3rdparty/webkit/WebKit/qt/tests/qgraphicswebview/tst_qgraphicswebview.cpp
src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.cpp
src/3rdparty/webkit/WebKit/qt/tests/qwebview/tst_qwebview.qrc
tests/auto/qtextlayout/tst_qtextlayout.cpp
tests/auto/qwidgetaction/tst_qwidgetaction.cpp
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 3 | ||||
-rw-r--r-- | src/gui/text/qtextlayout.cpp | 14 | ||||
-rw-r--r-- | src/multimedia/video/qabstractvideobuffer_p.h | 3 | ||||
-rw-r--r-- | src/network/socket/qlocalsocket_win.cpp | 19 |
4 files changed, 34 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 0edb8fb..2a85fdc 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -955,6 +955,9 @@ const QString qt_reg_winclass(QWidget *w) // register window class if (qt_widget_private(w)->isGLWidget) { cname = QLatin1String("QGLWidget"); style = CS_DBLCLKS; +#ifndef Q_WS_WINCE + style |= CS_OWNDC; +#endif icon = true; } else if (flags & Qt::MSWindowsOwnDC) { cname = QLatin1String("QWidgetOwnDC"); diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index ddf9411..fec9ecc 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -1661,7 +1661,7 @@ namespace { { LineBreakHelper() : glyphCount(0), maxGlyphs(0), currentPosition(0), fontEngine(0), logClusters(0), - manualWrap(false) + manualWrap(false), whiteSpaceOrObject(true) { } @@ -1684,6 +1684,7 @@ namespace { const unsigned short *logClusters; bool manualWrap; + bool whiteSpaceOrObject; bool checkFullOtherwiseExtend(QScriptLine &line); @@ -1693,8 +1694,10 @@ namespace { } inline glyph_t currentGlyph() const - { + { Q_ASSERT(currentPosition > 0); + Q_ASSERT(logClusters[currentPosition - 1] < glyphs.numGlyphs); + return glyphs.glyphs[logClusters[currentPosition - 1]]; } @@ -1829,6 +1832,7 @@ void QTextLine::layout_helper(int maxGlyphs) lbh.tmpData.descent = qMax(lbh.tmpData.descent, current.descent); if (current.analysis.flags == QScriptAnalysis::Tab && (alignment & (Qt::AlignLeft | Qt::AlignRight | Qt::AlignCenter | Qt::AlignJustify))) { + lbh.whiteSpaceOrObject = true; if (lbh.checkFullOtherwiseExtend(line)) goto found; @@ -1845,6 +1849,7 @@ void QTextLine::layout_helper(int maxGlyphs) if (lbh.checkFullOtherwiseExtend(line)) goto found; } else if (current.analysis.flags == QScriptAnalysis::LineOrParagraphSeparator) { + lbh.whiteSpaceOrObject = true; // if the line consists only of the line separator make sure // we have a sane height if (!line.length && !lbh.tmpData.length) @@ -1858,6 +1863,7 @@ void QTextLine::layout_helper(int maxGlyphs) line += lbh.tmpData; goto found; } else if (current.analysis.flags == QScriptAnalysis::Object) { + lbh.whiteSpaceOrObject = true; lbh.tmpData.length++; QTextFormat format = eng->formats()->format(eng->formatIndex(&eng->layoutData->items[item])); @@ -1871,6 +1877,7 @@ void QTextLine::layout_helper(int maxGlyphs) if (lbh.checkFullOtherwiseExtend(line)) goto found; } else if (attributes[lbh.currentPosition].whiteSpace) { + lbh.whiteSpaceOrObject = true; while (lbh.currentPosition < end && attributes[lbh.currentPosition].whiteSpace) addNextCluster(lbh.currentPosition, end, lbh.spaceData, lbh.glyphCount, current, lbh.logClusters, lbh.glyphs); @@ -1880,6 +1887,7 @@ void QTextLine::layout_helper(int maxGlyphs) goto found; } } else { + lbh.whiteSpaceOrObject = false; bool sb_or_ws = false; do { addNextCluster(lbh.currentPosition, end, lbh.tmpData, lbh.glyphCount, @@ -1941,7 +1949,7 @@ void QTextLine::layout_helper(int maxGlyphs) LB_DEBUG("reached end of line"); lbh.checkFullOtherwiseExtend(line); found: - if (lbh.rightBearing > 0) // If right bearing has not yet been adjusted + if (lbh.rightBearing > 0 && !lbh.whiteSpaceOrObject) // If right bearing has not yet been adjusted lbh.adjustRightBearing(); line.textAdvance = line.textWidth; line.textWidth -= qMin(QFixed(), lbh.rightBearing); diff --git a/src/multimedia/video/qabstractvideobuffer_p.h b/src/multimedia/video/qabstractvideobuffer_p.h index c72f303..3303b36 100644 --- a/src/multimedia/video/qabstractvideobuffer_p.h +++ b/src/multimedia/video/qabstractvideobuffer_p.h @@ -65,6 +65,9 @@ public: : handleType(QAbstractVideoBuffer::NoHandle) {} + virtual ~QAbstractVideoBufferPrivate() + {} + QAbstractVideoBuffer::HandleType handleType; }; diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 5486f47..4907f2c 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -280,6 +280,12 @@ void QLocalSocketPrivate::startAsyncRead() case ERROR_IO_PENDING: // This is not an error. We're getting notified, when data arrives. return; + case ERROR_MORE_DATA: + // This is not an error. The synchronous read succeeded. + // We're connected to a message mode pipe and the message + // didn't fit into the pipe's system buffer. + completeAsyncRead(); + break; case ERROR_PIPE_NOT_CONNECTED: { // It may happen, that the other side closes the connection directly @@ -309,9 +315,18 @@ bool QLocalSocketPrivate::completeAsyncRead() DWORD bytesRead; if (!GetOverlappedResult(handle, &overlapped, &bytesRead, TRUE)) { - if (GetLastError() != ERROR_PIPE_NOT_CONNECTED) + switch (GetLastError()) { + case ERROR_MORE_DATA: + // This is not an error. We're connected to a message mode + // pipe and the message didn't fit into the pipe's system + // buffer. We will read the remaining data in the next call. + break; + case ERROR_PIPE_NOT_CONNECTED: setErrorString(QLatin1String("QLocalSocketPrivate::completeAsyncRead")); - return false; + // fall through + default: + return false; + } } actualReadBufferSize += bytesRead; |