D21249: Test current filter before setting a new one
Jan-Marek Glogowski
noreply at phabricator.kde.org
Sun May 19 20:07:18 BST 2019
jglogowski updated this revision to Diff 58316.
jglogowski added a comment.
- Return a QString from findMatchingFilter and handle setCurrentFilter in main function
- Add filter unit test
For a manual test I added a "Raw (*)" filter to the bug test program.
After playing with it, I decided to not test the currentFilter() against QLatin1String("*"), so if a user selects such an entry, it'll disable auto-filter and -extension selection.
Since we never auto-select the "*" filter, this honors the users filter selection.
Took me a while to write the unit test without QDialog. I was a bit tricked by Q_ASSERT used in other tests ;-)
REPOSITORY
R241 KIO
CHANGES SINCE LAST UPDATE
https://phabricator.kde.org/D21249?vs=58291&id=58316
REVISION DETAIL
https://phabricator.kde.org/D21249
AFFECTED FILES
src/filewidgets/kfilewidget.cpp
tests/CMakeLists.txt
tests/kfilewidgettest_filter.cpp
To: jglogowski, #frameworks, ngraham, dfaure
Cc: elvisangelaccio, ngraham, michaelweghorn, kde-frameworks-devel, michaelh, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20190519/a646c777/attachment.html>
More information about the Kde-frameworks-devel
mailing list