Prevent double printing app list via cli
This commit is contained in:
parent
47452371db
commit
1dbdcb5279
1 changed files with 2 additions and 0 deletions
|
|
@ -18,6 +18,7 @@ enum State {
|
||||||
StateSeekComputer,
|
StateSeekComputer,
|
||||||
StateListApp,
|
StateListApp,
|
||||||
StateSeekApp,
|
StateSeekApp,
|
||||||
|
StateSeekEnded,
|
||||||
StateFailure,
|
StateFailure,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -107,6 +108,7 @@ public:
|
||||||
// Occurs when a computer is updated
|
// Occurs when a computer is updated
|
||||||
case Event::ComputerUpdated:
|
case Event::ComputerUpdated:
|
||||||
if (m_State == StateSeekApp) {
|
if (m_State == StateSeekApp) {
|
||||||
|
m_State = StateSeekEnded;
|
||||||
m_Arguments.isPrintCSV() ? printAppsCSV(m_Computer->appList) : printApps(m_Computer->appList);
|
m_Arguments.isPrintCSV() ? printAppsCSV(m_Computer->appList) : printApps(m_Computer->appList);
|
||||||
|
|
||||||
QCoreApplication::exit(0);
|
QCoreApplication::exit(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue