1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

LineEdit: SideWidget now eats all mouse events

This commit is contained in:
David Rosca 2017-01-27 16:36:11 +01:00
parent ad024ec739
commit 6e15e85919

View File

@ -36,8 +36,20 @@ SideWidget::SideWidget(QWidget* parent)
bool SideWidget::event(QEvent* event)
{
if (event->type() == QEvent::LayoutRequest) {
switch (event->type()) {
case QEvent::LayoutRequest:
emit sizeHintChanged();
break;
case QEvent::MouseButtonPress:
case QEvent::MouseButtonRelease:
case QEvent::MouseButtonDblClick:
case QEvent::MouseMove:
event->accept();
return true;
default:
break;
}
return QWidget::event(event);
@ -393,10 +405,6 @@ void LineEdit::mouseReleaseEvent(QMouseEvent* event)
void LineEdit::mouseDoubleClickEvent(QMouseEvent* event)
{
if (!hasFocus()) {
return;
}
if (event->buttons() == Qt::LeftButton && qzSettings->selectAllOnDoubleClick) {
selectAll();
return;