summaryrefslogtreecommitdiffstats
path: root/qthelper.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 18:25:36 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-13 18:26:34 -0700
commitf6981f021022a76498b417f1a34b4a21535c1a26 (patch)
treeb47327d11a33a99bf7f4b9be95ed50244ec767b0 /qthelper.cpp
parentb413fabce703a2bebfac0e9d6dd6af0a9e457928 (diff)
downloadsubsurface-f6981f021022a76498b417f1a34b4a21535c1a26.tar.gz
Add helper function to create a directory
Yes, this could easily done from the C code. But this seems just so much easier and I don't have to worry about the oddities of Windows and all that. I'm lazy. So sue me. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qthelper.cpp')
-rw-r--r--qthelper.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qthelper.cpp b/qthelper.cpp
index 12ce2cb3c..e25be9c26 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1073,3 +1073,10 @@ extern "C" void updateWindowTitle()
{
MainWindow::instance()->setTitle();
}
+
+extern "C" void subsurface_mkdir(const char *dir)
+{
+ QDir directory;
+ if (!directory.mkpath(QString(dir)))
+ qDebug() << "failed to create path" << dir;
+}