Bug 493893 - Using ApplicationLauncherJob in daemon processes causes the daemon to exit immediately
Summary: Using ApplicationLauncherJob in daemon processes causes the daemon to exit im...
Status: RESOLVED DUPLICATE of bug 471941
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git master
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-01 01:39 UTC by Jin Liu
Modified: 2024-10-01 11:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jin Liu 2024-10-01 01:39:42 UTC
STEPS TO REPRODUCE
```
#include <KIO/ApplicationLauncherJob>
#include <KService>

#include <QApplication>
#include <QTimer>

int main(int argc, char **argv) {
    QApplication app(argc, argv);
    QTimer::singleShot(0, &app, []() {
        QString command = QStringLiteral("konsole");
        KService::Ptr service(new KService("konsole", command, "utilities-terminal"));
        auto *job = new KIO::ApplicationLauncherJob(service);
        job->start();
    });
    return app.exec();
}
```

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.1.90
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.10.10-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 Nicolas Fella 2024-10-01 11:03:08 UTC
You need to add QCoreApplication::setQuitLockEnabled(false)

*** This bug has been marked as a duplicate of bug 471941 ***