D14042 moves the logic into the KIO slave
Details
- Reviewers
bruns dfaure renatoo franckarrecot ngraham hein - Group Reviewers
Frameworks - Commits
- R241:3523ba575b39: [KFilePlacesModel] Support pretty baloosearch URLs
Adjusted test, passes
All "Search For" default entries in Dolphin still work
Kickoff shows pretty search URLs now
Depends on D14042
Diff Detail
- Repository
- R241 KIO
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Tested with a new and existing user. Entries in Kickoff, Dolphin, Gwenview, and the file dialogs all work perfectly, and the subtitles in Kickoff are pretty. Code looks sane.
This change broke KFilePlacesViewTest, please update that test as well.
$ bin/kfileplacesviewtest
- Start testing of KFilePlacesViewTest *****
Config: Using QtTest library 5.11.1, Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 5.3.1 20160301 [gcc-5-branch revision 233849])
PASS : KFilePlacesViewTest::initTestCase()
PASS : KFilePlacesViewTest::testUrlChanged(Today)
PASS : KFilePlacesViewTest::testUrlChanged(Yesterday)
FAIL! : KFilePlacesViewTest::testUrlChanged(Documents) Compared values are not the same
Actual (args.at(0).toUrl().toString()): "baloosearch:/documents" Expected (expectedUrl) : "baloosearch:?json=%7B%22dayFilter%22: 0, %22monthFilter%22: 0, %22yearFilter%22: 0, %22type%22: [ %22Document%22]%7D" Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesviewtest.cpp(114)]
FAIL! : KFilePlacesViewTest::testUrlChanged(Images) Compared values are not the same
Actual (args.at(0).toUrl().toString()): "baloosearch:/images" Expected (expectedUrl) : "baloosearch:?json=%7B%22dayFilter%22: 0, %22monthFilter%22: 0, %22yearFilter%22: 0, %22type%22: [ %22Image%22]%7D" Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesviewtest.cpp(114)]
FAIL! : KFilePlacesViewTest::testUrlChanged(Audio Files) Compared values are not the same
Actual (args.at(0).toUrl().toString()): "baloosearch:/audio" Expected (expectedUrl) : "baloosearch:?json=%7B%22dayFilter%22: 0, %22monthFilter%22: 0, %22yearFilter%22: 0, %22type%22: [ %22Audio%22]%7D" Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesviewtest.cpp(114)]
FAIL! : KFilePlacesViewTest::testUrlChanged(Videos) Compared values are not the same
Actual (args.at(0).toUrl().toString()): "baloosearch:/videos" Expected (expectedUrl) : "baloosearch:?json=%7B%22dayFilter%22: 0, %22monthFilter%22: 0, %22yearFilter%22: 0, %22type%22: [ %22Video%22]%7D" Loc: [/d/kde/src/5/frameworks/kio/autotests/kfileplacesviewtest.cpp(114)]
PASS : KFilePlacesViewTest::cleanupTestCase()
Totals: 4 passed, 4 failed, 0 skipped, 0 blacklisted, 891ms
- Finished testing of KFilePlacesViewTest *****
src/filewidgets/kfileplacesmodel.cpp | ||
---|---|---|
137–148 | const auto validSearchPaths = { ... }; Would use an initializer list. This would be likely faster, since it would avoid the QStringList. |