mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Qt: Fix -Werror=deprecated-declarations when using Qt > 6.7
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
97ca6036fa
commit
07400b515c
Notes:
github-actions[bot]
2024-10-21 03:36:34 +00:00
Author: https://github.com/gabrieltassinari Commit: https://github.com/LadybirdBrowser/ladybird/commit/07400b515c3 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1807 Reviewed-by: https://github.com/ADKaster ✅
2 changed files with 20 additions and 0 deletions
|
@ -62,7 +62,11 @@ FindInPageWidget::FindInPageWidget(Tab* tab, WebContentView* content_view)
|
|||
m_match_case = new QCheckBox(this);
|
||||
m_match_case->setText("Match &Case");
|
||||
m_match_case->setChecked(false);
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(m_match_case, &QCheckBox::checkStateChanged, this, [this] {
|
||||
#else
|
||||
connect(m_match_case, &QCheckBox::stateChanged, this, [this] {
|
||||
#endif
|
||||
find_text_changed();
|
||||
});
|
||||
|
||||
|
|
|
@ -62,7 +62,11 @@ SettingsDialog::SettingsDialog(QMainWindow* window)
|
|||
|
||||
m_enable_do_not_track = new QCheckBox(this);
|
||||
m_enable_do_not_track->setChecked(Settings::the()->enable_do_not_track());
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 7, 0))
|
||||
QObject::connect(m_enable_do_not_track, &QCheckBox::checkStateChanged, this, [&](int state) {
|
||||
#else
|
||||
QObject::connect(m_enable_do_not_track, &QCheckBox::stateChanged, this, [&](int state) {
|
||||
#endif
|
||||
Settings::the()->set_enable_do_not_track(state == Qt::Checked);
|
||||
});
|
||||
|
||||
|
@ -73,7 +77,11 @@ SettingsDialog::SettingsDialog(QMainWindow* window)
|
|||
m_enable_autoplay->setChecked(Settings::the()->enable_autoplay());
|
||||
}
|
||||
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 7, 0))
|
||||
QObject::connect(m_enable_autoplay, &QCheckBox::checkStateChanged, this, [&](int state) {
|
||||
#else
|
||||
QObject::connect(m_enable_autoplay, &QCheckBox::stateChanged, this, [&](int state) {
|
||||
#endif
|
||||
Settings::the()->set_enable_autoplay(state == Qt::Checked);
|
||||
});
|
||||
|
||||
|
@ -129,12 +137,20 @@ void SettingsDialog::setup_search_engines()
|
|||
m_autocomplete_engine_dropdown->setMenu(autocomplete_engine_menu);
|
||||
m_autocomplete_engine_dropdown->setEnabled(Settings::the()->enable_autocomplete());
|
||||
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(m_enable_search, &QCheckBox::checkStateChanged, this, [&](int state) {
|
||||
#else
|
||||
connect(m_enable_search, &QCheckBox::stateChanged, this, [&](int state) {
|
||||
#endif
|
||||
Settings::the()->set_enable_search(state == Qt::Checked);
|
||||
m_search_engine_dropdown->setEnabled(state == Qt::Checked);
|
||||
});
|
||||
|
||||
#if (QT_VERSION > QT_VERSION_CHECK(6, 7, 0))
|
||||
connect(m_enable_autocomplete, &QCheckBox::checkStateChanged, this, [&](int state) {
|
||||
#else
|
||||
connect(m_enable_autocomplete, &QCheckBox::stateChanged, this, [&](int state) {
|
||||
#endif
|
||||
Settings::the()->set_enable_autocomplete(state == Qt::Checked);
|
||||
m_autocomplete_engine_dropdown->setEnabled(state == Qt::Checked);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue