Skip to content

Commit

Permalink
Add call to save current set as KnownGood
Browse files Browse the repository at this point in the history
  • Loading branch information
nephros committed May 26, 2023
1 parent 2b04ab6 commit 9c1f07d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@
<method name="revertToLastGood">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
<method name="setKnownGood">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
<method name="resolveFailure">
<annotation name="org.freedesktop.DBus.Method.NoReply" value="true"/>
</method>
Expand Down
5 changes: 5 additions & 0 deletions src/bin/patchmanager-daemon/patchmanagerobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,11 @@ void PatchManagerObject::setLastGoodPatches(const QSet<QString> &patches)
putSettings(QStringLiteral("lastknowngood"), QStringList(patches.toList()));
}

void PatchManagerObject::setKnownGood() const
{
setLastGoodPatches(getAppliedPatches());
}

QStringList PatchManagerObject::getMangleCandidates()
{
if (m_mangleCandidates.empty()) {
Expand Down
1 change: 1 addition & 0 deletions src/bin/patchmanager-daemon/patchmanagerobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ private slots:

QSet<QString> getLastGoodPatches() const;
void setLastGoodPatches(const QSet<QString> &patches);
void setKnownGood();

void getVersion();

Expand Down
7 changes: 7 additions & 0 deletions src/qml/patchmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,13 @@ void PatchManager::revertToLastGood()
m_interface->revertToLastGood();
}

void PatchManager::setKnownGood()
{
qDebug() << Q_FUNC_INFO;

m_interface->setKnownGood();
}

void PatchManager::resolveFailure()
{
qDebug() << Q_FUNC_INFO;
Expand Down
1 change: 1 addition & 0 deletions src/qml/patchmanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ public slots:
void onFailureChanged(bool failed);
void onLoadedChanged(bool loaded);

void setKnownGood();
void revertToLastGood();
void resolveFailure();

Expand Down

0 comments on commit 9c1f07d

Please sign in to comment.