[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KService has regressed
From: Albert Astals Cid <aacid () kde ! org>
Date: 2013-10-14 21:52:49
Message-ID: 7946117.jvg0LkrxoY () xps
[Download RAW message or body]
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
["main.cpp" (main.cpp)]
#include <kservice.h>
#include <QDebug>
int main(int argc, char **argv)
{
KService s("/usr/share/kde4/services/libokularGenerator_ghostview.desktop");
qDebug() << s.mimeTypes();
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic