mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
LineEdit: SideWidget now eats all mouse events
This commit is contained in:
parent
ad024ec739
commit
6e15e85919
18
src/lib/3rdparty/lineedit.cpp
vendored
18
src/lib/3rdparty/lineedit.cpp
vendored
|
@ -36,8 +36,20 @@ SideWidget::SideWidget(QWidget* parent)
|
||||||
|
|
||||||
bool SideWidget::event(QEvent* event)
|
bool SideWidget::event(QEvent* event)
|
||||||
{
|
{
|
||||||
if (event->type() == QEvent::LayoutRequest) {
|
switch (event->type()) {
|
||||||
|
case QEvent::LayoutRequest:
|
||||||
emit sizeHintChanged();
|
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);
|
return QWidget::event(event);
|
||||||
|
@ -393,10 +405,6 @@ void LineEdit::mouseReleaseEvent(QMouseEvent* event)
|
||||||
|
|
||||||
void LineEdit::mouseDoubleClickEvent(QMouseEvent* event)
|
void LineEdit::mouseDoubleClickEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
if (!hasFocus()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (event->buttons() == Qt::LeftButton && qzSettings->selectAllOnDoubleClick) {
|
if (event->buttons() == Qt::LeftButton && qzSettings->selectAllOnDoubleClick) {
|
||||||
selectAll();
|
selectAll();
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user