When using Qt.resolvedUrl to generate path in U1db.Database, the document contents are invalid

Bug #1426178 reported by Marco Trevisan (Treviño) on 2015-02-27
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
U1DB Qt/ QML
Medium
Marco Trevisan (Treviño)

Bug Description

See the attached example, I'm trying to set the fullpath of the dabase using Qt.resolvedUrl("settings.db").split("://")[1] (as a workaround of bug #1426180), but the given example (when saved in /tmp), when ran returns:

  Settings saved in /tmp/settings.db; settings contents is undefined

For some reason the document contents is undefined.
The example, correctly generates the "settings.db", but it has no default data in it.

If I replace, the the generated path with the full path of the file (so in my case 'path: "/tmp/settings.db"'), then it works.
This seems pretty weird.

Once generated, I can go back to the version with Qt.resolvedUrl and it seems to work again.

Related branches

description: updated
Changed in u1db-qt:
status: New → In Progress
assignee: nobody → Marco Trevisan (Treviño) (3v1n0)
Changed in u1db-qt:
importance: Undecided → Medium
Changed in u1db-qt:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers