diff options
| author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-07 23:17:05 (GMT) |
|---|---|---|
| committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-07-07 23:17:05 (GMT) |
| commit | 1dd26ea2486db87b61e8e9f70a1e04f7386405ef (patch) | |
| tree | 32a4691fd96da982452fb5dc3fc7cbdd149a6d12 /src | |
| parent | 233a146ae575de76e55abe2dc30bcde3b5570f23 (diff) | |
| parent | 4f8978312a8897e27b2e548fe85f2a76402aa17a (diff) | |
| download | Qt-1dd26ea2486db87b61e8e9f70a1e04f7386405ef.zip Qt-1dd26ea2486db87b61e8e9f70a1e04f7386405ef.tar.gz Qt-1dd26ea2486db87b61e8e9f70a1e04f7386405ef.tar.bz2 | |
Merge branch 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration into master-integration
* 'qt-4.8-from-4.7' of scm.dev.nokia.troll.no:qt/qt-integration:
Update the Window title when closing the last tab.
On symbian QMessageBox does not look like native dialog
Fix bidi reordering when part of text is rendered by fallback font
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui/dialogs/qmessagebox.cpp | 7 | ||||
| -rw-r--r-- | src/gui/painting/qpainter.cpp | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp index c3a1084..a2f086b 100644 --- a/src/gui/dialogs/qmessagebox.cpp +++ b/src/gui/dialogs/qmessagebox.cpp @@ -2507,7 +2507,12 @@ void QMessageBox::setInformativeText(const QString &text) label->hide(); QTextBrowser *textBrowser = new QTextBrowser(this); textBrowser->setOpenExternalLinks(true); - grid->addWidget(textBrowser, 1, 1, 1, 1); +#if defined(Q_OS_SYMBIAN) + const int preferredTextColumn = (QApplication::layoutDirection() == Qt::LeftToRight) ? 0 : 1; +#else + const int preferredTextColumn = 1; +#endif + grid->addWidget(textBrowser, 1, preferredTextColumn, 1, 1); d->textBrowser = textBrowser; #else grid->addWidget(label, 1, 1, 1, 1); diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 435e12a..9bd9733 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -6646,6 +6646,10 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti) qreal x = p.x(); qreal y = p.y(); + bool rtl = ti.flags & QTextItem::RightToLeft; + if (rtl) + x += ti.width.toReal(); + int start = 0; int end, i; for (end = 0; end < ti.glyphs.numGlyphs; ++end) { @@ -6662,14 +6666,19 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti) ti2.width += ti.glyphs.effectiveAdvance(i); } + if (rtl) + x -= ti2.width.toReal(); + d->engine->drawTextItem(QPointF(x, y), ti2); + if (!rtl) + x += ti2.width.toReal(); + // reset the high byte for all glyphs and advance to the next sub-string const int hi = which << 24; for (i = start; i < end; ++i) { glyphs.glyphs[i] = hi | glyphs.glyphs[i]; } - x += ti2.width.toReal(); // change engine start = end; @@ -6684,6 +6693,9 @@ void QPainter::drawTextItem(const QPointF &p, const QTextItem &_ti) ti2.width += ti.glyphs.effectiveAdvance(i); } + if (rtl) + x -= ti2.width.toReal(); + if (d->extended) d->extended->drawTextItem(QPointF(x, y), ti2); else |
