--- a/QTfrontend/util/HWDataManager.cpp Fri Oct 21 08:03:42 2011 +0200
+++ b/QTfrontend/util/HWDataManager.cpp Fri Oct 21 08:41:21 2011 +0200
@@ -75,17 +75,15 @@
}
-QFile * HWDataManager::findFileForRead(
+QString HWDataManager::findFileForRead(
const QString & relativeDataFilePath) const
{
- QFile * file =
- new QFile(userData->absolutePath()+"/"+relativeDataFilePath);
- if (!file->exists())
- {
- delete file;
- file = new QFile(defaultData->absolutePath()+"/"+relativeDataFilePath);
- }
- return file;
+ QString path = userData->absolutePath()+"/"+relativeDataFilePath;
+
+ if (!QFile::exists(path))
+ path = defaultData->absolutePath()+"/"+relativeDataFilePath;
+
+ return path;
}