D29036: Print meaningful warning when there is no QGuiApplication

2020-04-21 Thread Kai Uwe Broulik
This revision was automatically updated to reflect the committed changes.
Closed by commit R278:57e41449ed82: Print meaningful warning when there is no 
QGuiApplication (authored by broulik).

REPOSITORY
  R278 KWindowSystem

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29036?vs=80724&id=80727

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

AFFECTED FILES
  src/pluginwrapper.cpp

To: broulik, #plasma, zzag
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29036: Print meaningful warning when there is no QGuiApplication

2020-04-21 Thread Vlad Zahorodnii
zzag accepted this revision.
This revision is now accepted and ready to land.

REPOSITORY
  R278 KWindowSystem

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

To: broulik, #plasma, zzag
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29036: Print meaningful warning when there is no QGuiApplication

2020-04-21 Thread Kai Uwe Broulik
broulik created this revision.
broulik added a reviewer: Plasma.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
broulik requested review of this revision.

REVISION SUMMARY
  KWindowSystem plug-in loading (and everything regarding a window system, like 
X or Wayland connection anyway) depends on `QGuiApplication::platformName()` 
which will be empty when there is none, such as in a `QCoreApplication`.
  This would then just print a meaningless error on how now platform plug-in 
was found.

TEST PLAN
  - Created a `QCoreApplication`, called `KWindowSystem::windows()`, got a 
warning that I need a `QGuiApplication` and an empty window list
  - Created a `QGuiApplication`, called `KWindowSystem::windows()`, got no 
warning and a lost of X window ids
  - Created a `QApplication`, called `KWindowSystem::windows()`, got no warning 
and a lost of X window ids

REPOSITORY
  R278 KWindowSystem

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

AFFECTED FILES
  src/pluginwrapper.cpp

To: broulik, #plasma
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns