diff --git a/src/kcrash.cpp b/src/kcrash.cpp index 0a37c55..c2dbd0d 100644 --- a/src/kcrash.cpp +++ b/src/kcrash.cpp @@ -220,6 +220,14 @@ void KCrash::setApplicationFilePath(const QString &filePath) QStringList args = QCoreApplication::arguments(); if (!args.isEmpty()) { // edge case: tst_QX11Info::startupId does QApplication app(argc, nullptr)... + if (loadedByKdeinit) { + // When a KIO slave is loaded by kdeinit, drkonqi expects the + // appname to not actually be the exectuable but rather the name of + // the kdeinit'd exectuable. The easiest way to retrieve that is + // through argv. + s_appName = qstrdup(QFile::encodeName(QFileInfo(args[0]).completeBaseName()).constData()) ; + } + args[0] = filePath; // replace argv[0] with full path above delete[] s_autoRestartCommandLine; s_autoRestartArgc = args.count();