Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
5.14
-
None
Description
When doing this with Qt 5.14:
#include <QApplication> #include <QWebEngineProfile> int main(int argc, char *argv[]) { QApplication app(argc, argv); app.setOrganizationName("qtbug-test"); QWebEngineProfile *profile = QWebEngineProfile::defaultProfile(); profile->setPersistentStoragePath("/tmp/test"); return 0; }
It seems like Chromium tries to write to the (non-existent) path before the custom path was set, causing a warning:
[723673:723687:0916/184513.927681:WARNING:important_file_writer.cc(97)] temp file failure: /home/florian/.local/share/qtbug-test/testproj/QtWebEngine/Default/user_prefs.json : could not create temporary file: No such file or directory (2)
This is probably caused because ProfileQt::setupPrefService() is called twice - once in defaultProfile():
#0 QtWebEngineCore::ProfileQt::setupPrefService (this=0x55555629a7d0) at ../profile_qt.cpp:303 #1 0x00007fffe1939ac9 in QtWebEngineCore::ProfileQt::ProfileQt (this=0x55555629a7d0, profileAdapter=0x5555561e2470) at ../profile_qt.cpp:97 #2 0x00007fffe1931fe6 in QtWebEngineCore::ProfileAdapter::ProfileAdapter (this=0x5555561e2470, storageName="Default") at ../profile_adapter.cpp:98 #3 0x00007fffe19c0a75 in QtWebEngineCore::WebEngineContext::createDefaultProfileAdapter (this=0x555555dfa8f0) at ../web_engine_context.cpp:317 #4 0x00007fffe1932993 in QtWebEngineCore::ProfileAdapter::createDefaultProfileAdapter () at ../profile_adapter.cpp:239 #5 0x00007fffeeef3a24 in QWebEngineProfile::defaultProfile () at api/qwebengineprofile.cpp:694
and then again in setPersistentStoragePath():
#0 QtWebEngineCore::ProfileQt::setupPrefService (this=0x55555629a7d0) at ../profile_qt.cpp:303 #1 0x00007fffe1932b13 in QtWebEngineCore::ProfileAdapter::setDataPath (this=0x5555561e2470, path="/tmp/qutebrowser-basedir-1gbzmbrp/data/webengine") at ../profile_adapter.cpp:270 #2 0x00007fffeeef3346 in QWebEngineProfile::setPersistentStoragePath (this=0x555556371a20, path="/tmp/qutebrowser-basedir-1gbzmbrp/data/webengine") at api/qwebengineprofile.cpp:390
which causes it to (try to) flush data to the location which doesn't exist.
Attachments
Issue Links
- depends on
-
QTBUG-66068 Redesign profile creation
- Open