summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <kde@davidedmundson.co.uk>2016-02-01 23:06:48 (GMT)
committerDavid Edmundson <kde@davidedmundson.co.uk>2016-02-03 17:32:33 (GMT)
commit5a1a411b41f950e97d80ff7c898052fb6d02fb1a (patch)
tree1d7d5b91170f12e88e7d5fdc2abe55c6732c62af
parent13ad256cc40a657b54a236eef5c491fdf6b48ffc (diff)
Fix the Plasma::Applet::Actions crash
We were mixing KScreen and QScreen API. Corona.cpp checks we are requesting a containment for a valid screen if (screen >= 0 && screen < numScreens()) { This fails as numScreens() is Qt API based, whereas the signal we're adding the output for is ShellCorona::addOutput BUG: 351777 REVIEW: 126961
-rw-r--r--shell/shellcorona.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
index 683abd1..ea3768a 100644
--- a/shell/shellcorona.cpp
+++ b/shell/shellcorona.cpp
@@ -630,7 +630,11 @@ KActivities::Controller *ShellCorona::activityController()
int ShellCorona::numScreens() const
{
- return QGuiApplication::screens().count();
+ //don't start loading screens until kscreen has finished initialising.
+ if (!m_screenConfiguration) {
+ return 0;
+ }
+ return m_screenConfiguration->outputs().count();
}
QRect ShellCorona::screenGeometry(int id) const