diff --git a/src/core/krecentdocument.cpp b/src/core/krecentdocument.cpp --- a/src/core/krecentdocument.cpp +++ b/src/core/krecentdocument.cpp @@ -86,7 +86,12 @@ void KRecentDocument::add(const QUrl &url) { - KRecentDocument::add(url, QCoreApplication::applicationName()); + // desktopFileName is in QGuiApplication but we're in KIO Core here + QString desktopEntryName = QCoreApplication::instance()->property("desktopFileName").toString(); + if (desktopEntryName.isEmpty()) { + desktopEntryName = QCoreApplication::applicationName(); + } + KRecentDocument::add(url, desktopEntryName); // ### componentName might not match the service filename... }