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
Set a scope to lambda calls by passing the qobject, otherwise connects
persist after the object has been deleted.
Destroy the panel views when the ShellCorona is destroyed, otherwise they
stay available when the QScreen instances are cleaned up, provoking weird
crashes.
Qt subsystem has deficiencies on their approximation to multiple
screens. [1]
This patch adopts libkscreen to figure out screen additions and primary
modifications.
I'm not merging to master yet as I'm experiencing some issues but it's
already far more comfortable to work with than QGuiApplication::screens().
[1] https://bugreports.qt-project.org/browse/QTBUG-38404
CCMAIL: plasma-devel@kde.org
if the screen isn't there when plasma starts,
don't add the panels of that screen
if a screen is disconnected, remove the panels of said screen
BUG:333193
This saves having to iterate through a list of screens and try and find
which one matches. This didn't work as QWindow automatically assings
itself a new screen when the old screen is deleted.
With Aleix Pol.