forked from qt-creator/qt-creator
Show in the completion box only the visible IDs.
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user