[LyX/master] Remove references to older Qt versions

Jean-Marc Lasgouttes lasgouttes at lyx.org
Wed Oct 23 14:31:40 UTC 2024


commit 19ef7a2dea01271484aedec2b6a2c3bf686f38d5
Author: Jean-Marc Lasgouttes <lasgouttes at lyx.org>
Date:   Wed Oct 23 13:43:36 2024 +0200

    Remove references to older Qt versions
---
 src/frontends/qt/FancyLineEdit.cpp  | 3 +--
 src/frontends/qt/GuiFontMetrics.cpp | 6 ++----
 src/frontends/qt/GuiWorkArea.cpp    | 2 +-
 3 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/frontends/qt/FancyLineEdit.cpp b/src/frontends/qt/FancyLineEdit.cpp
index 269a717ed4..9f52f7c5c8 100644
--- a/src/frontends/qt/FancyLineEdit.cpp
+++ b/src/frontends/qt/FancyLineEdit.cpp
@@ -136,8 +136,7 @@ void FancyLineEdit::checkButtons(const QString &text)
 
 void FancyLineEdit::setClearButton(bool visible)
 {
-	// QLineEdit::setClearButtonEnabled() has been implemented in Qt 5.2.
-	// This is now the minimum required version
+	// FIXME: remove and adapt code
 	setClearButtonEnabled(visible);
 }
 
diff --git a/src/frontends/qt/GuiFontMetrics.cpp b/src/frontends/qt/GuiFontMetrics.cpp
index b106b1d619..7ad13fa3ea 100644
--- a/src/frontends/qt/GuiFontMetrics.cpp
+++ b/src/frontends/qt/GuiFontMetrics.cpp
@@ -78,8 +78,6 @@ int const strwidth_cache_max_cost = 1024 * 1024;
 // Limit breakstr_cache_ total cost to 10MB of string data.
 // This is useful for documents with very large insets.
 int const breakstr_cache_max_cost = 10 * 1024 * 1024;
-// Qt 5.x already has its own caching of QTextLayout objects
-// but it does not seem to work well on MacOS X.
 #if defined(Q_OS_MAC)
 // For some reason, the built-in cache of QTextLayout does not work or
 // exist on macOS.
@@ -424,7 +422,7 @@ getTextLayout_helper(TextLayoutHelper const & tlh, double const wordspacing,
 	ptl->setFont(font);
 #ifdef BIDI_USE_FLAG
 	/* Use undocumented flag to enforce drawing direction
-	 * FIXME: This does not work with Qt 5.11 (ticket #11284).
+	 * This does not work with some Qt versions (ticket #11284).
 	 */
 	ptl->setFlags(tlh.rtl ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight);
 #endif
@@ -527,7 +525,7 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
 	QTextLayout tl;
 #ifdef BIDI_USE_FLAG
 	/* Use undocumented flag to enforce drawing direction
-	 * FIXME: This does not work with Qt 5.11 (ticket #11284).
+	 * This does not work with some Qt versions (ticket #11284).
 	 */
 	tl.setFlags(rtl ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight);
 #endif
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index a54c033277..33616b4c09 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -789,7 +789,7 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
 	// QAbstractScrollArea::mouseMoveEvent, the event is triggered falsely when quickly
 	// double tapping a touchpad. To test: try to select a word by quickly double tapping
 	// on a touchpad while hovering the cursor over that word in the work area.
-	// This bug does not occur on Qt versions 5.10.1 and below. Only Windows seems to be affected.
+	// Only Windows seems to be affected.
 	// ML thread: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg211699.html
 	// Qt bugtracker: https://bugreports.qt.io/browse/QTBUG-85431
 	// Bug was fixed in Qt 5.15.1


More information about the lyx-cvs mailing list