Skip to content
Commit 642c6fb7 authored by Igor Kushnir's avatar Igor Kushnir 💬 Committed by Friedrich W. H. Kossebau
Browse files

Work around QKeyCombination-returning operators in global namespace

This workaround for QTBUG-126820 ensures that correct operator|
overloads are used in KDevelop code and prevents compilation errors like
the following while building against Qt 6:
applychangeswidget.cpp:67:36: error: cannot convert ‘QIncompatibleFlag’ to ‘const QKeySequence&’
   67 |     okButton->setShortcut(Qt::CTRL | Qt::Key_Return);
      |                           ~~~~~~~~~^~~~~~~~~~~~~~~~
      |                                    |
      |                                    QIncompatibleFlag

This commit assumes that the bug will be fixed in Qt version 6.9.0 and
thus limits the workaround to earlier Qt versions. But as an added
comment explains, should the bug be fixed by enclosing the
QKeyCombination-returning operators in the namespace Qt in an earlier
version (such as 6.8.1), the workaround would not break anything either.

Clean up nearby includes along the way.
parent 743728bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment