Assert if trying to use a KCatalog without a QCoreApplication
ClosedPublic

Authored by aacid on Aug 18 2018, 8:55 PM.

Details

Summary

QCoreApplication init calls

setlocale(LC_ALL, "");

that is crucial for gettext to work, so assert if
the user tries to use it before.

Diff Detail

Repository
R249 KI18n
Branch
arcpatch-D14922
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 1997
Build 2015: arc lint + arc unit
aacid created this revision.Aug 18 2018, 8:55 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 18 2018, 8:55 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
aacid requested review of this revision.Aug 18 2018, 8:55 PM
dfaure added a subscriber: dfaure.Aug 19 2018, 8:21 AM
dfaure added inline comments.
src/kcatalog.cpp
188

Q_ASSERT_X exists for this purpose

aacid updated this revision to Diff 40005.Aug 19 2018, 3:58 PM

Use Q_ASSERT_X

dfaure accepted this revision.Aug 19 2018, 9:32 PM

Qt itself tends to write "QCoreApplication" in such warnings instead of Q*Application, but OK.

This revision is now accepted and ready to land.Aug 19 2018, 9:32 PM
aacid closed this revision.Aug 28 2018, 8:42 PM

This change makes kwin_x11 crash on startup. Please fix kwin or degrade this to a warning.

KWin is fixed in 5.12, 5.13 and master branch, thanks for bringing this to our attention