Skip to content

Commit

Permalink
Make the case insensitive comparison for auto completion (#7603)
Browse files Browse the repository at this point in the history
Fixes #7593
  • Loading branch information
adeas31 committed Jun 22, 2021
1 parent 2be586e commit b22899e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMEdit/OMEditLIB/Modeling/LibraryTreeWidget.cpp
Expand Up @@ -715,15 +715,15 @@ void LibraryTreeItem::tryToComplete(QList<CompleterItem> &completionClasses, QLi
for (int bc = 0; bc < baseClasses.size(); ++bc) {
QList<LibraryTreeItem*> classes = baseClasses[bc]->childrenItems();
for (int i = 0; i < classes.size(); ++i) {
if (classes[i]->getName().startsWith(lastPart) &&
if (classes[i]->getName().startsWith(lastPart, Qt::CaseInsensitive) &&
classes[i]->getNameStructure().compare("OMEdit.Search.Feature") != 0)
completionClasses << (CompleterItem(classes[i]->getName(), classes[i]->getHTMLDescription()));
}

if (!baseClasses[bc]->isRootItem() && baseClasses[bc]->getLibraryType() == LibraryTreeItem::Modelica) {
const QList<ElementInfo*> &components = baseClasses[bc]->getComponentsList();
for (int i = 0; i < components.size(); ++i) {
if (components[i]->getName().startsWith(lastPart))
if (components[i]->getName().startsWith(lastPart, Qt::CaseInsensitive))
completionComponents << CompleterItem(components[i]->getName(), components[i]->getHTMLDescription() + QString("<br/>// Inside %1").arg(baseClasses[bc]->mNameStructure));
}
}
Expand Down

0 comments on commit b22899e

Please sign in to comment.