Bug 351868

Summary: Custom KIO plugin for dolphin doesn't load
Product: [Applications] dolphin Reporter: miflab
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal CC: emmanuelpescosta099, frank78ac, samrog131
Priority: NOR    
Version: 16.12.2   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description miflab 2015-08-27 16:50:42 UTC
I'm try to make thumbnail-plugin for display thumbnail for video files in Dolphin.
I make similar as described here http://api.kde.org/frameworks-api/frameworks5-apidocs/kio/html/classThumbCreator.html and after relogin I can see new option in Dolphin settings.
But even I enable this I still not have thumbnail for video files. It's seems like my library just not loads. But I don't understand why.

Reproducible: Always

Steps to Reproduce:
1. git clone https://github.com/Yukariin/ffmpegthumb.git (my repo)
2. cmake .
3. make
4. sudo make install
5. Log out and log in again
6. Open Dolphin
7. Press `Config` button
8. Select `Configure Dolphin` in config menu
9. Select `General` tab
10. Select `Previews` tab
11. Check `Video Files (ffmpegthumb)`
12. Go to any folder with videos

Actual Results:  
Still not have thumbnail for video files

Expected Results:  
Thumbnail for video files

Code of my plugin placed on github and can be found here - https://github.com/Yukariin/ffmpegthumb
Comment 1 Frank Reininghaus 2015-08-29 18:47:28 UTC
Thanks for the bug report. This might be a general issue with the preview infrastructure in KDE Frameworks, and not with the Dolphin application. Do thumbnails work for you in the file dialog of, e.g., KWrite, or in Folder View?
Comment 2 miflab 2015-08-30 12:12:27 UTC
(In reply to Frank Reininghaus from comment #1)
> Do thumbnails work for you in the file dialog of, e.g., KWrite, or in Folder View?
Nope, they not work in file dialog and Folder View too.
But in the same time thumbnailers from kio-extras, which is VERY similar with my, works great...
Comment 3 miflab 2015-08-30 13:27:32 UTC
Oh, I realized.
My files installs in /usr/local prfix instead of /usr/lib. So, Dolphin read .desktop file and try to load specified library from /usr/lib/qt/plugins but it installed in /usr/local/lib/plugins.
I find similar issue on SO - http://stackoverflow.com/questions/7254976
But in new Plasma we not have anymore kde4-sonfig, how I can do similar thing in plasma?
Comment 4 Emmanuel Pescosta 2015-09-01 19:03:45 UTC
(In reply to miflab from comment #3)
> Oh, I realized.
> My files installs in /usr/local prfix instead of /usr/lib. So, Dolphin read
> .desktop file and try to load specified library from /usr/lib/qt/plugins but
> it installed in /usr/local/lib/plugins.
> I find similar issue on SO - http://stackoverflow.com/questions/7254976
> But in new Plasma we not have anymore kde4-sonfig, how I can do similar
> thing in plasma?

cmake -DCMAKE_INSTALL_PREFIX=/usr
Comment 5 Rog131 2015-09-16 15:49:30 UTC
Tested with the Arch linux ;
Qt: 5.5.0
KDE Frameworks: 5.13.0
KDE Applications: 15.08

Compiling with:
$ mkdir -p builddir
$ cd builddir && cmake .. -DCMAKE_INSTALL_PREFIX=$(kf5-config --prefix) -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
# make install

=> 

-- Installing: /usr/lib/qt/plugins/ffmpegthumb.so
-- Installing: /usr/share/kservices5/ffmpegthumb.desktop

Seems to work.
Comment 6 miflab 2015-09-17 08:34:41 UTC
Yes, this work with -DKDE_INSTALL_USE_QT_SYS_PATHS=ON now, thanks.
Sorry for bothering.