refs #887, do not start wizard when other applications are running

(potential problems with writing settings)
Utility functions in info list
This commit is contained in:
Klaus Basan
2017-02-26 01:41:35 +01:00
committed by Mathew Sutcliffe
parent 1076eb2b29
commit 2005e1881b
4 changed files with 43 additions and 2 deletions

View File

@@ -21,4 +21,19 @@ namespace BlackMisc
{
return this->contains(&CApplicationInfo::application, application);
}
int CApplicationInfoList::removeApplication(CApplicationInfo::Application application)
{
return this->removeIf(&CApplicationInfo::application, application);
}
QStringList CApplicationInfoList::runningProcessNames() const
{
QStringList names;
for (const CApplicationInfo &info : *this)
{
names.append(info.processInfo().processName());
}
return names;
}
}

View File

@@ -36,6 +36,12 @@ namespace BlackMisc
//! List containing entry for CApplicationInfo::Application ?
bool containsApplication(CApplicationInfo::Application application) const;
//! Remove given application
int removeApplication(CApplicationInfo::Application application);
//! Running application names
QStringList runningProcessNames() const;
};
}