[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [Bug 260239] Renaming a variable affects only its declaration
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2010-12-30 23:07:31
Message-ID: 20101230230731.4AB10791CC () immanuel ! kde ! org
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=260239
David Nolden <david.nolden.kde@art-master.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #1 from David Nolden <david nolden kde art-master de> 2010-12-31 \
00:07:28 --- commit fafd165df1e16257ea8ce16fa00cfba5f343b6f8
branch master
Author: David Nolden <david.nolden.kde@art-master.de>
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 <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 #2 from David Nolden <david nolden kde art-master de> 2010-12-31 \
00:07:28 --- commit cfc20a64ad07f9dfb2a95a1eecb247c756fd41ba
branch master
Author: David Nolden <david.nolden.kde@art-master.de>
Date: Fri Dec 31 00:05:31 2010 +0100
Clear the file-modification cache instantly when the user has saved the
file in the editor.
This should be backported to 4.2.
BUG: 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 watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic