| ▲ | jasongill a day ago | |||||||||||||||||||||||||||||||||||||
Ignoring concerns about the security of UPnP, and the fact that this is somewhat of a "solved" problem considering there are things like libupnp and miniupnpc, I am wondering if this is really the cleanest way to solve the problem in C++ with Qt? I'm most curious about the fact that this program has ~30,000 lines of included headers to simply generate a static string (the XML output). Obviously if you were generating large XML payloads repeatedly, then including a dependency would be a good idea, but this implementation is using "inja.hpp" which in turn requires "json.hpp" to output what is effectively a concatenated string. Why not just use Qt's built in QStringLiteral and feed it the (short) bit of XML to it along with your 4 variables, similar to a sprintf? | ||||||||||||||||||||||||||||||||||||||
| ▲ | WesolyKubeczek a day ago | parent [-] | |||||||||||||||||||||||||||||||||||||
Likely a side effect of Qt trying to be an “everything” library, batteries and battery factory included. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||