From 3d40ec7d753e46bc0f785efcd5497cbebff28447 Mon Sep 17 00:00:00 2001 From: Oleg Shparber Date: Sun, 16 Jun 2024 02:59:35 -0400 Subject: [PATCH] fix(browser): use default QWebEngineProfile for Qt 6 The default profile is off-the-record already. --- src/libs/browser/settings.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libs/browser/settings.cpp b/src/libs/browser/settings.cpp index ceb23241..7b94a7c1 100644 --- a/src/libs/browser/settings.cpp +++ b/src/libs/browser/settings.cpp @@ -48,8 +48,13 @@ Settings::Settings(Core::Settings *appSettings, QObject *parent) { Q_ASSERT(!m_webProfile); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // Create a new off-the-record profile. m_webProfile = new QWebEngineProfile(this); +#else + // Default profile for Qt 6 is off-the-record. + m_webProfile = QWebEngineProfile::defaultProfile(); +#endif // Setup URL interceptor. #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)