Commit 86cbf733 authored by Laurent Montel's avatar Laurent Montel 😁

Fix compile with strict iterator

parent b54c5750
......@@ -397,7 +397,7 @@ void ScreenShotEffect::postPaintScreen()
p.begin(&multipleOutputsImage);
// reassemble images together
for (i = m_cacheOutputsImages.begin(); i != m_cacheOutputsImages.end(); ++i) {
for (i = m_cacheOutputsImages.constBegin(); i != m_cacheOutputsImages.constEnd(); ++i) {
auto pos = i.key();
auto img = i.value();
// disable dpr rendering, we already took care of this
......
......@@ -134,7 +134,7 @@ void KWinScreenEdge::monitorChangeDefaultEdge(const QList<int> &borderList, int
void KWinScreenEdge::reload()
{
for (auto it = m_reference.begin(); it != m_reference.cend(); ++it) {
for (auto it = m_reference.cbegin(); it != m_reference.cend(); ++it) {
monitor()->selectEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()), it.value());
}
onChanged();
......@@ -142,7 +142,7 @@ void KWinScreenEdge::reload()
void KWinScreenEdge::setDefaults()
{
for (auto it = m_default.begin(); it != m_default.cend(); ++it) {
for (auto it = m_default.cbegin(); it != m_default.cend(); ++it) {
monitor()->selectEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()), it.value());
}
onChanged();
......@@ -200,13 +200,13 @@ ElectricBorder KWinScreenEdge::monitorEdgeToElectricBorder(int edge)
void KWinScreenEdge::onChanged()
{
bool needSave = isSaveNeeded();
for (auto it = m_reference.begin(); it != m_reference.cend(); ++it) {
for (auto it = m_reference.cbegin(); it != m_reference.cend(); ++it) {
needSave |= it.value() != monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
}
emit saveNeededChanged(needSave);
bool defaults = isDefault();
for (auto it = m_default.begin(); it != m_default.cend(); ++it) {
for (auto it = m_default.cbegin(); it != m_default.cend(); ++it) {
defaults &= it.value() == monitor()->selectedEdgeItem(KWinScreenEdge::electricBorderToMonitorEdge(it.key()));
}
emit defaultChanged(defaults);
......
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