Changeset View
Changeset View
Standalone View
Standalone View
src/customproperties.cpp
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Line(s) | |||||
191 | void CustomProperties::setCustomProperties(const QMap<QByteArray, QString> &properties) | 191 | void CustomProperties::setCustomProperties(const QMap<QByteArray, QString> &properties) | ||
192 | { | 192 | { | ||
193 | bool changed = false; | 193 | bool changed = false; | ||
194 | for (QMap<QByteArray, QString>::ConstIterator it = properties.begin(); | 194 | for (QMap<QByteArray, QString>::ConstIterator it = properties.begin(); | ||
195 | it != properties.end(); ++it) { | 195 | it != properties.end(); ++it) { | ||
196 | // Validate the property name and convert any null string to empty string | 196 | // Validate the property name and convert any null string to empty string | ||
197 | if (checkName(it.key())) { | 197 | if (checkName(it.key())) { | ||
198 | if (d->isVolatileProperty(QLatin1String(it.key()))) { | 198 | if (d->isVolatileProperty(QLatin1String(it.key()))) { | ||
199 | d->mVolatileProperties[it.key()] = it.value().isNull() ? QStringLiteral("") : it.value(); | 199 | d->mVolatileProperties[it.key()] = it.value().isNull() ? QLatin1String("") : it.value(); | ||
200 | } else { | 200 | } else { | ||
201 | d->mProperties[it.key()] = it.value().isNull() ? QStringLiteral("") : it.value(); | 201 | d->mProperties[it.key()] = it.value().isNull() ? QLatin1String("") : it.value(); | ||
202 | } | 202 | } | ||
203 | if (!changed) { | 203 | if (!changed) { | ||
204 | customPropertyUpdate(); | 204 | customPropertyUpdate(); | ||
205 | } | 205 | } | ||
206 | changed = true; | 206 | changed = true; | ||
207 | } | 207 | } | ||
208 | } | 208 | } | ||
209 | if (changed) { | 209 | if (changed) { | ||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |