KIO's Recent Documents feature is not as useful as it could be right now because KRun and the KURl dialog unconditionally add all URLs to it, so it tends to fill up with web links, appstream:/ URLs, and the like.
This patch fixes that by having them only append a URL to Recent Documents if it's actually a document.