diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-10 07:00:04 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-10 07:00:04 (GMT) |
commit | 89052de56c660baccaeae3ed83615a1dbd0494f5 (patch) | |
tree | a6718a096bedc6b9c86e1c780b7b6f3d89ef9c85 /tests/benchmarks/gui | |
parent | 4cf3730c65b28f3e895a1a4c8f7db509e11c71c0 (diff) | |
parent | 6f6c25b61f6d83e86e93c5f82e2d699619d00d5e (diff) | |
download | Qt-89052de56c660baccaeae3ed83615a1dbd0494f5.zip Qt-89052de56c660baccaeae3ed83615a1dbd0494f5.tar.gz Qt-89052de56c660baccaeae3ed83615a1dbd0494f5.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (65 commits)
Fix QTextDocument::markContentsDirty()
Replace 4.6 in all .qdocconf files
Resetting bindings through debugger interface
Fix crash with invalid role indexes
Make test pass and fix docs following removal of SpringFollow
Remove autotests of depracted element SmoothedFollow
doc improvements
Clean up at the end of each test.
Improve test reliability.
Fix crash
Follow -> Behavior
Added some documentation to spring animation
Fix spring animation
Update QtDeclarative def files
Fix exponential behavior of QTextCursor::removeSelectedText
Optimization: change signal/slot to function call
Don't show warning for attempts to load pixmaps asynchronously
Remove Image::pixmap property. QML applications should use
Update QmlChanges.txt
Don't double delete cancelled pixmap cache requests
...
Diffstat (limited to 'tests/benchmarks/gui')
-rw-r--r-- | tests/benchmarks/gui/text/qtext/main.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp index eaa23e9..63daae0 100644 --- a/tests/benchmarks/gui/text/qtext/main.cpp +++ b/tests/benchmarks/gui/text/qtext/main.cpp @@ -84,9 +84,11 @@ private slots: void newLineReplacement(); void formatManipulation(); + void fontResolution(); void layout_data(); void layout(); + void formattedLayout(); void paintLayoutToPixmap(); void paintLayoutToPixmap_painterFill(); @@ -306,6 +308,18 @@ void tst_QText::formatManipulation() } } +void tst_QText::fontResolution() +{ + QFont font; + QFont font2; + font.setFamily("DejaVu"); + font2.setBold(true); + + QBENCHMARK { + QFont res = font.resolve(font2); + } +} + void tst_QText::layout_data() { QTest::addColumn<bool>("wrap"); @@ -339,6 +353,33 @@ void tst_QText::layout() } }*/ +void tst_QText::formattedLayout() +{ + //set up formatting + QList<QTextLayout::FormatRange> ranges; + { + QTextCharFormat format; + format.setForeground(QColor("steelblue")); + + QTextLayout::FormatRange formatRange; + formatRange.format = format; + formatRange.start = 0; + formatRange.length = 50; + + ranges.append(formatRange); + } + + QTextLayout layout(m_shortLorem); + layout.setAdditionalFormats(ranges); + setupTextLayout(&layout); + + QBENCHMARK { + QTextLayout layout(m_shortLorem); + layout.setAdditionalFormats(ranges); + setupTextLayout(&layout); + } +} + void tst_QText::paintLayoutToPixmap() { QTextLayout layout(m_shortLorem); |