MCPcopy Create free account
hub / github.com/NetHack/NetHack / Search

Method Search

win/Qt/qt_menu.cpp:794–810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

792}
793
794void NetHackQtMenuWindow::Search()
795{
796 if (how == PICK_NONE)
797 return;
798
799 searching = true;
800 NetHackQtStringRequestor requestor(this, "Search for:");
801 char line[BUFSZ];
802 line[0] = '\0'; /* for EDIT_GETLIN */
803 if (requestor.Get(line)) {
804 for (int i=0; i<itemcount; i++) {
805 if (itemlist[i].str.contains(line, Qt::CaseInsensitive))
806 ToggleSelect(i, false);
807 }
808 }
809 searching = false;
810}
811
812void NetHackQtMenuWindow::ClearSearch()
813{

Callers

nothing calls this directly

Calls 3

countMethod · 0.80
GetMethod · 0.45
SetDefaultMethod · 0.45

Tested by

no test coverage detected