From kdevelop-bugs Thu Dec 30 23:07:31 2010 From: David Nolden Date: Thu, 30 Dec 2010 23:07:31 +0000 To: kdevelop-bugs Subject: [Bug 260239] Renaming a variable affects only its declaration Message-Id: <20101230230731.3A380791C3 () immanuel ! kde ! org> X-MARC-Message: https://marc.info/?l=kdevelop-bugs&m=129375055919517 https://bugs.kde.org/show_bug.cgi?id=260239 David Nolden changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED --- Comment #1 from David Nolden 2010-12-31 00:07:28 --- commit fafd165df1e16257ea8ce16fa00cfba5f343b6f8 branch master Author: David Nolden Date: Thu Dec 30 23:11:48 2010 +0100 Don't completely ignore the retrieved top-context if it is still flagged to require an update. Instead, simply show a warning message on the status bar. (TODO: Find out why the update flag is not correct) This should be backported to KDevelop 4.2. BUG: 260239 diff --git a/language/duchain/navigation/usescollector.cpp b/language/duchain/navigation/usescollector.cpp index 0d11d80..1a501b2 100644 --- a/language/duchain/navigation/usescollector.cpp +++ b/language/duchain/navigation/usescollector.cpp @@ -32,6 +32,7 @@ #include "../classmemberdeclaration.h" #include "../abstractfunctiondeclaration.h" #include "../functiondefinition.h" +#include using namespace KDevelop; @@ -337,14 +338,22 @@ void UsesCollector::updateReady(KDevelop::IndexedString url, KDevelop::Reference if(!m_staticFeaturesManipulated.contains(url)) return; //Not interesting - if(!(topContext->features() & TopDUContext::AllDeclarationsContextsAndUses) || topContext->parsingEnvironmentFile()->needsUpdate()) { + if(!(topContext->features() & TopDUContext::AllDeclarationsContextsAndUses)) { ///@todo With simplified environment-matching, the same file may have been imported multiple times, ///while only one of those was updated. We have to check here whether this file is just such an import, ///or whether we work on with it. ///@todo We will lose files that were edited right after their update here. -// kDebug() << "context" << topContext->url().str() << "does not have the required features"; + kWarning() << "WARNING: context" << topContext->url().str() << "does not have the required features!!"; + ICore::self()->uiController()->showErrorMessage("Updating " + ICore::self()->projectController()->prettyFileName(topContext->url().toUrl(), KDevelop::IProjectController::FormatPlain) + " failed!", 5); return; } + + if(topContext->parsingEnvironmentFile()->needsUpdate()) { + kWarning() << "WARNING: context" << topContext->url().str() << "is not up to date!"; + ICore::self()->uiController()->showErrorMessage(ICore::self()->projectController()->prettyFileName(topContext->url().toUrl(), KDevelop::IProjectController::FormatPlain) + " still needs an update!", 5); +// return; + } + IndexedTopDUContext indexed(topContext.data()); if(m_checked.contains(indexed)) -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ KDevelop-bugs mailing list KDevelop-bugs@kdevelop.org https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs