Commit 13a2e49d authored by Christian Kamm's avatar Christian Kamm Committed by hjk

C++: Set property on CppEditorWidget when in function link.

To allow FakeVim to pick up on the state and pass through Enter/Return.

Change-Id: Ia203a1b3fa8877d90cbaf4b46183bb01a6de1362
Reviewed-on: http://codereview.qt.nokia.com/3856Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 9c1cb774
......@@ -2207,6 +2207,7 @@ void CPPEditorWidget::onFunctionDeclDefLinkFound(QSharedPointer<FunctionDeclDefL
{
abortDeclDefLink();
m_declDefLink = link;
setProperty(Constants::FUNCTION_DECL_DEF_LINK_PROPERTY_NAME, true);
// disable the link if content of the target editor changes
TextEditor::BaseTextEditorWidget *targetEditor =
......@@ -2222,7 +2223,7 @@ void CPPEditorWidget::applyDeclDefLinkChanges(bool jumpToMatch)
if (!m_declDefLink)
return;
m_declDefLink->apply(this, jumpToMatch);
m_declDefLink.clear();
abortDeclDefLink();
updateFunctionDeclDefLink();
}
......@@ -2239,6 +2240,7 @@ void CPPEditorWidget::abortDeclDefLink()
this, SLOT(abortDeclDefLink()));
}
setProperty(Constants::FUNCTION_DECL_DEF_LINK_PROPERTY_NAME, false);
m_declDefLink->hideMarker(this);
m_declDefLink.clear();
}
......
......@@ -65,6 +65,8 @@ const char * const WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("CppEditor", "C++");
const char * const CPP_SNIPPETS_GROUP_ID = "C++";
const char * const FUNCTION_DECL_DEF_LINK_PROPERTY_NAME = "inCppFunctionDeclDefLink";
} // namespace Constants
} // namespace CppEditor
......
......@@ -308,8 +308,6 @@ void FunctionDeclDefLink::apply(CPPEditorWidget *editor, bool jumpToMatch)
TextEditor::TextContent(
tr("Target file was changed, could not apply changes")));
}
hideMarker(editor);
}
template <class T>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment