]> git.lyx.org Git - lyx.git/commitdiff
Compilation fix with Qt < 5.7
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Apr 2024 10:39:09 +0000 (12:39 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 3 Apr 2024 10:41:45 +0000 (12:41 +0200)
Qt::ImAnchorRectangle has only been introduced in Qt 5.7. Since it is
used to answer a query from the IM machinery, there is no need for
it with older Qt versions.

src/frontends/qt/GuiWorkArea.cpp

index a4b874097c87152785d56439ee4b12c8589b136d..341fddc3b8774578a7ff920d2837a6dc2e285195 100644 (file)
@@ -1422,10 +1422,12 @@ QVariant GuiWorkArea::inputMethodQuery(Qt::InputMethodQuery query) const
                return QVariant(d->im_cursor_rect_);
                break;
        }
+#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
        case Qt::ImAnchorRectangle: {
                return QVariant(d->im_anchor_rect_);
                break;
        }
+#endif
        default:
                return QWidget::inputMethodQuery(query);
        }