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 54 Lines • ▼ Show 20 Line(s) | 90 | public: | |||
109 | UDSEntry& operator=(const UDSEntry&); | 121 | UDSEntry& operator=(const UDSEntry&); | ||
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 | | |||
129 | | ||||
117 | /** | 130 | /** | ||
ngraham: as other -> as the other | |||||
118 | * @return value of a textual field | 131 | * @return value of a textual field | ||
ngraham: Just `5.62` (Frameworks don't have minor versions) | |||||
119 | */ | 132 | */ | ||
120 | QString stringValue(uint field) const; | 133 | QString stringValue(uint field) const; | ||
121 | 134 | | |||
122 | /** | 135 | /** | ||
123 | * @return value of a numeric field | 136 | * @return value of a numeric field | ||
124 | */ | 137 | */ | ||
125 | long long numberValue(uint field, long long defaultValue = 0) const; | 138 | long long numberValue(uint field, long long defaultValue = 0) const; | ||
126 | 139 | | |||
ngraham: ditto | |||||
127 | // Convenience methods. | 140 | // Convenience methods. | ||
ngraham: ditto | |||||
128 | // Let's not add one method per field, only methods that have some more logic | 141 | // Let's not add one method per field, only methods that have some more logic | ||
129 | // than just calling stringValue(field) or numberValue(field). | 142 | // than just calling stringValue(field) or numberValue(field). | ||
130 | 143 | | |||
131 | /// @return true if this entry is a directory (or a link to a directory) | 144 | /// @return true if this entry is a directory (or a link to a directory) | ||
132 | bool isDir() const; | 145 | bool isDir() const; | ||
133 | /// @return true if this entry is a link | 146 | /// @return true if this entry is a link | ||
134 | bool isLink() const; | 147 | bool isLink() const; | ||
135 | 148 | | |||
▲ Show 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | 223 | enum StandardFieldTypes { | |||
326 | /// NB: you cannot repeat this entry; use UDS_EXTRA + i | 339 | /// NB: you cannot repeat this entry; use UDS_EXTRA + i | ||
327 | /// until UDS_EXTRA_END. | 340 | /// until UDS_EXTRA_END. | ||
328 | UDS_EXTRA = 100 | UDS_STRING, | 341 | UDS_EXTRA = 100 | UDS_STRING, | ||
329 | /// Extra data (used only if you specified Columns/ColumnsTypes) | 342 | /// Extra data (used only if you specified Columns/ColumnsTypes) | ||
330 | /// NB: you cannot repeat this entry; use UDS_EXTRA + i | 343 | /// NB: you cannot repeat this entry; use UDS_EXTRA + i | ||
331 | /// until UDS_EXTRA_END. | 344 | /// until UDS_EXTRA_END. | ||
332 | UDS_EXTRA_END = 140 | UDS_STRING | 345 | UDS_EXTRA_END = 140 | UDS_STRING | ||
333 | }; | 346 | }; | ||
334 | | ||||
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