QTfrontend/util/HWDataManager.cpp
changeset 6167 728cabee2c9f
parent 6160 863d3edf5690
child 6168 6f301dac12ff
equal deleted inserted replaced
6166:701c5b8fac56 6167:728cabee2c9f
    73 
    73 
    74     return result;
    74     return result;
    75 }
    75 }
    76 
    76 
    77 
    77 
    78 QFile * HWDataManager::findFileForRead(
    78 QString HWDataManager::findFileForRead(
    79                                 const QString & relativeDataFilePath) const
    79                                 const QString & relativeDataFilePath) const
    80 {
    80 {
    81     QFile * file =
    81     QString path = userData->absolutePath()+"/"+relativeDataFilePath;
    82             new QFile(userData->absolutePath()+"/"+relativeDataFilePath);
    82 
    83     if (!file->exists())
    83     if (!QFile::exists(path))
    84     {
    84         path = defaultData->absolutePath()+"/"+relativeDataFilePath;
    85         delete file;
    85 
    86         file = new QFile(defaultData->absolutePath()+"/"+relativeDataFilePath);
    86     return path;
    87     }
       
    88     return file;
       
    89 }
    87 }
    90 
    88 
    91 
    89 
    92 QFile * HWDataManager::findFileForWrite(
    90 QFile * HWDataManager::findFileForWrite(
    93                                 const QString & relativeDataFilePath) const
    91                                 const QString & relativeDataFilePath) const