Bug 455642

Summary: runtime warning Cannot register a job with KUiServerV2JobTracker without QGuiApplication::desktopFileName
Product: [Frameworks and Libraries] frameworks-kjobwidgets Reporter: Milian Wolff <mail>
Component: generalAssignee: kdelibs bugs <kdelibs-bugs-null>
Status: REPORTED ---    
Severity: normal CC: vad.kde
Priority: NOR    
Version First Reported In: 5.95.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Milian Wolff 2022-06-20 10:17:12 UTC
SUMMARY

I'm working on a non-KDE Qt application which happens to use KDE file dialogs when run on plasma. This then triggers runtime warnings and UBSAN warnings like the following:

```
    32.799 warning: kf.jobwidgets/unknown[unknown:0]: Cannot register a job with KUiServerV2JobTracker without QGuiApplication::desktopFileName
```

Can this be handled more gracefully or is this now a hard requirement for all Qt applications? 

STEPS TO REPRODUCE
1.  launch non-KDE application using Qt
2.  open file dialog
3.  look at console output

OBSERVED RESULT

```
    32.799 warning: kf.jobwidgets/unknown[unknown:0]: Cannot register a job with KUiServerV2JobTracker without QGuiApplication::desktopFileName
```

EXPECTED RESULT

No runtime warnings

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: latest archlinux packages
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.95.0
Qt Version: 5.15.5 (kde patch collection)

ADDITIONAL INFORMATION
Comment 1 Vadim 2023-05-28 13:10:23 UTC
VirtualBox crashes when you press Ctrl+F (search / filtering?) in a file selection dialog:

1. Create a new VM, next... finish
2. Go to VM settings, go to optical drive to select a new image file
3. In the File Open dialog press "Ctrl+F"
4. VirtualBox (Manager) crashes

`Qt WARNING: Cannot register a job with KUiServerV2JobTracker without QGuiApplication::desktopFileName`

Manjaro KDE, `pacman -Q frameworkintegration # frameworkintegration 5.105.0-1`