Summary: | Cannot open folder from search results | ||
---|---|---|---|
Product: | nepomuk | Reporter: | Simeon Bird <bladud> |
Component: | kioslave - nepomuksearch | Assignee: | Sebastian Trueg <sebastian> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | giorgosk67, me, peter.penz19, sebastian |
Priority: | NOR | Keywords: | reproducible |
Version: | 4.8 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kde-runtime/62fca35780b9a17123b656ceaf5faf652b91b0ca | Version Fixed In: | |
Attachments: |
Patch to fix subfolder listings
Better patch to fix listings |
Description
Simeon Bird
2012-02-02 02:03:52 UTC
@Sebastian: I'm not sure whether I introduced a regression or whether there was a change of behavior in the Nepomuk-Search-KIO-slave... Like in 4.7 I just get KFileItem::targetUrl() and change the location. Do you have a quick hint what I could check? Thanks! Just to be clear; the bug is also present in 4.7.4. So this is not a regression from 4.7. (Sorry if you knew that; I wasn't sure from reading your comment) Thanks for the update, I thought this is a regression introduced in 4.8. I've changed the component to Nepomuk in the hope that Sebastian will read this comment then ;-) Created attachment 71174 [details]
Patch to fix subfolder listings
This is a simple patch to make files in subfolders of a dolphin nepomuk search query openable.
Ok. I looked into this a little. The problem is that the nepomuk kioslave gives files a targetUrl understandable by non-KDE applications (ie, their real path on the filesystem). However, it does not give this to directories, and it only does the fancy stuff on the query folder, not any subfolders. The subfolders are opened with the kioslave base listdir class. The easy way to fix this is to give the kioslave a "real" url, which is what the attached patch does. It should apply to kde-runtime-4.8.3/nepomuk/kioslaves/search/kio_nepomuksearch.cpp However, this has problems (which may in fact be different bugs): 1. Open in new tab / open in new window behaviour is completely unchanged (is that doing something other than targetUrl? Maybe a different bug?) 2. The back button doesn't quite behave. Formerly, if you clicked on a folder in search results, and then clicked back, it would take you back to your search results (ie, nepomuksearch://query). Now it takes you back to whichever folder you were in before you started the query. Any thoughts on how to fix this, or comments on my patch? This was just what I could figure out from a half hour of reading the sources, and I have no experience with KIO, so it might be wildly wrong. Thanks for your support and the patch! The Nepomuk-guys are currently very busy with integrating Nepomuk2 and I'm not sure whether they'll respond to this update during the next days. My suggestion would be that if there is no feedback during the next ~5 days to provide a merge-request at https://git.reviewboard.kde.org/dashboard/ The patch looks ok to me but I'm not the maintainer of the code... Regarding the other 2 issues: I did not check the Dolphin code yet, but those might be Dolphin-specific issues that should not be too tricky to fix. If the your patch got merged, please ping me by replying on this bug-report and I'll take care to fix those 2 remaining issues. Created attachment 71487 [details]
Better patch to fix listings
This is a better patch, that actually works.
Just set TARGET_URL for directories as well as files.
I'll open the review board. I noticed that the behaviour of the back button is the same for the non-nepomuk filename search, so let's leave it alone. With the new patch, new tab now opens the original query folder, but with a funky display name. Not sure why, and it's probably a bug of some sort, but it's not terrible behaviour. Hi, Sorry, I'm having some difficulty opening the reviewboard. I see that kio_nepomuksearch moved from the nepomukcore repository's master branch in commit 66fe321dc3a94383bb6d86c87d4ee88ec80f2514 on Aug 29 2011, but I can't actually find where it went; there doesn't seem to be a kio_nepomuksearch project on projects.kde.org. Do you happen to know? Sorry if this is an excessively stupid question, I'm new to this. As far as I know Nepomuk has been moved to custom repositories during the last 2 weeks, but I don't know their location/name. Probably the best is if you just ask on the Nepomuk-mailing-list (nepomuk@kde.org) where you should but your patch. Maybe if you just attach the patch to the mail, one of the Nepomuk-core-developers directly applies it to the new location and you don't need to create a merge-request at the review-board at all :-) Evenn better! Ok, I emailed nepomuk@kde.org The KIO nepomuksearch is, as far as I can tell, in kde-runtime (it was done to prevent repository proliferation). So that's where the patch should be applied to. Thanks; with that information I opened https://git.reviewboard.kde.org/r/105158/ Git commit f07bd5b36263c3e00aaf7ec77ed4820330723471 by Vishesh Handa. Committed on 24/07/2012 at 06:55. Pushed by vhanda into branch 'KDE/4.9'. Improve Folder listing in nepomuksearch kioslave Set the UDS_TARGET_URL for directories. Patch by Simeon Bird (sbird) <bladud@gmail.com> REVIEW: 105158 Cherry-picked from 62fca35780b9a17123b656ceaf5faf652b91b0ca M +9 -2 nepomuk/kioslaves/search/searchfolder.cpp http://commits.kde.org/kde-runtime/f07bd5b36263c3e00aaf7ec77ed4820330723471 Git commit 62fca35780b9a17123b656ceaf5faf652b91b0ca by Vishesh Handa. Committed on 24/07/2012 at 06:55. Pushed by vhanda into branch 'master'. Improve Folder listing in nepomuksearch kioslave Set the UDS_TARGET_URL for directories. Patch by Simeon Bird (sbird) <bladud@gmail.com> REVIEW: 105158 M +9 -2 nepomuk/kioslaves/search/searchfolder.cpp http://commits.kde.org/kde-runtime/62fca35780b9a17123b656ceaf5faf652b91b0ca I have exactly the same bug in Kubuntu 12.10 x64 with KDE 4.9.5. :-( |