Commit 1b27a0c0 authored by Frederik Gladhorn's avatar Frederik Gladhorn

Connect to cursor updates in tracking mode.

Also clean up connections a little.
parent 2278a10a
......@@ -222,14 +222,15 @@ void KMagZoomView::followBoth(bool follow)
setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
connect(&m_registry, SIGNAL(focusChanged(const QAccessibleClient::AccessibleObject &)),
this, SLOT(focusChanged(const QAccessibleClient::AccessibleObject &)));
connect(&m_registry, SIGNAL(focusChanged(QAccessibleClient::AccessibleObject)),
this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
connect(&m_registry, SIGNAL(textCaretMoved(QAccessibleClient::AccessibleObject,int)),
this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
} else {
setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
disconnect(&m_registry, SIGNAL(focusChanged(const QAccessibleClient::AccessibleObject &)),
this, SLOT(focusChanged(const QAccessibleClient::AccessibleObject &)));
disconnect(this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
}
}
......@@ -246,15 +247,15 @@ void KMagZoomView::followFocus(bool follow)
setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
connect(&m_registry,SIGNAL(focusChanged(const QAccessibleClient::AccessibleObject &)),
this, SLOT(focusChanged(const QAccessibleClient::AccessibleObject &)));
connect(&m_registry,SIGNAL(focusChanged(QAccessibleClient::AccessibleObject)),
this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
connect(&m_registry, SIGNAL(textCaretMoved(QAccessibleClient::AccessibleObject,int)),
this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
} else {
setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
disconnect(&m_registry, SIGNAL(focusChanged(const QAccessibleClient::AccessibleObject &)),
this, SLOT(focusChanged(const QAccessibleClient::AccessibleObject &)));
disconnect(this, SLOT(focusChanged(QAccessibleClient::AccessibleObject)));
}
}
......
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