Bug 453807 - kalendar --version attempts to import a calendar if kalendar is already running
Summary: kalendar --version attempts to import a calendar if kalendar is already running
Status: RESOLVED FIXED
Alias: None
Product: Merkuro
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Claudio Cambra
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-15 05:45 UTC by Kishore Gopalakrishnan
Modified: 2022-05-15 12:18 UTC (History)
1 user (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 Kishore Gopalakrishnan 2022-05-15 05:45:11 UTC
SUMMARY
If you run kalendar --version in a terminal when kalendar is already running, the existing kalendar window offers to import a calendar file instead of the command just showing the version info and exiting.

STEPS TO REPRODUCE
1. Open a Kalendar window
2. In a terminal window, run `kalendar --version`

OBSERVED RESULTS
Kalendar offers to import a calendar file!!!! 
Title: Import Calendar. 
Text: "Would you like to merge this calendar file's events and tasks into one of your existing calendars, or would you like to create a new calendar from this file?"
Options provided: Merge with existing calendar; Create new calendar; Cancel

EXPECTED RESULTS
Just show the version number and exit, just like it happens when kalendar is not already running

SOFTWARE VERSIONS
kalendarac 5.20.1
kalendar 22.04.1 (could not find this version in the dropdown)
Operating System: Arch Linux
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.3
Kernel Version: 5.15.39-1-lts (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
A. Other KDE applications (e.g. Korganizer) work correctly.

B. Output of `kalendar --version` when kalendar is not already running:
$kalendar --version
QML debugging is enabled. Only use this in a safe environment.
kalendar 22.04.1

C. If you run `kalendar` without any arguments, it seems to correctly detect the already-running instance and exit.
Comment 1 Carl Schwan 2022-05-15 12:18:23 UTC
Git commit 1125887be3348355ac11541e0e1be417e7e15ab4 by Carl Schwan.
Committed on 15/05/2022 at 12:16.
Pushed by carlschwan into branch 'master'.

Move parameter processing earlier in kalendar startup

This makes kalendar not initialize akonadi when showing about or version
information and fix kalendar --version when a kalendar instance is
already started.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>

M  +5    -4    src/main.cpp

https://invent.kde.org/pim/kalendar/commit/1125887be3348355ac11541e0e1be417e7e15ab4