summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-05-11 03:30:25 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-05-11 03:30:25 (GMT)
commit5c4fc5b7517e5f226c3e4fe6f208b955c28aa6ca (patch)
treee5903ab311c400f2d0495fc0212072c98aa8268d /src
parent129940723d9145a4380f7e44c06cbaa88ee4053b (diff)
parentaa40b01fcda22e654790aaf93a6b14f947cdea72 (diff)
downloadQt-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.cpp4
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)