# HG changeset patch # User Wuzzy # Date 1508540281 -7200 # Node ID d47ab924525951b133306aa8536917260d63deb7 # Parent 288356c208688b3ab235c141d7e8c306e0e67414 Fix PhysFS 3.0.0 deprecation warnings for error reporting diff -r 288356c20868 -r d47ab9245259 QTfrontend/util/FileEngine.cpp --- a/QTfrontend/util/FileEngine.cpp Fri Oct 20 23:49:52 2017 +0200 +++ b/QTfrontend/util/FileEngine.cpp Sat Oct 21 00:58:01 2017 +0200 @@ -295,7 +295,11 @@ QString FileEngine::errorString() const { +#if PHYSFS_VER_MAJOR >= 3 + return PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode()); +#else return PHYSFS_getLastError(); +#endif } bool FileEngine::supportsExtension(Extension extension) const @@ -352,7 +356,12 @@ QString FileEngineHandler::errorStr() { - QString s = QString::fromUtf8(PHYSFS_getLastError()); + QString s; +#if PHYSFS_VER_MAJOR >= 3 + s = QString::fromUtf8(PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())); +#else + s = QString::fromUtf8(PHYSFS_getLastError()); +#endif return s.isEmpty() ? "ok" : s; }