Code snippet review for plasmate

Aaron J. Seigo aseigo at kde.org
Mon May 11 21:10:18 CEST 2009


On Monday 11 May 2009, Shantanu Tushar Jha wrote:
> > there should be a MimeType role in PackageModel and when data is called
> > for the MimeType it should return the mimetype from the package.
>
> I'm not that experienced in Qt, so had a doubt-
> There are some roles defined in the Qt namespace, but there isn't one for
> MimeType.

correct, this would be custom to the PackageModel.

> So, how to declare a new role in PackageModel (I think that will
> be in packagemodel.h) ?

enum DataRoles { MimeTypeRoe = Qt::UserRole + 1 }

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20090511/9e3a9afb/attachment-0001.sig 


More information about the Plasma-devel mailing list