[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/sdk/kdevplatform/language/duchain
From:       Milian Wolff <mail () milianw ! de>
Date:       2010-01-20 0:11:08
Message-ID: 1263946268.973371.6039.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1077341 by mwolff:

make it possible to update a context with a higher priority

 M  +2 -2      duchain.cpp  
 M  +2 -2      duchain.h  


--- trunk/extragear/sdk/kdevplatform/language/duchain/duchain.cpp #1077340:1077341
@@ -1722,7 +1722,7 @@
   return waiter.m_topContext;
 }
 
-void DUChain::updateContextForUrl(const IndexedString& document, \
TopDUContext::Features minFeatures, QObject* notifyReady) const { +void \
DUChain::updateContextForUrl(const IndexedString& document, TopDUContext::Features \
minFeatures, QObject* notifyReady, int priority) const {  DUChainReadLocker lock( \
DUChain::lock() );  TopDUContext* standardContext = \
DUChainUtils::standardContextForUrl(document.toUrl());  if(standardContext && \
standardContext->parsingEnvironmentFile() && \
!standardContext->parsingEnvironmentFile()->needsUpdate() && \
standardContext->parsingEnvironmentFile()->featuresSatisfied(minFeatures)) { @@ \
-1731,7 +1731,7 @@  QMetaObject::invokeMethod(notifyReady, "updateReady", \
Qt::DirectConnection, Q_ARG(KDevelop::IndexedString, document), \
Q_ARG(KDevelop::ReferencedTopDUContext, ReferencedTopDUContext(standardContext)));  \
}else{  ///Start a parse-job for the given document
-    ICore::self()->languageController()->backgroundParser()->addDocument(document.toUrl(), \
minFeatures, 1, notifyReady); +    \
ICore::self()->languageController()->backgroundParser()->addDocument(document.toUrl(), \
minFeatures, priority, notifyReady);  }
 }
 
--- trunk/extragear/sdk/kdevplatform/language/duchain/duchain.h #1077340:1077341
@@ -75,10 +75,10 @@
    *                    "void updateReady(KDevelop::IndexedString url, \
                KDevelop::ReferencedTopDUContext topContext)".
    *                    The notification is guaranteed to be called once for each \
                call to updateContextForUrl. The given top-context
    *                    may be invalid if the update failed. A queued connection is \
                used if a re-parse has to be done.
-   *
+   * @param priority An optional priority for the job. The lower the value, the \
                higher it's priority.
    * @note The duchain must be at least read-locked locked when this is called!
    */
-   Q_SCRIPTABLE void updateContextForUrl(const IndexedString& document, \
TopDUContext::Features minFeatures, QObject* notifyReady = 0) const; +   Q_SCRIPTABLE \
void updateContextForUrl(const IndexedString& document, TopDUContext::Features \
minFeatures, QObject* notifyReady = 0, int priority = 1) const;  
    /**
     * Convenience-function similar to updateContextForUrl that blocks this thread \
until the update of the given document is ready,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic