summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-07-06 15:46:38 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-09 17:58:00 +0000
commit8c10136c6676d3790ad64b3d448a1a1f09a9ff76 (patch)
tree963a56c0823c0bf3c4779ab6b42577b58cfec506 /src/core
parent70e04420eb8fbd61d7f4afd293d3ac135ca7ffd6 (diff)
Remove outdated QT_VERSION_CHECKs
Change-Id: I4c4b78af0bd7da5912b5e0136f9cfdb3c4268a7e Reviewed-by: Kirill Burtsev <kirill.burtsev@qt.io> (cherry picked from commit e62dde53f093dd2c404a65cf99e854081396632b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/profile_io_data_qt.h5
-rw-r--r--src/core/render_widget_host_view_qt.cpp4
-rw-r--r--src/core/render_widget_host_view_qt_delegate_client.cpp4
-rw-r--r--src/core/web_event_factory.cpp14
4 files changed, 0 insertions, 27 deletions
diff --git a/src/core/profile_io_data_qt.h b/src/core/profile_io_data_qt.h
index ab5c588f5..326c50d26 100644
--- a/src/core/profile_io_data_qt.h
+++ b/src/core/profile_io_data_qt.h
@@ -137,12 +137,7 @@ private:
QString m_httpCachePath;
QString m_storageName;
bool m_inMemoryOnly;
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
- QMutex m_mutex{QMutex::Recursive};
- using QRecursiveMutex = QMutex;
-#else
QRecursiveMutex m_mutex;
-#endif
int m_httpCacheMaxSize = 0;
BrowsingDataRemoverObserverQt m_removerObserver;
QString m_dataPath;
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 04d0ceda1..192ab460d 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -706,11 +706,7 @@ void RenderWidgetHostViewQt::OnUpdateTextInputStateCalled(content::TextInputMana
}
ui::TextInputType type = getTextInputType();
-#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText | Qt::ImhNoTextHandles | Qt::ImhNoEditMenu);
-#else
- m_delegate->setInputMethodHints(toQtInputMethodHints(getTextInputType()) | Qt::ImhNoPredictiveText);
-#endif
QString surroundingText = toQt(state->value);
// Remove IME composition text from the surrounding text
if (state->composition.has_value())
diff --git a/src/core/render_widget_host_view_qt_delegate_client.cpp b/src/core/render_widget_host_view_qt_delegate_client.cpp
index eb0a0ff12..0f218ab6c 100644
--- a/src/core/render_widget_host_view_qt_delegate_client.cpp
+++ b/src/core/render_widget_host_view_qt_delegate_client.cpp
@@ -406,12 +406,8 @@ QVariant RenderWidgetHostViewQtDelegateClient::inputMethodQuery(Qt::InputMethodQ
// TODO: Implement this
return QVariant(); // No limit.
case Qt::ImHints:
-#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
return int(toQtInputMethodHints(m_rwhv->getTextInputType()) | Qt::ImhNoPredictiveText
| Qt::ImhNoTextHandles | Qt::ImhNoEditMenu);
-#else
- return int(toQtInputMethodHints(m_rwhv->getTextInputType()) | Qt::ImhNoPredictiveText);
-#endif
default:
return QVariant();
}
diff --git a/src/core/web_event_factory.cpp b/src/core/web_event_factory.cpp
index aa5ea4036..b82877bac 100644
--- a/src/core/web_event_factory.cpp
+++ b/src/core/web_event_factory.cpp
@@ -950,7 +950,6 @@ static ui::DomKey domKeyForQtKey(int qtKey)
return ui::DomKey::ZENKAKU;
case Qt::Key_Zenkaku_Hankaku:
return ui::DomKey::ZENKAKU_HANKAKU;
-#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
// Dead keys (ui/events/keycodes/keyboard_code_conversion_xkb.cc)
case Qt::Key_Dead_Grave:
return ui::DomKey::DeadKeyFromCombiningCharacter(0x0300);
@@ -1018,7 +1017,6 @@ static ui::DomKey domKeyForQtKey(int qtKey)
return ui::DomKey::DeadKeyFromCombiningCharacter(0x00A4);
case Qt::Key_Dead_Greek:
return ui::DomKey::DeadKeyFromCombiningCharacter(0x037E);
-#endif
// General-Purpose Function Keys
case Qt::Key_F1:
return ui::DomKey::F1;
@@ -1580,9 +1578,7 @@ blink::WebMouseWheelEvent::Phase toBlinkPhase(QWheelEvent *ev)
{
switch (ev->phase()) {
case Qt::NoScrollPhase:
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
case Qt::ScrollMomentum:
-#endif
return blink::WebMouseWheelEvent::kPhaseNone;
case Qt::ScrollBegin:
return blink::WebMouseWheelEvent::kPhaseBegan;
@@ -1601,15 +1597,10 @@ blink::WebMouseWheelEvent WebEventFactory::toWebWheelEvent(QWheelEvent *ev)
webEvent.SetType(webEventTypeForEvent(ev));
webEvent.SetModifiers(modifiersForEvent(ev));
webEvent.SetTimeStamp(base::TimeTicks::Now());
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
- webEvent.SetPositionInWidget(ev->x(), ev->y());
- webEvent.SetPositionInScreen(ev->globalX(), ev->globalY());
-#else
webEvent.SetPositionInWidget(static_cast<float>(ev->position().x()),
static_cast<float>(ev->position().y()));
webEvent.SetPositionInScreen(static_cast<float>(ev->globalPosition().x()),
static_cast<float>(ev->globalPosition().y()));
-#endif
webEvent.wheel_ticks_x = static_cast<float>(ev->angleDelta().x()) / QWheelEvent::DefaultDeltasPerStep;
webEvent.wheel_ticks_y = static_cast<float>(ev->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep;
@@ -1640,15 +1631,10 @@ bool WebEventFactory::coalesceWebWheelEvent(blink::WebMouseWheelEvent &webEvent,
#endif
webEvent.SetTimeStamp(base::TimeTicks::Now());
-#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
- webEvent.SetPositionInWidget(ev->x(), ev->y());
- webEvent.SetPositionInScreen(ev->globalX(), ev->globalY());
-#else
webEvent.SetPositionInWidget(static_cast<float>(ev->position().x()),
static_cast<float>(ev->position().y()));
webEvent.SetPositionInScreen(static_cast<float>(ev->globalPosition().x()),
static_cast<float>(ev->globalPosition().y()));
-#endif
webEvent.wheel_ticks_x += static_cast<float>(ev->angleDelta().x()) / QWheelEvent::DefaultDeltasPerStep;
webEvent.wheel_ticks_y += static_cast<float>(ev->angleDelta().y()) / QWheelEvent::DefaultDeltasPerStep;