// Editing sub-components:
// Imports:
- QSet<Import> imports() const;
+ QList<Import> imports() const;
void addImport(const Import &import);
void removeImport(const Import &import);
if (m_imports.contains(import))
return;
- m_imports.insert(import);
+ m_imports.append(import);
notifyImportAdded(import);
}
void ModelPrivate::removeImport(const Import &import)
{
- if (!m_imports.remove(import))
+ if (!m_imports.removeOne(import))
return;
notifyImportRemoved(import);
// return subModel;
//}
-QSet<Import> Model::imports() const
+QList<Import> Model::imports() const
{
return m_d->imports();
}
// Imports:
- QSet<Import> imports() const { return m_imports; }
+ QList<Import> imports() const { return m_imports; }
void addImport(const Import &import);
void removeImport(const Import &import);
void notifyImportAdded(const Import &import) const;
Model *m_q;
MetaInfo m_metaInfo;
- QSet<Import> m_imports;
+ QList<Import> m_imports;
QList<QWeakPointer<AbstractView> > m_viewList;
QList<InternalNodePointer> m_selectedNodeList;
QHash<QString,InternalNodePointer> m_idNodeHash;
void TextToModelMerger::setupImports(const Document::Ptr &doc,
DifferenceHandler &differenceHandler)
{
- QSet<Import> existingImports = m_rewriterView->model()->imports();
+ QList<Import> existingImports = m_rewriterView->model()->imports();
for (UiImportList *iter = doc->qmlProgram()->imports; iter; iter = iter->next) {
UiImport *import = iter->import;
const Import newImport = Import::createFileImport(strippedFileName,
version, as);
- if (!existingImports.remove(newImport))
+ if (!existingImports.removeOne(newImport))
differenceHandler.modelMissesImport(newImport);
} else {
const Import newImport =
Import::createLibraryImport(flatten(import->importUri), as, version);
- if (!existingImports.remove(newImport))
+ if (!existingImports.removeOne(newImport))
differenceHandler.modelMissesImport(newImport);
}
}