Bug 392044

Summary: OSX main krita broken after commit dbd65ef72
Product: [Applications] krita Reporter: vanyossi <ghevan>
Component: GeneralAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED FIXED    
Severity: major CC: halla
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: macOS   
Latest Commit: Version Fixed In:
Attachments: Place KoApplication creator before QApplication calls

Description vanyossi 2018-03-19 08:59:24 UTC
Created attachment 111491 [details]
Place KoApplication creator before QApplication calls

Commit dbd65ef72 breaks krita binary with the following message on OSX

krita 
QCoreApplication::applicationDirPath: Please instantiate the QApplication object first
Cannot calculate the bundle path from the app path
Abort trap: 6

I attach a patch that reverts KoApplication call to where it was, so it starts QApplication before any call to it.
Comment 1 Halla Rempt 2018-03-19 12:11:23 UTC
Hm, we'll have to ifdef that, because otherwise selecting translations is broken again.
Comment 2 Halla Rempt 2018-03-20 07:39:42 UTC
Git commit 19edf52aa9e68ffb35417471288ce975034d46e5 by Boudewijn Rempt.
Committed on 20/03/2018 at 07:37.
Pushed by rempt into branch 'master'.

Try harder to setup the environment for finding translations

We can only get the application root if we have an application, so
create a dummy temporary qapplication to get the root; then set
all the paths and environment, then create the real application,
then set the application domain. Now ki18n should be able to find
the translations under all circumstances.

M  +18   -6    krita/main.cc

https://commits.kde.org/krita/19edf52aa9e68ffb35417471288ce975034d46e5
Comment 3 Halla Rempt 2018-03-20 07:50:55 UTC
Git commit 931ba3643615ebd6045d63ee444762398637460a by Boudewijn Rempt.
Committed on 20/03/2018 at 07:49.
Pushed by rempt into branch 'krita/4.0'.

Try harder to setup the environment for finding translations

We can only get the application root if we have an application, so
create a dummy temporary qapplication to get the root; then set
all the paths and environment, then create the real application,
then set the application domain. Now ki18n should be able to find
the translations under all circumstances.
(cherry picked from commit 19edf52aa9e68ffb35417471288ce975034d46e5)

M  +18   -6    krita/main.cc

https://commits.kde.org/krita/931ba3643615ebd6045d63ee444762398637460a