SmartPointer<const IStatus> EditorHistory::RestoreState(const SmartPointer<IMemento>& memento) { QList<IMemento::Pointer> mementos = memento->GetChildren(WorkbenchConstants::TAG_FILE); for (int i = 0; i < mementos.size(); i++) { EditorHistoryItem::Pointer item(new EditorHistoryItem(mementos[i])); if (!item->GetName().isEmpty() || !item->GetToolTipText().isEmpty()) { this->Add(item, fifoList.size()); } } return Status::OK_STATUS(BERRY_STATUS_LOC); }
bool RegistryPersistence::CheckClass(const SmartPointer<IConfigurationElement>& configurationElement, QList<SmartPointer<IStatus> >& warningsToLog, const QString& message, const QString& id) { // Check to see if we have a handler class. if ((configurationElement->GetAttribute(ATT_CLASS).isNull()) && (configurationElement->GetChildren(TAG_CLASS).isEmpty())) { AddWarning(warningsToLog, message, configurationElement, id); return false; } return true; }