mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-05 18:22:46 +00:00
Add BlurHash placeholders at several places
* [ui] Added: Blurry previews of images before they are loaded Also fixes a bug where ApiModel would remove items that already started with a lowecase letter or didn't start with a letter at all.
This commit is contained in:
parent
bb2f6f3a3e
commit
79d378c9ed
13 changed files with 120 additions and 25 deletions
|
@ -183,6 +183,7 @@ QVariant ApiModel::data(const QModelIndex &index, int role) const {
|
|||
QJsonObject obj = m_array.at(index.row()).toObject();
|
||||
|
||||
const QString &key = m_roles[role];
|
||||
|
||||
if (obj.contains(key)) {
|
||||
return obj[key].toVariant();
|
||||
}
|
||||
|
|
|
@ -30,7 +30,12 @@ void convertToCamelCase(QJsonValueRef val) {
|
|||
QJsonValueRef ref = obj[key];
|
||||
convertToCamelCase(ref);
|
||||
obj[convertToCamelCaseHelper(key)] = ref;
|
||||
obj.remove(key);
|
||||
if (key[0].isLower() || !key[0].isLetter()) {
|
||||
obj[key] = ref;
|
||||
} else {
|
||||
obj[convertToCamelCaseHelper(key)] = ref;
|
||||
obj.remove(key);
|
||||
}
|
||||
}
|
||||
val = obj;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue