Details
-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.10.0 Beta2
Description
Currently, using the new Microsoft WebView2 backend (QTBUG-75747) will produce this warning:
WebView2 Warning: Using default User Data Folder is not recommended, please see documentation. https://go.microsoft.com/fwlink/?linkid=2187341
This is because we currently pass a null userDataFolder value to CreateCoreWebView2EnvironmentWithOptions():
- https://github.com/qt/qtwebview/blob/v6.10.0-beta2/src/plugins/windows/qwebview2webview.cpp#L137
- https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.3351.48#createcorewebview2environmentwithoptions
When a null folder is provided, the default UDF location is the executable's folder, which could be a non-writable location (e.g. inside C:\Program Files). See also [Manage user data folders - Microsoft Edge Developer documentation | Microsoft Learn|https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/user-data-folder?tabs=win32#specifying-a-custom-udf-location]
Therefore, at the very least, we need the default UDF to be somewhere in StandardPaths::writableLocation(). Even better if there's a way for the developer to customize this location.