From f39e0937b926e7944fd9753c37f9dccb978e528a Mon Sep 17 00:00:00 2001 From: xboxones1 <91512529+xboxones1@users.noreply.github.com> Date: Sun, 23 Nov 2025 05:26:40 +0900 Subject: [PATCH] Fix markdown type for >= QT 5.15.18 (#12654) and advance vcpkg baseline - Fix markdown type for >= QT 5.15.18 (#12654) - Fix deprecation warnings about implicit capturing of "this" - Advance vcpkg baseline to fix macOS Qt building Fixes Qt build errors on macOS 26 Tahoe. See https://github.com/microsoft/vcpkg/pull/48298 --- src/core/Tools.cpp | 2 +- src/gui/MainWindow.cpp | 13 +++++++------ tests/TestTools.cpp | 4 ++-- vcpkg.json | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/core/Tools.cpp b/src/core/Tools.cpp index b0d012c82..37a544c51 100644 --- a/src/core/Tools.cpp +++ b/src/core/Tools.cpp @@ -515,7 +515,7 @@ namespace Tools "application/protobuf", "application/x-zerosize"}; const static QStringList HtmlFormats = {"text/html"}; - const static QStringList MarkdownFormats = {"text/markdown"}; + const static QStringList MarkdownFormats = {"text/markdown", "text/x-web-markdown"}; const static QStringList ImageFormats = {"image/"}; static auto isCompatible = [](const QString& format, const QStringList& list) { diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 755b38a1e..1bfaac458 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -642,12 +642,13 @@ MainWindow::MainWindow() auto* hidePreRelWarn = new QAction(tr("Don't show again for this version"), m_ui->globalMessageWidget); m_ui->globalMessageWidget->addAction(hidePreRelWarn); auto hidePreRelWarnConn = QSharedPointer::create(); - *hidePreRelWarnConn = connect(m_ui->globalMessageWidget, &KMessageWidget::hideAnimationFinished, [=] { - m_ui->globalMessageWidget->removeAction(hidePreRelWarn); - disconnect(*hidePreRelWarnConn); - hidePreRelWarn->deleteLater(); - }); - connect(hidePreRelWarn, &QAction::triggered, [=] { + *hidePreRelWarnConn = connect( + m_ui->globalMessageWidget, &KMessageWidget::hideAnimationFinished, [this, hidePreRelWarn, hidePreRelWarnConn] { + m_ui->globalMessageWidget->removeAction(hidePreRelWarn); + disconnect(*hidePreRelWarnConn); + hidePreRelWarn->deleteLater(); + }); + connect(hidePreRelWarn, &QAction::triggered, [this] { m_ui->globalMessageWidget->animatedHide(); config()->set(Config::Messages_HidePreReleaseWarning, KEEPASSXC_VERSION); }); diff --git a/tests/TestTools.cpp b/tests/TestTools.cpp index 2e0d094fe..3455e97c8 100644 --- a/tests/TestTools.cpp +++ b/tests/TestTools.cpp @@ -403,8 +403,8 @@ void TestTools::testGetMimeTypeByFileInfo() const QStringList Markdowns = {"test.md", "test.markdown"}; - for (const auto& makdown : Markdowns) { - QCOMPARE(Tools::getMimeType(QFileInfo(makdown)), Tools::MimeType::Markdown); + for (const auto& markdown : Markdowns) { + QCOMPARE(Tools::getMimeType(QFileInfo(markdown)), Tools::MimeType::Markdown); } const QStringList UnknownHeaders = {"test.doc", "test.pdf", "test.docx"}; diff --git a/vcpkg.json b/vcpkg.json index f055407a2..f98c1880e 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,7 +1,7 @@ { "name": "keepassxc", "version-string": "2.8.0", - "builtin-baseline": "74e6536215718009aae747d86d84b78376bf9e09", + "builtin-baseline": "dfb72f61c5a066ab75cd0bdcb2e007228bfc3270", "dependencies": [ { "name": "argon2",