Changeset View
Changeset View
Standalone View
Standalone View
src/core/udsentry.h
Show All 38 Lines | |||||
39 | KIOCORE_EXPORT QDataStream &operator>> (QDataStream &s, KIO::UDSEntry &a); | 39 | KIOCORE_EXPORT QDataStream &operator>> (QDataStream &s, KIO::UDSEntry &a); | ||
40 | 40 | | |||
41 | /** | 41 | /** | ||
42 | * Support for qDebug() << aUDSEntry | 42 | * Support for qDebug() << aUDSEntry | ||
43 | * \since 5.22 | 43 | * \since 5.22 | ||
44 | */ | 44 | */ | ||
45 | KIOCORE_EXPORT QDebug operator<<(QDebug stream, const KIO::UDSEntry &entry); | 45 | KIOCORE_EXPORT QDebug operator<<(QDebug stream, const KIO::UDSEntry &entry); | ||
46 | 46 | | |||
47 | /** | ||||
48 | * Returns true if the entry contains the same data as the other | ||||
49 | * @since 5.62.0 | ||||
50 | */ | ||||
51 | KIOCORE_EXPORT bool operator== (const KIO::UDSEntry &entry, const KIO::UDSEntry &other); | ||||
52 | | ||||
53 | /** | ||||
54 | * Returns true if the entry does not contain the same data as the other | ||||
55 | * @since 5.62.0 | ||||
56 | */ | ||||
57 | KIOCORE_EXPORT bool operator!= (const KIO::UDSEntry &entry, const KIO::UDSEntry &other); | ||||
58 | | ||||
47 | namespace KIO | 59 | namespace KIO | ||
48 | { | 60 | { | ||
49 | class UDSEntryPrivate; | 61 | class UDSEntryPrivate; | ||
50 | /** | 62 | /** | ||
51 | * @class KIO::UDSEntry udsentry.h <KIO/UDSEntry> | 63 | * @class KIO::UDSEntry udsentry.h <KIO/UDSEntry> | ||
52 | * | 64 | * | ||
53 | * Universal Directory Service | 65 | * Universal Directory Service | ||
54 | * | 66 | * | ||
▲ Show 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 90 | public: | |||
110 | 122 | | |||
111 | /** | 123 | /** | ||
112 | * Move assignment | 124 | * Move assignment | ||
113 | * @since 5.44 | 125 | * @since 5.44 | ||
114 | */ | 126 | */ | ||
115 | UDSEntry& operator=(UDSEntry&&); | 127 | UDSEntry& operator=(UDSEntry&&); | ||
116 | 128 | | |||
117 | /** | 129 | /** | ||
118 | * @return value of a textual field | 130 | * @return value of a textual field | ||
ngraham: as other -> as the other | |||||
119 | */ | 131 | */ | ||
ngraham: Just `5.62` (Frameworks don't have minor versions) | |||||
120 | QString stringValue(uint field) const; | 132 | QString stringValue(uint field) const; | ||
121 | 133 | | |||
122 | /** | 134 | /** | ||
123 | * @return value of a numeric field | 135 | * @return value of a numeric field | ||
124 | */ | 136 | */ | ||
125 | long long numberValue(uint field, long long defaultValue = 0) const; | 137 | long long numberValue(uint field, long long defaultValue = 0) const; | ||
126 | 138 | | |||
127 | // Convenience methods. | 139 | // Convenience methods. | ||
ngraham: ditto | |||||
128 | // Let's not add one method per field, only methods that have some more logic | 140 | // Let's not add one method per field, only methods that have some more logic | ||
ngraham: ditto | |||||
129 | // than just calling stringValue(field) or numberValue(field). | 141 | // than just calling stringValue(field) or numberValue(field). | ||
130 | 142 | | |||
131 | /// @return true if this entry is a directory (or a link to a directory) | 143 | /// @return true if this entry is a directory (or a link to a directory) | ||
132 | bool isDir() const; | 144 | bool isDir() const; | ||
133 | /// @return true if this entry is a link | 145 | /// @return true if this entry is a link | ||
134 | bool isLink() const; | 146 | bool isLink() const; | ||
135 | 147 | | |||
136 | /** | 148 | /** | ||
▲ Show 20 Lines • Show All 195 Lines • ▼ Show 20 Line(s) | 222 | enum StandardFieldTypes { | |||
332 | UDS_EXTRA_END = 140 | UDS_STRING | 344 | UDS_EXTRA_END = 140 | UDS_STRING | ||
333 | }; | 345 | }; | ||
334 | 346 | | |||
335 | private: | 347 | private: | ||
336 | QSharedDataPointer<UDSEntryPrivate> d; | 348 | QSharedDataPointer<UDSEntryPrivate> d; | ||
337 | friend KIOCORE_EXPORT QDataStream& ::operator<< (QDataStream &s, const KIO::UDSEntry &a); | 349 | friend KIOCORE_EXPORT QDataStream& ::operator<< (QDataStream &s, const KIO::UDSEntry &a); | ||
338 | friend KIOCORE_EXPORT QDataStream& ::operator>> (QDataStream &s, KIO::UDSEntry &a); | 350 | friend KIOCORE_EXPORT QDataStream& ::operator>> (QDataStream &s, KIO::UDSEntry &a); | ||
339 | friend KIOCORE_EXPORT QDebug (::operator<<) (QDebug stream, const KIO::UDSEntry &entry); | 351 | friend KIOCORE_EXPORT QDebug (::operator<<) (QDebug stream, const KIO::UDSEntry &entry); | ||
352 | friend KIOCORE_EXPORT bool ::operator==(const KIO::UDSEntry &entry, const KIO::UDSEntry &other); | ||||
353 | friend KIOCORE_EXPORT bool ::operator!=(const KIO::UDSEntry &entry, const KIO::UDSEntry &other); | ||||
354 | | ||||
340 | public: | 355 | public: | ||
341 | /** | 356 | /** | ||
342 | * Replace or insert field with string value | 357 | * Replace or insert field with string value | ||
343 | * @param field numeric field id | 358 | * @param field numeric field id | ||
344 | * @param value to set | 359 | * @param value to set | ||
345 | * @since 5.47 | 360 | * @since 5.47 | ||
346 | */ | 361 | */ | ||
347 | void replace(uint field, const QString &value); | 362 | void replace(uint field, const QString &value); | ||
Show All 39 Lines |
as other -> as the other