Revert "qt: workaround for type conversion to QVector<MLItemId> doesn't occur with Qt 5.12"

This reverts commit 23e220abf8.
This commit is contained in:
Fatih Uzunoglu 2024-04-05 15:24:12 +03:00 committed by Steve Lhomme
parent 839924f737
commit f17fe8e429
2 changed files with 0 additions and 21 deletions

View File

@ -269,24 +269,6 @@ void MediaLib::reload()
});
}
void MediaLib::mlInputItem(const QVariantList &variantList, QJSValue callback)
{
if (!callback.isCallable()) // invalid argument
{
msg_Warn(m_intf, "callback is not callbable");
return;
}
QVector<MLItemId> mlIdList;
for (const auto& variant : variantList)
{
assert(variant.canConvert<MLItemId>());
mlIdList.push_back(variant.value<MLItemId>());
}
mlInputItem(mlIdList, callback);
}
void MediaLib::mlInputItem(const QVector<MLItemId>& itemIdVector, QJSValue callback)
{
if (!callback.isCallable()) // invalid argument

View File

@ -74,9 +74,6 @@ public:
Q_INVOKABLE void reload();
Q_INVOKABLE void mlInputItem(const QVector<MLItemId>& itemIdVector, QJSValue callback);
// TODO: This is added back due to type conversion does not occur with Qt 5.12.
// Remove when possible:
Q_INVOKABLE void mlInputItem(const QVariantList& variantList, QJSValue callback);
inline bool idle() const { return m_idle; }
inline int discoveryPending() const { return m_discoveryPending; }