Changeset View
Changeset View
Standalone View
Standalone View
src/core/udsentry.h
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | 90 | public: | |||
---|---|---|---|---|---|
146 | bool isLink() const; | 146 | bool isLink() const; | ||
147 | 147 | | |||
148 | /** | 148 | /** | ||
149 | * Calling this function before inserting items into an empty UDSEntry may save time and memory. | 149 | * Calling this function before inserting items into an empty UDSEntry may save time and memory. | ||
150 | * @param size number of items for which memory will be pre-allocated | 150 | * @param size number of items for which memory will be pre-allocated | ||
151 | */ | 151 | */ | ||
152 | void reserve(int size); | 152 | void reserve(int size); | ||
153 | 153 | | |||
154 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 48) | ||||
154 | /** | 155 | /** | ||
155 | * insert field with string value | 156 | * insert field with string value | ||
156 | * @param field numeric field id | 157 | * @param field numeric field id | ||
157 | * @param value to set | 158 | * @param value to set | ||
158 | * @deprecated since 5.48 in favor of fastInsert or replace | 159 | * @deprecated since 5.48 in favor of fastInsert or replace | ||
159 | */ | 160 | */ | ||
160 | KIOCORE_DEPRECATED void insert(uint field, const QString &value); | 161 | KIOCORE_DEPRECATED_VERSION(5, 48, "Use UDSEntry::fastInsert(uint, const QString &) or UDSEntry::replace(uint, const QString &)") | ||
162 | void insert(uint field, const QString &value); | ||||
163 | #endif | ||||
161 | 164 | | |||
165 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 48) | ||||
162 | /** | 166 | /** | ||
163 | * insert field with numeric value | 167 | * insert field with numeric value | ||
164 | * @param field numeric field id | 168 | * @param field numeric field id | ||
165 | * @param l value to set | 169 | * @param l value to set | ||
166 | * @deprecated since 5.48 in favor of fastInsert or replace | 170 | * @deprecated since 5.48 in favor of fastInsert or replace | ||
167 | */ | 171 | */ | ||
168 | KIOCORE_DEPRECATED void insert(uint field, long long l); | 172 | KIOCORE_DEPRECATED_VERSION(5, 48, "Use UDSEntry::fastInsert(uint, long long) or UDSEntry::replace(uint, long long)") | ||
173 | void insert(uint field, long long l); | ||||
174 | #endif | ||||
169 | 175 | | |||
170 | /** | 176 | /** | ||
171 | * insert field with string value, it will assert if the field is already inserted. In that case, use replace() instead. | 177 | * insert field with string value, it will assert if the field is already inserted. In that case, use replace() instead. | ||
172 | * @param field numeric field id | 178 | * @param field numeric field id | ||
173 | * @param value to set | 179 | * @param value to set | ||
174 | * @since 5.48 | 180 | * @since 5.48 | ||
175 | */ | 181 | */ | ||
176 | void fastInsert(uint field, const QString &value); | 182 | void fastInsert(uint field, const QString &value); | ||
Show All 13 Lines | |||||
190 | int count() const; | 196 | int count() const; | ||
191 | 197 | | |||
192 | /** | 198 | /** | ||
193 | * check existence of a field | 199 | * check existence of a field | ||
194 | * @param field numeric field id | 200 | * @param field numeric field id | ||
195 | */ | 201 | */ | ||
196 | bool contains(uint field) const; | 202 | bool contains(uint field) const; | ||
197 | 203 | | |||
204 | #if KIOCORE_ENABLE_DEPRECATED_SINCE(5, 8) | ||||
198 | /** | 205 | /** | ||
199 | * List all fields. | 206 | * List all fields. | ||
200 | * @return all fields. | 207 | * @return all fields. | ||
201 | * @deprecated since 5.8. Use fields() instead. | 208 | * @deprecated since 5.8. Use fields() instead. | ||
202 | */ | 209 | */ | ||
203 | #ifndef KIOCORE_NO_DEPRECATED | 210 | KIOCORE_DEPRECATED_VERSION(5, 8, "Use UDSEntry::fields()") | ||
204 | KIOCORE_DEPRECATED QList<uint> listFields() const; | 211 | QList<uint> listFields() const; | ||
205 | #endif | 212 | #endif | ||
206 | 213 | | |||
207 | /** | 214 | /** | ||
208 | * A vector of fields being present for the current entry. | 215 | * A vector of fields being present for the current entry. | ||
209 | * @return all fields for the current entry. | 216 | * @return all fields for the current entry. | ||
210 | * @since 5.8 | 217 | * @since 5.8 | ||
211 | */ | 218 | */ | ||
212 | QVector<uint> fields() const; | 219 | QVector<uint> fields() const; | ||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |