diff options
| -rw-r--r-- | .cmake.conf | 2 | ||||
| -rw-r--r-- | dependencies.yaml | 8 | ||||
| -rw-r--r-- | src/core/permission_manager_qt.cpp | 19 |
3 files changed, 18 insertions, 11 deletions
diff --git a/.cmake.conf b/.cmake.conf index c72971300..6aff16de3 100644 --- a/.cmake.conf +++ b/.cmake.conf @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.11.0") +set(QT_REPO_MODULE_VERSION "6.12.0") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_SUPPORTED_MIN_CMAKE_VERSION_FOR_BUILDING_WEBENGINE "3.19") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_NO_QASCONST=1") diff --git a/dependencies.yaml b/dependencies.yaml index 39b9020be..9bf5aec2e 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -1,13 +1,13 @@ dependencies: ../qtdeclarative: - ref: fc162d455eedbb68f22f302dee45f7faf4146dd0 + ref: 68e5d7bf7de7a35f7319be67a3db954752ebb161 required: true ../qtpositioning: - ref: 393a3448c91e6e65752e337bcc41118a80e8cfa0 + ref: 876bcf92bfb9c3ae2d45414f4965b1748c51a34c required: false ../qttools: - ref: b7f8536d4079c85c4536f1d16759f2a4845600b9 + ref: 5d3150b960e0791048b571dc4ed9cbf9f0624b2b required: false ../qtwebchannel: - ref: 213031f891b2ef6e44858691bdb6d05772a90857 + ref: 17a7f904558b554baaf3dc51d8f26d4de7459845 required: false diff --git a/src/core/permission_manager_qt.cpp b/src/core/permission_manager_qt.cpp index 502f4deb9..7a7f24b67 100644 --- a/src/core/permission_manager_qt.cpp +++ b/src/core/permission_manager_qt.cpp @@ -469,8 +469,15 @@ QList<QWebEnginePermission> PermissionManagerQt::listPermissions( Q_ASSERT(origin.isEmpty() || permissionType == QWebEnginePermission::PermissionType::Unsupported); QList<QWebEnginePermission> returnList; - const GURL gorigin = toGurl(origin).DeprecatedGetOriginAsURL(); - const std::string originSpec = gorigin.spec(); + const GURL gorigin = toGurl(origin); + std::string originString = url::Origin::Create(gorigin).Serialize(); + + if (originString == "null") { + // Origin::Serialize() returns "null" for empty URLs. + // Set originString to empty string so we don't have to do + // string comparisons for every permission in the loop below. + originString.clear(); + } if (!origin.isEmpty() && !gorigin.is_valid()) return returnList; @@ -495,7 +502,7 @@ QList<QWebEnginePermission> PermissionManagerQt::listPermissions( Q_ASSERT(prefDict); for (auto &&entry : *prefDict) { - if (!originSpec.empty() && entry.first != originSpec) + if (!originString.empty() && entry.first != originString) continue; auto *pvt = new QWebEnginePermissionPrivate( @@ -695,7 +702,7 @@ blink::mojom::PermissionStatus PermissionManagerQt::GetPermissionStatus( const auto *permissionsDict = pref->GetValue()->GetIfDict(); Q_ASSERT(permissionsDict); - const auto requestedPermission = permissionsDict->FindBool(requesting_origin.DeprecatedGetOriginAsURL().spec()); + const auto requestedPermission = permissionsDict->FindBool(url::Origin::Create(requesting_origin).Serialize()); if (!requestedPermission) return blink::mojom::PermissionStatus::ASK; // Origin is not in the current permission type's database @@ -790,7 +797,7 @@ void PermissionManagerQt::ResetPermission( return; ScopedDictPrefUpdate updater(m_prefService.get(), permissionTypeString(permissionType)); - updater.Get().Remove(requesting_origin.spec()); + updater.Get().Remove(url::Origin::Create(requesting_origin).Serialize()); } blink::mojom::PermissionStatus PermissionManagerQt::getTransientPermissionStatus( @@ -829,7 +836,7 @@ void PermissionManagerQt::setPersistentPermission( return; ScopedDictPrefUpdate updater(m_prefService.get(), permissionTypeString(permissionTypeQt)); - updater.Get().Set(requesting_origin.spec(), granted); + updater.Get().Set(url::Origin::Create(requesting_origin).Serialize(), granted); m_prefService->SchedulePendingLossyWrites(); } |
