forked from qt-creator/qt-creator
		
	qmljs: coalesce resets of code model triggered by cpp files update
Use a timer to avoid resetting the model too often. Change-Id: Iadf3ff3f03cfc91df44168243972b1e5a0ee5077 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
		@@ -141,6 +141,7 @@ private slots:
 | 
			
		||||
    void maybeQueueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc);
 | 
			
		||||
    void queueCppQmlTypeUpdate(const CPlusPlus::Document::Ptr &doc, bool scan);
 | 
			
		||||
    void startCppQmlTypeUpdate();
 | 
			
		||||
    void asyncReset();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    static bool matchesMimeType(const Core::MimeType &fileMimeType, const Core::MimeType &knownMimeType);
 | 
			
		||||
@@ -160,6 +161,7 @@ private:
 | 
			
		||||
    QFutureSynchronizer<void> m_synchronizer;
 | 
			
		||||
 | 
			
		||||
    QTimer *m_updateCppQmlTypesTimer;
 | 
			
		||||
    QTimer *m_asyncResetTimer;
 | 
			
		||||
    QHash<QString, QPair<CPlusPlus::Document::Ptr, bool> > m_queuedCppDocuments;
 | 
			
		||||
    QFuture<void> m_cppQmlTypesUpdater;
 | 
			
		||||
    QmlJS::QrcCache m_qrcCache;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user