qurlinfo.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/kernel/qurlinfo.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2015 The Qt Company Ltd.-
4** Contact: http://www.qt.io/licensing/-
5**-
6** This file is part of the QtNetwork module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL21$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see http://www.qt.io/terms-conditions. For further-
15** information use the contact form at http://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 2.1 or version 3 as published by the Free-
20** Software Foundation and appearing in the file LICENSE.LGPLv21 and-
21** LICENSE.LGPLv3 included in the packaging of this file. Please review the-
22** following information to ensure the GNU Lesser General Public License-
23** requirements will be met: https://www.gnu.org/licenses/lgpl.html and-
24** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.-
25**-
26** As a special exception, The Qt Company gives you certain additional-
27** rights. These rights are described in The Qt Company LGPL Exception-
28** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.-
29**-
30** $QT_END_LICENSE$-
31**-
32****************************************************************************/-
33-
34#include "qurlinfo_p.h"-
35-
36#ifndef QT_NO_FTP-
37-
38#include "qurl.h"-
39#include "qdir.h"-
40#include <limits.h>-
41-
42QT_BEGIN_NAMESPACE-
43-
44class QUrlInfoPrivate-
45{-
46public:-
47 QUrlInfoPrivate() :-
48 permissions(0),-
49 size(0),-
50 isDir(false),-
51 isFile(true),-
52 isSymLink(false),-
53 isWritable(true),-
54 isReadable(true),-
55 isExecutable(false)-
56 {}
executed 730 times by 1 test: end of block
Executed by:
  • tst_QFtp
730
57-
58 QString name;-
59 int permissions;-
60 QString owner;-
61 QString group;-
62 qint64 size;-
63-
64 QDateTime lastModified;-
65 QDateTime lastRead;-
66 bool isDir;-
67 bool isFile;-
68 bool isSymLink;-
69 bool isWritable;-
70 bool isReadable;-
71 bool isExecutable;-
72};-
73-
74-
75/*!-
76 \class QUrlInfo-
77 \brief The QUrlInfo class stores information about URLs.-
78-
79 \internal-
80 \ingroup io-
81 \ingroup network-
82 \inmodule QtNetwork-
83-
84 The information about a URL that can be retrieved includes name(),-
85 permissions(), owner(), group(), size(), lastModified(),-
86 lastRead(), isDir(), isFile(), isSymLink(), isWritable(),-
87 isReadable() and isExecutable().-
88-
89 You can create your own QUrlInfo objects passing in all the-
90 relevant information in the constructor, and you can modify a-
91 QUrlInfo; for each getter mentioned above there is an equivalent-
92 setter. Note that setting values does not affect the underlying-
93 resource that the QUrlInfo provides information about; for example-
94 if you call setWritable(true) on a read-only resource the only-
95 thing changed is the QUrlInfo object, not the resource.-
96-
97 \sa QUrl, {FTP Example}-
98*/-
99-
100/*!-
101 \enum QUrlInfo::PermissionSpec-
102-
103 This enum is used by the permissions() function to report the-
104 permissions of a file.-
105-
106 \value ReadOwner The file is readable by the owner of the file.-
107 \value WriteOwner The file is writable by the owner of the file.-
108 \value ExeOwner The file is executable by the owner of the file.-
109 \value ReadGroup The file is readable by the group.-
110 \value WriteGroup The file is writable by the group.-
111 \value ExeGroup The file is executable by the group.-
112 \value ReadOther The file is readable by anyone.-
113 \value WriteOther The file is writable by anyone.-
114 \value ExeOther The file is executable by anyone.-
115*/-
116-
117/*!-
118 Constructs an invalid QUrlInfo object with default values.-
119-
120 \sa isValid()-
121*/-
122-
123QUrlInfo::QUrlInfo()-
124{-
125 d = 0;-
126}
executed 374 times by 1 test: end of block
Executed by:
  • tst_QFtp
374
127-
128/*!-
129 Copy constructor, copies \a ui to this URL info object.-
130*/-
131-
132QUrlInfo::QUrlInfo(const QUrlInfo &ui)-
133{-
134 if (ui.d) {
ui.dDescription
TRUEevaluated 358 times by 1 test
Evaluated by:
  • tst_QFtp
FALSEnever evaluated
0-358
135 d = new QUrlInfoPrivate;-
136 *d = *ui.d;-
137 } else {
executed 358 times by 1 test: end of block
Executed by:
  • tst_QFtp
358
138 d = 0;-
139 }
never executed: end of block
0
140}-
141-
142/*!-
143 Constructs a QUrlInfo object by specifying all the URL's-
144 information.-
145-
146 The information that is passed is the \a name, file \a-
147 permissions, \a owner and \a group and the file's \a size. Also-
148 passed is the \a lastModified date/time and the \a lastRead-
149 date/time. Flags are also passed, specifically, \a isDir, \a-
150 isFile, \a isSymLink, \a isWritable, \a isReadable and \a-
151 isExecutable.-
152*/-
153-
154QUrlInfo::QUrlInfo(const QString &name, int permissions, const QString &owner,-
155 const QString &group, qint64 size, const QDateTime &lastModified,-
156 const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,-
157 bool isWritable, bool isReadable, bool isExecutable)-
158{-
159 d = new QUrlInfoPrivate;-
160 d->name = name;-
161 d->permissions = permissions;-
162 d->owner = owner;-
163 d->group = group;-
164 d->size = size;-
165 d->lastModified = lastModified;-
166 d->lastRead = lastRead;-
167 d->isDir = isDir;-
168 d->isFile = isFile;-
169 d->isSymLink = isSymLink;-
170 d->isWritable = isWritable;-
171 d->isReadable = isReadable;-
172 d->isExecutable = isExecutable;-
173}
never executed: end of block
0
174-
175-
176/*!-
177 Constructs a QUrlInfo object by specifying all the URL's-
178 information.-
179-
180 The information that is passed is the \a url, file \a-
181 permissions, \a owner and \a group and the file's \a size. Also-
182 passed is the \a lastModified date/time and the \a lastRead-
183 date/time. Flags are also passed, specifically, \a isDir, \a-
184 isFile, \a isSymLink, \a isWritable, \a isReadable and \a-
185 isExecutable.-
186*/-
187-
188QUrlInfo::QUrlInfo(const QUrl &url, int permissions, const QString &owner,-
189 const QString &group, qint64 size, const QDateTime &lastModified,-
190 const QDateTime &lastRead, bool isDir, bool isFile, bool isSymLink,-
191 bool isWritable, bool isReadable, bool isExecutable)-
192{-
193 d = new QUrlInfoPrivate;-
194 d->name = QFileInfo(url.path()).fileName();-
195 d->permissions = permissions;-
196 d->owner = owner;-
197 d->group = group;-
198 d->size = size;-
199 d->lastModified = lastModified;-
200 d->lastRead = lastRead;-
201 d->isDir = isDir;-
202 d->isFile = isFile;-
203 d->isSymLink = isSymLink;-
204 d->isWritable = isWritable;-
205 d->isReadable = isReadable;-
206 d->isExecutable = isExecutable;-
207}
never executed: end of block
0
208-
209-
210/*!-
211 Sets the name of the URL to \a name. The name is the full text,-
212 for example, "http://qt-project.org/doc/qt-5.0/qtcore/qurl.html".-
213-
214 If you call this function for an invalid URL info, this function-
215 turns it into a valid one.-
216-
217 \sa isValid()-
218*/-
219-
220void QUrlInfo::setName(const QString &name)-
221{-
222 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
223 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
224 d->name = name;-
225}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
226-
227-
228/*!-
229 If \a b is true then the URL is set to be a directory; if \a b is-
230 false then the URL is set not to be a directory (which normally-
231 means it is a file). (Note that a URL can refer to both a file and-
232 a directory even though most file systems do not support this.)-
233-
234 If you call this function for an invalid URL info, this function-
235 turns it into a valid one.-
236-
237 \sa isValid()-
238*/-
239-
240void QUrlInfo::setDir(bool b)-
241{-
242 if (!d)
!dDescription
TRUEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
FALSEnever evaluated
0-372
243 d = new QUrlInfoPrivate;
executed 372 times by 1 test: d = new QUrlInfoPrivate;
Executed by:
  • tst_QFtp
372
244 d->isDir = b;-
245}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
246-
247-
248/*!-
249 If \a b is true then the URL is set to be a file; if \b is false-
250 then the URL is set not to be a file (which normally means it is a-
251 directory). (Note that a URL can refer to both a file and a-
252 directory even though most file systems do not support this.)-
253-
254 If you call this function for an invalid URL info, this function-
255 turns it into a valid one.-
256-
257 \sa isValid()-
258*/-
259-
260void QUrlInfo::setFile(bool b)-
261{-
262 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
263 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
264 d->isFile = b;-
265}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
266-
267-
268/*!-
269 Specifies that the URL refers to a symbolic link if \a b is true-
270 and that it does not if \a b is false.-
271-
272 If you call this function for an invalid URL info, this function-
273 turns it into a valid one.-
274-
275 \sa isValid()-
276*/-
277-
278void QUrlInfo::setSymLink(bool b)-
279{-
280 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
281 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
282 d->isSymLink = b;-
283}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
284-
285-
286/*!-
287 Specifies that the URL is writable if \a b is true and not-
288 writable if \a b is false.-
289-
290 If you call this function for an invalid URL info, this function-
291 turns it into a valid one.-
292-
293 \sa isValid()-
294*/-
295-
296void QUrlInfo::setWritable(bool b)-
297{-
298 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
299 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
300 d->isWritable = b;-
301}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
302-
303-
304/*!-
305 Specifies that the URL is readable if \a b is true and not-
306 readable if \a b is false.-
307-
308 If you call this function for an invalid URL info, this function-
309 turns it into a valid one.-
310-
311 \sa isValid()-
312*/-
313-
314void QUrlInfo::setReadable(bool b)-
315{-
316 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
317 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
318 d->isReadable = b;-
319}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
320-
321/*!-
322 Specifies that the owner of the URL is called \a s.-
323-
324 If you call this function for an invalid URL info, this function-
325 turns it into a valid one.-
326-
327 \sa isValid()-
328*/-
329-
330void QUrlInfo::setOwner(const QString &s)-
331{-
332 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
333 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
334 d->owner = s;-
335}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
336-
337/*!-
338 Specifies that the owning group of the URL is called \a s.-
339-
340 If you call this function for an invalid URL info, this function-
341 turns it into a valid one.-
342-
343 \sa isValid()-
344*/-
345-
346void QUrlInfo::setGroup(const QString &s)-
347{-
348 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
349 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
350 d->group = s;-
351}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
352-
353/*!-
354 Specifies the \a size of the URL.-
355-
356 If you call this function for an invalid URL info, this function-
357 turns it into a valid one.-
358-
359 \sa isValid()-
360*/-
361-
362void QUrlInfo::setSize(qint64 size)-
363{-
364 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
365 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
366 d->size = size;-
367}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
368-
369/*!-
370 Specifies that the URL has access permissions \a p.-
371-
372 If you call this function for an invalid URL info, this function-
373 turns it into a valid one.-
374-
375 \sa isValid()-
376*/-
377-
378void QUrlInfo::setPermissions(int p)-
379{-
380 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
381 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
382 d->permissions = p;-
383}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
384-
385/*!-
386 Specifies that the object the URL refers to was last modified at-
387 \a dt.-
388-
389 If you call this function for an invalid URL info, this function-
390 turns it into a valid one.-
391-
392 \sa isValid()-
393*/-
394-
395void QUrlInfo::setLastModified(const QDateTime &dt)-
396{-
397 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
398 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
399 d->lastModified = dt;-
400}
executed 372 times by 1 test: end of block
Executed by:
  • tst_QFtp
372
401-
402/*!-
403 \since 4.4-
404-
405 Specifies that the object the URL refers to was last read at-
406 \a dt.-
407-
408 If you call this function for an invalid URL info, this function-
409 turns it into a valid one.-
410-
411 \sa isValid()-
412*/-
413-
414void QUrlInfo::setLastRead(const QDateTime &dt)-
415{-
416 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
417 d = new QUrlInfoPrivate;
never executed: d = new QUrlInfoPrivate;
0
418 d->lastRead = dt;-
419}
never executed: end of block
0
420-
421/*!-
422 Destroys the URL info object.-
423*/-
424-
425QUrlInfo::~QUrlInfo()-
426{-
427 delete d;-
428}
executed 732 times by 1 test: end of block
Executed by:
  • tst_QFtp
732
429-
430/*!-
431 Assigns the values of \a ui to this QUrlInfo object.-
432*/-
433-
434QUrlInfo &QUrlInfo::operator=(const QUrlInfo &ui)-
435{-
436 if (ui.d) {
ui.dDescription
TRUEnever evaluated
FALSEnever evaluated
0
437 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
438 d= new QUrlInfoPrivate;
never executed: d= new QUrlInfoPrivate;
0
439 *d = *ui.d;-
440 } else {
never executed: end of block
0
441 delete d;-
442 d = 0;-
443 }
never executed: end of block
0
444 return *this;
never executed: return *this;
0
445}-
446-
447/*!-
448 Returns the file name of the URL.-
449-
450 \sa isValid()-
451*/-
452-
453QString QUrlInfo::name() const-
454{-
455 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 340 times by 1 test
Evaluated by:
  • tst_QFtp
0-340
456 return QString();
never executed: return QString();
0
457 return d->name;
executed 340 times by 1 test: return d->name;
Executed by:
  • tst_QFtp
340
458}-
459-
460/*!-
461 Returns the permissions of the URL. You can use the \c PermissionSpec flags-
462 to test for certain permissions.-
463-
464 \sa isValid()-
465*/-
466-
467int QUrlInfo::permissions() const-
468{-
469 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
470 return 0;
never executed: return 0;
0
471 return d->permissions;
never executed: return d->permissions;
0
472}-
473-
474/*!-
475 Returns the owner of the URL.-
476-
477 \sa isValid()-
478*/-
479-
480QString QUrlInfo::owner() const-
481{-
482 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
483 return QString();
never executed: return QString();
0
484 return d->owner;
executed 372 times by 1 test: return d->owner;
Executed by:
  • tst_QFtp
372
485}-
486-
487/*!-
488 Returns the group of the URL.-
489-
490 \sa isValid()-
491*/-
492-
493QString QUrlInfo::group() const-
494{-
495 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
496 return QString();
never executed: return QString();
0
497 return d->group;
never executed: return d->group;
0
498}-
499-
500/*!-
501 Returns the size of the URL.-
502-
503 \sa isValid()-
504*/-
505-
506qint64 QUrlInfo::size() const-
507{-
508 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
509 return 0;
never executed: return 0;
0
510 return d->size;
never executed: return d->size;
0
511}-
512-
513/*!-
514 Returns the last modification date of the URL.-
515-
516 \sa isValid()-
517*/-
518-
519QDateTime QUrlInfo::lastModified() const-
520{-
521 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
522 return QDateTime();
never executed: return QDateTime();
0
523 return d->lastModified;
never executed: return d->lastModified;
0
524}-
525-
526/*!-
527 Returns the date when the URL was last read.-
528-
529 \sa isValid()-
530*/-
531-
532QDateTime QUrlInfo::lastRead() const-
533{-
534 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
535 return QDateTime();
never executed: return QDateTime();
0
536 return d->lastRead;
never executed: return d->lastRead;
0
537}-
538-
539/*!-
540 Returns \c true if the URL is a directory; otherwise returns \c false.-
541-
542 \sa isValid()-
543*/-
544-
545bool QUrlInfo::isDir() const-
546{-
547 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
548 return false;
never executed: return false;
0
549 return d->isDir;
never executed: return d->isDir;
0
550}-
551-
552/*!-
553 Returns \c true if the URL is a file; otherwise returns \c false.-
554-
555 \sa isValid()-
556*/-
557-
558bool QUrlInfo::isFile() const-
559{-
560 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
561 return false;
never executed: return false;
0
562 return d->isFile;
never executed: return d->isFile;
0
563}-
564-
565/*!-
566 Returns \c true if the URL is a symbolic link; otherwise returns \c false.-
567-
568 \sa isValid()-
569*/-
570-
571bool QUrlInfo::isSymLink() const-
572{-
573 if (!d)
!dDescription
TRUEnever evaluated
FALSEevaluated 372 times by 1 test
Evaluated by:
  • tst_QFtp
0-372
574 return false;
never executed: return false;
0
575 return d->isSymLink;
executed 372 times by 1 test: return d->isSymLink;
Executed by:
  • tst_QFtp
372
576}-
577-
578/*!-
579 Returns \c true if the URL is writable; otherwise returns \c false.-
580-
581 \sa isValid()-
582*/-
583-
584bool QUrlInfo::isWritable() const-
585{-
586 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
587 return false;
never executed: return false;
0
588 return d->isWritable;
never executed: return d->isWritable;
0
589}-
590-
591/*!-
592 Returns \c true if the URL is readable; otherwise returns \c false.-
593-
594 \sa isValid()-
595*/-
596-
597bool QUrlInfo::isReadable() const-
598{-
599 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
600 return false;
never executed: return false;
0
601 return d->isReadable;
never executed: return d->isReadable;
0
602}-
603-
604/*!-
605 Returns \c true if the URL is executable; otherwise returns \c false.-
606-
607 \sa isValid()-
608*/-
609-
610bool QUrlInfo::isExecutable() const-
611{-
612 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
613 return false;
never executed: return false;
0
614 return d->isExecutable;
never executed: return d->isExecutable;
0
615}-
616-
617/*!-
618 Returns \c true if \a i1 is greater than \a i2; otherwise returns-
619 false. The objects are compared by the value, which is specified-
620 by \a sortBy. This must be one of QDir::Name, QDir::Time or-
621 QDir::Size.-
622*/-
623-
624bool QUrlInfo::greaterThan(const QUrlInfo &i1, const QUrlInfo &i2,-
625 int sortBy)-
626{-
627 switch (sortBy) {-
628 case QDir::Name:
never executed: case QDir::Name:
0
629 return i1.name() > i2.name();
never executed: return i1.name() > i2.name();
0
630 case QDir::Time:
never executed: case QDir::Time:
0
631 return i1.lastModified() > i2.lastModified();
never executed: return i1.lastModified() > i2.lastModified();
0
632 case QDir::Size:
never executed: case QDir::Size:
0
633 return i1.size() > i2.size();
never executed: return i1.size() > i2.size();
0
634 default:
never executed: default:
0
635 return false;
never executed: return false;
0
636 }-
637}-
638-
639/*!-
640 Returns \c true if \a i1 is less than \a i2; otherwise returns \c false.-
641 The objects are compared by the value, which is specified by \a-
642 sortBy. This must be one of QDir::Name, QDir::Time or QDir::Size.-
643*/-
644-
645bool QUrlInfo::lessThan(const QUrlInfo &i1, const QUrlInfo &i2,-
646 int sortBy)-
647{-
648 return !greaterThan(i1, i2, sortBy);
never executed: return !greaterThan(i1, i2, sortBy);
0
649}-
650-
651/*!-
652 Returns \c true if \a i1 equals to \a i2; otherwise returns \c false.-
653 The objects are compared by the value, which is specified by \a-
654 sortBy. This must be one of QDir::Name, QDir::Time or QDir::Size.-
655*/-
656-
657bool QUrlInfo::equal(const QUrlInfo &i1, const QUrlInfo &i2,-
658 int sortBy)-
659{-
660 switch (sortBy) {-
661 case QDir::Name:
never executed: case QDir::Name:
0
662 return i1.name() == i2.name();
never executed: return i1.name() == i2.name();
0
663 case QDir::Time:
never executed: case QDir::Time:
0
664 return i1.lastModified() == i2.lastModified();
never executed: return i1.lastModified() == i2.lastModified();
0
665 case QDir::Size:
never executed: case QDir::Size:
0
666 return i1.size() == i2.size();
never executed: return i1.size() == i2.size();
0
667 default:
never executed: default:
0
668 return false;
never executed: return false;
0
669 }-
670}-
671-
672/*!-
673 Returns \c true if this QUrlInfo is equal to \a other; otherwise-
674 returns \c false.-
675-
676 \sa lessThan(), equal()-
677*/-
678-
679bool QUrlInfo::operator==(const QUrlInfo &other) const-
680{-
681 if (!d)
!dDescription
TRUEnever evaluated
FALSEnever evaluated
0
682 return other.d == 0;
never executed: return other.d == 0;
0
683 if (!other.d)
!other.dDescription
TRUEnever evaluated
FALSEnever evaluated
0
684 return false;
never executed: return false;
0
685-
686 return (d->name == other.d->name &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->name == other.d->nameDescription
TRUEnever evaluated
FALSEnever evaluated
0
687 d->permissions == other.d->permissions &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->permissions...d->permissionsDescription
TRUEnever evaluated
FALSEnever evaluated
0
688 d->owner == other.d->owner &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->owner == other.d->ownerDescription
TRUEnever evaluated
FALSEnever evaluated
0
689 d->group == other.d->group &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->group == other.d->groupDescription
TRUEnever evaluated
FALSEnever evaluated
0
690 d->size == other.d->size &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->size == other.d->sizeDescription
TRUEnever evaluated
FALSEnever evaluated
0
691 d->lastModified == other.d->lastModified &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->lastModifie...->lastModifiedDescription
TRUEnever evaluated
FALSEnever evaluated
0
692 d->lastRead == other.d->lastRead &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->lastRead ==...er.d->lastReadDescription
TRUEnever evaluated
FALSEnever evaluated
0
693 d->isDir == other.d->isDir &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isDir == other.d->isDirDescription
TRUEnever evaluated
FALSEnever evaluated
0
694 d->isFile == other.d->isFile &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isFile == other.d->isFileDescription
TRUEnever evaluated
FALSEnever evaluated
0
695 d->isSymLink == other.d->isSymLink &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isSymLink =...r.d->isSymLinkDescription
TRUEnever evaluated
FALSEnever evaluated
0
696 d->isWritable == other.d->isWritable &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isWritable ....d->isWritableDescription
TRUEnever evaluated
FALSEnever evaluated
0
697 d->isReadable == other.d->isReadable &&
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isReadable ....d->isReadableDescription
TRUEnever evaluated
FALSEnever evaluated
0
698 d->isExecutable == other.d->isExecutable);
never executed: return (d->name == other.d->name && d->permissions == other.d->permissions && d->owner == other.d->owner && d->group == other.d->group && d->size == other.d->size && d->lastModified == other.d->lastModified && d->lastRead == other.d->lastRead && d->isDir == other.d->isDir && d->isFile == other.d->isFile && d->isSymLink == other.d->isSymLink && d->isWritable == other.d->isWritable && d->isReadable == other.d->isReadable && d->isExecutable == other.d->isExecutable);
d->isExecutabl...->isExecutableDescription
TRUEnever evaluated
FALSEnever evaluated
0
699}-
700-
701/*!-
702 \fn bool QUrlInfo::operator!=(const QUrlInfo &other) const-
703 \since 4.2-
704-
705 Returns \c true if this QUrlInfo is not equal to \a other; otherwise-
706 returns \c false.-
707-
708 \sa lessThan(), equal()-
709*/-
710-
711/*!-
712 Returns \c true if the URL info is valid; otherwise returns \c false.-
713 Valid means that the QUrlInfo contains real information.-
714-
715 You should always check if the URL info is valid before relying on-
716 the values.-
717*/-
718bool QUrlInfo::isValid() const-
719{-
720 return d != 0;
never executed: return d != 0;
0
721}-
722-
723QT_END_NAMESPACE-
724-
725#endif // QT_NO_FTP-
Source codeSwitch to Preprocessed file

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