On Thursday 15 September 2011 11:45:30 ext Thiago Macieira wrote:
> > > Why can't you think of MIME type editor, e.g. like one in ROX Filer?
> > 
> > And the question is whether this is a usecase that should be supported by
> > Qt essentials. I don't think so.
> > 
> > Mimetype handling should become part of the basic offering. But only for
> > the common use case of reading them and figuring out themimetype of files
> > and data.
> 
> I'm of the same opinion.
> 
> Writing Qt functionality that benefits one application in the system seems
> superfluous. We're trying to resolve the common case here.
> 
> If editing MIME types turns out to be a common task, then we can revisit.

In the spirit of this discussion I'd like to point out that I need a way to 
create QMimeType objects with all their properties set. Can we add 
constructors to QMimeTypeData and QMimeType like this:

QMimeTypeData::QMimeTypeData(
    const QString &theType,
    const QString &theComment,
    const LocaleHash &theLocaleComments,
    const QStringList &theAliases,
    const QString &theGenericIconName,
    const QList< QMimeGlobPattern > &theGlobPatterns,
    const QStringList &theSubClassOf,
    const QString &thePreferredSuffix,
    const QStringList &theSuffixes,
    const QList< QMimeMagicRuleMatcher > &theMagicMatchers)
    : suffixPattern(QLatin1String("^\\*\\.[\\w+]+$")),
    , type(theType)
    , comment(theComment)
    , localeComments(theLocaleComments)
    , aliases(theAliases)
    , genericIconName(theGenericIconName)
    , globPattterns(theGlobPatterns)
    , subClassOf(theSubClassOf)
    , preferredSuffix(thePreferredSuffix)
    , suffixes(theSuffixes)
    , magicMatchers(theMagicMatchers)
{
    if (!suffixPattern.isValid())
        qWarning("MimeTypeData(): invalid suffixPattern");
}

QMimeType::QMimeType(
    const QString &theType,
    const QString &theComment,
    const LocaleHash &theLocaleComments,
    const QStringList &theAliases,
    const QString &theGenericIconName,
    const QList< QMimeGlobPattern > &theGlobPatterns,
    const QStringList &theSubClassOf,
    const QString &thePreferredSuffix,
    const QStringList &theSuffixes,
    const QList< QMimeMagicRuleMatcher > &theMagicMatchers)
    : d(new QMimeTypeData(...))
{}
_______________________________________________
Qt5-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt5-feedback

Reply via email to