QTfrontend/main.cpp
changeset 8508 f849b7b3af1d
parent 8406 8a834943609d
child 8651 da384b09eb2b
--- a/QTfrontend/main.cpp	Sat Feb 16 23:28:16 2013 +0400
+++ b/QTfrontend/main.cpp	Sun Feb 17 00:25:53 2013 +0400
@@ -120,15 +120,6 @@
     return true;
 }
 
-bool checkForFile(const QString & file)
-{
-    QFile tmpfile(file);
-    if (!tmpfile.exists())
-        return tmpfile.open(QFile::WriteOnly);
-    else
-        return true;
-}
-
 // Guaranteed to be the last thing ran in the application's life time.
 // Closes resources that need to exist as long as possible.
 void closeResources(void)
@@ -296,7 +287,7 @@
     engine->setWriteDir(cfgdir->absolutePath());
     engine->mountPacks();
 
-    checkForFile("physfs://hedgewars.ini");
+    DataManager::ensureFileExists("physfs://hedgewars.ini");
 
     QTranslator Translator;
     {