Commit 8a472f17 authored by David Edmundson's avatar David Edmundson

Avoid connecting to screen changed signals twice

Summary:
load() can be called multiple times; either from setShell or
loadLookAndFeelDefaultLayout. We still only want addOutput once when a
screen is added

Reviewers: #plasma, apol

Reviewed By: apol

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D3320

CCBUG:372099
CCBUG:371858
CBUG:371991
CCBUG:371819
CCBUG:371734
parent 329f00dc
......@@ -675,9 +675,9 @@ void ShellCorona::load()
addOutput(screen);
}
}
connect(qGuiApp, &QGuiApplication::screenAdded, this, &ShellCorona::addOutput);
connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &ShellCorona::primaryOutputChanged);
connect(qGuiApp, &QGuiApplication::screenRemoved, this, &ShellCorona::screenRemoved);
connect(qGuiApp, &QGuiApplication::screenAdded, this, &ShellCorona::addOutput, Qt::UniqueConnection);
connect(qGuiApp, &QGuiApplication::primaryScreenChanged, this, &ShellCorona::primaryOutputChanged, Qt::UniqueConnection);
connect(qGuiApp, &QGuiApplication::screenRemoved, this, &ShellCorona::screenRemoved, Qt::UniqueConnection);
if (!m_waitingPanels.isEmpty()) {
m_waitingPanelsTimer.start();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment