QTfrontend/util/FileEngine.cpp
changeset 12724 d47ab9245259
parent 10235 bafca1686867
child 13869 bd796e4d8920
equal deleted inserted replaced
12723:288356c20868 12724:d47ab9245259
   293     return QFile::UnspecifiedError;
   293     return QFile::UnspecifiedError;
   294 }
   294 }
   295 
   295 
   296 QString FileEngine::errorString() const
   296 QString FileEngine::errorString() const
   297 {
   297 {
       
   298 #if PHYSFS_VER_MAJOR >= 3
       
   299     return PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
       
   300 #else
   298     return PHYSFS_getLastError();
   301     return PHYSFS_getLastError();
       
   302 #endif
   299 }
   303 }
   300 
   304 
   301 bool FileEngine::supportsExtension(Extension extension) const
   305 bool FileEngine::supportsExtension(Extension extension) const
   302 {
   306 {
   303     return
   307     return
   350     hedgewarsMountPackages();
   354     hedgewarsMountPackages();
   351 }
   355 }
   352 
   356 
   353 QString FileEngineHandler::errorStr()
   357 QString FileEngineHandler::errorStr()
   354 {
   358 {
   355     QString s = QString::fromUtf8(PHYSFS_getLastError());
   359     QString s;
       
   360 #if PHYSFS_VER_MAJOR >= 3
       
   361     s = QString::fromUtf8(PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()));
       
   362 #else
       
   363     s = QString::fromUtf8(PHYSFS_getLastError());
       
   364 #endif
   356     return s.isEmpty() ? "ok" : s;
   365     return s.isEmpty() ? "ok" : s;
   357 }
   366 }
   358 
   367 
   359 
   368 
   360 FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries)
   369 FileEngineIterator::FileEngineIterator(QDir::Filters filters, const QStringList &nameFilters, const QStringList &entries)