| Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qabstractfileengine.cpp |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | static bool qt_file_engine_handlers_in_use = false; | - | ||||||||||||
| 8 | - | |||||||||||||
| 9 | - | |||||||||||||
| 10 | - | |||||||||||||
| 11 | - | |||||||||||||
| 12 | - | |||||||||||||
| 13 | namespace { namespace Q_QGS_fileEngineHandlerMutex { typedef QReadWriteLock Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
executed 3 times by 3 tests: }guard.store(QtGlobalStatic::Destroyed);Executed by:
executed 3 times by 3 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (QReadWriteLock::Recursive))) : value (QReadWriteLock::Recursive) { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of blockExecuted by:
executed 120 times by 6 tests: &holder.value;return &holder.value;Executed by:
executed 120 times by 6 tests: } } } static QGlobalStatic<QReadWriteLock, Q_QGS_fileEngineHandlerMutex::innerFunction, Q_QGS_fileEngineHandlerMutex::guard> fileEngineHandlerMutex;return &holder.value;Executed by:
| 0-120 | ||||||||||||
| 14 | static bool qt_abstractfileenginehandlerlist_shutDown = false; | - | ||||||||||||
| 15 | class QAbstractFileEngineHandlerList : public QList<QAbstractFileEngineHandler *> | - | ||||||||||||
| 16 | { | - | ||||||||||||
| 17 | public: | - | ||||||||||||
| 18 | ~QAbstractFileEngineHandlerList() | - | ||||||||||||
| 19 | { | - | ||||||||||||
| 20 | QWriteLocker locker(fileEngineHandlerMutex()); | - | ||||||||||||
| 21 | qt_abstractfileenginehandlerlist_shutDown = true; | - | ||||||||||||
| 22 | } executed 3 times by 3 tests: end of blockExecuted by:
| 3 | ||||||||||||
| 23 | }; | - | ||||||||||||
| 24 | namespace { namespace Q_QGS_fileEngineHandlers { typedef QAbstractFileEngineHandlerList Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
executed 3 times by 3 tests: }guard.store(QtGlobalStatic::Destroyed);Executed by:
executed 3 times by 3 tests: }; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; returnend of blockExecuted by:
executed 117 times by 3 tests: &holder.value;return &holder.value;Executed by:
executed 117 times by 3 tests: } } } static QGlobalStatic<QAbstractFileEngineHandlerList, Q_QGS_fileEngineHandlers::innerFunction, Q_QGS_fileEngineHandlers::guard> fileEngineHandlers;return &holder.value;Executed by:
| 0-117 | ||||||||||||
| 25 | QAbstractFileEngineHandler::QAbstractFileEngineHandler() | - | ||||||||||||
| 26 | { | - | ||||||||||||
| 27 | QWriteLocker locker(fileEngineHandlerMutex()); | - | ||||||||||||
| 28 | qt_file_engine_handlers_in_use = true; | - | ||||||||||||
| 29 | fileEngineHandlers()->prepend(this); | - | ||||||||||||
| 30 | } executed 15 times by 3 tests: end of blockExecuted by:
| 15 | ||||||||||||
| 31 | - | |||||||||||||
| 32 | - | |||||||||||||
| 33 | - | |||||||||||||
| 34 | - | |||||||||||||
| 35 | - | |||||||||||||
| 36 | QAbstractFileEngineHandler::~QAbstractFileEngineHandler() | - | ||||||||||||
| 37 | { | - | ||||||||||||
| 38 | QWriteLocker locker(fileEngineHandlerMutex()); | - | ||||||||||||
| 39 | - | |||||||||||||
| 40 | if (!qt_abstractfileenginehandlerlist_shutDown
| 0-15 | ||||||||||||
| 41 | QAbstractFileEngineHandlerList *handlers = fileEngineHandlers(); | - | ||||||||||||
| 42 | handlers->removeOne(this); | - | ||||||||||||
| 43 | if (handlers->isEmpty()
| 1-14 | ||||||||||||
| 44 | qt_file_engine_handlers_in_use = false; executed 14 times by 3 tests: qt_file_engine_handlers_in_use = false;Executed by:
| 14 | ||||||||||||
| 45 | } executed 15 times by 3 tests: end of blockExecuted by:
| 15 | ||||||||||||
| 46 | } executed 15 times by 3 tests: end of blockExecuted by:
| 15 | ||||||||||||
| 47 | - | |||||||||||||
| 48 | - | |||||||||||||
| 49 | - | |||||||||||||
| 50 | - | |||||||||||||
| 51 | - | |||||||||||||
| 52 | - | |||||||||||||
| 53 | QAbstractFileEngine *qt_custom_file_engine_handler_create(const QString &path) | - | ||||||||||||
| 54 | { | - | ||||||||||||
| 55 | QAbstractFileEngine *engine = 0; | - | ||||||||||||
| 56 | - | |||||||||||||
| 57 | if (qt_file_engine_handlers_in_use
| 87-305828 | ||||||||||||
| 58 | QReadLocker locker(fileEngineHandlerMutex()); | - | ||||||||||||
| 59 | - | |||||||||||||
| 60 | - | |||||||||||||
| 61 | QAbstractFileEngineHandlerList *handlers = fileEngineHandlers(); | - | ||||||||||||
| 62 | for (int i = 0; i < handlers->size()
| 34-87 | ||||||||||||
| 63 | if ((
| 34-53 | ||||||||||||
| 64 | break; executed 53 times by 3 tests: break;Executed by:
| 53 | ||||||||||||
| 65 | } executed 34 times by 2 tests: end of blockExecuted by:
| 34 | ||||||||||||
| 66 | } executed 87 times by 3 tests: end of blockExecuted by:
| 87 | ||||||||||||
| 67 | - | |||||||||||||
| 68 | return executed 305915 times by 303 tests: engine;return engine;Executed by:
executed 305915 times by 303 tests: return engine;Executed by:
| 305915 | ||||||||||||
| 69 | } | - | ||||||||||||
| 70 | QAbstractFileEngine *QAbstractFileEngine::create(const QString &fileName) | - | ||||||||||||
| 71 | { | - | ||||||||||||
| 72 | QFileSystemEntry entry(fileName); | - | ||||||||||||
| 73 | QFileSystemMetaData metaData; | - | ||||||||||||
| 74 | QAbstractFileEngine *engine = QFileSystemEngine::resolveEntryAndCreateLegacyEngine(entry, metaData); | - | ||||||||||||
| 75 | - | |||||||||||||
| 76 | - | |||||||||||||
| 77 | if (!engine
| 14942-47048 | ||||||||||||
| 78 | - | |||||||||||||
| 79 | return executed 47048 times by 207 tests: new QFSFileEngine(entry.filePath());return new QFSFileEngine(entry.filePath());Executed by:
executed 47048 times by 207 tests: return new QFSFileEngine(entry.filePath());Executed by:
| 47048 | ||||||||||||
| 80 | - | |||||||||||||
| 81 | - | |||||||||||||
| 82 | return executed 14942 times by 83 tests: engine;return engine;Executed by:
executed 14942 times by 83 tests: return engine;Executed by:
| 14942 | ||||||||||||
| 83 | } | - | ||||||||||||
| 84 | QAbstractFileEngine::QAbstractFileEngine() : d_ptr(new QAbstractFileEnginePrivate) | - | ||||||||||||
| 85 | { | - | ||||||||||||
| 86 | d_ptr->q_ptr = this; | - | ||||||||||||
| 87 | } executed 18 times by 2 tests: end of blockExecuted by:
| 18 | ||||||||||||
| 88 | - | |||||||||||||
| 89 | - | |||||||||||||
| 90 | - | |||||||||||||
| 91 | - | |||||||||||||
| 92 | - | |||||||||||||
| 93 | - | |||||||||||||
| 94 | QAbstractFileEngine::QAbstractFileEngine(QAbstractFileEnginePrivate &dd) : d_ptr(&dd) | - | ||||||||||||
| 95 | { | - | ||||||||||||
| 96 | d_ptr->q_ptr = this; | - | ||||||||||||
| 97 | } executed 98631 times by 217 tests: end of blockExecuted by:
| 98631 | ||||||||||||
| 98 | - | |||||||||||||
| 99 | - | |||||||||||||
| 100 | - | |||||||||||||
| 101 | - | |||||||||||||
| 102 | QAbstractFileEngine::~QAbstractFileEngine() | - | ||||||||||||
| 103 | { | - | ||||||||||||
| 104 | } | - | ||||||||||||
| 105 | bool QAbstractFileEngine::open(QIODevice::OpenMode openMode) | - | ||||||||||||
| 106 | { | - | ||||||||||||
| 107 | (void)openMode;; | - | ||||||||||||
| 108 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 109 | } | - | ||||||||||||
| 110 | - | |||||||||||||
| 111 | - | |||||||||||||
| 112 | - | |||||||||||||
| 113 | - | |||||||||||||
| 114 | - | |||||||||||||
| 115 | - | |||||||||||||
| 116 | bool QAbstractFileEngine::close() | - | ||||||||||||
| 117 | { | - | ||||||||||||
| 118 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 119 | } | - | ||||||||||||
| 120 | bool QAbstractFileEngine::syncToDisk() | - | ||||||||||||
| 121 | { | - | ||||||||||||
| 122 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 123 | } | - | ||||||||||||
| 124 | - | |||||||||||||
| 125 | - | |||||||||||||
| 126 | - | |||||||||||||
| 127 | - | |||||||||||||
| 128 | - | |||||||||||||
| 129 | - | |||||||||||||
| 130 | - | |||||||||||||
| 131 | bool QAbstractFileEngine::flush() | - | ||||||||||||
| 132 | { | - | ||||||||||||
| 133 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 134 | } | - | ||||||||||||
| 135 | - | |||||||||||||
| 136 | - | |||||||||||||
| 137 | - | |||||||||||||
| 138 | - | |||||||||||||
| 139 | qint64 QAbstractFileEngine::size() const | - | ||||||||||||
| 140 | { | - | ||||||||||||
| 141 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 142 | } | - | ||||||||||||
| 143 | - | |||||||||||||
| 144 | - | |||||||||||||
| 145 | - | |||||||||||||
| 146 | - | |||||||||||||
| 147 | - | |||||||||||||
| 148 | - | |||||||||||||
| 149 | qint64 QAbstractFileEngine::pos() const | - | ||||||||||||
| 150 | { | - | ||||||||||||
| 151 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 152 | } | - | ||||||||||||
| 153 | bool QAbstractFileEngine::seek(qint64 pos) | - | ||||||||||||
| 154 | { | - | ||||||||||||
| 155 | (void)pos;; | - | ||||||||||||
| 156 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 157 | } | - | ||||||||||||
| 158 | bool QAbstractFileEngine::isSequential() const | - | ||||||||||||
| 159 | { | - | ||||||||||||
| 160 | return executed 13 times by 1 test: false;return false;Executed by:
executed 13 times by 1 test: return false;Executed by:
| 13 | ||||||||||||
| 161 | } | - | ||||||||||||
| 162 | bool QAbstractFileEngine::remove() | - | ||||||||||||
| 163 | { | - | ||||||||||||
| 164 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 165 | } | - | ||||||||||||
| 166 | - | |||||||||||||
| 167 | - | |||||||||||||
| 168 | - | |||||||||||||
| 169 | - | |||||||||||||
| 170 | - | |||||||||||||
| 171 | bool QAbstractFileEngine::copy(const QString &newName) | - | ||||||||||||
| 172 | { | - | ||||||||||||
| 173 | (void)newName;; | - | ||||||||||||
| 174 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 175 | } | - | ||||||||||||
| 176 | bool QAbstractFileEngine::rename(const QString &newName) | - | ||||||||||||
| 177 | { | - | ||||||||||||
| 178 | (void)newName;; | - | ||||||||||||
| 179 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 180 | } | - | ||||||||||||
| 181 | bool QAbstractFileEngine::renameOverwrite(const QString &newName) | - | ||||||||||||
| 182 | { | - | ||||||||||||
| 183 | (void)newName;; | - | ||||||||||||
| 184 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 185 | } | - | ||||||||||||
| 186 | - | |||||||||||||
| 187 | - | |||||||||||||
| 188 | - | |||||||||||||
| 189 | - | |||||||||||||
| 190 | - | |||||||||||||
| 191 | - | |||||||||||||
| 192 | - | |||||||||||||
| 193 | bool QAbstractFileEngine::link(const QString &newName) | - | ||||||||||||
| 194 | { | - | ||||||||||||
| 195 | (void)newName;; | - | ||||||||||||
| 196 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 197 | } | - | ||||||||||||
| 198 | bool QAbstractFileEngine::mkdir(const QString &dirName, bool createParentDirectories) const | - | ||||||||||||
| 199 | { | - | ||||||||||||
| 200 | (void)dirName;; | - | ||||||||||||
| 201 | (void)createParentDirectories;; | - | ||||||||||||
| 202 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 203 | } | - | ||||||||||||
| 204 | bool QAbstractFileEngine::rmdir(const QString &dirName, bool recurseParentDirectories) const | - | ||||||||||||
| 205 | { | - | ||||||||||||
| 206 | (void)dirName;; | - | ||||||||||||
| 207 | (void)recurseParentDirectories;; | - | ||||||||||||
| 208 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 209 | } | - | ||||||||||||
| 210 | bool QAbstractFileEngine::setSize(qint64 size) | - | ||||||||||||
| 211 | { | - | ||||||||||||
| 212 | (void)size;; | - | ||||||||||||
| 213 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 214 | } | - | ||||||||||||
| 215 | - | |||||||||||||
| 216 | - | |||||||||||||
| 217 | - | |||||||||||||
| 218 | - | |||||||||||||
| 219 | - | |||||||||||||
| 220 | - | |||||||||||||
| 221 | - | |||||||||||||
| 222 | bool QAbstractFileEngine::caseSensitive() const | - | ||||||||||||
| 223 | { | - | ||||||||||||
| 224 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 225 | } | - | ||||||||||||
| 226 | bool QAbstractFileEngine::isRelativePath() const | - | ||||||||||||
| 227 | { | - | ||||||||||||
| 228 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 229 | } | - | ||||||||||||
| 230 | QStringList QAbstractFileEngine::entryList(QDir::Filters filters, const QStringList &filterNames) const | - | ||||||||||||
| 231 | { | - | ||||||||||||
| 232 | QStringList ret; | - | ||||||||||||
| 233 | QDirIterator it(fileName(), filterNames, filters); | - | ||||||||||||
| 234 | while (it.hasNext()
| 0 | ||||||||||||
| 235 | it.next(); | - | ||||||||||||
| 236 | ret << it.fileName(); | - | ||||||||||||
| 237 | } never executed: end of block | 0 | ||||||||||||
| 238 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||
| 239 | } | - | ||||||||||||
| 240 | QAbstractFileEngine::FileFlags QAbstractFileEngine::fileFlags(FileFlags type) const | - | ||||||||||||
| 241 | { | - | ||||||||||||
| 242 | (void)type;; | - | ||||||||||||
| 243 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 244 | } | - | ||||||||||||
| 245 | bool QAbstractFileEngine::setPermissions(uint perms) | - | ||||||||||||
| 246 | { | - | ||||||||||||
| 247 | (void)perms;; | - | ||||||||||||
| 248 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 249 | } | - | ||||||||||||
| 250 | QString QAbstractFileEngine::fileName(FileName file) const | - | ||||||||||||
| 251 | { | - | ||||||||||||
| 252 | (void)file;; | - | ||||||||||||
| 253 | return never executed: QString();return QString();never executed: return QString(); | 0 | ||||||||||||
| 254 | } | - | ||||||||||||
| 255 | uint QAbstractFileEngine::ownerId(FileOwner owner) const | - | ||||||||||||
| 256 | { | - | ||||||||||||
| 257 | (void)owner;; | - | ||||||||||||
| 258 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 259 | } | - | ||||||||||||
| 260 | QString QAbstractFileEngine::owner(FileOwner owner) const | - | ||||||||||||
| 261 | { | - | ||||||||||||
| 262 | (void)owner;; | - | ||||||||||||
| 263 | return never executed: QString();return QString();never executed: return QString(); | 0 | ||||||||||||
| 264 | } | - | ||||||||||||
| 265 | QDateTime QAbstractFileEngine::fileTime(FileTime time) const | - | ||||||||||||
| 266 | { | - | ||||||||||||
| 267 | (void)time;; | - | ||||||||||||
| 268 | return never executed: QDateTime();return QDateTime();never executed: return QDateTime(); | 0 | ||||||||||||
| 269 | } | - | ||||||||||||
| 270 | void QAbstractFileEngine::setFileName(const QString &file) | - | ||||||||||||
| 271 | { | - | ||||||||||||
| 272 | (void)file;; | - | ||||||||||||
| 273 | } never executed: end of block | 0 | ||||||||||||
| 274 | - | |||||||||||||
| 275 | - | |||||||||||||
| 276 | - | |||||||||||||
| 277 | - | |||||||||||||
| 278 | - | |||||||||||||
| 279 | - | |||||||||||||
| 280 | int QAbstractFileEngine::handle() const | - | ||||||||||||
| 281 | { | - | ||||||||||||
| 282 | return executed 1 time by 1 test: -1;return -1;Executed by:
executed 1 time by 1 test: return -1;Executed by:
| 1 | ||||||||||||
| 283 | } | - | ||||||||||||
| 284 | bool QAbstractFileEngine::atEnd() const | - | ||||||||||||
| 285 | { | - | ||||||||||||
| 286 | return never executed: const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension);return const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension);never executed: return const_cast<QAbstractFileEngine *>(this)->extension(AtEndExtension); | 0 | ||||||||||||
| 287 | } | - | ||||||||||||
| 288 | uchar *QAbstractFileEngine::map(qint64 offset, qint64 size, QFile::MemoryMapFlags flags) | - | ||||||||||||
| 289 | { | - | ||||||||||||
| 290 | MapExtensionOption option; | - | ||||||||||||
| 291 | option.offset = offset; | - | ||||||||||||
| 292 | option.size = size; | - | ||||||||||||
| 293 | option.flags = flags; | - | ||||||||||||
| 294 | MapExtensionReturn r; | - | ||||||||||||
| 295 | if (!extension(MapExtension, &option, &r)
| 24-34366 | ||||||||||||
| 296 | return executed 24 times by 1 test: 0;return 0;Executed by:
executed 24 times by 1 test: return 0;Executed by:
| 24 | ||||||||||||
| 297 | return executed 34366 times by 121 tests: r.address;return r.address;Executed by:
executed 34366 times by 121 tests: return r.address;Executed by:
| 34366 | ||||||||||||
| 298 | } | - | ||||||||||||
| 299 | bool QAbstractFileEngine::unmap(uchar *address) | - | ||||||||||||
| 300 | { | - | ||||||||||||
| 301 | UnMapExtensionOption options; | - | ||||||||||||
| 302 | options.address = address; | - | ||||||||||||
| 303 | return executed 32814 times by 2 tests: extension(UnMapExtension, &options);return extension(UnMapExtension, &options);Executed by:
executed 32814 times by 2 tests: return extension(UnMapExtension, &options);Executed by:
| 32814 | ||||||||||||
| 304 | } | - | ||||||||||||
| 305 | class QAbstractFileEngineIteratorPrivate | - | ||||||||||||
| 306 | { | - | ||||||||||||
| 307 | public: | - | ||||||||||||
| 308 | QString path; | - | ||||||||||||
| 309 | QDir::Filters filters; | - | ||||||||||||
| 310 | QStringList nameFilters; | - | ||||||||||||
| 311 | QFileInfo fileInfo; | - | ||||||||||||
| 312 | }; | - | ||||||||||||
| 313 | - | |||||||||||||
| 314 | - | |||||||||||||
| 315 | - | |||||||||||||
| 316 | - | |||||||||||||
| 317 | - | |||||||||||||
| 318 | QAbstractFileEngineIterator::QAbstractFileEngineIterator(QDir::Filters filters, | - | ||||||||||||
| 319 | const QStringList &nameFilters) | - | ||||||||||||
| 320 | : d(new QAbstractFileEngineIteratorPrivate) | - | ||||||||||||
| 321 | { | - | ||||||||||||
| 322 | d->nameFilters = nameFilters; | - | ||||||||||||
| 323 | d->filters = filters; | - | ||||||||||||
| 324 | } executed 176 times by 7 tests: end of blockExecuted by:
| 176 | ||||||||||||
| 325 | - | |||||||||||||
| 326 | - | |||||||||||||
| 327 | - | |||||||||||||
| 328 | - | |||||||||||||
| 329 | - | |||||||||||||
| 330 | - | |||||||||||||
| 331 | QAbstractFileEngineIterator::~QAbstractFileEngineIterator() | - | ||||||||||||
| 332 | { | - | ||||||||||||
| 333 | } | - | ||||||||||||
| 334 | - | |||||||||||||
| 335 | - | |||||||||||||
| 336 | - | |||||||||||||
| 337 | - | |||||||||||||
| 338 | - | |||||||||||||
| 339 | - | |||||||||||||
| 340 | - | |||||||||||||
| 341 | QString QAbstractFileEngineIterator::path() const | - | ||||||||||||
| 342 | { | - | ||||||||||||
| 343 | return executed 1210 times by 7 tests: d->path;return d->path;Executed by:
executed 1210 times by 7 tests: return d->path;Executed by:
| 1210 | ||||||||||||
| 344 | } | - | ||||||||||||
| 345 | - | |||||||||||||
| 346 | - | |||||||||||||
| 347 | - | |||||||||||||
| 348 | - | |||||||||||||
| 349 | - | |||||||||||||
| 350 | - | |||||||||||||
| 351 | - | |||||||||||||
| 352 | void QAbstractFileEngineIterator::setPath(const QString &path) | - | ||||||||||||
| 353 | { | - | ||||||||||||
| 354 | d->path = path; | - | ||||||||||||
| 355 | } executed 176 times by 7 tests: end of blockExecuted by:
| 176 | ||||||||||||
| 356 | - | |||||||||||||
| 357 | - | |||||||||||||
| 358 | - | |||||||||||||
| 359 | - | |||||||||||||
| 360 | - | |||||||||||||
| 361 | - | |||||||||||||
| 362 | QStringList QAbstractFileEngineIterator::nameFilters() const | - | ||||||||||||
| 363 | { | - | ||||||||||||
| 364 | return never executed: d->nameFilters;return d->nameFilters;never executed: return d->nameFilters; | 0 | ||||||||||||
| 365 | } | - | ||||||||||||
| 366 | - | |||||||||||||
| 367 | - | |||||||||||||
| 368 | - | |||||||||||||
| 369 | - | |||||||||||||
| 370 | - | |||||||||||||
| 371 | - | |||||||||||||
| 372 | QDir::Filters QAbstractFileEngineIterator::filters() const | - | ||||||||||||
| 373 | { | - | ||||||||||||
| 374 | return never executed: d->filters;return d->filters;never executed: return d->filters; | 0 | ||||||||||||
| 375 | } | - | ||||||||||||
| 376 | QString QAbstractFileEngineIterator::currentFilePath() const | - | ||||||||||||
| 377 | { | - | ||||||||||||
| 378 | QString name = currentFileName(); | - | ||||||||||||
| 379 | if (!name.isNull()
| 0-1036 | ||||||||||||
| 380 | QString tmp = path(); | - | ||||||||||||
| 381 | if (!tmp.isEmpty()
| 0-1036 | ||||||||||||
| 382 | if (!tmp.endsWith(QLatin1Char('/'))
| 142-894 | ||||||||||||
| 383 | tmp.append(QLatin1Char('/')); executed 894 times by 7 tests: tmp.append(QLatin1Char('/'));Executed by:
| 894 | ||||||||||||
| 384 | name.prepend(tmp); | - | ||||||||||||
| 385 | } executed 1036 times by 7 tests: end of blockExecuted by:
| 1036 | ||||||||||||
| 386 | } executed 1036 times by 7 tests: end of blockExecuted by:
| 1036 | ||||||||||||
| 387 | return executed 1036 times by 7 tests: name;return name;Executed by:
executed 1036 times by 7 tests: return name;Executed by:
| 1036 | ||||||||||||
| 388 | } | - | ||||||||||||
| 389 | QFileInfo QAbstractFileEngineIterator::currentFileInfo() const | - | ||||||||||||
| 390 | { | - | ||||||||||||
| 391 | QString path = currentFilePath(); | - | ||||||||||||
| 392 | if (d->fileInfo.filePath() != path
| 0-518 | ||||||||||||
| 393 | d->fileInfo.setFile(path); executed 518 times by 7 tests: d->fileInfo.setFile(path);Executed by:
| 518 | ||||||||||||
| 394 | - | |||||||||||||
| 395 | - | |||||||||||||
| 396 | return executed 518 times by 7 tests: d->fileInfo;return d->fileInfo;Executed by:
executed 518 times by 7 tests: return d->fileInfo;Executed by:
| 518 | ||||||||||||
| 397 | } | - | ||||||||||||
| 398 | QVariant QAbstractFileEngineIterator::entryInfo(EntryInfoType type) const | - | ||||||||||||
| 399 | { | - | ||||||||||||
| 400 | (void)type; | - | ||||||||||||
| 401 | return never executed: QVariant();return QVariant();never executed: return QVariant(); | 0 | ||||||||||||
| 402 | } | - | ||||||||||||
| 403 | QAbstractFileEngine::Iterator *QAbstractFileEngine::beginEntryList(QDir::Filters filters, const QStringList &filterNames) | - | ||||||||||||
| 404 | { | - | ||||||||||||
| 405 | (void)filters;; | - | ||||||||||||
| 406 | (void)filterNames;; | - | ||||||||||||
| 407 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 408 | } | - | ||||||||||||
| 409 | - | |||||||||||||
| 410 | - | |||||||||||||
| 411 | - | |||||||||||||
| 412 | - | |||||||||||||
| 413 | QAbstractFileEngine::Iterator *QAbstractFileEngine::endEntryList() | - | ||||||||||||
| 414 | { | - | ||||||||||||
| 415 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 416 | } | - | ||||||||||||
| 417 | qint64 QAbstractFileEngine::read(char *data, qint64 maxlen) | - | ||||||||||||
| 418 | { | - | ||||||||||||
| 419 | (void)data;; | - | ||||||||||||
| 420 | (void)maxlen;; | - | ||||||||||||
| 421 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||
| 422 | } | - | ||||||||||||
| 423 | - | |||||||||||||
| 424 | - | |||||||||||||
| 425 | - | |||||||||||||
| 426 | - | |||||||||||||
| 427 | - | |||||||||||||
| 428 | qint64 QAbstractFileEngine::write(const char *data, qint64 len) | - | ||||||||||||
| 429 | { | - | ||||||||||||
| 430 | (void)data;; | - | ||||||||||||
| 431 | (void)len;; | - | ||||||||||||
| 432 | return never executed: -1;return -1;never executed: return -1; | 0 | ||||||||||||
| 433 | } | - | ||||||||||||
| 434 | - | |||||||||||||
| 435 | - | |||||||||||||
| 436 | - | |||||||||||||
| 437 | - | |||||||||||||
| 438 | - | |||||||||||||
| 439 | - | |||||||||||||
| 440 | qint64 QAbstractFileEngine::readLine(char *data, qint64 maxlen) | - | ||||||||||||
| 441 | { | - | ||||||||||||
| 442 | qint64 readSoFar = 0; | - | ||||||||||||
| 443 | while (readSoFar < maxlen
| 0-8 | ||||||||||||
| 444 | char c; | - | ||||||||||||
| 445 | qint64 readResult = read(&c, 1); | - | ||||||||||||
| 446 | if (readResult <= 0
| 0-8 | ||||||||||||
| 447 | return executed 8 times by 1 test: (readSoFar > 0) ? readSoFar : -1;return (readSoFar > 0) ? readSoFar : -1;Executed by:
executed 8 times by 1 test: return (readSoFar > 0) ? readSoFar : -1;Executed by:
| 8 | ||||||||||||
| 448 | ++readSoFar; | - | ||||||||||||
| 449 | *data++ = c; | - | ||||||||||||
| 450 | if (c == '\n'
| 0 | ||||||||||||
| 451 | return never executed: readSoFar;return readSoFar;never executed: return readSoFar; | 0 | ||||||||||||
| 452 | } never executed: end of block | 0 | ||||||||||||
| 453 | return never executed: readSoFar;return readSoFar;never executed: return readSoFar; | 0 | ||||||||||||
| 454 | } | - | ||||||||||||
| 455 | bool QAbstractFileEngine::extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output) | - | ||||||||||||
| 456 | { | - | ||||||||||||
| 457 | (void)extension;; | - | ||||||||||||
| 458 | (void)option;; | - | ||||||||||||
| 459 | (void)output;; | - | ||||||||||||
| 460 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 461 | } | - | ||||||||||||
| 462 | bool QAbstractFileEngine::supportsExtension(Extension extension) const | - | ||||||||||||
| 463 | { | - | ||||||||||||
| 464 | (void)extension;; | - | ||||||||||||
| 465 | return never executed: false;return false;never executed: return false; | 0 | ||||||||||||
| 466 | } | - | ||||||||||||
| 467 | QFile::FileError QAbstractFileEngine::error() const | - | ||||||||||||
| 468 | { | - | ||||||||||||
| 469 | const QAbstractFileEnginePrivate * const d = d_func(); | - | ||||||||||||
| 470 | return executed 3754 times by 53 tests: d->fileError;return d->fileError;Executed by:
executed 3754 times by 53 tests: return d->fileError;Executed by:
| 3754 | ||||||||||||
| 471 | } | - | ||||||||||||
| 472 | QString QAbstractFileEngine::errorString() const | - | ||||||||||||
| 473 | { | - | ||||||||||||
| 474 | const QAbstractFileEnginePrivate * const d = d_func(); | - | ||||||||||||
| 475 | return executed 4349 times by 63 tests: d->errorString;return d->errorString;Executed by:
executed 4349 times by 63 tests: return d->errorString;Executed by:
| 4349 | ||||||||||||
| 476 | } | - | ||||||||||||
| 477 | void QAbstractFileEngine::setError(QFile::FileError error, const QString &errorString) | - | ||||||||||||
| 478 | { | - | ||||||||||||
| 479 | QAbstractFileEnginePrivate * const d = d_func(); | - | ||||||||||||
| 480 | d->fileError = error; | - | ||||||||||||
| 481 | d->errorString = errorString; | - | ||||||||||||
| 482 | } executed 6409 times by 71 tests: end of blockExecuted by:
| 6409 | ||||||||||||
| 483 | - | |||||||||||||
| 484 | - | |||||||||||||
| Switch to Source code | Preprocessed file |