D27476: [KDBusConnectionPool] Handle the case of no qApp

2020-02-23 Thread David Edmundson
davidedmundson abandoned this revision.
davidedmundson added a comment.


  Also fixed by D27607 

REPOSITORY
  R271 KDBusAddons

REVISION DETAIL
  https://phabricator.kde.org/D27476

To: davidedmundson
Cc: apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, 
bruns


D27476: [KDBusConnectionPool] Handle the case of no qApp

2020-02-18 Thread Aleix Pol Gonzalez
apol added inline comments.

INLINE COMMENTS

> kdbusconnectionpool.cpp:66
> +if (!QCoreApplication::instance()) {
> +return QDBusConnection::sessionBus();
> +}

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

REPOSITORY
  R271 KDBusAddons

REVISION DETAIL
  https://phabricator.kde.org/D27476

To: davidedmundson
Cc: apol, kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, 
bruns


D27476: [KDBusConnectionPool] Handle the case of no qApp

2020-02-18 Thread David Edmundson
davidedmundson created this revision.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
davidedmundson requested review of this revision.

REVISION 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

REPOSITORY
  R271 KDBusAddons

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D27476

AFFECTED FILES
  src/kdbusconnectionpool.cpp

To: davidedmundson
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns