]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
Fix QTBUG-92199 by reverting 5a9bcf5
authortobtoht <thotbot@protonmail.com>
Sun, 3 Jul 2022 16:11:56 +0000 (18:11 +0200)
committertobtoht <thotbot@protonmail.com>
Sun, 3 Jul 2022 16:11:56 +0000 (18:11 +0200)
.dockerignore
Dockerfile.linux
contrib/QTBUG-92199-fix.patch [new file with mode: 0644]

index 709533e26075d3c6fbcbc7a22ed13f3339a5dfe9..f1c4e0fce380947cde22f381220a10a7bfe40a31 100644 (file)
@@ -1,2 +1,3 @@
 *
-!contrib/build-deps/verify-packages.sh
\ No newline at end of file
+!contrib/build-deps/verify-packages.sh
+!contrib/QTBUG-92199-fix.patch
\ No newline at end of file
index 8d00f4ed2d7dcc9faf3cbd2935ffe2b8264eb85a..65c5b813bafbf40361e3588d6a25618b5d3ed4e8 100644 (file)
@@ -73,6 +73,8 @@ RUN git clone -b 2.13.92 --depth 1 https://gitlab.freedesktop.org/fontconfig/fon
     make -j$THREADS install && \
     rm -rf $(pwd)
 
+COPY contrib/QTBUG-92199-fix.patch .
+
 ENV QT_VERSION=v5.15.5-lts-lgpl
 RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
     cd qt5 && \
@@ -86,7 +88,8 @@ RUN git clone git://code.qt.io/qt/qt5.git -b ${QT_VERSION} --depth 1 && \
     git clone git://code.qt.io/qt/qtwebsockets.git -b ${QT_VERSION} --depth 1 && \
     sed -ri s/\(Libs:.*\)/\\1\ -lexpat/ /usr/local/lib/pkgconfig/fontconfig.pc && \
     sed -ri s/\(Libs:.*\)/\\1\ -lz/ /usr/local/lib/pkgconfig/freetype2.pc && \
-    sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf
+    sed -i s/\\/usr\\/X11R6\\/lib64/\\/usr\\/local\\/lib/ qtbase/mkspecs/linux-g++-64/qmake.conf && \
+    cd qtbase && cat ../../QTBUG-92199-fix.patch && git apply ../../QTBUG-92199-fix.patch
 
 RUN cd qt5 && \
     if [ "$(uname -m)" = "aarch64" ]; then \
diff --git a/contrib/QTBUG-92199-fix.patch b/contrib/QTBUG-92199-fix.patch
new file mode 100644 (file)
index 0000000..6be407a
--- /dev/null
@@ -0,0 +1,46 @@
+diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
+index 2ab9756f8d..a9d6ecd51a 100644
+--- a/src/widgets/styles/qstylesheetstyle.cpp
++++ b/src/widgets/styles/qstylesheetstyle.cpp
+@@ -1465,7 +1465,6 @@ void QRenderRule::configurePalette(QPalette *p, QPalette::ColorGroup cg, const Q
+         p->setBrush(cg, w->foregroundRole(), pal->foreground);
+         p->setBrush(cg, QPalette::WindowText, pal->foreground);
+         p->setBrush(cg, QPalette::Text, pal->foreground);
+-        p->setBrush(cg, QPalette::PlaceholderText, pal->foreground);
+     }
+     if (pal->selectionBackground.style() != Qt::NoBrush)
+         p->setBrush(cg, QPalette::Highlight, pal->selectionBackground);
+diff --git a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+index 26868a763c..82527849b0 100644
+--- a/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
++++ b/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
+@@ -126,7 +126,6 @@ private slots:
+     void QTBUG15910_crashNullWidget();
+     void QTBUG36933_brokenPseudoClassLookup();
+     void styleSheetChangeBeforePolish();
+-    void placeholderColor();
+     //at the end because it mess with the style.
+     void widgetStyle();
+     void appStyle();
+@@ -2230,21 +2229,6 @@ void tst_QStyleSheetStyle::highdpiImages()
+     QHighDpiScaling::updateHighDpiScaling(); // reset to normal
+ }
+-void tst_QStyleSheetStyle::placeholderColor()
+-{
+-    const QColor red(Qt::red);
+-    qApp->setStyleSheet("* { color: red; }");
+-    QLineEdit le1;
+-    QLineEdit le2;
+-    le2.setEnabled(false);
+-    le1.ensurePolished();
+-    QCOMPARE(le1.palette().placeholderText(), red);
+-    le2.ensurePolished();
+-    QCOMPARE(le2.palette().placeholderText(), red);
+-    le2.setEnabled(true);
+-    QCOMPARE(le2.palette().placeholderText(), red);
+-}
+-
+ QTEST_MAIN(tst_QStyleSheetStyle)
+ #include "tst_qstylesheetstyle.moc"