[KDBusConnectionPool] Handle the case of no qApp
AbandonedPublic

Authored by davidedmundson on Feb 18 2020, 2:04 PM.

Details

Reviewers
None
Summary

If we don't have a QApplication we can't use the thread-local
QDBusConnection, but we can at least return something valid.

Intended use case is to call KDEInitInterface::ensureKdeinitRunning can
be called from a process with no QApplication.

Test Plan

Used in a process with no QApplication

Diff Detail

Repository
R271 KDBusAddons
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22627
Build 22645: arc lint + arc unit
davidedmundson created this revision.Feb 18 2020, 2:04 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFeb 18 2020, 2:04 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidedmundson requested review of this revision.Feb 18 2020, 2:04 PM
apol added a subscriber: apol.Feb 18 2020, 3:16 PM
apol added inline comments.
src/kdbusconnectionpool.cpp
66

It feels like we should be using the s_perThreadConnection when we're not on a QApplication. Non-QApplications might still have threads.

davidedmundson abandoned this revision.Feb 23 2020, 9:42 PM

Also fixed by D27607