summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2010-11-01 01:11:58 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2010-11-01 01:11:58 (GMT)
commit95e00f7d712ee51389948a018b27c0d1dde4fa99 (patch)
tree60efb42c957d02b2d27eb6973f5d5f8eb411398a /tools
parent349b6c734aa7af85f3709312325c3b2e9abdad2b (diff)
downloadQt-95e00f7d712ee51389948a018b27c0d1dde4fa99.zip
Qt-95e00f7d712ee51389948a018b27c0d1dde4fa99.tar.gz
Qt-95e00f7d712ee51389948a018b27c0d1dde4fa99.tar.bz2
Fix QML visual tests on Mac.
Task-number: QTBUG-14792
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/qdeclarativetester.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/qml/qdeclarativetester.cpp b/tools/qml/qdeclarativetester.cpp
index 67ea03d..eaf3403 100644
--- a/tools/qml/qdeclarativetester.cpp
+++ b/tools/qml/qdeclarativetester.cpp
@@ -52,6 +52,7 @@
QT_BEGIN_NAMESPACE
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
QDeclarativeTester::QDeclarativeTester(const QString &script, QDeclarativeViewer::ScriptOptions opts,
QDeclarativeView *parent)
@@ -267,7 +268,14 @@ void QDeclarativeTester::updateCurrentTime(int msec)
if (options & QDeclarativeViewer::TestImages) {
img.fill(qRgb(255,255,255));
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
m_view->render(&p);
}