Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | typedef char Char; | - |
13 | typedef char Latin1Char; | - |
14 | typedef int NativeFileHandle; | - |
15 | static bool createFileFromTemplate(NativeFileHandle &file, | - |
16 | QFileSystemEntry::NativePath &path, size_t pos, size_t length, quint32 mode, | - |
17 | QSystemError &error) | - |
18 | { | - |
19 | ((!(length != 0)) ? qt_assert("length != 0",__FILE__,116) : qt_noop()); | - |
20 | ((!(pos < size_t(path.length()))) ? qt_assert("pos < size_t(path.length())",__FILE__,117) : qt_noop()); | - |
21 | ((!(length <= size_t(path.length()) - pos)) ? qt_assert("length <= size_t(path.length()) - pos",__FILE__,118) : qt_noop()); | - |
22 | | - |
23 | Char *const placeholderStart = (Char *)path.data() + pos; | - |
24 | Char *const placeholderEnd = placeholderStart + length; | - |
25 | | - |
26 | | - |
27 | { | - |
28 | Char *rIter = placeholderEnd; | - |
29 | | - |
30 | | - |
31 | quint64 pid = quint64(QCoreApplication::applicationPid()); | - |
32 | do { | - |
33 | *--rIter = Latin1Char((pid % 10) + '0'); | - |
34 | pid /= 10; | - |
35 | }executed 8846 times by 25 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
while (rIter != placeholderStartTRUE | evaluated 8846 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | never evaluated |
&& pid != 0TRUE | evaluated 6690 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 2156 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
); | 0-8846 |
36 | | - |
37 | | - |
38 | while (rIter != placeholderStartTRUE | evaluated 4132 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 2156 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) { | 2156-4132 |
39 | char ch = char((qrand() & 0xffff) % (26 + 26)); | - |
40 | if (ch < 26TRUE | evaluated 2162 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 1970 times by 17 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) | 1970-2162 |
41 | *--executed 2162 times by 25 tests: *--rIter = Latin1Char(ch + 'A'); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
rIter = Latin1Char(ch + 'A');executed 2162 times by 25 tests: *--rIter = Latin1Char(ch + 'A'); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 2162 |
42 | else | - |
43 | *--executed 1970 times by 17 tests: *--rIter = Latin1Char(ch - 26 + 'a'); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
rIter = Latin1Char(ch - 26 + 'a');executed 1970 times by 17 tests: *--rIter = Latin1Char(ch - 26 + 'a'); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1970 |
44 | } | - |
45 | } | - |
46 | | - |
47 | for (;;) { | - |
48 | file = qt_safe_open(path.constData(), | - |
49 | 0100 | 0200 | 02 | 0, | - |
50 | static_cast<mode_t>(mode)); | - |
51 | | - |
52 | if (file != -1TRUE | evaluated 2143 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 316 times by 2 testsEvaluated by:- tst_QSaveFile
- tst_QTemporaryFile
|
) | 316-2143 |
53 | returnexecuted 2143 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
true;executed 2143 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 2143 |
54 | | - |
55 | int err = (*__errno_location ()); | - |
56 | if (err != 17TRUE | evaluated 13 times by 2 testsEvaluated by:- tst_QSaveFile
- tst_QTemporaryFile
| FALSE | evaluated 303 times by 1 test |
) { | 13-303 |
57 | error = QSystemError(err, QSystemError::NativeError); | - |
58 | returnexecuted 13 times by 2 tests: return false; Executed by:- tst_QSaveFile
- tst_QTemporaryFile
false;executed 13 times by 2 tests: return false; Executed by:- tst_QSaveFile
- tst_QTemporaryFile
| 13 |
59 | } | - |
60 | | - |
61 | | - |
62 | | - |
63 | for (Char *iter = placeholderStart;;) { | - |
64 | | - |
65 | | - |
66 | switch (char(*iter)) { | - |
67 | caseexecuted 6 times by 1 test: case 'Z': 'Z':executed 6 times by 1 test: case 'Z': | 6 |
68 | | - |
69 | *iter = Latin1Char('a'); | - |
70 | if (++TRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
iter == placeholderEndTRUE | never evaluated | FALSE | evaluated 6 times by 1 test |
) { | 0-6 |
71 | | - |
72 | error = QSystemError(err, QSystemError::NativeError); | - |
73 | return never executed: return false; false;never executed: return false; | 0 |
74 | } | - |
75 | | - |
76 | continue;executed 6 times by 1 test: continue; | 6 |
77 | | - |
78 | case never executed: case '0': '0':never executed: case '0': casenever executed: case '1': '1':never executed: case '1': casenever executed: case '2': '2':never executed: case '2': casenever executed: case '3': '3':never executed: case '3': casenever executed: case '4': '4':never executed: case '4': | 0 |
79 | case never executed: case '5': '5':never executed: case '5': casenever executed: case '6': '6':never executed: case '6': casenever executed: case '7': '7':never executed: case '7': casenever executed: case '8': '8':never executed: case '8': casenever executed: case '9': '9':never executed: case '9': | 0 |
80 | *iter = Latin1Char('a'); | - |
81 | break; never executed: break; | 0 |
82 | | - |
83 | caseexecuted 8 times by 1 test: case 'z': 'z':executed 8 times by 1 test: case 'z': | 8 |
84 | | - |
85 | *iter = Latin1Char('A'); | - |
86 | break;executed 8 times by 1 test: break; | 8 |
87 | | - |
88 | defaultexecuted 295 times by 1 test: default: :executed 295 times by 1 test: default: | 295 |
89 | ++*iter; | - |
90 | break;executed 295 times by 1 test: break; | 295 |
91 | } | - |
92 | break;executed 303 times by 1 test: break; | 303 |
93 | } | - |
94 | }executed 303 times by 1 test: end of block | 303 |
95 | | - |
96 | ((!(false)) ? qt_assert("false",__FILE__,227) : qt_noop()); | - |
97 | return never executed: return false; false;never executed: return false; | 0 |
98 | } | - |
99 | | - |
100 | | - |
101 | QTemporaryFileEngine::~QTemporaryFileEngine() | - |
102 | { | - |
103 | QFSFileEnginePrivate * const d = d_func(); | - |
104 | d->unmapAll(); | - |
105 | QFSFileEngine::close(); | - |
106 | }executed 2155 times by 25 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 2155 |
107 | | - |
108 | bool QTemporaryFileEngine::isReallyOpen() const | - |
109 | { | - |
110 | const QFSFileEnginePrivate * const d = d_func(); | - |
111 | | - |
112 | if (!((TRUE | evaluated 4343 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | never evaluated |
0 == d->fh)TRUE | evaluated 4343 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | never evaluated |
&& (-TRUE | evaluated 4321 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 22 times by 3 testsEvaluated by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
|
1 == d->fd)TRUE | evaluated 4321 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 22 times by 3 testsEvaluated by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
|
| 0-4343 |
113 | | - |
114 | | - |
115 | | - |
116 | )) | - |
117 | returnexecuted 22 times by 3 tests: return true; Executed by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
true;executed 22 times by 3 tests: return true; Executed by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
| 22 |
118 | | - |
119 | returnexecuted 4321 times by 25 tests: return false; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
false;executed 4321 times by 25 tests: return false; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 4321 |
120 | | - |
121 | } | - |
122 | | - |
123 | void QTemporaryFileEngine::setFileName(const QString &file) | - |
124 | { | - |
125 | | - |
126 | QFSFileEngine::close(); | - |
127 | QFSFileEngine::setFileName(file); | - |
128 | }executed 218 times by 8 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QFile
- tst_QFileInfo
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTemporaryFile
| 218 |
129 | | - |
130 | void QTemporaryFileEngine::setFileTemplate(const QString &fileTemplate) | - |
131 | { | - |
132 | QFSFileEnginePrivate * const d = d_func(); | - |
133 | if (filePathIsTemplateTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1 |
134 | d->fileEntry = QFileSystemEntry(fileTemplate);executed 1 time by 1 test: d->fileEntry = QFileSystemEntry(fileTemplate); | 1 |
135 | }executed 2 times by 1 test: end of block | 2 |
136 | | - |
137 | bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode) | - |
138 | { | - |
139 | QFSFileEnginePrivate * const d = d_func(); | - |
140 | ((!(!isReallyOpen())) ? qt_assert("!isReallyOpen()",__FILE__,271) : qt_noop()); | - |
141 | | - |
142 | openMode |= QIODevice::ReadWrite; | - |
143 | | - |
144 | if (!filePathIsTemplateTRUE | evaluated 3 times by 1 test | FALSE | evaluated 2156 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) | 3-2156 |
145 | returnexecuted 3 times by 1 test: return QFSFileEngine::open(openMode); QFSFileEngine::open(openMode);executed 3 times by 1 test: return QFSFileEngine::open(openMode); | 3 |
146 | | - |
147 | QString qfilename = d->fileEntry.filePath(); | - |
148 | | - |
149 | | - |
150 | uint phPos = qfilename.length(); | - |
151 | uint phLength = 0; | - |
152 | | - |
153 | while (phPos != 0TRUE | evaluated 21363 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 26 times by 1 test |
) { | 26-21363 |
154 | --phPos; | - |
155 | | - |
156 | if (qfilename[phPos] == QLatin1Char('X')TRUE | evaluated 8536 times by 18 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| FALSE | evaluated 12827 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) { | 8536-12827 |
157 | ++phLength; | - |
158 | continue;executed 8536 times by 18 tests: continue; Executed by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| 8536 |
159 | } | - |
160 | | - |
161 | if (phLength >= 6TRUE | evaluated 1393 times by 18 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| FALSE | evaluated 11434 times by 17 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
| 1393-11434 |
162 | || qfilename[phPos] == QLatin1Char('/')TRUE | evaluated 737 times by 10 testsEvaluated by:- tst_QColorDialog
- tst_QFileDialog2
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QLockFile
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 10697 times by 15 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
|
) { | 737-10697 |
163 | ++phPos; | - |
164 | break;executed 2130 times by 25 tests: break; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 2130 |
165 | } | - |
166 | | - |
167 | | - |
168 | phLength = 0; | - |
169 | }executed 10697 times by 15 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFileDialog2
- tst_QFileSystemModel
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
| 10697 |
170 | | - |
171 | if (phLength < 6TRUE | evaluated 757 times by 10 testsEvaluated by:- tst_QColorDialog
- tst_QFileDialog2
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QLockFile
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 1399 times by 18 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
|
) | 757-1399 |
172 | qfilename.append(QLatin1String(".XXXXXX"));executed 757 times by 10 tests: qfilename.append(QLatin1String(".XXXXXX")); Executed by:- tst_QColorDialog
- tst_QFileDialog2
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QLockFile
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 757 |
173 | | - |
174 | | - |
175 | QFileSystemEntry::NativePath filename = QFileSystemEngine::absoluteName( | - |
176 | QFileSystemEntry(qfilename, QFileSystemEntry::FromInternalPath())) | - |
177 | .nativeFilePath(); | - |
178 | | - |
179 | | - |
180 | phPos = filename.length(); | - |
181 | phLength = 0; | - |
182 | while (phPos != 0TRUE | evaluated 15452 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | never evaluated |
) { | 0-15452 |
183 | --phPos; | - |
184 | | - |
185 | if (filename[phPos] == Latin1Char('X')TRUE | evaluated 12997 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 2455 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) { | 2455-12997 |
186 | ++phLength; | - |
187 | continue;executed 12997 times by 25 tests: continue; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 12997 |
188 | } | - |
189 | | - |
190 | if (phLength >= 6TRUE | evaluated 2156 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 299 times by 8 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFileSystemModel
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTemporaryFile
|
) { | 299-2156 |
191 | ++phPos; | - |
192 | break;executed 2156 times by 25 tests: break; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 2156 |
193 | } | - |
194 | | - |
195 | | - |
196 | phLength = 0; | - |
197 | }executed 299 times by 8 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QDBusMarshall
- tst_QDir
- tst_QFileSystemModel
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTemporaryFile
| 299 |
198 | | - |
199 | ((!(phLength >= 6)) ? qt_assert("phLength >= 6",__FILE__,330) : qt_noop()); | - |
200 | | - |
201 | QSystemError error; | - |
202 | | - |
203 | | - |
204 | | - |
205 | NativeFileHandle &file = d->fd; | - |
206 | | - |
207 | | - |
208 | if (!createFileFromTemplate(file, filename, phPos, phLength, fileMode, error)TRUE | evaluated 13 times by 2 testsEvaluated by:- tst_QSaveFile
- tst_QTemporaryFile
| FALSE | evaluated 2143 times by 25 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) { | 13-2143 |
209 | setError(QFile::OpenError, error.toString()); | - |
210 | returnexecuted 13 times by 2 tests: return false; Executed by:- tst_QSaveFile
- tst_QTemporaryFile
false;executed 13 times by 2 tests: return false; Executed by:- tst_QSaveFile
- tst_QTemporaryFile
| 13 |
211 | } | - |
212 | | - |
213 | d->fileEntry = QFileSystemEntry(filename, QFileSystemEntry::FromNativePath()); | - |
214 | | - |
215 | | - |
216 | d->closeFileHandle = true; | - |
217 | | - |
218 | | - |
219 | filePathIsTemplate = false; | - |
220 | | - |
221 | d->openMode = openMode; | - |
222 | d->lastFlushFailed = false; | - |
223 | d->tried_stat = 0; | - |
224 | | - |
225 | returnexecuted 2143 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
true;executed 2143 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 2143 |
226 | } | - |
227 | | - |
228 | bool QTemporaryFileEngine::remove() | - |
229 | { | - |
230 | QFSFileEnginePrivate * const d = d_func(); | - |
231 | | - |
232 | | - |
233 | d->unmapAll(); | - |
234 | QFSFileEngine::close(); | - |
235 | if (QFSFileEngine::remove()TRUE | evaluated 353 times by 23 testsEvaluated by:- tst_QColorDialog
- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| FALSE | evaluated 1 time by 1 test |
) { | 1-353 |
236 | d->fileEntry.clear(); | - |
237 | | - |
238 | | - |
239 | | - |
240 | | - |
241 | | - |
242 | filePathIsTemplate = filePathWasTemplate; | - |
243 | returnexecuted 353 times by 23 tests: return true; Executed by:- tst_QColorDialog
- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
true;executed 353 times by 23 tests: return true; Executed by:- tst_QColorDialog
- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 353 |
244 | } | - |
245 | returnexecuted 1 time by 1 test: return false; false;executed 1 time by 1 test: return false; | 1 |
246 | } | - |
247 | | - |
248 | bool QTemporaryFileEngine::rename(const QString &newName) | - |
249 | { | - |
250 | QFSFileEngine::close(); | - |
251 | returnexecuted 790 times by 15 tests: return QFSFileEngine::rename(newName); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
QFSFileEngine::rename(newName);executed 790 times by 15 tests: return QFSFileEngine::rename(newName); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSaveFile
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
| 790 |
252 | } | - |
253 | | - |
254 | bool QTemporaryFileEngine::renameOverwrite(const QString &newName) | - |
255 | { | - |
256 | QFSFileEngine::close(); | - |
257 | returnexecuted 571 times by 7 tests: return QFSFileEngine::renameOverwrite(newName); Executed by:- tst_QColorDialog
- tst_QFileDialog2
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QSaveFile
- tst_QSettings
- tst_languageChange
QFSFileEngine::renameOverwrite(newName);executed 571 times by 7 tests: return QFSFileEngine::renameOverwrite(newName); Executed by:- tst_QColorDialog
- tst_QFileDialog2
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QSaveFile
- tst_QSettings
- tst_languageChange
| 571 |
258 | } | - |
259 | | - |
260 | bool QTemporaryFileEngine::close() | - |
261 | { | - |
262 | | - |
263 | seek(0); | - |
264 | setError(QFile::UnspecifiedError, QString()); | - |
265 | returnexecuted 2166 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
true;executed 2166 times by 25 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSaveFile
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 2166 |
266 | } | - |
267 | | - |
268 | | - |
269 | | - |
270 | QTemporaryFilePrivate::QTemporaryFilePrivate() : autoRemove(true) | - |
271 | { | - |
272 | }executed 1579 times by 24 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMetaType
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1579 |
273 | | - |
274 | QTemporaryFilePrivate::~QTemporaryFilePrivate() | - |
275 | { | - |
276 | } | - |
277 | | - |
278 | QAbstractFileEngine *QTemporaryFilePrivate::engine() const | - |
279 | { | - |
280 | if (!fileEngineTRUE | evaluated 1575 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 3404 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
|
) { | 1575-3404 |
281 | fileEngine = new QTemporaryFileEngine; | - |
282 | resetFileEngine(); | - |
283 | }executed 1575 times by 24 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1575 |
284 | returnexecuted 4979 times by 25 tests: return fileEngine; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
fileEngine;executed 4979 times by 25 tests: return fileEngine; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 4979 |
285 | } | - |
286 | | - |
287 | void QTemporaryFilePrivate::resetFileEngine() const | - |
288 | { | - |
289 | if (!fileEngineTRUE | evaluated 1575 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 1579 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) | 1575-1579 |
290 | return;executed 1575 times by 24 tests: return; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1575 |
291 | | - |
292 | QTemporaryFileEngine *tef = static_cast<QTemporaryFileEngine *>(fileEngine); | - |
293 | if (fileName.isEmpty()TRUE | evaluated 1576 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 3 times by 1 test |
) | 3-1576 |
294 | tef->initialize(templateName, 0600);executed 1576 times by 24 tests: tef->initialize(templateName, 0600); Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1576 |
295 | else | - |
296 | tef->initialize(fileName, 0600, false);executed 3 times by 1 test: tef->initialize(fileName, 0600, false); | 3 |
297 | } | - |
298 | | - |
299 | QString QTemporaryFilePrivate::defaultTemplateName() | - |
300 | { | - |
301 | QString baseName; | - |
302 | | - |
303 | baseName = QCoreApplication::applicationName(); | - |
304 | if (baseName.isEmpty()TRUE | never evaluated | FALSE | evaluated 1039 times by 9 testsEvaluated by:- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageWriter
- tst_QMetaType
- tst_QMimeDatabase
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
|
) | 0-1039 |
305 | | - |
306 | baseName = QLatin1String("qt_temp"); never executed: baseName = QLatin1String("qt_temp"); | 0 |
307 | | - |
308 | returnexecuted 1039 times by 9 tests: return QDir::tempPath() + QLatin1Char('/') + baseName + QLatin1String(".XXXXXX"); Executed by:- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageWriter
- tst_QMetaType
- tst_QMimeDatabase
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
QDir::tempPath() + QLatin1Char('/') + baseName + QLatin1String(".XXXXXX");executed 1039 times by 9 tests: return QDir::tempPath() + QLatin1Char('/') + baseName + QLatin1String(".XXXXXX"); Executed by:- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageWriter
- tst_QMetaType
- tst_QMimeDatabase
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| 1039 |
309 | } | - |
310 | QTemporaryFile::QTemporaryFile() | - |
311 | : QFile(*new QTemporaryFilePrivate, 0) | - |
312 | { | - |
313 | QTemporaryFilePrivate * const d = d_func(); | - |
314 | d->templateName = QTemporaryFilePrivate::defaultTemplateName(); | - |
315 | }executed 1038 times by 9 tests: end of block Executed by:- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageWriter
- tst_QMetaType
- tst_QMimeDatabase
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| 1038 |
316 | QTemporaryFile::QTemporaryFile(const QString &templateName) | - |
317 | : QFile(*new QTemporaryFilePrivate, 0) | - |
318 | { | - |
319 | QTemporaryFilePrivate * const d = d_func(); | - |
320 | d->templateName = templateName; | - |
321 | }executed 453 times by 19 tests: end of block Executed by:- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QSettings
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 453 |
322 | QTemporaryFile::QTemporaryFile(QObject *parent) | - |
323 | : QFile(*new QTemporaryFilePrivate, parent) | - |
324 | { | - |
325 | QTemporaryFilePrivate * const d = d_func(); | - |
326 | d->templateName = QTemporaryFilePrivate::defaultTemplateName(); | - |
327 | }executed 1 time by 1 test: end of block | 1 |
328 | QTemporaryFile::QTemporaryFile(const QString &templateName, QObject *parent) | - |
329 | : QFile(*new QTemporaryFilePrivate, parent) | - |
330 | { | - |
331 | QTemporaryFilePrivate * const d = d_func(); | - |
332 | d->templateName = templateName; | - |
333 | }executed 87 times by 3 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QNetworkDiskCache
- tst_QNetworkReply
| 87 |
334 | QTemporaryFile::~QTemporaryFile() | - |
335 | { | - |
336 | QTemporaryFilePrivate * const d = d_func(); | - |
337 | close(); | - |
338 | if (!d->fileName.isEmpty()TRUE | evaluated 1568 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| FALSE | evaluated 12 times by 2 testsEvaluated by:- tst_QMetaType
- tst_QTemporaryFile
|
&& d->autoRemoveTRUE | evaluated 348 times by 22 testsEvaluated by:- tst_QColorDialog
- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| FALSE | evaluated 1220 times by 9 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTemporaryFile
|
) | 12-1568 |
339 | remove();executed 348 times by 22 tests: remove(); Executed by:- tst_QColorDialog
- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 348 |
340 | }executed 1580 times by 25 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMetaType
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qdbusmarshall - unknown status
- tst_qlockfile - unknown status
| 1580 |
341 | bool QTemporaryFile::autoRemove() const | - |
342 | { | - |
343 | const QTemporaryFilePrivate * const d = d_func(); | - |
344 | returnexecuted 2 times by 1 test: return d->autoRemove; d->autoRemove;executed 2 times by 1 test: return d->autoRemove; | 2 |
345 | } | - |
346 | void QTemporaryFile::setAutoRemove(bool b) | - |
347 | { | - |
348 | QTemporaryFilePrivate * const d = d_func(); | - |
349 | d->autoRemove = b; | - |
350 | }executed 1243 times by 9 tests: end of block Executed by:- tst_QAbstractNetworkCache
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QImageReader
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QTemporaryFile
| 1243 |
351 | QString QTemporaryFile::fileName() const | - |
352 | { | - |
353 | const QTemporaryFilePrivate * const d = d_func(); | - |
354 | if(d->fileName.isEmpty()TRUE | evaluated 6 times by 1 test | FALSE | evaluated 2314 times by 15 testsEvaluated by:- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
|
) | 6-2314 |
355 | returnexecuted 6 times by 1 test: return QString(); QString();executed 6 times by 1 test: return QString(); | 6 |
356 | returnexecuted 2314 times by 15 tests: return d->engine()->fileName(QAbstractFileEngine::DefaultName); Executed by:- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
d->engine()->fileName(QAbstractFileEngine::DefaultName);executed 2314 times by 15 tests: return d->engine()->fileName(QAbstractFileEngine::DefaultName); Executed by:- tst_QDir
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QImageReader
- tst_QImageWriter
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QStorageInfo
- tst_QTemporaryFile
| 2314 |
357 | } | - |
358 | | - |
359 | | - |
360 | | - |
361 | | - |
362 | | - |
363 | | - |
364 | | - |
365 | QString QTemporaryFile::fileTemplate() const | - |
366 | { | - |
367 | const QTemporaryFilePrivate * const d = d_func(); | - |
368 | returnexecuted 10 times by 1 test: return d->templateName; d->templateName;executed 10 times by 1 test: return d->templateName; | 10 |
369 | } | - |
370 | void QTemporaryFile::setFileTemplate(const QString &name) | - |
371 | { | - |
372 | QTemporaryFilePrivate * const d = d_func(); | - |
373 | d->templateName = name; | - |
374 | if (d->fileEngineTRUE | evaluated 2 times by 1 test | FALSE | evaluated 7 times by 2 testsEvaluated by:- tst_QDBusMarshall
- tst_QTemporaryFile
|
) | 2-7 |
375 | static_cast<executed 2 times by 1 test: static_cast<QTemporaryFileEngine*>(d->fileEngine)->setFileTemplate(name); QTemporaryFileEngine*>(d->fileEngine)->setFileTemplate(name);executed 2 times by 1 test: static_cast<QTemporaryFileEngine*>(d->fileEngine)->setFileTemplate(name); | 2 |
376 | }executed 9 times by 2 tests: end of block Executed by:- tst_QDBusMarshall
- tst_QTemporaryFile
| 9 |
377 | QTemporaryFile *QTemporaryFile::createNativeFile(QFile &file) | - |
378 | { | - |
379 | if (QAbstractFileEngine *engine = file.d_func()->engine()TRUE | evaluated 4 times by 1 test | FALSE | never evaluated |
) { | 0-4 |
380 | if(engine->fileFlags(QAbstractFileEngine::FlagsMask) & QAbstractFileEngine::LocalDiskFlagTRUE | evaluated 2 times by 1 test | FALSE | evaluated 2 times by 1 test |
) | 2 |
381 | returnexecuted 2 times by 1 test: return 0; 0;executed 2 times by 1 test: return 0; | 2 |
382 | | - |
383 | bool wasOpen = file.isOpen(); | - |
384 | qint64 old_off = 0; | - |
385 | if(wasOpenTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1 |
386 | old_off = file.pos();executed 1 time by 1 test: old_off = file.pos(); | 1 |
387 | else | - |
388 | file.open(QIODevice::ReadOnly);executed 1 time by 1 test: file.open(QIODevice::ReadOnly); | 1 |
389 | | - |
390 | QTemporaryFile *ret = new QTemporaryFile; | - |
391 | ret->open(); | - |
392 | file.seek(0); | - |
393 | char buffer[1024]; | - |
394 | while(true) { | - |
395 | qint64 len = file.read(buffer, 1024); | - |
396 | if(len < 1TRUE | evaluated 2 times by 1 test | FALSE | evaluated 2 times by 1 test |
) | 2 |
397 | break;executed 2 times by 1 test: break; | 2 |
398 | ret->write(buffer, len); | - |
399 | }executed 2 times by 1 test: end of block | 2 |
400 | ret->seek(0); | - |
401 | | - |
402 | if(wasOpenTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
) | 1 |
403 | file.seek(old_off);executed 1 time by 1 test: file.seek(old_off); | 1 |
404 | else | - |
405 | file.close();executed 1 time by 1 test: file.close(); | 1 |
406 | | - |
407 | returnexecuted 2 times by 1 test: return ret; ret;executed 2 times by 1 test: return ret; | 2 |
408 | } | - |
409 | return never executed: return 0; 0;never executed: return 0; | 0 |
410 | } | - |
411 | bool QTemporaryFile::open(OpenMode flags) | - |
412 | { | - |
413 | QTemporaryFilePrivate * const d = d_func(); | - |
414 | if (!d->fileName.isEmpty()TRUE | evaluated 25 times by 3 testsEvaluated by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
| FALSE | evaluated 1576 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
|
) { | 25-1576 |
415 | if (static_cast<TRUE | evaluated 22 times by 3 testsEvaluated by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
| FALSE | evaluated 3 times by 1 test |
QTemporaryFileEngine*>(d->engine())->isReallyOpen()TRUE | evaluated 22 times by 3 testsEvaluated by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
| FALSE | evaluated 3 times by 1 test |
) { | 3-22 |
416 | setOpenMode(flags); | - |
417 | returnexecuted 22 times by 3 tests: return true; Executed by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
true;executed 22 times by 3 tests: return true; Executed by:- tst_QFileDialog2
- tst_QImageReader
- tst_QTemporaryFile
| 22 |
418 | } | - |
419 | }executed 3 times by 1 test: end of block | 3 |
420 | | - |
421 | | - |
422 | | - |
423 | | - |
424 | | - |
425 | | - |
426 | d->resetFileEngine(); | - |
427 | | - |
428 | if (QFile::open(flags)TRUE | evaluated 1571 times by 24 testsEvaluated by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| FALSE | evaluated 8 times by 1 test |
) { | 8-1571 |
429 | d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName); | - |
430 | returnexecuted 1571 times by 24 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
true;executed 1571 times by 24 tests: return true; Executed by:- tst_QAbstractNetworkCache
- tst_QColorDialog
- tst_QDBusMarshall
- tst_QDir
- tst_QFile
- tst_QFileDialog2
- tst_QFileInfo
- tst_QFileSystemModel
- tst_QFileSystemWatcher
- tst_QFiledialog
- tst_QGraphicsProxyWidget
- tst_QImageReader
- tst_QImageWriter
- tst_QLockFile
- tst_QMimeDatabase
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QPdfWriter
- tst_QPixmap
- tst_QSettings
- tst_QStorageInfo
- tst_QTemporaryFile
- tst_languageChange
- tst_qlockfile - unknown status
| 1571 |
431 | } | - |
432 | returnexecuted 8 times by 1 test: return false; false;executed 8 times by 1 test: return false; | 8 |
433 | } | - |
434 | | - |
435 | | - |
| | |