mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
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:
committed by
Mathew Sutcliffe
parent
1076eb2b29
commit
2005e1881b
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user