If a directory does not exist (e.g. /usr/share/applications/kde4) then the code
in on_search_text_change() would stop processing an no applications would appear.
Instead of returning if opendir(directory_text.data()) fails, just continue processing.
This probably comes from there being no guarantee (no invariant) that the standard library (std::vector) would not reorder the search directory entries and not maintain the order specified in the source.
If a directory does not exist (e.g. /usr/share/applications/kde4) then the code in on_search_text_change() would stop processing an no applications would appear.
Instead of returning if opendir(directory_text.data()) fails, just continue processing.
This probably comes from there being no guarantee (no invariant) that the standard library (std::vector) would not reorder the search directory entries and not maintain the order specified in the source.