| 1208 | } |
| 1209 | |
| 1210 | void |
| 1211 | AppManager::removeInstance(int appID) |
| 1212 | { |
| 1213 | int newApp = -1; |
| 1214 | { |
| 1215 | QMutexLocker k(&_imp->_appInstancesMutex); |
| 1216 | for (AppInstanceVec::iterator it = _imp->_appInstances.begin(); it != _imp->_appInstances.end(); ++it) { |
| 1217 | if ( (*it)->getAppID() == appID ) { |
| 1218 | _imp->_appInstances.erase(it); |
| 1219 | break; |
| 1220 | } |
| 1221 | } |
| 1222 | |
| 1223 | if ( !_imp->_appInstances.empty() ) { |
| 1224 | newApp = _imp->_appInstances.front()->getAppID(); |
| 1225 | } |
| 1226 | } |
| 1227 | |
| 1228 | if (newApp != -1) { |
| 1229 | setAsTopLevelInstance(newApp); |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | AppManager::AppTypeEnum |
| 1234 | AppManager::getAppType() const |