- adjustments for the Qt filesystem layer
@@ -979,7 +979,7 @@ | ||
979 | 979 | catch( ... ) |
980 | 980 | {} |
981 | 981 | |
982 | - return 0; | |
982 | + return -1; | |
983 | 983 | } |
984 | 984 | |
985 | 985 | qint64 readLine( char *data, qint64 maxlen ) noexcept override |
@@ -1000,7 +1000,7 @@ | ||
1000 | 1000 | catch( ... ) |
1001 | 1001 | {} |
1002 | 1002 | |
1003 | - return 0; | |
1003 | + return -1; | |
1004 | 1004 | } |
1005 | 1005 | |
1006 | 1006 | bool extension( Extension extension, const ExtensionOption *option, ExtensionReturn *output ) noexcept override |
@@ -1010,18 +1010,23 @@ | ||
1010 | 1010 | return false; |
1011 | 1011 | } |
1012 | 1012 | |
1013 | - try | |
1013 | + if ( extension == QAbstractFileEngine::AtEndExtension ) | |
1014 | 1014 | { |
1015 | - if ( extension == QAbstractFileEngine::AtEndExtension ) | |
1015 | + try | |
1016 | 1016 | { |
1017 | 1017 | if ( CFile *dataFile = this->dataFile ) |
1018 | 1018 | { |
1019 | 1019 | return dataFile->IsEOF(); |
1020 | 1020 | } |
1021 | + } | |
1022 | + catch( ... ) | |
1023 | + {} | |
1021 | 1024 | |
1022 | - return true; | |
1023 | - } | |
1024 | - else if ( extension == QAbstractFileEngine::MapExtension ) | |
1025 | + return true; | |
1026 | + } | |
1027 | + else if ( extension == QAbstractFileEngine::MapExtension ) | |
1028 | + { | |
1029 | + try | |
1025 | 1030 | { |
1026 | 1031 | if ( CFile *handle = this->dataFile ) |
1027 | 1032 | { |
@@ -1053,7 +1058,12 @@ | ||
1053 | 1058 | } |
1054 | 1059 | } |
1055 | 1060 | } |
1056 | - else if ( extension == QAbstractFileEngine::UnMapExtension ) | |
1061 | + catch( ... ) | |
1062 | + {} | |
1063 | + } | |
1064 | + else if ( extension == QAbstractFileEngine::UnMapExtension ) | |
1065 | + { | |
1066 | + try | |
1057 | 1067 | { |
1058 | 1068 | if ( CFileMappingProvider *mapProv = this->mem_mappings ) |
1059 | 1069 | { |
@@ -1064,9 +1074,9 @@ | ||
1064 | 1074 | return couldUnmap; |
1065 | 1075 | } |
1066 | 1076 | } |
1077 | + catch( ... ) | |
1078 | + {} | |
1067 | 1079 | } |
1068 | - catch( ... ) | |
1069 | - {} | |
1070 | 1080 | |
1071 | 1081 | return false; |
1072 | 1082 | } |