Bug 496640

Summary: -d option in KGpg does not load optional file into editor
Product: [Applications] kgpg Reporter: Denys Horman <denyshorman>
Component: generalAssignee: Rolf Eike Beer <kde>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 24.08.3   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Denys Horman 2024-11-24 16:12:53 UTC
SUMMARY
When running the `kgpg --help` command, it specifies that a file can optionally be provided alongside the available options. One of these options, -d, is designed to open the KGpg editor. The -d option itself works correctly to open the editor. However, when a file is provided as an additional argument after the -d option, the tool does not load the specified file into the editor.

The expected behavior is that if a file is provided as an argument, the editor should open with this file preloaded. Currently, the editor opens without any file loaded, even when a valid file is provided.

STEPS TO REPRODUCE
1. Open a terminal
2. Run `kgpg -d file.txt`. Ensure file.txt is a valid file
3. Observe the behavior of the KGpg editor

OBSERVED RESULT
The KGpg editor opens without any file loaded, regardless of whether a file is provided with the -d option.

EXPECTED RESULT
The KGpg editor should open with file.txt preloaded and ready for decryption/editing.

SOFTWARE/OS VERSIONS
Linux: Fedora Linux 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0