mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 10:22:48 +00:00
plasma: pass the focus reason when setting focus
the focus reason serves some purpose Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
87b428e010
commit
2dcb8c968a
2 changed files with 3 additions and 8 deletions
|
@ -683,22 +683,19 @@ void Dialog::showEvent(QShowEvent * event)
|
|||
|
||||
void Dialog::focusInEvent(QFocusEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
if (d->view) {
|
||||
d->view->setFocus();
|
||||
d->view->setFocus(event->reason());
|
||||
}
|
||||
|
||||
QGraphicsWidget *graphicsWidget = d->graphicsWidgetPtr.data();
|
||||
if (graphicsWidget) {
|
||||
graphicsWidget->setFocus();
|
||||
graphicsWidget->setFocus(event->reason());
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog::moveEvent(QMoveEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
//kDebug();
|
||||
d->scheduleBorderCheck();
|
||||
}
|
||||
|
||||
|
|
|
@ -1177,10 +1177,8 @@ QSizeF ScrollWidget::snapSize() const
|
|||
|
||||
void ScrollWidget::focusInEvent(QFocusEvent *event)
|
||||
{
|
||||
Q_UNUSED(event)
|
||||
|
||||
if (d->widget) {
|
||||
d->widget.data()->setFocus();
|
||||
d->widget.data()->setFocus(event->reason());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue