Bug 248234 - Files returned in a nepomuk search are considered to be in a remote location
Summary: Files returned in a nepomuk search are considered to be in a remote location
Status: RESOLVED FIXED
Alias: None
Product: nepomuk
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 12:36 UTC by Jonas Thorell
Modified: 2010-09-14 00:54 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Error message from Kaffeine (29.33 KB, image/png)
2010-09-14 00:54 UTC, Jonas Thorell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Thorell 2010-08-18 12:36:00 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

In KDE 4.5, files returned by a nepomuk search are apparantly treated as if they were non-local files. Is that intentional? If so, what's the rational? If not, could it please be fixed for 4.5.1?

Easiest way to see that nepomuk considers returned searches non-local:

1. Tag an image with a specific tag.
2. Make sure Dolphin->Preferences->General->Preview->Do not create previews for remote files above is set to 0 (default)
3. Make sure previews are turned on.
4. Search for the tag used in 1.

You should now get a result back with (assuming it's only one file) only displayed as a generic image icon. Increase the threshold mentioned in 2 and you get the preview as expected.

Now, previews are only cosmetic but it can interfere with the workflow as well. I have tagged my work-in-progress odt-files with WIP, and saved a search to the sidebar to get access to those documents very quickly. However, when trying to open them from within Oo-writer (by clicking on the saved search, and then the document in question) I only get a "You need to select a local file". This worked in 4.4.4.

Reproducible: Always

Steps to Reproduce:
For KDE-only example of how to reproduce without previews (kinda silly example but...) rather than OpenOffice being involved.

1. Tag some images "Wallpaper".
2. Search for the tag "Wallpaper" from within Dolphin and save the search.
3. Right-click on the desktop and select "Desktop settings".
4. Select "Open" in the wallpaper section.
5. Select the saved search, and one of the returned images.

Actual Results:  
A error-message stating that you must select a local file.

Expected Results:  
Getting the image as my new wallpaper. This too worked in 4.4.
Comment 1 Kolia 2010-09-02 13:43:40 UTC
In addition, I found that even with increasing the "preview size limit" for remote files I don't get the preview for folders (folders that I have tagged), only for files. When I do a nepomuk search, I can see the folders tagged, but with no preview.
Comment 2 Sebastian Trueg 2010-09-02 15:48:01 UTC
Already done in 4.5.1
Comment 3 Jonas Thorell 2010-09-02 16:54:45 UTC
Are you sure? Because I get exactly the same behavior in 4.5.1 as I did in 4.5.0.
Comment 4 Pasi Rehtonen 2010-09-02 20:49:27 UTC
This is not fixed in 4.5.1! I ran the testcase Jonas described and I get exactly the same problems as he.
Comment 5 Sebastian Trueg 2010-09-03 11:18:04 UTC
What is fixed is the important part: the opening in non-kde apps. I, however, do not know why previews are not generated properly. I will look into that.
Comment 6 Sebastian Trueg 2010-09-06 23:11:30 UTC
SVN commit 1172303 by trueg:

Use KFileItem::mostLocalUrl() to get the preview instead of the plain url.
This will actually get previews for local files in search results.
Approved via review request http://reviewboard.kde.org/r/5251/
BUG: 248234


 M  +6 -0      kfileitem.cpp  
 M  +7 -0      kfileitem.h  
 M  +3 -3      previewjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1172303
Comment 7 Jonas Thorell 2010-09-14 00:53:37 UTC
(In reply to comment #5)
> What is fixed is the important part: the opening in non-kde apps. 

Actually, I would say that is only half-fixed (at least that's how it works on my system). That, of course, is far better than not fixed at all. 

Anyway, this is why I think it is only half-fixed:

1. Tag a video-file with tag X. 
2. Search for it within dolphin, and save the search parameters.
3. Use the saved search from within Dolphin (or folder-view for that matter), and try to open it with a non-KDE app (say VLC) but that uses the KDE file-selector if running in a KDE-session. That works, great!
4. Now, use the same app (VLC) but on its own. That is, without giving it a file as input parameter at launch.
5. Open the file-selector, and select the saved search and the file tagged.
6. You will get the equivalent of "You can only select local files".

I get this for every non-KDE app that can use the KDE-fileselector I know of and use (that is, VLC, Firefox, and OpenOffice). And since it worked in 4.4.x, using the very same apps, I consider it a regression.

Besides that, I get a similar error from at least one KDE app I can remember (apart from the wallpaper example),namely Kaffeine. That may be a Kaffeine bug though, but I've attached a screenshot of the error dialogue (the same conditions as outlined above, that is: it only occurs when I use the "Open file" dialogue).
Comment 8 Jonas Thorell 2010-09-14 00:54:29 UTC
Created attachment 51618 [details]
Error message from Kaffeine