summaryrefslogtreecommitdiff
path: root/libraries/qt5/patches/QTBUG-39047.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/qt5/patches/QTBUG-39047.patch')
-rw-r--r--libraries/qt5/patches/QTBUG-39047.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/libraries/qt5/patches/QTBUG-39047.patch b/libraries/qt5/patches/QTBUG-39047.patch
new file mode 100644
index 0000000000..ee6e4ad40e
--- /dev/null
+++ b/libraries/qt5/patches/QTBUG-39047.patch
@@ -0,0 +1,57 @@
+From 009ad875f89d7d7bc4447e18c2fbbd485a75e0b5 Mon Sep 17 00:00:00 2001
+From: Oleg Shparber <trollixx@gmail.com>
+Date: Mon, 19 May 2014 00:53:39 -0700
+Subject: [PATCH] Fix improper antialiasing property behavior
+
+For components antialiased by default the property was returned
+as false if default true value was set to true again.
+
+Task-number: QTBUG-39047
+Change-Id: I16960a12b6d38a0d9e487fc6612610c39c4949d4
+Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
+---
+ src/quick/items/qquickitem.cpp | 8 +++++---
+ tests/auto/quick/qquicktext/tst_qquicktext.cpp | 7 +++++++
+ 2 files changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
+index 3f0dae8..ef2eac4 100644
+--- a/src/quick/items/qquickitem.cpp
++++ b/src/quick/items/qquickitem.cpp
+@@ -5691,10 +5691,12 @@ void QQuickItem::setAntialiasing(bool aa)
+ {
+ Q_D(QQuickItem);
+
+- bool changed = (aa != antialiasing());
+- d->antialiasingValid = true;
++ if (!d->antialiasingValid) {
++ d->antialiasingValid = true;
++ d->antialiasing = d->implicitAntialiasing;
++ }
+
+- if (!changed)
++ if (aa == d->antialiasing)
+ return;
+
+ d->antialiasing = aa;
+diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+index 0b69981..d36c55d 100644
+--- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp
++++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp
+@@ -1334,6 +1334,13 @@ void tst_qquicktext::antialiasing()
+ text->resetAntialiasing();
+ QCOMPARE(text->antialiasing(), true);
+ QCOMPARE(spy.count(), 2);
++
++ // QTBUG-39047
++ component.setData("import QtQuick 2.0\n Text { antialiasing: true }", QUrl());
++ object.reset(component.create());
++ text = qobject_cast<QQuickText *>(object.data());
++ QVERIFY(text);
++ QCOMPARE(text->antialiasing(), true);
+ }
+
+ void tst_qquicktext::weight()
+--
+1.7.1
+