would make this easier to read and save you the trouble to create tmp.
Also, don't use QString::isNull() unless you absolutely must use it. Or do you really want this function to behave differently for pathHint == QString{} and pathHint == QStringLiteral{""}? If the answer is yes, then a second c'tor that doesn't take a pathHint paramter would be much better API in my opinion.
Maybe you should document that ../share/kleopatra is used as pathHint if pathHint is QString{}. On the other hand, this is a library function and it defaults to an application specific value?
I suggest moving this application specific default value for pathHint where it belongs: in the application(s).
You delete c'tors that don't even exist in the first place. c'tors of base classes are never inherited by subclasses unless they are explicitly made visible to overload resolution with using. (I'm wondering why gcc doesn't complain about this.)
You can easily verify this by commenting those two lines and then trying to do DocAction foo{nullptr}; somewhere. gcc will tell you that there is no matching function call and that the only available candidate expects 5 arguments.