diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-11 03:09:49 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-05-11 03:18:19 (GMT) |
commit | aa40b01fcda22e654790aaf93a6b14f947cdea72 (patch) | |
tree | 234ca2fb319dea1f12c679ed7030a4b82f540caa /tests/auto | |
parent | cd70183a86f3586eb34c15f11af03746f28f4acc (diff) | |
download | Qt-aa40b01fcda22e654790aaf93a6b14f947cdea72.zip Qt-aa40b01fcda22e654790aaf93a6b14f947cdea72.tar.gz Qt-aa40b01fcda22e654790aaf93a6b14f947cdea72.tar.bz2 |
Round ideal width up to prevent incorrect word wrapping on Mac OS X
QTBUG-10539
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 8cc0e3f..b92024f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -202,7 +202,7 @@ void tst_qdeclarativetextedit::width() QFont f; QFontMetricsF fm(f); qreal metricWidth = fm.size(Qt::TextExpandTabs && Qt::TextShowMnemonic, standard.at(i)).width(); - metricWidth = floor(metricWidth); + metricWidth = ceil(metricWidth); QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + standard.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); @@ -219,7 +219,7 @@ void tst_qdeclarativetextedit::width() document.setHtml(richText.at(i)); document.setDocumentMargin(0); - int documentWidth = document.idealWidth(); + int documentWidth = ceil(document.idealWidth()); QString componentStr = "import Qt 4.7\nTextEdit { text: \"" + richText.at(i) + "\" }"; QDeclarativeComponent texteditComponent(&engine); |