The following code sample shows that KMimeType advertises Comment as a property name, but returns nothing Reproducible: Always Steps to Reproduce: KMimeType::Ptr mimeType = KMimeType::mimeType("image/png"); qDebug() << mimeType->propertyNames(); qDebug() << mimeType->property("Comment"); Actual Results: ("Name", "Comment", "Patterns", "Icon") QVariant(QString, "") Expected Results: Should return the comment for that mime type.
Git commit 09030c36b2e5da244c41fde9afbc6eb75a21713b by David E. Narváez. Committed on 05/08/2013 at 15:23. Pushed by narvaez into branch 'KDE/4.11'. Ensure MimeType's XML Data is Loaded before Returning Properties Comment information is found in the XML data so needs to be loaded before returning property values. The same would apply for the Patterns property if you were to query that from the property name instead of the KMimeType::patterns() method. FIXED-IN: 4.11 REVIEW: 111852 M +4 -3 kdecore/services/kmimetype.cpp M +6 -0 kdecore/services/kmimetype_p.h M +10 -0 kdecore/tests/kmimetypetest.cpp M +1 -1 kdecore/tests/kmimetypetest.h http://commits.kde.org/kdelibs/09030c36b2e5da244c41fde9afbc6eb75a21713b