diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2011-10-14 16:17:58 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2011-10-14 16:17:58 (GMT) |
commit | d089496936b9a17d7849d49b74f85838cb711634 (patch) | |
tree | 8395c56f3c1e6b64cb781d7311fda56081f0ef51 /src/declarative/graphicsitems/qdeclarativetextedit.cpp | |
parent | 2543ed5b1b18864797b3a11c9bd13887c7567e86 (diff) | |
parent | 7a6a50879322945110120ffdec5d0e6820fc4b54 (diff) | |
download | Qt-d089496936b9a17d7849d49b74f85838cb711634.zip Qt-d089496936b9a17d7849d49b74f85838cb711634.tar.gz Qt-d089496936b9a17d7849d49b74f85838cb711634.tar.bz2 |
Merge remote branch 'qt/4.7' into 4.7
Conflicts:
src/corelib/kernel/qtranslator.cpp
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativetextedit.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 24d7f75..a7444df 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1713,7 +1713,9 @@ void QDeclarativeTextEdit::updateSize() setImplicitWidth(newWidth); else if (d->requireImplicitWidth) setImplicitWidth(naturalWidth); - qreal newHeight = d->document->isEmpty() ? fm.height() : (int)d->document->size().height(); + qreal newHeight = d->document->size().height(); + if (newHeight == 0) + newHeight = fm.height(); setImplicitHeight(newHeight); d->paintedSize = QSize(newWidth, newHeight); |