Comment 7 for bug 1220395

Revision history for this message
Sam Segers (sam-sgrs) wrote :

Yes, but if you call i18n.domain = i18n.domain, the UI gets updated.
Tim Peeters already said on the IRC that domain changed connects to an other signal that updates the ui.
So if we just add a new signal to UbuntuI18n called textDomainChanged or so and emit it in domainChanged method and do in plugin.cpp:
void UbuntuComponentsPlugin::initializeEngine(QQmlEngine *engine, const char *uri)
{
    ...

    QObject::connect(&UbuntuI18n::instance(), SIGNAL(textDomainChanged()),
                     &i18nChangeListener, SLOT(updateContextProperty()));

Or just emit domainChanged from bindtextdomain method in UbuntuI18n.

Wouldn't that do it?