D8630: Created unit test for PlacesItemModel
Milian Wolff
noreply at phabricator.kde.org
Mon Nov 20 11:35:43 GMT 2017
mwolff requested changes to this revision.
mwolff added a comment.
This revision now requires changes to proceed.
lgtm, some minor nits only from my side
INLINE COMMENTS
> placesitemmodeltest.cpp:44
> +//c:\ as root for windows
> +#define KDE_ROOT_PATH "C:\\"
> +#else
why not QDir rootPath with toNativeSeparators?
> placesitemmodeltest.cpp:151
> + m_model = new PlacesItemModel();
> + QTest::qWait(300);
> + QCOMPARE(m_model->count(), 17);
can you instead use a signal spy and wait for some signal? or use QTRY_COMPARE below?
> placesitemmodeltest.cpp:478
> +{
> + PlacesItem *item = m_model->createPlacesItem(QStringLiteral("Temporary Dir"),
> + QUrl::fromLocalFile(QStandardPaths::writableLocation(QStandardPaths::TempLocation)),
extract this into a helper function to simplify the code, it's repeated in most test functions
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D8630
To: renatoo, ervin, elvisangelaccio, mwolff
Cc: mwolff, elvisangelaccio, ngraham, #dolphin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20171120/51eadb7a/attachment.htm>
More information about the kfm-devel
mailing list