I'm a currently running on Ubuntu 22.04 and calling the following xdg-open system call from a C++ program:
QString cmd = "xdg-open /home/user/foo.html &";
int ret = system(cmd.toStdString().c_str());
Instead of opening the default Firefox browser the xdg-open system call opens foo.html in a Text Editor.
The same program xdg-open call on Ubuntu 20.04 opens foo.html in a Firefox browser.