[neon/qt/qtbase/Neon/release] debian: Revert adding fix-misplacement-of-placeholder-text-in-QLineEdit.diff.

Dmitry Shachnev null at kde.org
Thu May 5 10:59:24 BST 2022


Git commit d10e748c548df90741fcc830dab87671e518f604 by Dmitry Shachnev.
Committed on 02/07/2021 at 15:57.
Pushed by jriddell into branch 'Neon/release'.

Revert adding fix-misplacement-of-placeholder-text-in-QLineEdit.diff.

Unfortunately it causes a regression.

See https://bugreports.qt.io/browse/QTBUG-94824.

M  +3    -0    debian/changelog
D  +0    -53   debian/patches/fix-misplacement-of-placeholder-text-in-QLineEdit.diff
M  +0    -1    debian/patches/series

https://invent.kde.org/neon/qt/qtbase/commit/d10e748c548df90741fcc830dab87671e518f604

diff --git a/debian/changelog b/debian/changelog
index c77a02f..7c1e671 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,8 @@
 qtbase-opensource-src (5.15.2+dfsg-9) UNRELEASED; urgency=medium
 
+  [ Dmitry Shachnev ]
+  * Revert adding fix-misplacement-of-placeholder-text-in-QLineEdit.diff.
+    Unfortunately it causes a regression (see QTBUG-94824).
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Fri, 02 Jul 2021 18:55:04 +0300
 
diff --git a/debian/patches/fix-misplacement-of-placeholder-text-in-QLineEdit.diff b/debian/patches/fix-misplacement-of-placeholder-text-in-QLineEdit.diff
deleted file mode 100644
index 3a14d54..0000000
--- a/debian/patches/fix-misplacement-of-placeholder-text-in-QLineEdit.diff
+++ /dev/null
@@ -1,53 +0,0 @@
-Description: fix misplacement of placeholder text in QLineEdit with RTL content
- The placeholder text was rendered in the wrong position after clicking
- on the clear button in a QLineEdit with right-to-left content. The
- button was still taking up space while it was fading out, so the first
- paintEvent rendered the placeholder with space reserved for the clear
- button. Once the button gets hidden, no new update was issued, so
- garbage was left behind.
- .
- Fix this by not giving a fading-out clear button any margin space. The
- result of this is that the placeholder text is visible underneath the
- fading-out clear button. This is preferable to the placeholder text
- being first rendered next to the fading-out clear button, and then
- popping to the edge when the clear button is hidden (which would have
- been the result of issuing a complete update for the line edit at the
- end of the fade-out animation).
-Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=dc794f7622bc00f7
-Last-Update: 2021-06-16
-
---- a/src/widgets/widgets/qlineedit_p.cpp
-+++ b/src/widgets/widgets/qlineedit_p.cpp
-@@ -664,10 +664,18 @@ static int effectiveTextMargin(int defau
-     if (widgets.empty())
-         return defaultMargin;
- 
--    return defaultMargin + (parameters.margin + parameters.widgetWidth) *
--           int(std::count_if(widgets.begin(), widgets.end(),
-+    const auto visibleSideWidgetCount = std::count_if(widgets.begin(), widgets.end(),
-                              [](const QLineEditPrivate::SideWidgetEntry &e) {
--                                 return e.widget->isVisibleTo(e.widget->parentWidget()); }));
-+#if QT_CONFIG(animation)
-+        // a button that's fading out doesn't get any space
-+        if (auto* iconButton = qobject_cast<QLineEditIconButton*>(e.widget))
-+            return iconButton->needsSpace();
-+
-+#endif
-+        return e.widget->isVisibleTo(e.widget->parentWidget());
-+    });
-+
-+    return defaultMargin + (parameters.margin + parameters.widgetWidth) * visibleSideWidgetCount;
- }
- 
- QMargins QLineEditPrivate::effectiveTextMargins() const
---- a/src/widgets/widgets/qlineedit_p.h
-+++ b/src/widgets/widgets/qlineedit_p.h
-@@ -95,6 +95,8 @@ public:
- 
-     bool shouldHideWithText() const;
-     void setHideWithText(bool hide);
-+    // m_wasHidden is true unless the button is fading out
-+    bool needsSpace() const { return m_wasHidden; }
- #endif
- 
- protected:
diff --git a/debian/patches/series b/debian/patches/series
index f702b2a..7cf8202 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,7 +5,6 @@ gcc_11_limits.diff
 qiodevice_readline_memory.diff
 mime_globs.diff
 fix-invalid-pointer-return-with-QGridLayout.diff
-fix-misplacement-of-placeholder-text-in-QLineEdit.diff
 
 # Debian specific.
 gnukfreebsd.diff



More information about the Neon-commits mailing list