[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 260239] Renaming a variable affects only its declaration
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2011-01-01 21:21:15
Message-ID: 20110101212115.70F5E79BCA () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=260239
--- Comment #3 from David Nolden <david nolden kde art-master de> 2011-01-01 \
22:21:14 --- commit a16d5240b2a1fddd9b8917b04de57d07eaba8ad7
branch 1.2
Author: David Nolden <david.nolden.kde@art-master.de>
Date: Thu Dec 30 23:11:48 2010 +0100
backport from master: 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)
CCBUG: 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 <interfaces/iuicontroller.h>
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))
--- Comment #4 from David Nolden <david nolden kde art-master de> 2011-01-01 \
22:21:14 --- commit 1c507f9ea492d285895e6211a41011677c3ebaaa
branch 1.2
Author: David Nolden <david.nolden.kde@art-master.de>
Date: Fri Dec 31 00:05:31 2010 +0100
backport from master: Clear the file-modification cache instantly when the
user has saved the file in the editor.
CCBUG: 260239
diff --git a/language/backgroundparser/documentchangetracker.cpp
b/language/backgroundparser/documentchangetracker.cpp
index fa0c2f4..a021c96 100644
--- a/language/backgroundparser/documentchangetracker.cpp
+++ b/language/backgroundparser/documentchangetracker.cpp
@@ -75,6 +75,7 @@ DocumentChangeTracker::DocumentChangeTracker(
KTextEditor::Document* document )
connect(document,
SIGNAL(textRemoved(KTextEditor::Document*,KTextEditor::Range, QString)),
SLOT(textRemoved(KTextEditor::Document*,KTextEditor::Range, QString)));
connect(document,
SIGNAL(textChanged(KTextEditor::Document*,KTextEditor::Range,QString,
KTextEditor::Range)),
SLOT(textChanged(KTextEditor::Document*,KTextEditor::Range,QString,
KTextEditor::Range)));
connect(document, SIGNAL(destroyed(QObject*)),
SLOT(documentDestroyed(QObject*)));
+ connect(document,
SIGNAL(documentSavedOrUploaded(KTextEditor::Document*,bool)),
SLOT(documentSavedOrUploaded(KTextEditor::Document*,bool)));
m_moving = dynamic_cast<KTextEditor::MovingInterface*>(document);
Q_ASSERT(m_moving);
@@ -253,6 +254,11 @@ void DocumentChangeTracker::textRemoved( Document*
document, Range oldRange, QSt
updateChangedRange(oldRange);
}
+void DocumentChangeTracker::documentSavedOrUploaded(KTextEditor::Document*
doc,bool)
+{
+ ModificationRevision::clearModificationCache(IndexedString(doc->url()));
+}
+
void DocumentChangeTracker::documentDestroyed( QObject* )
{
m_document = 0;
diff --git a/language/backgroundparser/documentchangetracker.h
b/language/backgroundparser/documentchangetracker.h
index 2c8d4a6..f4651a4 100644
--- a/language/backgroundparser/documentchangetracker.h
+++ b/language/backgroundparser/documentchangetracker.h
@@ -247,6 +247,7 @@ public slots:
virtual void textChanged( KTextEditor::Document* document,
KTextEditor::Range oldRange, QString oldText, KTextEditor::Range newRange );
void documentDestroyed( QObject* );
void aboutToInvalidateMovingInterfaceContent ( KTextEditor::Document*
document );
+ void documentSavedOrUploaded(KTextEditor::Document*,bool);
private:
virtual bool checkMergeTokens(const KTextEditor::Range& range, QString
oldText, QString newText);
diff --git a/language/editor/modificationrevision.cpp
b/language/editor/modificationrevision.cpp
index 9e717bf..ac8a852 100644
--- a/language/editor/modificationrevision.cpp
+++ b/language/editor/modificationrevision.cpp
@@ -46,6 +46,8 @@ class hash_map : public std::unordered_map<_Key, _Tp, _Hash,
_Pred, _Alloc> { }
#include "modificationrevisionset.h"
#include <sys/time.h>
+///@todo Listen to filesystem changes (together with the project manager) and
call fileModificationCache().clear(...) when a file has changed
+
namespace KDevelop {
const int cacheModificationTimesForSeconds = 30;
--
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic