QTfrontend/util/DataManager.cpp
branchphysfslayer
changeset 8049 133e22b5c410
parent 7928 88fde28bbda6
child 8346 3443e0de2c9d
equal deleted inserted replaced
8046:4d3415927d2c 8049:133e22b5c410
    70         sortedFileNames.insert(fn.toLower(), fn);
    70         sortedFileNames.insert(fn.toLower(), fn);
    71     }
    71     }
    72     result = sortedFileNames.values();
    72     result = sortedFileNames.values();
    73 
    73 
    74     return result;
    74     return result;
    75 }
       
    76 
       
    77 
       
    78 QString DataManager::findFileForRead(
       
    79     const QString & relativeDataFilePath) const
       
    80 {
       
    81     QString path("physfs://%1");
       
    82 
       
    83     return path.arg(relativeDataFilePath);
       
    84 }
       
    85 
       
    86 
       
    87 QString DataManager::findFileForWrite(
       
    88     const QString & relativeDataFilePath) const
       
    89 {
       
    90     QString path("physfs://%1");
       
    91 
       
    92     // create folders if needed
       
    93     QDir tmp;
       
    94     tmp.mkpath(QFileInfo(path.arg(relativeDataFilePath)).absolutePath());
       
    95 
       
    96     return path;
       
    97 }
    75 }
    98 
    76 
    99 GameStyleModel * DataManager::gameStyleModel()
    77 GameStyleModel * DataManager::gameStyleModel()
   100 {
    78 {
   101     if (m_gameStyleModel == NULL) {
    79     if (m_gameStyleModel == NULL) {