From kde-core-devel Mon Oct 14 21:52:49 2013 From: Albert Astals Cid Date: Mon, 14 Oct 2013 21:52:49 +0000 To: kde-core-devel Subject: KService has regressed Message-Id: <7946117.jvg0LkrxoY () xps> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=138178759224330 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart1439688.NJYdiOeoum" This is a multi-part message in MIME format. --nextPart1439688.NJYdiOeoum Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 --nextPart1439688.NJYdiOeoum Content-Disposition: attachment; filename="main.cpp" Content-Transfer-Encoding: 7Bit Content-Type: text/x-c++src; charset="UTF-8"; name="main.cpp" #include #include int main(int argc, char **argv) { KService s("/usr/share/kde4/services/libokularGenerator_ghostview.desktop"); qDebug() << s.mimeTypes(); } --nextPart1439688.NJYdiOeoum--