Bug 407164 - Load Demo -button in the start-up dialog doesn't work or opens wrong version of KPhotoAlbum
Summary: Load Demo -button in the start-up dialog doesn't work or opens wrong version ...
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: general (show other bugs)
Version: GIT master
Platform: Mint (Debian based) Linux
: NOR minor
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-02 18:56 UTC by Teemu Hämäläinen
Modified: 2019-05-02 21:31 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 Teemu Hämäläinen 2019-05-02 18:56:59 UTC
SUMMARY
Load Demo -button in the start-up dialog doesn't work or opens wrong version of KPa, if KPa is started from a location which is different than what is found in $PATH.

Running KPhotoAlbum without parameters produces a dialog, with options to Create My Own database, Load demo or Check My Feature Set.
If KPhotoAlbum is not found in PATH, the Load Demo -button just closes the dialog and exits the program. 
 
I found this out when I built a new Git-based version 5.5.2. launched it from the install directory with ./kphotoalbum and pressing Load Demo to check the new functionality, it opened version 5.3. instead (which was the version installed earlier from distro's repositories).

STEPS TO REPRODUCE
1. Build a new version of KPa and install it in a location not found in $PATH
2. Enter the install directory and launch KPhotoAlbum from there without parameters
3. Press Load Demo -button

OBSERVED RESULT
Older version (found from PATH) of KPa is opened, or the demo version does not open at all (it no version found in PATH).

EXPECTED RESULT
Demo database opens with the version of KPhotoAlbum that was just launched and which provides the start-up dialog.

SOFTWARE/OS VERSIONS
Linux Mint Cinnamon 19.1 with all available updates 

ADDITIONAL INFORMATION
Launching the program with "--demo" parameter opens the demo database with the correct version of KPa. Maybe Load Demo-button does just that, i.e. closes the current program and re-launches it with the parameter, and this doesn't work, if the same version is not found in PATH.
Comment 1 Johannes Zarl-Zierl 2019-05-02 21:23:10 UTC
You're right. I'll check how easy this is to fix...
Comment 2 Johannes Zarl-Zierl 2019-05-02 21:31:18 UTC
Git commit b19a14f05dee10d2a6e1a50e687eb9108b621cc4 by Johannes Zarl-Zierl.
Committed on 02/05/2019 at 21:28.
Pushed by johanneszarl into branch 'master'.

Don't rely on path for starting demo mode.

Instead of calling the kphotoalbum executable that is found using PATH,
try to call the actual executable file when starting demo mode via the
help menu.

M  +1    -1    MainWindow/Window.cpp

https://commits.kde.org/kphotoalbum/b19a14f05dee10d2a6e1a50e687eb9108b621cc4