On Sun, Feb 28, 2010 at 6:36 PM, Abdelrazak Younes <you...@lyx.org> wrote:
> Hum, I'd prefer that you create a new Language model for the Buffer;
> accessible through GuiWorkArea::languageModel() or even better through
> GuiApplication::languageModel(Buffer * buf).
> Then sorting would be a matter of using QAbstractItemModel::sort() and this
> model would be available for other dialogs.

OK, I'm a little confused. We seem to use three types of language lists:

1) ./Language.h:        typedef std::map<std::string, Language> LanguageList;
2) ./LaTeXFeatures.h:   typedef std::set<Language const *> LanguageList;
3) void Buffer::getLanguages(std::set<Language const *> & languages) const

2 and 3 are basically the same, except that 2 uses a typedef and 3 doesn't.

I don't see why this is necessary. In any case to avoid duplicating
functionality the languageModel(...) functions should probably only
operate over one type of LanguageList, and cast the other Languages to
that one if need be. So shall I add a
   std::set<Language const *>  Languages::getLanguages()
method (i.e. as with type 3 above)?

-- 
John C. McCabe-Dansted

Reply via email to