fix(browser): use default QWebEngineProfile for Qt 6

The default profile is off-the-record already.
This commit is contained in:
Oleg Shparber 2024-06-16 02:59:35 -04:00
parent cae1ea7486
commit 3d40ec7d75

View File

@ -48,8 +48,13 @@ Settings::Settings(Core::Settings *appSettings, QObject *parent)
{ {
Q_ASSERT(!m_webProfile); Q_ASSERT(!m_webProfile);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
// Create a new off-the-record profile. // Create a new off-the-record profile.
m_webProfile = new QWebEngineProfile(this); m_webProfile = new QWebEngineProfile(this);
#else
// Default profile for Qt 6 is off-the-record.
m_webProfile = QWebEngineProfile::defaultProfile();
#endif
// Setup URL interceptor. // Setup URL interceptor.
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0) #if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)