diff -r f4475782cf45 -r f849b7b3af1d QTfrontend/util/DataManager.cpp --- 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; +}