From a0d4f94c0eb3f724df979d9d22c4c944f34d547a Mon Sep 17 00:00:00 2001 From: Warwick Allison Date: Fri, 25 Jun 2010 10:51:56 +1000 Subject: Force font selection (and so ensure visual test passes). --- .../declarative/qdeclarativetext/data/alignments.qml | 2 -- .../declarative/qdeclarativetext/data/alignments_cb.png | Bin 528 -> 496 bytes .../declarative/qdeclarativetext/data/alignments_cc.png | Bin 549 -> 556 bytes .../declarative/qdeclarativetext/data/alignments_ct.png | Bin 564 -> 533 bytes .../declarative/qdeclarativetext/data/alignments_lb.png | Bin 522 -> 496 bytes .../declarative/qdeclarativetext/data/alignments_lc.png | Bin 541 -> 535 bytes .../declarative/qdeclarativetext/data/alignments_lt.png | Bin 558 -> 514 bytes .../declarative/qdeclarativetext/data/alignments_rb.png | Bin 530 -> 505 bytes .../declarative/qdeclarativetext/data/alignments_rc.png | Bin 550 -> 559 bytes .../declarative/qdeclarativetext/data/alignments_rt.png | Bin 564 -> 539 bytes .../qdeclarativetext/tst_qdeclarativetext.cpp | 7 +++++++ .../qdeclarativetextedit/data/alignments.qml | 2 -- .../qdeclarativetextedit/data/alignments_cb.png | Bin 528 -> 496 bytes .../qdeclarativetextedit/data/alignments_cc.png | Bin 549 -> 556 bytes .../qdeclarativetextedit/data/alignments_ct.png | Bin 564 -> 533 bytes .../qdeclarativetextedit/data/alignments_lb.png | Bin 522 -> 496 bytes .../qdeclarativetextedit/data/alignments_lc.png | Bin 541 -> 535 bytes .../qdeclarativetextedit/data/alignments_lt.png | Bin 558 -> 514 bytes .../qdeclarativetextedit/data/alignments_rb.png | Bin 530 -> 505 bytes .../qdeclarativetextedit/data/alignments_rc.png | Bin 550 -> 559 bytes .../qdeclarativetextedit/data/alignments_rt.png | Bin 564 -> 539 bytes .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 7 +++++++ 22 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments.qml b/tests/auto/declarative/qdeclarativetext/data/alignments.qml index b10c335..b1f701b 100644 --- a/tests/auto/declarative/qdeclarativetext/data/alignments.qml +++ b/tests/auto/declarative/qdeclarativetext/data/alignments.qml @@ -20,8 +20,6 @@ Rectangle { id: t anchors.fill: parent - font.family: "Misc Fixed" - font.pixelSize: 8 horizontalAlignment: TextEdit.AlignRight verticalAlignment: TextEdit.AlignBottom wrapMode: TextEdit.WordWrap diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_cb.png b/tests/auto/declarative/qdeclarativetext/data/alignments_cb.png index b0ad381..99de219 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_cb.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_cb.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_cc.png b/tests/auto/declarative/qdeclarativetext/data/alignments_cc.png index 98232ce..cb85251 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_cc.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_cc.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_ct.png b/tests/auto/declarative/qdeclarativetext/data/alignments_ct.png index b606ba5..ddca549 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_ct.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_ct.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_lb.png b/tests/auto/declarative/qdeclarativetext/data/alignments_lb.png index a8f095d..1b50a81 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_lb.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_lb.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_lc.png b/tests/auto/declarative/qdeclarativetext/data/alignments_lc.png index c2a0679..f041b86 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_lc.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_lc.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_lt.png b/tests/auto/declarative/qdeclarativetext/data/alignments_lt.png index c019551..c75e0d1 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_lt.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_lt.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_rb.png b/tests/auto/declarative/qdeclarativetext/data/alignments_rb.png index 08d581a..b06a5da 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_rb.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_rb.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_rc.png b/tests/auto/declarative/qdeclarativetext/data/alignments_rc.png index d607955..e468857 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_rc.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_rc.png differ diff --git a/tests/auto/declarative/qdeclarativetext/data/alignments_rt.png b/tests/auto/declarative/qdeclarativetext/data/alignments_rt.png index 2acfb9e..576715f 100644 Binary files a/tests/auto/declarative/qdeclarativetext/data/alignments_rt.png and b/tests/auto/declarative/qdeclarativetext/data/alignments_rt.png differ diff --git a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp index 91b3ca0..dc92f07 100644 --- a/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp +++ b/tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp @@ -424,6 +424,13 @@ void tst_qdeclarativetext::alignments() QFETCH(int, vAlign); QFETCH(QString, expectfile); +#ifdef Q_OS_LINUX + // Font-specific, but not likely platform-specific, so only test on one platform + QFont fn; + fn.setRawName("-misc-fixed-medium-r-*-*-8-*-*-*-*-*-*-*"); + QApplication::setFont(fn); +#endif + QDeclarativeView *canvas = createView(SRCDIR "/data/alignments.qml"); canvas->show(); diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml index b10c335..b1f701b 100644 --- a/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml +++ b/tests/auto/declarative/qdeclarativetextedit/data/alignments.qml @@ -20,8 +20,6 @@ Rectangle { id: t anchors.fill: parent - font.family: "Misc Fixed" - font.pixelSize: 8 horizontalAlignment: TextEdit.AlignRight verticalAlignment: TextEdit.AlignBottom wrapMode: TextEdit.WordWrap diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_cb.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_cb.png index b0ad381..99de219 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_cb.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_cb.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_cc.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_cc.png index 98232ce..cb85251 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_cc.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_cc.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_ct.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_ct.png index b606ba5..ddca549 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_ct.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_ct.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lb.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lb.png index a8f095d..1b50a81 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lb.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lb.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lc.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lc.png index c2a0679..f041b86 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lc.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lc.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lt.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lt.png index c019551..c75e0d1 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_lt.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_lt.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rb.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rb.png index 08d581a..b06a5da 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rb.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rb.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rc.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rc.png index d607955..e468857 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rc.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rc.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rt.png b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rt.png index 2acfb9e..576715f 100644 Binary files a/tests/auto/declarative/qdeclarativetextedit/data/alignments_rt.png and b/tests/auto/declarative/qdeclarativetextedit/data/alignments_rt.png differ diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 009d354..adf8348 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -325,6 +325,13 @@ void tst_qdeclarativetextedit::alignments() QFETCH(int, vAlign); QFETCH(QString, expectfile); +#ifdef Q_OS_LINUX + // Font-specific, but not likely platform-specific, so only test on one platform + QFont fn; + fn.setRawName("-misc-fixed-medium-r-*-*-8-*-*-*-*-*-*-*"); + QApplication::setFont(fn); +#endif + QDeclarativeView *canvas = createView(SRCDIR "/data/alignments.qml"); canvas->show(); -- cgit v0.12