13Q_LOGGING_CATEGORY(lcStorageInfo,
"qt.core.qstorageinfo", QtWarningMsg)
15QT_IMPL_METATYPE_EXTERN(QStorageInfo)
16QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QStorageInfoPrivate)
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
46QStorageInfo::QStorageInfo(QStorageInfoPrivate &dd)
52
53
54
55
56
57
58
59QStorageInfo::QStorageInfo()
60 : d(
new QStorageInfoPrivate)
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79QStorageInfo::QStorageInfo(
const QString &path)
86
87
88
89QStorageInfo::QStorageInfo(
const QDir &dir)
90 : QStorageInfo(dir.absolutePath())
95
96
97QStorageInfo::QStorageInfo(
const QStorageInfo &other)
101
102
103
104
105
106
107
108
109
112
113
114QStorageInfo::~QStorageInfo()
118
119
120QStorageInfo &QStorageInfo::operator=(
const QStorageInfo &other)
124
125
126
127
128
129
132
133
134
137
138
139
140
141
142
143
144void QStorageInfo::setPath(
const QString &path)
146 if (d->rootPath == path)
154
155
156
157
158
159
160
161
162
163
164
165
166
167QString QStorageInfo::rootPath()
const
173
174
175
176
177
178
179
180
181
182
183qint64 QStorageInfo::bytesAvailable()
const
185 return d->bytesAvailable;
189
190
191
192
193
194
195
196
197qint64 QStorageInfo::bytesFree()
const
203
204
205
206
207
208
209qint64 QStorageInfo::bytesTotal()
const
211 return d->bytesTotal;
215
216
217
218
219
220
221int QStorageInfo::blockSize()
const
227
228
229
230
231
232
233
234
235QByteArray QStorageInfo::fileSystemType()
const
237 return d->fileSystemType;
241
242
243
244
245
246
247
248
249QByteArray QStorageInfo::device()
const
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270QByteArray QStorageInfo::subvolume()
const
276
277
278
279
280
281
282
283
284
285
286
287QString QStorageInfo::name()
const
293
294
295QString QStorageInfo::displayName()
const
297 if (!d->name.isEmpty())
303
304
305
306
307
308
309
310
311
312
315
316
317
318bool QStorageInfo::isReadOnly()
const
324
325
326
327
328
329
330
331
332bool QStorageInfo::isReady()
const
338
339
340
341
342
343bool QStorageInfo::isValid()
const
349
350
351
352
353
354
355
356void QStorageInfo::refresh()
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378QList<QStorageInfo> QStorageInfo::mountedVolumes()
380 return QStorageInfoPrivate::mountedVolumes();
386
387
388
389
390
391
392
393QStorageInfo QStorageInfo::root()
399
400
401
402
403
404
405
406
409
410
411
412
413
415bool comparesEqual(
const QStorageInfo &lhs,
const QStorageInfo &rhs)
noexcept
419 return lhs.d->device == rhs.d->device && lhs.d->rootPath == rhs.d->rootPath;
422#ifndef QT_NO_DEBUG_STREAM
423QDebug operator<<(QDebug debug,
const QStorageInfo &s)
425 QDebugStateSaver saver(debug);
428 debug <<
"QStorageInfo(";
430 const QStorageInfoPrivate *d = s.d.constData();
431 debug <<
'"' << d->rootPath <<
'"';
432 if (!d->fileSystemType.isEmpty())
433 debug <<
", type=" << d->fileSystemType;
434 if (!d->name.isEmpty())
435 debug <<
", name=\"" << d->name <<
'"';
436 if (!d->device.isEmpty())
437 debug <<
", device=\"" << d->device <<
'"';
438 if (!d->subvolume.isEmpty())
439 debug <<
", subvolume=\"" << d->subvolume <<
'"';
441 debug <<
" [read only]";
442 debug << (d->ready ?
" [ready]" :
" [not ready]");
443 if (d->bytesTotal > 0) {
444 debug <<
", bytesTotal=" << d->bytesTotal <<
", bytesFree=" << d->bytesFree
445 <<
", bytesAvailable=" << d->bytesAvailable;
Q_GLOBAL_STATIC(DefaultRoleNames, qDefaultRoleNames, { { Qt::DisplayRole, "display" }, { Qt::DecorationRole, "decoration" }, { Qt::EditRole, "edit" }, { Qt::ToolTipRole, "toolTip" }, { Qt::StatusTipRole, "statusTip" }, { Qt::WhatsThisRole, "whatsThis" }, }) const QHash< int
bool comparesEqual(const QFileInfo &lhs, const QFileInfo &rhs)