Bug 392044 - OSX main krita broken after commit dbd65ef72
Summary: OSX main krita broken after commit dbd65ef72
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other macOS
: NOR major
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-19 08:59 UTC by vanyossi
Modified: 2018-03-20 07:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Place KoApplication creator before QApplication calls (983 bytes, patch)
2018-03-19 08:59 UTC, vanyossi
Details

Note You need to log in before you can comment on or make changes to this bug.
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