[Bug 41356] No method to retrieve available message types [patch]
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Oct 4 12:56:12 CEST 2011
https://bugs.freedesktop.org/show_bug.cgi?id=41356
Olli Salli <ollisal at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|telepathy-bugs at lists.freede |kde at davidedmundson.co.uk
|sktop.org |
--- Comment #2 from Olli Salli <ollisal at gmail.com> 2011-10-04 03:56:11 PDT ---
(In reply to comment #1)
> Also I would like to have a public QSet<ChannelTextMessageType> (or maybe
> QList?) TextChannel::supportedMessageTypes() const.
Such an accessor is probably mostly useful for populating drop down menus,
radio button groups or alike used for choosing the type of message to send
(having the available options there). supportsMessageType() already provides
the answer to "does it contain type X", the most natural use for a QSet, hence
QList<ChannelTextMessageType> would be most appropriate here.
QList is fine as the internal impl for both accessors too. As there are only a
few message types, it's likely even faster than a QSet even for contains()
(linear search from an array vs logarithmic search from a linked structure,
where the total size is usually about equal to the logarithm base), and
definitely faster to create.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list