forked from qt-creator/qt-creator
QmlJS: Change from QMap to QHash for QString keys.
Tests indicate that lookup in QHash<QString, ...> is more performant even for short strings. Change-Id: I8e5a73d0f1a72e202522f397b16901887f9c3591 Reviewed-on: http://codereview.qt-project.org/5070 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -736,7 +736,7 @@ void ModelManager::startCppQmlTypeUpdate()
|
||||
|
||||
void ModelManager::updateCppQmlTypes(ModelManager *qmlModelManager,
|
||||
CPlusPlus::CppModelManagerInterface *cppModelManager,
|
||||
QMap<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents)
|
||||
QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents)
|
||||
{
|
||||
CppDataHash newData = qmlModelManager->cppData();
|
||||
|
||||
@@ -756,7 +756,7 @@ void ModelManager::updateCppQmlTypes(ModelManager *qmlModelManager,
|
||||
finder(doc);
|
||||
|
||||
QList<LanguageUtils::FakeMetaObject::ConstPtr> exported = finder.exportedTypes();
|
||||
QMap<QString, QString> contextProperties = finder.contextProperties();
|
||||
QHash<QString, QString> contextProperties = finder.contextProperties();
|
||||
if (exported.isEmpty() && contextProperties.isEmpty()) {
|
||||
newData.remove(fileName);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user