Avoid enabling kcrash if it's only included via a plugin
ClosedPublic

Authored by davidedmundson on Aug 15 2019, 9:25 AM.

Details

Summary

If a Qt app happens to load our plasma-integration plugin it shouldn't
change how bug reporting works.

There's no point showing drkonqi if there's not an
appropriate KDE product.

Worse, our crash handling can interfere with that processes own signal
handling.

This patch is effectively a copy of
02b523bad09aab062355e46771889b0f3709692f in kxmlgui for enabling auto-
accelerators only if the lib is linked directly.

BUG: 401637

Test Plan

Changed the crashtest app in drkonqi to not directly link - didn't get drkonqi
Re-enabled linking. Got drkonqi

Diff Detail

Repository
R285 KCrash
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.Aug 15 2019, 9:25 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptAug 15 2019, 9:25 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Aug 15 2019, 9:25 AM

Alternatively we could just kill the Q_COREAPP_STARTUP_FUNCTION as most apps already explicitly call KCrash::initialize() to get round distros compiling with link-as-needed?

mart accepted this revision.Aug 15 2019, 9:39 AM
mart added a subscriber: mart.

the logic is awesome, the checking with the static is not super pretty but saves significantly useless checks

This revision is now accepted and ready to land.Aug 15 2019, 9:39 AM
This revision was automatically updated to reflect the committed changes.