diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2018-03-21 16:54:18 +0100 |
---|---|---|
committer | Antti Hölttä <ahoelttae@luxoft.com> | 2018-03-28 09:03:41 +0000 |
commit | 56265350a0a102ce86e80a70c5593445333ca94e (patch) | |
tree | f4accdb22dcd2b4cf1a89d14fc8f2ce59466f7f7 /src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp | |
parent | 6df85b230cec05c5cb9647c8987e5bfd737215e9 (diff) | |
download | qtivi-56265350a0a102ce86e80a70c5593445333ca94e.tar.gz |
Update the QIviSearchAndBrowseModel to use the new QIviPendingReply
Because of this, the indexOf function is now easier to implement and works
from QML and C++.
Task-number: QTAUTO-838
Change-Id: I094511abf8f55fd9728aa94e552dcc79f9bf0b58
Reviewed-by: Antti Hölttä <ahoelttae@luxoft.com>
Diffstat (limited to 'src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp')
-rw-r--r-- | src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp b/src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp index 96c8804..27aff61 100644 --- a/src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp +++ b/src/plugins/ivimedia/media_simulator/usbbrowsebackend.cpp @@ -125,34 +125,40 @@ QString UsbBrowseBackend::goForward(const QUuid &identifier, const QString &type return itemId; } -void UsbBrowseBackend::insert(const QUuid &identifier, const QString &type, int index, const QIviSearchAndBrowseModelItem *item) +QIviPendingReply<void> UsbBrowseBackend::insert(const QUuid &identifier, const QString &type, int index, const QIviSearchAndBrowseModelItem *item) { Q_UNUSED(identifier) Q_UNUSED(type) Q_UNUSED(index) Q_UNUSED(item) + + return QIviPendingReply<void>::createFailedReply(); } -void UsbBrowseBackend::remove(const QUuid &identifier, const QString &type, int index) +QIviPendingReply<void> UsbBrowseBackend::remove(const QUuid &identifier, const QString &type, int index) { Q_UNUSED(identifier) Q_UNUSED(type) Q_UNUSED(index) + + return QIviPendingReply<void>::createFailedReply(); } -void UsbBrowseBackend::move(const QUuid &identifier, const QString &type, int currentIndex, int newIndex) +QIviPendingReply<void> UsbBrowseBackend::move(const QUuid &identifier, const QString &type, int currentIndex, int newIndex) { Q_UNUSED(identifier) Q_UNUSED(type) Q_UNUSED(currentIndex) Q_UNUSED(newIndex) + + return QIviPendingReply<void>::createFailedReply(); } -int UsbBrowseBackend::indexOf(const QUuid &identifier, const QString &type, const QIviSearchAndBrowseModelItem *item) +QIviPendingReply<int> UsbBrowseBackend::indexOf(const QUuid &identifier, const QString &type, const QIviSearchAndBrowseModelItem *item) { Q_UNUSED(identifier) Q_UNUSED(type) Q_UNUSED(item) - return -1; + return QIviPendingReply<int>::createFailedReply(); } |