Ensure the database path exists before trying to create a file there
ClosedPublic

Authored by ahiemstra on Jan 17 2018, 7:30 PM.

Details

Summary

QStandardPath::writeableLocation can return a path that does not exist.
This causes QSql to complain that it cannot create the database. (with
the very unhelpful message "out of memory".) So ensure the path exists
before trying to open the database.

Diff Detail

Repository
R157 Peruse
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ahiemstra requested review of this revision.Jan 17 2018, 7:30 PM
ahiemstra created this revision.
leinir accepted this revision.Jan 18 2018, 9:14 AM

Ah. Well spotted - and silly QStandardPaths ;)

This revision is now accepted and ready to land.Jan 18 2018, 9:14 AM
This revision was automatically updated to reflect the committed changes.