Add oneshot option

This commit is contained in:
woblight
2025-01-28 19:10:00 +01:00
parent 0429a444ac
commit c98a505fbc
5 changed files with 40 additions and 3 deletions
+14
View File
@@ -580,6 +580,20 @@ void Addon::setReadme(QString readme)
emit readmeChanged(m_readme);
}
QFuture<void> Addon::updateIfBehind()
{
std::shared_ptr<QPromise<void>> p(new QPromise<void>());
delegate("UpdateIfBehind", [this](){
},[this, p](){
if (m_gitStatus == Addon::GitStatusFlag::Behind)
update();
delegate("Finished", [p](){
p->finish();
});
});
return p->future();
}
QStringList Addon::branches() const
{
return m_branches;