Skip to content
Snippets Groups Projects
Commit 68a8b6a6 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Show in the completion box only the visible IDs.

parent 33bc7d77
No related branches found
No related tags found
No related merge requests found
......@@ -243,12 +243,18 @@ int QmlCodeCompletion::startCompletion(TextEditor::ITextEditable *editor)
return -1;
}
const QFileInfo currentFileInfo(qmlDocument->fileName());
const QString currentFilePath = currentFileInfo.absolutePath();
const QIcon typeIcon = iconForColor(Qt::yellow);
foreach (QmlJS::Document::Ptr doc, snapshot) {
const QFileInfo fileInfo(doc->fileName());
if (fileInfo.suffix() != QLatin1String("qml"))
continue;
else if (fileInfo.absolutePath() != currentFilePath) // ### FIXME includ `imported' components
continue;
const QString typeName = fileInfo.baseName();
if (typeName.isEmpty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment