KService has regressed

Albert Astals Cid aacid at kde.org
Mon Oct 14 22:52:49 BST 2013


Hi guys, seems that KService has regressed and now it does not include all the 
mimetypes listed in the .desktop file anymore.

Code to fix BUG 321706 seems to have added a check for 
  // Only add unique mimetypes

When that is not the behavior that kservice used to had, and it's not the 
documented behaviour

    /**
     * Returns the list of mime types that this service supports.
     * Note that this doesn't include inherited mimetypes,
     * only the mimetypes types listed in the .desktop file.
     * @since 4.8.3
     */
    QStringList mimeTypes() const;

By reading that I understand that by using mimeTypes I will get a list of all 
the mimetypes i list in the .desktop file

Attached the test uses kservice on 
/usr/share/kde4/services/libokularGenerator_ghostview.desktop
that has
MimeType=application/postscript;image/x-eps;
but the code only prints
application/postscript

Can anyone fix that please? Okular is acting all weird because of this.

Cheers,
  Albert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 185 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20131014/71df257b/attachment.cpp>


More information about the kde-core-devel mailing list