1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Merge branch 'v2.0'

This commit is contained in:
David Rosca 2016-08-23 08:59:06 +02:00
commit 6d301e1854

View File

@ -172,8 +172,6 @@ void ToolButton::showMenu()
void ToolButton::mousePressEvent(QMouseEvent* e)
{
QToolButton::mousePressEvent(e);
if (popupMode() == QToolButton::DelayedPopup)
m_pressTimer.start();
@ -184,13 +182,13 @@ void ToolButton::mousePressEvent(QMouseEvent* e)
else if (e->buttons() == Qt::RightButton && menu()) {
setDown(true);
showMenu();
} else {
QToolButton::mousePressEvent(e);
}
}
void ToolButton::mouseReleaseEvent(QMouseEvent* e)
{
QToolButton::mouseReleaseEvent(e);
m_pressTimer.stop();
if (e->button() == Qt::MiddleButton && rect().contains(e->pos())) {
@ -200,6 +198,8 @@ void ToolButton::mouseReleaseEvent(QMouseEvent* e)
else if (e->button() == Qt::LeftButton && rect().contains(e->pos()) && e->modifiers() == Qt::ControlModifier) {
emit controlClicked();
setDown(false);
} else {
QToolButton::mouseReleaseEvent(e);
}
}