Qmljs: small QHash improvements

Change-Id: I79a5504c8471b66540aac8047fbcf760ceb6b10f
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Tim Jenssen
2016-06-20 13:42:26 +02:00
parent edc77e339f
commit a6d21cc1f7
3 changed files with 18 additions and 9 deletions

View File

@@ -168,7 +168,8 @@ void setupProjectInfoQmlBundles(ModelManagerInterface::ProjectInfo &projectInfo)
namespace Internal {
QHash<QString,Dialect> ModelManager::languageForSuffix() const
QHash<QString,Dialect> ModelManager::initLanguageForSuffix() const
{
QHash<QString,Dialect> res = ModelManagerInterface::languageForSuffix();
@@ -196,6 +197,12 @@ QHash<QString,Dialect> ModelManager::languageForSuffix() const
return res;
}
QHash<QString,Dialect> ModelManager::languageForSuffix() const
{
static QHash<QString,Dialect> res = initLanguageForSuffix();
return res;
}
ModelManager::ModelManager(QObject *parent):
ModelManagerInterface(parent)
{