diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-08-19 16:05:29 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@digia.com> | 2013-10-01 10:33:51 +0200 |
commit | ba2d7a4fa7c29ea2d62da3d6f6835a091f604656 (patch) | |
tree | 240f8484a13829478d3b7c586eec0598c45d0872 /src/plugins/cpptools/cpptoolseditorsupport.h | |
parent | 447c4ed37f8904ca733d6e6253ad19bb0388f209 (diff) | |
download | qt-creator-ba2d7a4fa7c29ea2d62da3d6f6835a091f604656.tar.gz |
C++: Only parse with appropriate defines for open editors.
If two files from different (sub-)projects include the same header file,
and the defined macros differ for both files, the header file will be
parsed with only the appropriate macros for the including file.
Task-number: QTCREATORBUG-9802
Task-number: QTCREATORBUG-1249
Change-Id: I560490afa287b3bb1e863bce1bb4f57af36ad56e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Diffstat (limited to 'src/plugins/cpptools/cpptoolseditorsupport.h')
-rw-r--r-- | src/plugins/cpptools/cpptoolseditorsupport.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/cpptools/cpptoolseditorsupport.h b/src/plugins/cpptools/cpptoolseditorsupport.h index 46e9ee3d51..838b8cab4f 100644 --- a/src/plugins/cpptools/cpptoolseditorsupport.h +++ b/src/plugins/cpptools/cpptoolseditorsupport.h @@ -33,12 +33,14 @@ #include "cpphighlightingsupport.h" #include "cppmodelmanager.h" #include "cppsemanticinfo.h" +#include "cppsnapshotupdater.h" #include <cplusplus/CppDocument.h> #include <QFuture> #include <QObject> #include <QPointer> +#include <QSharedPointer> #include <QTimer> namespace CPlusPlus { class AST; } @@ -111,6 +113,8 @@ public: /// thread if it is outdate. SemanticInfo recalculateSemanticInfo(bool emitSignalWhenFinished = true); + CPlusPlus::Document::Ptr lastSemanticInfoDocument() const; + /// Recalculates the semantic info in a future, and will emit the /// semanticInfoUpdated() signal when finished. /// Requires that initialized() is true. @@ -119,6 +123,8 @@ public: CppCompletionAssistProvider *completionAssistProvider() const; + QSharedPointer<SnapshotUpdater> snapshotUpdater(); + signals: void documentUpdated(); void diagnosticsChanged(); @@ -173,6 +179,7 @@ private: QFuture<void> m_documentParser; // content caching + mutable QMutex m_cachedContentsLock; mutable QByteArray m_cachedContents; mutable int m_cachedContentsEditorRevision; bool m_fileIsBeingReloaded; @@ -188,6 +195,7 @@ private: mutable QMutex m_lastSemanticInfoLock; SemanticInfo m_lastSemanticInfo; QFuture<void> m_futureSemanticInfo; + QSharedPointer<SnapshotUpdater> m_snapshotUpdater; // Highlighting: unsigned m_lastHighlightRevision; |