OpenCoverage

qsystemerror.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/kernel/qsystemerror.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static QString standardLibraryErrorString(int errorCode)-
4{-
5 const char *s = 0;-
6 QString ret;-
7 switch (errorCode) {-
8 case
never executed: case 0:
0:
never executed: case 0:
0
9 break;
never executed: break;
0
10 case
executed 10 times by 4 tests: case 13:
Executed by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
13:
executed 10 times by 4 tests: case 13:
Executed by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
10
11 s = "Permission denied";-
12 break;
executed 10 times by 4 tests: break;
Executed by:
  • tst_QDir
  • tst_QFile
  • tst_QSaveFile
  • tst_QTemporaryFile
10
13 case
never executed: case 24:
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: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
2:
executed 599 times by 22 tests: case 2:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
599
17 s = "No such file or directory";-
18 break;
executed 599 times by 22 tests: break;
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
599
19 case
never executed: case 28:
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:
  • tst_QFile
  • tst_QImageReader
  • tst_QLocalSocket
:
executed 107 times by 3 tests: default:
Executed by:
  • tst_QFile
  • tst_QImageReader
  • tst_QLocalSocket
{
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:
  • tst_QFile
  • tst_QImageReader
  • tst_QLocalSocket
}
107
34 }-
35 if (s
sDescription
TRUEevaluated 609 times by 22 tests
Evaluated by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
FALSEevaluated 107 times by 3 tests
Evaluated by:
  • tst_QFile
  • tst_QImageReader
  • tst_QLocalSocket
) {
107-609
36-
37-
38 ret = QString::fromLatin1(s);-
39 }
executed 609 times by 22 tests: end of block
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
609
40 return
executed 716 times by 23 tests: return ret.trimmed();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
ret.trimmed();
executed 716 times by 23 tests: return ret.trimmed();
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
716
41}-
42-
43QString QSystemError::toString() const-
44{-
45 switch(errorScope) {-
46 case
executed 15 times by 3 tests: case NativeError:
Executed by:
  • tst_QFileSystemWatcher
  • tst_QSaveFile
  • tst_QTemporaryFile
NativeError:
executed 15 times by 3 tests: case NativeError:
Executed by:
  • tst_QFileSystemWatcher
  • tst_QSaveFile
  • tst_QTemporaryFile
15
47-
48-
49-
50-
51-
52 case
executed 701 times by 23 tests: case StandardLibraryError:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
StandardLibraryError:
executed 701 times by 23 tests: case StandardLibraryError:
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
701
53 return
executed 716 times by 23 tests: return standardLibraryErrorString(errorCode);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
standardLibraryErrorString(errorCode);
executed 716 times by 23 tests: return standardLibraryErrorString(errorCode);
Executed by:
  • tst_QAbstractNetworkCache
  • tst_QDir
  • tst_QDirIterator
  • tst_QDirModel
  • tst_QFile
  • tst_QFileInfo
  • tst_QFileSystemWatcher
  • tst_QIODevice
  • tst_QImageReader
  • tst_QImageWriter
  • tst_QLocalSocket
  • tst_QMimeDatabase
  • tst_QNetworkDiskCache
  • tst_QPrinter
  • tst_QSaveFile
  • tst_QSettings
  • tst_QSharedMemory
  • tst_QTemporaryFile
  • tst_QTextStream
  • tst_QXmlStream
  • tst_qmake
  • tst_qstandardpaths
  • tst_selftests - unknown status
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: case NoError:
NoError:
never executed: case NoError:
code before this statement never executed: case NoError:
0
58 return
never executed: return QLatin1String("No error");
QLatin1String("No error");
never executed: return QLatin1String("No error");
0
59 }-
60}-
61-
62-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9