diff --git a/src/EditProfileDialog.h b/src/EditProfileDialog.h --- a/src/EditProfileDialog.h +++ b/src/EditProfileDialog.h @@ -44,11 +44,6 @@ #include "KeyboardTranslatorManager.h" #include "FontDialog.h" -// Backward compatibility -#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) -#define qAsConst(code) -#endif - class KPluralHandlingSpinBox; class KLocalizedString; class QItemSelectionModel; diff --git a/src/ScrollState.cpp b/src/ScrollState.cpp --- a/src/ScrollState.cpp +++ b/src/ScrollState.cpp @@ -25,21 +25,10 @@ void ScrollState::addWheelEvent(const QWheelEvent *wheel) { - // If the Libinput X server input driver is used we get a value for - // pixelDelta for a physical mouse wheel scroll, so we check that - // the source of the wheel event is actually a mouse, this has been - // fixed upstream in Qt 5.9.5: https://bugreports.qt.io/browse/QTBUG-59261 - // Fixes Konsole BUG: https://bugs.kde.org/show_bug.cgi?id=386762 -#if (QT_VERSION < QT_VERSION_CHECK(5, 9, 5)) - if (wheel->source() != Qt::MouseEventNotSynthesized) { -#else - if (true) { -#endif - if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) { - _remainingScrollPixel = 0; - } else { - _remainingScrollPixel += wheel->pixelDelta().y(); - } + if ((wheel->angleDelta().y() != 0) && (wheel->pixelDelta().y() == 0)) { + _remainingScrollPixel = 0; + } else { + _remainingScrollPixel += wheel->pixelDelta().y(); } _remainingScrollAngle += wheel->angleDelta().y(); } diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp --- a/src/TerminalDisplay.cpp +++ b/src/TerminalDisplay.cpp @@ -715,9 +715,7 @@ paint.drawLine(cx + xHalfGap, cy - 1, ex, cy - 1); paint.drawLine(cx + xHalfGap, cy + 1, ex, cy + 1); // No break! -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) Q_FALLTHROUGH(); -#endif case 0x4C: // BOX DRAWINGS LIGHT DOUBLE DASH HORIZONTAL paint.drawLine(x, cy, cx - xHalfGap - 1, cy); paint.drawLine(cx + xHalfGap, cy, ex, cy); @@ -728,9 +726,7 @@ paint.drawLine(cx - 1, cy + yHalfGap, cx - 1, ey); paint.drawLine(cx + 1, cy + yHalfGap, cx + 1, ey); // No break! -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) Q_FALLTHROUGH(); -#endif case 0x4E: // BOX DRAWINGS LIGHT DOUBLE DASH VERTICAL paint.drawLine(cx, y, cx, cy - yHalfGap - 1); paint.drawLine(cx, cy + yHalfGap, cx, ey); diff --git a/tools/uni2characterwidth/template.h b/tools/uni2characterwidth/template.h --- a/tools/uni2characterwidth/template.h +++ b/tools/uni2characterwidth/template.h @@ -26,11 +26,6 @@ #include #include -// Backward compatibility -#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) && !defined(qAsConst) -#define qAsConst(code) code -#endif - // QVariant doesn't offer modification in place. Var does. class Var { public: diff --git a/tools/uni2characterwidth/uni2characterwidth.cpp b/tools/uni2characterwidth/uni2characterwidth.cpp --- a/tools/uni2characterwidth/uni2characterwidth.cpp +++ b/tools/uni2characterwidth/uni2characterwidth.cpp @@ -36,11 +36,6 @@ #include -// Backward compatibility -#if QT_VERSION < QT_VERSION_CHECK(5, 7, 0) -#define qAsConst(code) code -#endif - static constexpr unsigned int CODE_POINTS_NUM = 0x110000;