ubuntu-webapps-bugs team mailing list archive
-
ubuntu-webapps-bugs team
-
Mailing list archive
-
Message #01737
[Bug 1387754] [NEW] applicationName ignored in pure QML apps importing Ubuntu.Web
Public bug reported:
The dataPath for webviews is set in the plugin’s initializeEngine()
method, like so:
QDir dataLocation(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
engine->rootContext()->setContextProperty("dataLocation", dataLocation.absolutePath());
This works well if the application has a C++ wrapper that sets the
application name before loading any QML, but it doesn’t work so well for
pure QML applications that import Ubuntu.Web: at the point in time when
they import the module, the app name most likely hasn’t been set yet,
and as a result the generic name set by qmlscene is used, resulting in a
dataPath that looks like "~/.local/share/Qt Project/QtQmlViewer".
We don’t want to force applications to ship a thin C++ wrapper just to
work around this issue, so we will need to figure out a way to delay the
setting of dataLocation until the webview is actually instantiated.
** Affects: webbrowser-app
Importance: High
Assignee: Olivier Tilloy (osomon)
Status: Triaged
--
You received this bug notification because you are a member of Ubuntu
WebApps bug tracking, which is subscribed to webbrowser-app.
https://bugs.launchpad.net/bugs/1387754
Title:
applicationName ignored in pure QML apps importing Ubuntu.Web
Status in Web Browser App:
Triaged
Bug description:
The dataPath for webviews is set in the plugin’s initializeEngine()
method, like so:
QDir dataLocation(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
engine->rootContext()->setContextProperty("dataLocation", dataLocation.absolutePath());
This works well if the application has a C++ wrapper that sets the
application name before loading any QML, but it doesn’t work so well
for pure QML applications that import Ubuntu.Web: at the point in time
when they import the module, the app name most likely hasn’t been set
yet, and as a result the generic name set by qmlscene is used,
resulting in a dataPath that looks like "~/.local/share/Qt
Project/QtQmlViewer".
We don’t want to force applications to ship a thin C++ wrapper just to
work around this issue, so we will need to figure out a way to delay
the setting of dataLocation until the webview is actually
instantiated.
To manage notifications about this bug go to:
https://bugs.launchpad.net/webbrowser-app/+bug/1387754/+subscriptions
Follow ups
References