[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdevplatform/frameworks] language/codegen: Fix messy fixup from this morning
From: Kevin Funk <kevin () kfunk ! org>
Date: 2014-01-28 13:03:38
Message-ID: E1W88KI-0004Iz-Qg () scm ! kde ! org
[Download RAW message or body]
Git commit 2d396b7cb3b2f3cce55ba8a56cae2f309b89f1aa by Kevin Funk.
Committed on 28/01/2014 at 13:01.
Pushed by kfunk into branch 'frameworks'.
Fix messy fixup from this morning
Thanks for noticing, Dominik
CCMAIL: dhaumann@kde.org
M +6 -8 language/codegen/basicrefactoring.cpp
http://commits.kde.org/kdevplatform/2d396b7cb3b2f3cce55ba8a56cae2f309b89f1aa
diff --git a/language/codegen/basicrefactoring.cpp \
b/language/codegen/basicrefactoring.cpp index 0d1d2fe..be33e29 100644
--- a/language/codegen/basicrefactoring.cpp
+++ b/language/codegen/basicrefactoring.cpp
@@ -150,16 +150,14 @@ DocumentChangeSet::ChangeResult \
BasicRefactoring::applyChangesToDeclarations(con KDevelop::IndexedDeclaration \
BasicRefactoring::declarationUnderCursor(bool allowUse) {
KTextEditor::View* view = \
ICore::self()->documentController()->activeTextDocumentView(); + Q_ASSERT(view);
KTextEditor::Document* doc = view->document();
- if (doc && view) {
- DUChainReadLocker lock;
- if (allowUse)
- return DUChainUtils::itemUnderCursor(doc->url(), \
SimpleCursor(view->cursorPosition()));
- else
- return DUChainUtils::declarationInLine(SimpleCursor(view->cursorPosition()), \
DUChainUtils::standardContextForUrl(doc->url()));
- }
- return KDevelop::IndexedDeclaration();
+ DUChainReadLocker lock;
+ if (allowUse)
+ return DUChainUtils::itemUnderCursor(doc->url(), \
SimpleCursor(view->cursorPosition())); + else
+ return DUChainUtils::declarationInLine(SimpleCursor(view->cursorPosition()), \
DUChainUtils::standardContextForUrl(doc->url())); }
void BasicRefactoring::startInteractiveRename(const KDevelop::IndexedDeclaration \
&decl)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic