Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9
-
None
Description
`QWebEngineProfile` provides methods to set data/cache/... paths, such as `
setPersistentStoragePath(...)`. However, just instantiating `QWebEngineProfile` with a profile name creates an empty directory in the default data path (e.g. `%APPDATA%\<AppName>\QtWebEngine\<ProfileName>`), due to the following call chain:
- https://github.com/qt/qtwebengine/blob/dev/src/core/api/qwebengineprofile.cpp#L330
- https://github.com/qt/qtwebengine/blob/dev/src/core/profile_adapter.cpp#L74
- https://github.com/qt/qtwebengine/blob/dev/src/core/profile_qt.cpp#L59
- https://github.com/qt/qtwebengine/blob/dev/src/core/profile_qt.cpp#L234
- https://github.com/qt/qtwebengine/blob/dev/src/core/pref_service_adapter.cpp#L69
- https://github.com/qt/qtwebengine/blob/dev/src/core/profile_adapter.cpp#L150
This is problematic especially for portable apps, which want to redirect all data files to a portable directory. I would prefer if the directory was created on-demand, instead of during the class initialization.