on xenial help sign in
Use qml singeltonType for changelog
commit245e1783e5587dcc49686c2cefadf568acba8cdd authorMarius Gripsgard <marius@ubports.com> dateWed 15 Aug 2018, 23:10 (8 years ago) parent69948b1
2 files changed+2−2
plugins/Wizard/Changelog.cpp+1−1 plugins/Wizard/plugin.cpp+1−1
plugins/Wizard/Changelog.cpp+1−1
@@ -48,11 +48,11 @@ void Changelog::readChangelog()
4848 if (!f.open(QFile::ReadOnly | QFile::Text)) return;
4949 QTextStream in(&f);
5050 m_text = in.readAll();
51+ Q_EMIT textChanged();
5152}
5253
5354void Changelog::watcherFileChanged()
5455{
5556 readChangelog();
56− Q_EMIT textChanged();
5757 m_fsWatcher.removePath(changelogPath());
5858}
plugins/Wizard/plugin.cpp+1−1
@@ -31,8 +31,8 @@ void WizardPlugin::registerTypes(const char *uri)
3131 qmlRegisterType<PageList>(uri, 0, 1, "PageList");
3232 qmlRegisterSingletonType<System>(uri, 0, 1, "System", [](QQmlEngine*, QJSEngine*) -> QObject* { return new System; });
3333 qmlRegisterSingletonType<Status>(uri, 0, 1, "Status", [](QQmlEngine*, QJSEngine*) -> QObject* { return new Status; });
34+ qmlRegisterSingletonType<Changelog>(uri, 0, 1, "Changelog", [](QQmlEngine*, QJSEngine*) -> QObject* { return new Changelog; });
3435 qmlRegisterType<TimeZoneLocationModel>(uri, 0, 1, "TimeZoneModel");
3536 qmlRegisterType<KeyboardLayoutsModel>(uri, 0, 1, "KeyboardLayoutsModel");
3637 qmlRegisterType<LocalePlugin>(uri, 0, 1, "LocalePlugin");
37− qmlRegisterType<Changelog>(uri, 0, 1, "Changelog");
3838}