diff options
author | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-18 10:29:10 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@theqtcompany.com> | 2015-08-18 10:29:47 +0200 |
commit | eb30e3d7ee81c48cea720e7ecd2ed45647bc70ee (patch) | |
tree | 810e8ad0642434eeb4043c3a06c82217314300e1 /src/quick/items/qquicktext.cpp | |
parent | 9c9fca5e27bd91da1ea07bebd7569049493c5ccf (diff) | |
parent | 521ace713d8e5230d47f3da8cd941699ca085af2 (diff) |
Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
src/qml/debugger/qv4debugservice.cpp
src/qml/jsruntime/qv4value_inl_p.h
src/qml/jsruntime/qv4value_p.h
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mm_p.h
src/qml/qml/qqmlnotifier_p.h
src/qml/qml/qqmlproperty.cpp
src/quick/items/qquickflickable.cpp
src/quick/items/qquicktextedit.cpp
tests/auto/quick/qquickwindow/BLACKLIST
The extra changes in qqmlbinding.cpp are ported from changes to
qqmlproperty.cpp that occurred in parallel with writeBinding() being
moved to qqmlbinding.cpp.
Change-Id: I16d1920abf448c29a01822256f52153651a56356
Diffstat (limited to 'src/quick/items/qquicktext.cpp')
-rw-r--r-- | src/quick/items/qquicktext.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp index a91e6b47c2..924c455872 100644 --- a/src/quick/items/qquicktext.cpp +++ b/src/quick/items/qquicktext.cpp @@ -100,6 +100,7 @@ QQuickTextPrivate::ExtraData::ExtraData() , minimumPointSize(12) , nbActiveDownloads(0) , maximumLineCount(INT_MAX) + , lineHeightValid(false) , lineHeightMode(QQuickText::ProportionalHeight) , fontSizeMode(QQuickText::FixedSize) { @@ -421,7 +422,7 @@ void QQuickTextPrivate::updateLayout() } textHasChanged = false; } - } else { + } else if (extra.isAllocated() && extra->lineHeightValid) { ensureDoc(); QTextBlockFormat::LineHeightTypes type; type = lineHeightMode() == QQuickText::FixedHeight ? QTextBlockFormat::FixedHeight : QTextBlockFormat::ProportionalHeight; @@ -2480,6 +2481,7 @@ void QQuickText::setLineHeight(qreal lineHeight) if ((d->lineHeight() == lineHeight) || (lineHeight < 0.0)) return; + d->extra.value().lineHeightValid = true; d->extra.value().lineHeight = lineHeight; d->implicitHeightValid = false; d->updateLayout(); @@ -2511,6 +2513,7 @@ void QQuickText::setLineHeightMode(LineHeightMode mode) return; d->implicitHeightValid = false; + d->extra.value().lineHeightValid = true; d->extra.value().lineHeightMode = mode; d->updateLayout(); |