QTfrontend/util/DataManager.cpp
changeset 8508 f849b7b3af1d
parent 8377 869f80966a77
child 8918 512753ea4b1b
--- a/QTfrontend/util/DataManager.cpp	Sat Feb 16 23:28:16 2013 +0400
+++ b/QTfrontend/util/DataManager.cpp	Sun Feb 17 00:25:53 2013 +0400
@@ -176,3 +176,12 @@
         m_colorsModel->item(i)->setData(QColor(colors[i]));
     }
 }
+
+bool DataManager::ensureFileExists(const QString &fileName)
+{
+    QFile tmpfile(fileName);
+    if (!tmpfile.exists())
+        return tmpfile.open(QFile::WriteOnly);
+    else
+        return true;
+}