Workaround a lack of API from Qt where it will decide to move the panels
around without us being able to control it.
This patch overrides the QWindow::screenDestroyed slot to be able to decide
where to move the Panel or whether it needs to be removed. This is
considered a workaround and should be removed once the new API is in and
released.
See also: https://codereview.qt-project.org/#/c/88351/
BUG: 335710
If there are no Shaders Plasma doesn't work. If we detect this we show
a warning (without GL) and exit.
This doesn't really work as Qt has a bug which doesn't allow to detect
whether Shaders are supported and the exit just doesn't work.
REVIEW: 118812
This way, we don't need to have everything being repainted when geometries
change while constructing the panel.
Also don't connect to screen changed until everything is initialized and
the panel is displayed.
If a containment is in an applet, then recursively ask for the screen
until we get to an actual root containment that can tell us the screen.
CCBUG: 334500
we have to change the way the platform specific components are done
adding on the fly import paths that override the same plugin
breaks the QML parsing
Qt::UniqueConnection doesn't work well with lambdas, as it's actually a new
connection every time.
Turn it into a method so that Qt can make sure we're connecting only once.
destroy the script engine after use.
is usually used a single time anyways, so saves memory and executes
the code parts that in the bindings gets executed at destroy
such as wallpaper change
BUG:334667
So far we were just enforcing that 0 would be the primary screen. After
this change we will make sure that the rest are layed out horizontally and
then vertically if there's a 2 at the same position.
If a new screen is connected, we'll try to put it in the correct position
following the described situation.
BUG: 334502
This broke screenForContainment because the Panel didn't know where it
would be placed when the panel is being set. This shouldn't be the case
anymore.
BUG: 334500
CCBUG: 334502