diff options
| author | Anu Aliyas <anu.aliyas@qt.io> | 2024-11-19 09:55:52 +0100 |
|---|---|---|
| committer | Anu Aliyas <anu.aliyas@qt.io> | 2024-12-06 19:27:42 +0100 |
| commit | 5352c9b455c67a1e29006848713075a1fa72d752 (patch) | |
| tree | 618541299eb9cf708a9324ecfd2b94071c571f2c /src/core/profile_adapter.cpp | |
| parent | 0ac92ae46913e8d5ee054f5cdaaf65d82d0540ff (diff) | |
Ensure unique data path for the profile
Added data path verification to restrict profile creation. This
change ensures that no two profiles can use the same data path. Any
request to create a profile with the duplicate data path will
now return nullptr.
Change-Id: Ifb25861756775fb484b02a23c802bffb791c88bb
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/profile_adapter.cpp')
| -rw-r--r-- | src/core/profile_adapter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/profile_adapter.cpp b/src/core/profile_adapter.cpp index 0c3ff686b..8a7e491dc 100644 --- a/src/core/profile_adapter.cpp +++ b/src/core/profile_adapter.cpp @@ -245,6 +245,11 @@ ProfileAdapter *ProfileAdapter::createDefaultProfileAdapter() return WebEngineContext::current()->createDefaultProfileAdapter(); } +bool ProfileAdapter::profileExistOnPath(const QString &dataPath) +{ + return WebEngineContext::current()->profileExistOnPath(dataPath); +} + ProfileAdapter *ProfileAdapter::defaultProfileAdapter() { WebEngineContext *context = WebEngineContext::current(); |
