- found = true;
- int pos = std::find(this->children.begin(), this->children.end(), this->applications[i]) - this->children.begin();
- checked[pos] = true;
- checkedApplications[i] = true;
- if(!this->applications[i]->Refresh(result))
- return false;
+ if (this->applications[i]->GetName() == applicationName)
+ {
+ found = true;
+ int pos = std::find(this->children.begin(), this->children.end(), this->applications[i]) - this->children.begin();
+ checked[pos] = true;
+ checkedApplications[i] = true;
+ if(!this->applications[i]->Refresh(result))
+ return false;
+ }
+ }
+ if(!found)
+ {
+ modelCDMApplication* application= new modelCDMApplication(this->path + CDMUtilities::SLASH + stdfileName, stdfileName, this->level + 1);
+ this->applications.push_back(application);
+ this->children.push_back(application);