Remove references to older Qt versions

This commit is contained in:
Jean-Marc Lasgouttes 2024-10-23 13:43:36 +02:00
parent 0a4f7db022
commit 19ef7a2dea
3 changed files with 4 additions and 7 deletions

View File

@ -136,8 +136,7 @@ void FancyLineEdit::checkButtons(const QString &text)
void FancyLineEdit::setClearButton(bool visible) void FancyLineEdit::setClearButton(bool visible)
{ {
// QLineEdit::setClearButtonEnabled() has been implemented in Qt 5.2. // FIXME: remove and adapt code
// This is now the minimum required version
setClearButtonEnabled(visible); setClearButtonEnabled(visible);
} }

View File

@ -78,8 +78,6 @@ int const strwidth_cache_max_cost = 1024 * 1024;
// Limit breakstr_cache_ total cost to 10MB of string data. // Limit breakstr_cache_ total cost to 10MB of string data.
// This is useful for documents with very large insets. // This is useful for documents with very large insets.
int const breakstr_cache_max_cost = 10 * 1024 * 1024; 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) #if defined(Q_OS_MAC)
// For some reason, the built-in cache of QTextLayout does not work or // For some reason, the built-in cache of QTextLayout does not work or
// exist on macOS. // exist on macOS.
@ -424,7 +422,7 @@ getTextLayout_helper(TextLayoutHelper const & tlh, double const wordspacing,
ptl->setFont(font); ptl->setFont(font);
#ifdef BIDI_USE_FLAG #ifdef BIDI_USE_FLAG
/* Use undocumented flag to enforce drawing direction /* 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); ptl->setFlags(tlh.rtl ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight);
#endif #endif
@ -527,7 +525,7 @@ GuiFontMetrics::breakString_helper(docstring const & s, int first_wid, int wid,
QTextLayout tl; QTextLayout tl;
#ifdef BIDI_USE_FLAG #ifdef BIDI_USE_FLAG
/* Use undocumented flag to enforce drawing direction /* 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); tl.setFlags(rtl ? Qt::TextForceRightToLeft : Qt::TextForceLeftToRight);
#endif #endif

View File

@ -789,7 +789,7 @@ void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
// QAbstractScrollArea::mouseMoveEvent, the event is triggered falsely when quickly // QAbstractScrollArea::mouseMoveEvent, the event is triggered falsely when quickly
// double tapping a touchpad. To test: try to select a word by quickly double tapping // 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. // 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 // ML thread: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg211699.html
// Qt bugtracker: https://bugreports.qt.io/browse/QTBUG-85431 // Qt bugtracker: https://bugreports.qt.io/browse/QTBUG-85431
// Bug was fixed in Qt 5.15.1 // Bug was fixed in Qt 5.15.1