QmlJS: Find setContextProperty calls in C++ and expose to QML.

Task-number: QTCREATORBUG-3199

Change-Id: I591490ceafadc0f5a07c63ec063f1bdfa7055f47
Reviewed-on: http://codereview.qt-project.org/4074
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-08-25 12:35:55 +02:00
parent c2f31f16dc
commit 10a956a8f7
8 changed files with 327 additions and 71 deletions

View File

@@ -110,7 +110,14 @@ public:
Table _elements;
};
typedef QHash<QString, QList<LanguageUtils::FakeMetaObject::ConstPtr> > CppQmlTypeHash;
class CppData
{
public:
QList<LanguageUtils::FakeMetaObject::ConstPtr> exportedTypes;
QMap<QString, QString> contextProperties;
};
typedef QHash<QString, CppData> CppDataHash;
public:
ModelManagerInterface(QObject *parent = 0);
@@ -138,7 +145,7 @@ public:
virtual void loadPluginTypes(const QString &libraryPath, const QString &importPath,
const QString &importUri, const QString &importVersion) = 0;
virtual CppQmlTypeHash cppQmlTypes() const = 0;
virtual CppDataHash cppData() const = 0;
virtual LibraryInfo builtins(const Document::Ptr &doc) const = 0;