qstorageinfo.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/io/qstorageinfo.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3QStorageInfo::QStorageInfo()-
4 : d(new QStorageInfoPrivate)-
5{-
6}
executed 4 times by 1 test: end of block
Executed by:
  • tst_QStorageInfo
4
7QStorageInfo::QStorageInfo(const QString &path)-
8 : d(new QStorageInfoPrivate)-
9{-
10 setPath(path);-
11}
executed 24 times by 1 test: end of block
Executed by:
  • tst_QStorageInfo
24
12-
13-
14-
15-
16-
17QStorageInfo::QStorageInfo(const QDir &dir)-
18 : d(new QStorageInfoPrivate)-
19{-
20 setPath(dir.absolutePath());-
21}
never executed: end of block
0
22-
23-
24-
25-
26QStorageInfo::QStorageInfo(const QStorageInfo &other)-
27 : d(other.d)-
28{-
29}
executed 21 times by 1 test: end of block
Executed by:
  • tst_QStorageInfo
21
30-
31-
32-
33-
34QStorageInfo::~QStorageInfo()-
35{-
36}-
37-
38-
39-
40-
41QStorageInfo &QStorageInfo::operator=(const QStorageInfo &other)-
42{-
43 d = other.d;-
44 return
never executed: return *this;
*this;
never executed: return *this;
0
45}-
46void QStorageInfo::setPath(const QString &path)-
47{-
48 if (d->rootPath == path
d->rootPath == pathDescription
TRUEnever evaluated
FALSEevaluated 24 times by 1 test
Evaluated by:
  • tst_QStorageInfo
)
0-24
49 return;
never executed: return;
0
50 d.detach();-
51 d->rootPath = path;-
52 d->doStat();-
53}
executed 24 times by 1 test: end of block
Executed by:
  • tst_QStorageInfo
24
54QString QStorageInfo::rootPath() const-
55{-
56 return
executed 8 times by 1 test: return d->rootPath;
Executed by:
  • tst_QStorageInfo
d->rootPath;
executed 8 times by 1 test: return d->rootPath;
Executed by:
  • tst_QStorageInfo
8
57}-
58qint64 QStorageInfo::bytesAvailable() const-
59{-
60 return
executed 3 times by 1 test: return d->bytesAvailable;
Executed by:
  • tst_QStorageInfo
d->bytesAvailable;
executed 3 times by 1 test: return d->bytesAvailable;
Executed by:
  • tst_QStorageInfo
3
61}-
62qint64 QStorageInfo::bytesFree() const-
63{-
64 return
executed 15 times by 1 test: return d->bytesFree;
Executed by:
  • tst_QStorageInfo
d->bytesFree;
executed 15 times by 1 test: return d->bytesFree;
Executed by:
  • tst_QStorageInfo
15
65}-
66qint64 QStorageInfo::bytesTotal() const-
67{-
68 return
executed 24 times by 1 test: return d->bytesTotal;
Executed by:
  • tst_QStorageInfo
d->bytesTotal;
executed 24 times by 1 test: return d->bytesTotal;
Executed by:
  • tst_QStorageInfo
24
69}-
70int QStorageInfo::blockSize() const-
71{-
72 return
executed 5 times by 1 test: return d->blockSize;
Executed by:
  • tst_QStorageInfo
d->blockSize;
executed 5 times by 1 test: return d->blockSize;
Executed by:
  • tst_QStorageInfo
5
73}-
74QByteArray QStorageInfo::fileSystemType() const-
75{-
76 return
executed 15 times by 1 test: return d->fileSystemType;
Executed by:
  • tst_QStorageInfo
d->fileSystemType;
executed 15 times by 1 test: return d->fileSystemType;
Executed by:
  • tst_QStorageInfo
15
77}-
78QByteArray QStorageInfo::device() const-
79{-
80 return
executed 48 times by 1 test: return d->device;
Executed by:
  • tst_QStorageInfo
d->device;
executed 48 times by 1 test: return d->device;
Executed by:
  • tst_QStorageInfo
48
81}-
82QString QStorageInfo::name() const-
83{-
84 return
executed 5 times by 1 test: return d->name;
Executed by:
  • tst_QStorageInfo
d->name;
executed 5 times by 1 test: return d->name;
Executed by:
  • tst_QStorageInfo
5
85}-
86-
87-
88-
89-
90QString QStorageInfo::displayName() const-
91{-
92 if (!d->name.isEmpty()
!d->name.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
93 return
never executed: return d->name;
d->name;
never executed: return d->name;
0
94 return
never executed: return d->rootPath;
d->rootPath;
never executed: return d->rootPath;
0
95}-
96bool QStorageInfo::isReadOnly() const-
97{-
98 return
executed 5 times by 1 test: return d->readOnly;
Executed by:
  • tst_QStorageInfo
d->readOnly;
executed 5 times by 1 test: return d->readOnly;
Executed by:
  • tst_QStorageInfo
5
99}-
100bool QStorageInfo::isReady() const-
101{-
102 return
executed 7 times by 1 test: return d->ready;
Executed by:
  • tst_QStorageInfo
d->ready;
executed 7 times by 1 test: return d->ready;
Executed by:
  • tst_QStorageInfo
7
103}-
104-
105-
106-
107-
108-
109-
110-
111bool QStorageInfo::isValid() const-
112{-
113 return
executed 7 times by 1 test: return d->valid;
Executed by:
  • tst_QStorageInfo
d->valid;
executed 7 times by 1 test: return d->valid;
Executed by:
  • tst_QStorageInfo
7
114}-
115void QStorageInfo::refresh()-
116{-
117 d.detach();-
118 d->doStat();-
119}
executed 1 time by 1 test: end of block
Executed by:
  • tst_QStorageInfo
1
120QList<QStorageInfo> QStorageInfo::mountedVolumes()-
121{-
122 return
executed 2 times by 1 test: return QStorageInfoPrivate::mountedVolumes();
Executed by:
  • tst_QStorageInfo
QStorageInfoPrivate::mountedVolumes();
executed 2 times by 1 test: return QStorageInfoPrivate::mountedVolumes();
Executed by:
  • tst_QStorageInfo
2
123}-
124-
125namespace { namespace Q_QGS_getRoot { typedef QStorageInfo Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qstorageinfo - unknown status
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 1 time by 1 test: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_qstorageinfo - unknown status
}
executed 1 time by 1 test: end of block
Executed by:
  • tst_qstorageinfo - unknown status
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type (QStorageInfoPrivate::root()))) : value (QStorageInfoPrivate::root()) { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 10 times by 1 test: return &holder.value;
Executed by:
  • tst_QStorageInfo
&holder.value;
executed 10 times by 1 test: return &holder.value;
Executed by:
  • tst_QStorageInfo
} } } static QGlobalStatic<QStorageInfo, Q_QGS_getRoot::innerFunction, Q_QGS_getRoot::guard> getRoot;
0-10
126QStorageInfo QStorageInfo::root()-
127{-
128 return
executed 10 times by 1 test: return *getRoot();
Executed by:
  • tst_QStorageInfo
*getRoot();
executed 10 times by 1 test: return *getRoot();
Executed by:
  • tst_QStorageInfo
10
129}-
130-
Switch to Source codePreprocessed file

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