summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools/qmljsmodelmanager.h
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-23 12:02:29 +0200
committerChristian Kamm <christian.d.kamm@nokia.com>2011-08-24 12:13:41 +0200
commit27d08306986c72aeab1b1f06e96e7072c53d3622 (patch)
tree95cb41bb69e8242b637ec3807ce493b1e4723518 /src/plugins/qmljstools/qmljsmodelmanager.h
parentc105ae47c1eb38ee24d919f2fee151c05ec852e0 (diff)
downloadqt-creator-27d08306986c72aeab1b1f06e96e7072c53d3622.tar.gz
QmlJS: Move the exported-C++-type detection out of C++ code.
It now lives in qmljstools/qmljsfindexportedcpptypes, all in one place. Also ensures that the source code is available when a file is being scanned for QML exports. This will enable checking comments for annotations about the URI a plugin is usually imported as. Change-Id: I1da36d0678e0a8d34b171dbe0f6b5690d89eb18b Reviewed-on: http://codereview.qt.nokia.com/3392 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
Diffstat (limited to 'src/plugins/qmljstools/qmljsmodelmanager.h')
-rw-r--r--src/plugins/qmljstools/qmljsmodelmanager.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/qmljstools/qmljsmodelmanager.h b/src/plugins/qmljstools/qmljsmodelmanager.h
index 7fe82145b3..0a8c26fdbd 100644
--- a/src/plugins/qmljstools/qmljsmodelmanager.h
+++ b/src/plugins/qmljstools/qmljsmodelmanager.h
@@ -117,12 +117,15 @@ protected:
void updateImportPaths();
private slots:
- void queueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc);
+ void maybeQueueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc);
+ void queueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc, bool scan);
void startCppQmlTypeUpdate();
private:
static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
- static void updateCppQmlTypes(ModelManager *qmlModelManager, CPlusPlus::CppModelManagerInterface *cppModelManager, QSet<QString> files);
+ static void updateCppQmlTypes(ModelManager *qmlModelManager,
+ CPlusPlus::CppModelManagerInterface *cppModelManager,
+ QMap<QString, QPair<CPlusPlus::Document::Ptr, bool> > documents);
mutable QMutex m_mutex;
Core::ICore *m_core;
@@ -134,7 +137,7 @@ private:
QFutureSynchronizer<void> m_synchronizer;
QTimer *m_updateCppQmlTypesTimer;
- QSet<QString> m_queuedCppDocuments;
+ QMap<QString, QPair<CPlusPlus::Document::Ptr, bool> > m_queuedCppDocuments;
CppQmlTypeHash m_cppTypes;
mutable QMutex m_cppTypesMutex;