diff options
-rw-r--r-- | dependencies.yaml | 8 | ||||
-rw-r--r-- | src/core/api/qwebengineprofile.cpp | 3 | ||||
-rw-r--r-- | src/core/api/qwebengineprofile.h | 3 | ||||
-rw-r--r-- | src/core/doc/src/qtwebengine-overview.qdoc | 24 | ||||
-rw-r--r-- | src/core/profile_adapter.h | 3 | ||||
-rw-r--r-- | src/core/profile_io_data_qt.cpp | 3 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineprofile.cpp | 6 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineprofile.h | 3 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineprofileprototype.cpp | 3 | ||||
-rw-r--r-- | tests/auto/quick/publicapi/tst_publicapi.cpp | 1 | ||||
-rw-r--r-- | tests/auto/widgets/qwebengineprofilebuilder/tst_qwebengineprofilebuilder.cpp | 6 |
11 files changed, 33 insertions, 30 deletions
diff --git a/dependencies.yaml b/dependencies.yaml index a8acf8ba9..b20633e2b 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,13 +1,13 @@ dependencies: ../qtdeclarative: - ref: d0fc30d734990182f6a204f7dfc1fcb327457551 + ref: aeaa7ae43e59e165d17f3726eda11fb70271d45a required: true ../qtpositioning: - ref: 2a7bb9117f108c3ae0f307856cebbd3b528e4eb6 + ref: 36089e0429cdc69f90538df09b48f443db762753 required: false ../qttools: - ref: 9f0eb33ae064b25b86e9ab5e10417d1c9287c99e + ref: 273f3edb01670c992c0843c93c45949279492f67 required: false ../qtwebchannel: - ref: 451313b81a07c86b2ad7ce8484f26ec2bb415c62 + ref: 31e4ea43642dba8cae84f445dff1bb1888630522 required: false diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp index 5b523dd87..728be6d7f 100644 --- a/src/core/api/qwebengineprofile.cpp +++ b/src/core/api/qwebengineprofile.cpp @@ -103,6 +103,9 @@ using QtWebEngineCore::ProfileAdapter; \value AllowPersistentCookies Cookies marked persistent are saved to and restored from disk, whereas session cookies are only stored to disk for crash recovery. This is the default setting. + \value OnlyPersistentCookies + Cookies marked persistent are saved to and restored from disk, whereas session cookies + are not stored to disk, even for crash recovery. \value ForcePersistentCookies Both session and persistent cookies are saved to and restored from disk. */ diff --git a/src/core/api/qwebengineprofile.h b/src/core/api/qwebengineprofile.h index fe00e6f5d..1825ce1ad 100644 --- a/src/core/api/qwebengineprofile.h +++ b/src/core/api/qwebengineprofile.h @@ -48,7 +48,8 @@ public: enum PersistentCookiesPolicy { NoPersistentCookies, AllowPersistentCookies, - ForcePersistentCookies + ForcePersistentCookies, + OnlyPersistentCookies, }; Q_ENUM(PersistentCookiesPolicy) diff --git a/src/core/doc/src/qtwebengine-overview.qdoc b/src/core/doc/src/qtwebengine-overview.qdoc index 3a5d30338..3d7ebf6ad 100644 --- a/src/core/doc/src/qtwebengine-overview.qdoc +++ b/src/core/doc/src/qtwebengine-overview.qdoc @@ -249,28 +249,8 @@ \section1 High DPI Support - To support High DPI devices, it is recommended that the application attribute - Qt::AA_EnableHighDpiScaling is set to enable automatic scaling based on the - pixel density of the monitor. In \QWE applications, the scaling - affects the default zooming factor and scrollbar size. - - For example: - - \code - int main(int argc, char *argv[]) - { - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - QApplication app(argc, argv); - // ... - } - \endcode - - \QWE bundles images for normal and high-dpi resolutions into - \e qtwebengine_resources_100p.pak and \e qtwebengine_resources_200p.pak - files. Depending on the target resolutions, one or both of these files need - to be deployed. - - For more information, see \l{High DPI}. + High DPI support is always enabled in Qt 6, and this also applies to \QWE. For more information, + see \l{High DPI}. \section1 Using WebEngine Core diff --git a/src/core/profile_adapter.h b/src/core/profile_adapter.h index b6357ce1c..36d286851 100644 --- a/src/core/profile_adapter.h +++ b/src/core/profile_adapter.h @@ -61,7 +61,8 @@ public: enum PersistentCookiesPolicy { NoPersistentCookies = 0, AllowPersistentCookies, - ForcePersistentCookies + ForcePersistentCookies, + OnlyPersistentCookies, }; enum VisitedLinksPolicy { diff --git a/src/core/profile_io_data_qt.cpp b/src/core/profile_io_data_qt.cpp index 567403a7c..85b533b93 100644 --- a/src/core/profile_io_data_qt.cpp +++ b/src/core/profile_io_data_qt.cpp @@ -224,7 +224,8 @@ void ProfileIODataQt::ConfigureNetworkContextParams(bool in_memory, if (m_persistentCookiesPolicy != ProfileAdapter::NoPersistentCookies) { network_context_params->file_paths->cookie_database_name = base::FilePath::FromASCII("Cookies"); network_context_params->restore_old_session_cookies = m_persistentCookiesPolicy == ProfileAdapter::ForcePersistentCookies; - network_context_params->persist_session_cookies = m_persistentCookiesPolicy != ProfileAdapter::NoPersistentCookies; + network_context_params->persist_session_cookies = + m_persistentCookiesPolicy != ProfileAdapter::OnlyPersistentCookies; } } diff --git a/src/webenginequick/api/qquickwebengineprofile.cpp b/src/webenginequick/api/qquickwebengineprofile.cpp index 6aebc18a1..dce3c8822 100644 --- a/src/webenginequick/api/qquickwebengineprofile.cpp +++ b/src/webenginequick/api/qquickwebengineprofile.cpp @@ -96,6 +96,9 @@ QT_BEGIN_NAMESPACE \value AllowPersistentCookies Cookies marked persistent are saved to and restored from disk, whereas session cookies are only stored to disk for crash recovery. This is the default setting. + \value OnlyPersistentCookies + Cookies marked persistent are saved to and restored from disk, whereas session cookies + are never stored to disk, even for crash recovery. \value ForcePersistentCookies Both session and persistent cookies are saved to and restored from disk. */ @@ -726,6 +729,9 @@ void QQuickWebEngineProfile::setHttpCacheType(QQuickWebEngineProfile::HttpCacheT Cookies marked persistent are saved to and restored from disk, whereas session cookies are only stored to disk for crash recovery. This is the default value for non off-the-record profile with storageName. + \value WebEngineProfile.OnlyPersistentCookies + Cookies marked persistent are saved to and restored from disk, whereas session cookies + are never stored to disk, even for crash recovery. \value WebEngineProfile.ForcePersistentCookies Both session and persistent cookies are saved to and restored from disk. */ diff --git a/src/webenginequick/api/qquickwebengineprofile.h b/src/webenginequick/api/qquickwebengineprofile.h index 9a21852ba..899d431a1 100644 --- a/src/webenginequick/api/qquickwebengineprofile.h +++ b/src/webenginequick/api/qquickwebengineprofile.h @@ -65,7 +65,8 @@ public: enum PersistentCookiesPolicy { NoPersistentCookies, AllowPersistentCookies, - ForcePersistentCookies + ForcePersistentCookies, + OnlyPersistentCookies, }; Q_ENUM(PersistentCookiesPolicy) diff --git a/src/webenginequick/api/qquickwebengineprofileprototype.cpp b/src/webenginequick/api/qquickwebengineprofileprototype.cpp index e6c4b8e99..d32d63ce7 100644 --- a/src/webenginequick/api/qquickwebengineprofileprototype.cpp +++ b/src/webenginequick/api/qquickwebengineprofileprototype.cpp @@ -161,6 +161,9 @@ void QQuickWebEngineProfilePrototype::setHttpCacheType( Cookies marked persistent are saved to and restored from disk, whereas session cookies are only stored to disk for crash recovery. This is the default value for non off-the-record profile with storageName. + \value WebEngineProfile.OnlyPersistentCookies + Cookies marked persistent are saved to and restored from disk, whereas session cookies + are never stored to the disk, even for crash recovery. \value WebEngineProfile.ForcePersistentCookies Both session and persistent cookies are saved to and restored from disk. */ diff --git a/tests/auto/quick/publicapi/tst_publicapi.cpp b/tests/auto/quick/publicapi/tst_publicapi.cpp index c9ed0c434..d6449707e 100644 --- a/tests/auto/quick/publicapi/tst_publicapi.cpp +++ b/tests/auto/quick/publicapi/tst_publicapi.cpp @@ -437,6 +437,7 @@ static const QStringList expectedAPI = QStringList() << "QQuickWebEngineProfile.MemoryHttpCache --> HttpCacheType" << "QQuickWebEngineProfile.NoCache --> HttpCacheType" << "QQuickWebEngineProfile.NoPersistentCookies --> PersistentCookiesPolicy" + << "QQuickWebEngineProfile.OnlyPersistentCookies --> PersistentCookiesPolicy" << "QQuickWebEngineProfile.PersistentPermissionsPolicy.AskEveryTime --> PersistentPermissionsPolicy" << "QQuickWebEngineProfile.PersistentPermissionsPolicy.StoreInMemory --> PersistentPermissionsPolicy" << "QQuickWebEngineProfile.PersistentPermissionsPolicy.StoreOnDisk --> PersistentPermissionsPolicy" diff --git a/tests/auto/widgets/qwebengineprofilebuilder/tst_qwebengineprofilebuilder.cpp b/tests/auto/widgets/qwebengineprofilebuilder/tst_qwebengineprofilebuilder.cpp index c0c087f5c..404df2cc6 100644 --- a/tests/auto/widgets/qwebengineprofilebuilder/tst_qwebengineprofilebuilder.cpp +++ b/tests/auto/widgets/qwebengineprofilebuilder/tst_qwebengineprofilebuilder.cpp @@ -164,10 +164,16 @@ void tst_QWebEngineProfileBuilder::persistentCookiesPolicy_data() << QWebEngineProfile::NoPersistentCookies << true; QTest::newRow("allowPersistentCookiesOffTheRecord") << QWebEngineProfile::AllowPersistentCookies << true; + QTest::newRow("onlyPersistentCookiesOffTheRecord") + << QWebEngineProfile::OnlyPersistentCookies << true; + QTest::newRow("forcePersistentCookiesOffTheRecord") + << QWebEngineProfile::ForcePersistentCookies << true; QTest::newRow("forcePersistentCookiesDiskBasedProfile") << QWebEngineProfile::ForcePersistentCookies << false; QTest::newRow("allowPersistentCookiesDiskBasedProfile") << QWebEngineProfile::AllowPersistentCookies << false; + QTest::newRow("onlyPersistentCookiesDiskBasedProfile") + << QWebEngineProfile::OnlyPersistentCookies << false; QTest::newRow("noPersistentCookiesDiskBasedProfile") << QWebEngineProfile::NoPersistentCookies << false; } |