Bug 464030

Summary: Welcome screen stays visible after importing PostScript as PDF
Product: [Applications] okular Reporter: Jonah Brüchert <jbb>
Component: generalAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: major CC: dxt.wjb, nate
Priority: NOR    
Version First Reported In: 22.12.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Jonah Brüchert 2023-01-09 00:34:41 UTC
SUMMARY
Welcome screen stays visible after a PostScript file was imported.

STEPS TO REPRODUCE
1. Start Okular
2. File -> Import PostScript to PDF… 

OBSERVED RESULT
Welcome screen stays visible, and the new PDF is opened behind it

EXPECTED RESULT
welcome screen is closed after the post script file is imported, and the new PDF becomes visible.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 dxt.wjb@gmail.com 2023-05-02 13:25:38 UTC
The Welcome Screen can also stay visible when a document has been opened via the DBus interface.

1. Start Okular

2. Find the DBus server

    $ qdbus| grep okular
    org.kde.okular-9834

3. Open a document

     $ dbus-send --print-reply --dest=org.kde.okular-9834 /okular org.kde.okular.openDocument string:/path/to/some.pdf

However, I think there's a more general problem with opening documents because tab behaviour is also inconsistent the same way',
i.e.  the  "Open new files in tabs" and "Switch to existing tab..." configuration options:  
   * work as expected for:
           * File | Open
           * File | Open Recent
   * have no effect for: 
           * File | Import Postscript as PDF
           * DBus OpenDocumentSOFTWARE/OS VERSIONS

SOFTWARE/OS VERSIONS
Operating System: Gentoo (amd64/stable) Linux-6.1.19
Okular Version: 22.12.3
KDE Plasma Version: 5.27.4.1
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.9
Graphics Platform: X11
Comment 2 dxt.wjb@gmail.com 2023-05-02 14:13:07 UTC
Please disregard my dbus comments, shortly after pressing "Save Changes" I tried the /okularshell path (as below) and the behaviour of Welcome Screen & Tabs is as expected.
 $ dbus-send --print-reply --dest=org.kde.okular-9834 /okular org.kde.okular.openDocument string:file://path/to/some.pdf