diff --git a/src/core/net/proxy_config_service_qt.cpp b/src/core/net/proxy_config_service_qt.cpp index c5316d54e86fee56239715982fc13fadb2f59ad4..13b969281d5e3131362fa3fa4a2f89c8d64f87ad 100644 --- a/src/core/net/proxy_config_service_qt.cpp +++ b/src/core/net/proxy_config_service_qt.cpp @@ -93,9 +93,7 @@ void ProxyConfigServiceQt::RemoveObserver(net::ProxyConfigService::Observer *obs net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxyConfig(net::ProxyConfigWithAnnotation *config) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) m_usesSystemConfiguration = QNetworkProxyFactory::usesSystemConfiguration(); -#endif if (m_usesSystemConfiguration) { // Use Chromium's base service to retrieve system settings net::ProxyConfigWithAnnotation systemConfig; @@ -149,7 +147,6 @@ void ProxyConfigServiceQt::OnLazyPoll() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); -#if QT_VERSION >= QT_VERSION_CHECK(5, 8, 0) // We need to update if // - setUseSystemConfiguration() was called in between // - user changed application proxy @@ -160,10 +157,6 @@ void ProxyConfigServiceQt::OnLazyPoll() if (m_baseService.get()) m_baseService->OnLazyPoll(); } -#else - if (m_qtApplicationProxy != QNetworkProxy::applicationProxy()) - Update(); -#endif } // Called when the base service changed diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index 86d5d711850758777dd2712613b8861fb905c0aa..6c5b2ac20f5035877bb1c7e68ce3338182a98037 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -90,9 +90,7 @@ #include <QVariant> #include <QWheelEvent> #include <QWindow> -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) #include <QtGui/private/qinputcontrol_p.h> -#endif #include <QtGui/qaccessible.h> namespace QtWebEngineCore { @@ -178,55 +176,7 @@ static inline bool compareTouchPoints(const QTouchEvent::TouchPoint &lhs, const static inline bool isCommonTextEditShortcut(const QKeyEvent *ke) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 9, 0) return QInputControl::isCommonTextEditShortcut(ke); -#else - if (ke->modifiers() == Qt::NoModifier - || ke->modifiers() == Qt::ShiftModifier - || ke->modifiers() == Qt::KeypadModifier) { - if (ke->key() < Qt::Key_Escape) { - return true; - } else { - switch (ke->key()) { - case Qt::Key_Return: - case Qt::Key_Enter: - case Qt::Key_Delete: - case Qt::Key_Home: - case Qt::Key_End: - case Qt::Key_Backspace: - case Qt::Key_Left: - case Qt::Key_Right: - case Qt::Key_Up: - case Qt::Key_Down: - case Qt::Key_Tab: - return true; - default: - break; - } - } - } else if (ke->matches(QKeySequence::Copy) - || ke->matches(QKeySequence::Paste) - || ke->matches(QKeySequence::Cut) - || ke->matches(QKeySequence::Redo) - || ke->matches(QKeySequence::Undo) - || ke->matches(QKeySequence::MoveToNextWord) - || ke->matches(QKeySequence::MoveToPreviousWord) - || ke->matches(QKeySequence::MoveToStartOfDocument) - || ke->matches(QKeySequence::MoveToEndOfDocument) - || ke->matches(QKeySequence::SelectNextWord) - || ke->matches(QKeySequence::SelectPreviousWord) - || ke->matches(QKeySequence::SelectStartOfLine) - || ke->matches(QKeySequence::SelectEndOfLine) - || ke->matches(QKeySequence::SelectStartOfBlock) - || ke->matches(QKeySequence::SelectEndOfBlock) - || ke->matches(QKeySequence::SelectStartOfDocument) - || ke->matches(QKeySequence::SelectEndOfDocument) - || ke->matches(QKeySequence::SelectAll) - ) { - return true; - } - return false; -#endif } static uint32_t s_eventId = 0; diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 762d9f53a4c8dd1dd38ad29da40ab08f7180ae8a..5b9e612682e3da4b1285a3df971c1beb1604e32d 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1431,11 +1431,7 @@ bool WebContentsAdapter::handleDropDataFileContents(const content::DropData &dro const auto maybeFilename = dropData.GetSafeFilenameForImageFileContents(); const QString fileName = maybeFilename ? toQt(maybeFilename->AsUTF16Unsafe()) : QString(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) const QString &filePath = m_dndTmpDir->filePath(fileName); -#else - const QString &filePath = m_dndTmpDir->path() + QLatin1Char('/') + fileName; -#endif QFile file(filePath); if (!file.open(QIODevice::WriteOnly)) { qWarning("Cannot write temporary file %s.", qUtf8Printable(filePath)); diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index b7cf1344b8beb51e9996e26106adbc9d4e50d43b..fefccae0edfd62c05fd91f9dbafbb33e420b38a0 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -142,10 +142,8 @@ bool usingQtQuick2DRenderer() } } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) if (device.isEmpty()) device = QQuickWindow::sceneGraphBackend(); -#endif if (device.isEmpty()) device = QString::fromLocal8Bit(qgetenv("QT_QUICK_BACKEND")); if (device.isEmpty()) diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp index 17c1c75a0db0db993bed04e3290ba7b3643067a0..04d4930ecfa76237c7de651286678d6d321c1fd5 100644 --- a/src/core/web_event_factory.cpp +++ b/src/core/web_event_factory.cpp @@ -1413,11 +1413,7 @@ static void setBlinkWheelEventDelta(blink::WebMouseWheelEvent &webEvent) // a pixel delta based on ticks and scroll per line. static const float cDefaultQtScrollStep = 20.f; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0)) static const int wheelScrollLines = QGuiApplication::styleHints()->wheelScrollLines(); -#else - static const int wheelScrollLines = 3; -#endif webEvent.delta_x = webEvent.wheel_ticks_x * wheelScrollLines * cDefaultQtScrollStep; webEvent.delta_y = webEvent.wheel_ticks_y * wheelScrollLines * cDefaultQtScrollStep; } diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 252bdc9b6ed83b979e0e07bb1bf916f0930018d5..7e49bc77d91dcd9ad5f6d36e39b8f2055730fd57 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -508,12 +508,7 @@ public: if (pos.isNull() || !item->contains(pos)) return; const QPoint oldPos = QCursor::pos(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) const QPoint globalPos = item->mapToGlobal(QPointF(pos)).toPoint(); -#else - const QPoint posInWindow = item->mapToItem(item->window()->contentItem(), QPointF(pos)).toPoint(); - const QPoint globalPos = item->window()->mapToGlobal(posInWindow); -#endif if (oldPos == globalPos) return; m_oldCursorPos = oldPos;