fix(src/libappdata): 新增或卸载应用时刷新标签
This commit is contained in:
parent
32f473fb64
commit
ef7315b3c9
|
@ -68,6 +68,19 @@ AppCategoryPlugin::AppCategoryPlugin(QObject *parent) : AppListPluginInterface(p
|
||||||
EventTrack::instance()->sendClickEvent("switch_app_view", "AppView", map);
|
EventTrack::instance()->sendClickEvent("switch_app_view", "AppView", map);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(m_categoryModel, &AppCategoryModel::rowsInserted, this, [=] {
|
||||||
|
Q_EMIT labelChanged();
|
||||||
|
});
|
||||||
|
connect(m_categoryModel, &AppCategoryModel::rowsRemoved, this, [=] {
|
||||||
|
Q_EMIT labelChanged();
|
||||||
|
});
|
||||||
|
connect(m_recentlyModel, &RecentlyInstalledModel::rowsInserted, this, [=] {
|
||||||
|
Q_EMIT labelChanged();
|
||||||
|
});
|
||||||
|
connect(m_recentlyModel, &RecentlyInstalledModel::rowsRemoved, this, [=] {
|
||||||
|
Q_EMIT labelChanged();
|
||||||
|
});
|
||||||
|
|
||||||
m_actions.append(categoryAction);
|
m_actions.append(categoryAction);
|
||||||
m_actions.append(firstLatterAction);
|
m_actions.append(firstLatterAction);
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,9 @@ void AppListModel::installPlugin(AppListPluginInterface *plugin)
|
||||||
connect(m_plugin, &AppListPluginInterface::titleChanged, this, [this, plugin] {
|
connect(m_plugin, &AppListPluginInterface::titleChanged, this, [this, plugin] {
|
||||||
m_header->setTitle(plugin->title());
|
m_header->setTitle(plugin->title());
|
||||||
});
|
});
|
||||||
|
connect(m_plugin, &AppListPluginInterface::labelChanged, this, [this, plugin] {
|
||||||
|
Q_EMIT labelBottleChanged();
|
||||||
|
});
|
||||||
|
|
||||||
Q_EMIT labelBottleChanged();
|
Q_EMIT labelBottleChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void titleChanged();
|
void titleChanged();
|
||||||
|
void labelChanged();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // UkuiMenu
|
} // UkuiMenu
|
||||||
|
|
Loading…
Reference in New Issue