Bug 407164

Summary: Load Demo -button in the start-up dialog doesn't work or opens wrong version of KPhotoAlbum
Product: [Applications] kphotoalbum Reporter: Teemu Hämäläinen <sikanauta>
Component: generalAssignee: KPhotoAlbum Bugs <kphotoalbum-bugs-null>
Status: RESOLVED FIXED    
Severity: minor CC: johannes
Priority: NOR    
Version First Reported In: GIT master   
Target Milestone: ---   
Platform: Mint (Debian based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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