| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qsystemerror.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | static QString standardLibraryErrorString(int errorCode) | - | ||||||
| 4 | { | - | ||||||
| 5 | const char *s = 0; | - | ||||||
| 6 | QString ret; | - | ||||||
| 7 | switch (errorCode) { | - | ||||||
| 8 | case never executed: 0:case 0:never executed: case 0: | 0 | ||||||
| 9 | break; never executed: break; | 0 | ||||||
| 10 | case executed 10 times by 4 tests: 13:case 13:Executed by:
executed 10 times by 4 tests: case 13:Executed by:
| 10 | ||||||
| 11 | s = "Permission denied"; | - | ||||||
| 12 | break; executed 10 times by 4 tests: break;Executed by:
| 10 | ||||||
| 13 | case never executed: 24:case 24:never executed: case 24: | 0 | ||||||
| 14 | s = "Too many open files"; | - | ||||||
| 15 | break; never executed: break; | 0 | ||||||
| 16 | case executed 599 times by 22 tests: 2:case 2:Executed by:
executed 599 times by 22 tests: case 2:Executed by:
| 599 | ||||||
| 17 | s = "No such file or directory"; | - | ||||||
| 18 | break; executed 599 times by 22 tests: break;Executed by:
| 599 | ||||||
| 19 | case never executed: 28:case 28:never executed: case 28: | 0 | ||||||
| 20 | s = "No space left on device"; | - | ||||||
| 21 | break; never executed: break; | 0 | ||||||
| 22 | default executed 107 times by 3 tests: :default:Executed by:
executed 107 times by 3 tests: {default:Executed by:
| 107 | ||||||
| 23 | - | |||||||
| 24 | - | |||||||
| 25 | - | |||||||
| 26 | - | |||||||
| 27 | - | |||||||
| 28 | - | |||||||
| 29 | - | |||||||
| 30 | ret = QString::fromLocal8Bit(strerror(errorCode)); | - | ||||||
| 31 | - | |||||||
| 32 | - | |||||||
| 33 | break; executed 107 times by 3 tests: }break;Executed by:
| 107 | ||||||
| 34 | } | - | ||||||
| 35 | if (s
| 107-609 | ||||||
| 36 | - | |||||||
| 37 | - | |||||||
| 38 | ret = QString::fromLatin1(s); | - | ||||||
| 39 | } executed 609 times by 22 tests: end of blockExecuted by:
| 609 | ||||||
| 40 | return executed 716 times by 23 tests: ret.trimmed();return ret.trimmed();Executed by:
executed 716 times by 23 tests: return ret.trimmed();Executed by:
| 716 | ||||||
| 41 | } | - | ||||||
| 42 | - | |||||||
| 43 | QString QSystemError::toString() const | - | ||||||
| 44 | { | - | ||||||
| 45 | switch(errorScope) { | - | ||||||
| 46 | case executed 15 times by 3 tests: NativeError:case NativeError:Executed by:
executed 15 times by 3 tests: case NativeError:Executed by:
| 15 | ||||||
| 47 | - | |||||||
| 48 | - | |||||||
| 49 | - | |||||||
| 50 | - | |||||||
| 51 | - | |||||||
| 52 | case executed 701 times by 23 tests: StandardLibraryError:case StandardLibraryError:Executed by:
executed 701 times by 23 tests: case StandardLibraryError:Executed by:
| 701 | ||||||
| 53 | return executed 716 times by 23 tests: standardLibraryErrorString(errorCode);return standardLibraryErrorString(errorCode);Executed by:
executed 716 times by 23 tests: return standardLibraryErrorString(errorCode);Executed by:
| 716 | ||||||
| 54 | default never executed: :default:never executed: default: | 0 | ||||||
| 55 | QMessageLogger(__FILE__, 166, __PRETTY_FUNCTION__).warning("invalid error scope"); | - | ||||||
| 56 | - | |||||||
| 57 | case never executed: NoError:case NoError:never executed: case NoError:code before this statement never executed: case NoError: | 0 | ||||||
| 58 | return never executed: QLatin1String("No error");return QLatin1String("No error");never executed: return QLatin1String("No error"); | 0 | ||||||
| 59 | } | - | ||||||
| 60 | } | - | ||||||
| 61 | - | |||||||
| 62 | - | |||||||
| Switch to Source code | Preprocessed file |