Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Less debug on startup, use faster QList constructor for effect

parent 4886594c
......@@ -112,11 +112,9 @@ std::shared_ptr<EffectTreeModel> EffectTreeModel::construct(const QString &categ
}
// we create the data list corresponding to this profile
QList<QVariant> data;
bool isFav = KdenliveSettings::favorite_effects().contains(effect.first);
qDebug() << effect.second << effect.first << "in " << targetCategory->dataColumn(0).toString();
data << effect.second << effect.first << QVariant::fromValue(type) << isFav;
//qDebug() << effect.second << effect.first << "in " << targetCategory->dataColumn(0).toString();
QList<QVariant> data {effect.second, effect.first, QVariant::fromValue(type), isFav};
targetCategory->appendChild(data);
}
return self;
......@@ -128,9 +126,8 @@ void EffectTreeModel::reloadEffect(const QString &path)
if (asset.first.isEmpty() || m_customCategory == nullptr) {
return;
}
QList<QVariant> data;
bool isFav = KdenliveSettings::favorite_effects().contains(asset.first);
data << asset.second << asset.first << QVariant::fromValue(EffectType::Custom) << isFav;
QList<QVariant> data {asset.second, asset.first, QVariant::fromValue(EffectType::Custom), isFav};
m_customCategory->appendChild(data);
}
......
......@@ -67,10 +67,9 @@ std::shared_ptr<TransitionTreeModel> TransitionTreeModel::construct(bool flat, Q
}
// we create the data list corresponding to this transition
QList<QVariant> data;
bool isFav = KdenliveSettings::favorite_transitions().contains(transition.first);
qDebug() << transition.second << transition.first << "in " << targetCategory->dataColumn(0).toString();
data << transition.second << transition.first << QVariant::fromValue(type) << isFav;
//qDebug() << transition.second << transition.first << "in " << targetCategory->dataColumn(0).toString();
QList<QVariant> data {transition.second, transition.first, QVariant::fromValue(type), isFav};
targetCategory->appendChild(data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment