forked from qt-creator/qt-creator
QmlJS: Disable unhelpful completion in imports.
Change-Id: I06773d4f1e4805d9d611f520c0a5e63ff6b226c6 Reviewed-by: Leandro Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -646,8 +646,13 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// currently path-in-stringliteral is the only completion available in imports
|
||||||
|
if (contextFinder.isInImport())
|
||||||
|
return 0;
|
||||||
|
|
||||||
// member "a.bc<complete>" or function "foo(<complete>" completion
|
// member "a.bc<complete>" or function "foo(<complete>" completion
|
||||||
else if (completionOperator == QLatin1Char('.')
|
if (completionOperator == QLatin1Char('.')
|
||||||
|| (completionOperator == QLatin1Char('(') && !onIdentifier)) {
|
|| (completionOperator == QLatin1Char('(') && !onIdentifier)) {
|
||||||
// Look at the expression under cursor.
|
// Look at the expression under cursor.
|
||||||
//QTextCursor tc = textWidget->textCursor();
|
//QTextCursor tc = textWidget->textCursor();
|
||||||
@@ -699,8 +704,9 @@ IAssistProposal *QmlJSCompletionAssistProcessor::perform(const IAssistInterface
|
|||||||
return createContentProposal();
|
return createContentProposal();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// global completion
|
// global completion
|
||||||
else if (onIdentifier || assistInterface->reason() == ExplicitlyInvoked) {
|
if (onIdentifier || assistInterface->reason() == ExplicitlyInvoked) {
|
||||||
|
|
||||||
bool doGlobalCompletion = true;
|
bool doGlobalCompletion = true;
|
||||||
bool doQmlKeywordCompletion = true;
|
bool doQmlKeywordCompletion = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user