D25258: test(search): Add test case for baloo parsing model
Elvis Angelaccio
noreply at phabricator.kde.org
Mon Nov 11 21:54:42 GMT 2019
elvisangelaccio requested changes to this revision.
elvisangelaccio added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> dolphinsearchboxtest.cpp:57
> m_searchBox = new DolphinSearchBox();
> + m_searchBox->show(); //required to initialize the searchbox widgets
> }
Please try to use `QVERIFY(QTest::qWaitForWindowExposed(m_searchBox));` in the actual test instead.
> dolphinsearchboxtest.cpp:132
> + */
> +QUrl _composeQueryUrl(const QString searchString)
> +{
Coding style: we never use a leading underscore in function names.
Missing pass-by-reference for `searchString`.
> dolphinsearchboxtest.cpp:139-140
> + QJsonDocument doc(jsonObject);
> + QByteArray docByteArray = doc.toJson(QJsonDocument::Compact);
> + QString queryString = QLatin1String(docByteArray);
> +
One-liner:
const QString queryString = QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
> dolphinsearchboxtest.cpp:163
> +
> + QUrl testUrl = _composeQueryUrl(searchString);
> + DolphinQueryModel queryModel = DolphinQueryModel::fromBalooSearchUrl(testUrl);
`const`
> dolphinsearchboxtest.cpp:192
> + QCOMPARE(searchTerms.count(), expectedTerms.count());
> + for (int i=0; i < expectedTerms.count(); i++) {
> + QCOMPARE(searchTerms.at(i).trimmed(), expectedTerms.at(i).trimmed());
Coding style: missing space before/after =
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D25258
To: iasensio, elvisangelaccio, bruns, #dolphin
Cc: kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20191111/d2e8f1fa/attachment.htm>
More information about the kfm-devel
mailing list