threedeyes / qthaikuplugins

Qt5 plugins for haiku platform
GNU General Public License v3.0
13 stars 4 forks source link

Need to implement applicationFilePath() #9

Open waddlesplash opened 5 years ago

waddlesplash commented 5 years ago

A recent change in Haiku made be_roster launch apps with argv[0] set to the symlink, e.g. the Deskbar symlink. @diversys says this breaks Qt apps. The problem likely is, as per Qt documentation:

Warning: On Linux, this function will try to get the path from the /proc file system. If that fails, it assumes that argv[0] contains the absolute file name of the executable. The function also assumes that the current directory has not been changed by the application.

So we need a different implementation for Haiku here, using get_image_info to get the application image, and then its path.