diff options
Diffstat (limited to 'recipes-qt/qt5/qtdeclarative/0002-Fix-improper-antialiasing-property-behavior.patch')
| -rw-r--r-- | recipes-qt/qt5/qtdeclarative/0002-Fix-improper-antialiasing-property-behavior.patch | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/recipes-qt/qt5/qtdeclarative/0002-Fix-improper-antialiasing-property-behavior.patch b/recipes-qt/qt5/qtdeclarative/0002-Fix-improper-antialiasing-property-behavior.patch deleted file mode 100644 index 821149f2..00000000 --- a/recipes-qt/qt5/qtdeclarative/0002-Fix-improper-antialiasing-property-behavior.patch +++ /dev/null | |||
| @@ -1,60 +0,0 @@ | |||
| 1 | From 009ad875f89d7d7bc4447e18c2fbbd485a75e0b5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Oleg Shparber <trollixx@gmail.com> | ||
| 3 | Date: Mon, 19 May 2014 00:53:39 -0700 | ||
| 4 | Subject: [PATCH] Fix improper antialiasing property behavior | ||
| 5 | |||
| 6 | For components antialiased by default the property was returned | ||
| 7 | as false if default true value was set to true again. | ||
| 8 | |||
| 9 | Upstream-Status: Backport | ||
| 10 | |||
| 11 | Task-number: QTBUG-39047 | ||
| 12 | Change-Id: I16960a12b6d38a0d9e487fc6612610c39c4949d4 | ||
| 13 | Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> | ||
| 14 | Signed-off-by: Jonathan Liu <net147@gmail.com> | ||
| 15 | --- | ||
| 16 | src/quick/items/qquickitem.cpp | 8 +++++--- | ||
| 17 | tests/auto/quick/qquicktext/tst_qquicktext.cpp | 7 +++++++ | ||
| 18 | 2 files changed, 12 insertions(+), 3 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp | ||
| 21 | index 3f0dae8..ef2eac4 100644 | ||
| 22 | --- a/src/quick/items/qquickitem.cpp | ||
| 23 | +++ b/src/quick/items/qquickitem.cpp | ||
| 24 | @@ -5691,10 +5691,12 @@ void QQuickItem::setAntialiasing(bool aa) | ||
| 25 | { | ||
| 26 | Q_D(QQuickItem); | ||
| 27 | |||
| 28 | - bool changed = (aa != antialiasing()); | ||
| 29 | - d->antialiasingValid = true; | ||
| 30 | + if (!d->antialiasingValid) { | ||
| 31 | + d->antialiasingValid = true; | ||
| 32 | + d->antialiasing = d->implicitAntialiasing; | ||
| 33 | + } | ||
| 34 | |||
| 35 | - if (!changed) | ||
| 36 | + if (aa == d->antialiasing) | ||
| 37 | return; | ||
| 38 | |||
| 39 | d->antialiasing = aa; | ||
| 40 | diff --git a/tests/auto/quick/qquicktext/tst_qquicktext.cpp b/tests/auto/quick/qquicktext/tst_qquicktext.cpp | ||
| 41 | index 0b69981..d36c55d 100644 | ||
| 42 | --- a/tests/auto/quick/qquicktext/tst_qquicktext.cpp | ||
| 43 | +++ b/tests/auto/quick/qquicktext/tst_qquicktext.cpp | ||
| 44 | @@ -1334,6 +1334,13 @@ void tst_qquicktext::antialiasing() | ||
| 45 | text->resetAntialiasing(); | ||
| 46 | QCOMPARE(text->antialiasing(), true); | ||
| 47 | QCOMPARE(spy.count(), 2); | ||
| 48 | + | ||
| 49 | + // QTBUG-39047 | ||
| 50 | + component.setData("import QtQuick 2.0\n Text { antialiasing: true }", QUrl()); | ||
| 51 | + object.reset(component.create()); | ||
| 52 | + text = qobject_cast<QQuickText *>(object.data()); | ||
| 53 | + QVERIFY(text); | ||
| 54 | + QCOMPARE(text->antialiasing(), true); | ||
| 55 | } | ||
| 56 | |||
| 57 | void tst_qquicktext::weight() | ||
| 58 | -- | ||
| 59 | 1.9.3 | ||
| 60 | |||
