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

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

Description

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

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.

Reviewers: leinir

Reviewed By: leinir

Differential Revision: https://phabricator.kde.org/D9954