diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2019-04-02 16:06:40 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2019-05-07 14:14:00 +0000 |
commit | 0e73a6dea0651e4b7df8169d85d3b5b45d11a0b5 (patch) | |
tree | e7314dc08aaa23f8ceead4da9ab7622c406fe8c7 /tests | |
parent | 569268fd6c0fce70348695c9fe8949b17bb69924 (diff) | |
download | qtivi-0e73a6dea0651e4b7df8169d85d3b5b45d11a0b5.tar.gz |
Make the QIviQueryTerm and QIviOrderTerm classes serializable
This is needed to make a full featured generic async backend
for the QIviSearchAndBrowseModel.
Change-Id: Ifcbd6d86d45348f92427c78ce8ce48a918beeb6a
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/core/queryparser/tst_queryparser.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/core/queryparser/tst_queryparser.cpp b/tests/auto/core/queryparser/tst_queryparser.cpp index bcaade2..fb7f21e 100644 --- a/tests/auto/core/queryparser/tst_queryparser.cpp +++ b/tests/auto/core/queryparser/tst_queryparser.cpp @@ -155,6 +155,17 @@ void TestQueryParser::validQueries() CHECK_ERRORSTRING(term->toString(), representationQuery); + //Test the searialize functions + QByteArray buffer; + QDataStream in(&buffer, QIODevice::WriteOnly); + in << term; + + QDataStream out(buffer); + QIviAbstractQueryTerm *newTerm = nullptr; + out >> &newTerm; + + QCOMPARE(term->toString(), newTerm->toString()); + delete newTerm; delete term; } |