diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-05-11 03:30:25 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-05-11 03:30:25 (GMT) |
commit | 5c4fc5b7517e5f226c3e4fe6f208b955c28aa6ca (patch) | |
tree | e5903ab311c400f2d0495fc0212072c98aa8268d /src | |
parent | 129940723d9145a4380f7e44c06cbaa88ee4053b (diff) | |
parent | aa40b01fcda22e654790aaf93a6b14f947cdea72 (diff) | |
download | Qt-5c4fc5b7517e5f226c3e4fe6f208b955c28aa6ca.zip Qt-5c4fc5b7517e5f226c3e4fe6f208b955c28aa6ca.tar.gz Qt-5c4fc5b7517e5f226c3e4fe6f208b955c28aa6ca.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src')
-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 d095dbe..6d86e58 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -46,6 +46,8 @@ #include <private/qdeclarativeglobal_p.h> #include <qdeclarativeinfo.h> +#include <QtCore/qmath.h> + #include <QTextLayout> #include <QTextLine> #include <QTextDocument> @@ -1107,7 +1109,7 @@ void QDeclarativeTextEdit::updateSize() setBaselineOffset(fm.ascent() + yoff + d->textMargin); //### need to comfirm cost of always setting these - int newWidth = (int)d->document->idealWidth(); + int newWidth = qCeil(d->document->idealWidth()); d->document->setTextWidth(newWidth); // ### QTextDoc> Alignment will not work unless textWidth is set. Does Text need this line as well? int cursorWidth = 1; if(d->cursor) |