On Mon, Mar 1, 2010 at 4:18 PM, Abdelrazak Younes <you...@lyx.org> wrote:
> No, the submenu would just have to call
> 'setModel(guiApp->languageModel(buffer))'. The conversion from std::set<...>
> would be automatically done in GuiApplication::languageModel().

Thats what I meant :).

> Yes :-)
>
> And something similar for 'languageModel(Buffer *)' except that here we
> would have to search the QMap instead.

I am not sure what you mean by search QMap. I'd do something like

QAbstractItemModel * GuiApplication::languageModel(Buffer * b)
{
        QSortFilterProxyModel language_model;
        updateLanguageModel(language_model, b->getLanguages());
        return language_model;
}

or (using the old way)

QAbstractItemModel * GuiApplication::languageModel(Buffer * b)
{
        return languageModel(b->getLanguages());
}

> PS: you are learning fast, it's a pleasure to discuss that with you :-)

Thanks :)

-- 
John C. McCabe-Dansted

Reply via email to