19.09.2011, в 14:14, Wolf-Michael Bolle написал(а):

> On Thursday 15 September 2011 09:50:02 ext David Faure wrote:
> 
>> Also, it exposes too much internals of the spec, such as the various fields
>> for magic (content-based) matching; this is all because QtCreator has a GUI
>> for defining your own mimetypes, but I can't think of any use case for a
>> user defining his own magic rules...
> 
> According to the code, the list of attributes in qmime is as follows:
> 
>> QString type;
> 
> I called that name. The spec calls it type. I should probably change, then.
> 
>> QString comment;
> 
> I call that displayName. The spec calls it comment. I should probably change, 
> then.
> 
>> LocaleHash localeComments;
> 
> I have no name for that because I didn't know where the actual translation 
> would happen. If the consensus is that the translation should be in here then 
> I will add that, too.

Same reason while it still exists; i think we should always return localized 
comment for current locale. 

> 
>> QStringList aliases;
> 
> I don't have that in my API. What is the use case for that?

Specification tells that some mime types can be aliases to other types (i.e. 1 
type with 2 names), for example  "application/mathml+xml" and  "text/mahml"

>> QString genericIconName;
> 
> I call that iconURL. Since I am not convinced the generic-icons will be 
> installed on every platform Qt runs on I favor to return a complete path to 
> the icon. I should probably change the type from QString to QUrl, right?
> 
>> QList<QMimeGlobPattern> globPatterns;
> 
> I don't have that in my API. What is the use case for that?

I think this should be moved to QMutableMimeType; This is "details of 
implementation" mentioned by David

>> QStringList subClassOf;
> 
> I don't have that in my API. I could add that.
> 
>> QString preferredSuffix;
> 
> I don't have that in my API. I could add that.
> 
>> QStringList suffixes;
> 
> With my latest patch that is waiting for the mirror to kick in, I call that 
> filenameExtension. I can't find it in the spec, though. What does everybody 
> prefer?

I used QtCreator names so keeping old name will save them from changing it:)

>> QList<QMimeMagicRuleMatcher> magicMatchers;
> 
> I don't have that in my API. What is the use case for that?

Same as globPatterns; useful for constructing mime types, but useless in 
QMimeType
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to