fix .mkpath()
authorgregor herrmann <gregoa@debian.org>
Wed, 5 Sep 2012 13:16:13 +0000 (13:16 +0000)
committergregor herrmann <gregoa@debian.org>
Wed, 5 Sep 2012 13:16:13 +0000 (13:16 +0000)
Creating the "." path works.
Is this idiomatic? At least it works (under Windows).

TODO left: handle errors.

src/sql/sqlengine.cpp

index be9e164..a0771d7 100644 (file)
@@ -47,7 +47,7 @@ SqlEngine::~SqlEngine() {
 
 void SqlEngine::open() {
     QFileInfo dbFilenameInfo(dbFilename);
-    dbFilenameInfo.absoluteDir().mkpath(""); // TODO ...
+    dbFilenameInfo.absoluteDir().mkpath("."); // TODO: handle error
     db = QSqlDatabase::addDatabase("QSQLITE");
     db.setDatabaseName(dbFilename);
     db.open();