From a271d1dfa8a962f559178eb1d2cce52fa1253495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joni=20R=C3=A4s=C3=A4nen?= Date: Tue, 22 Jan 2019 10:51:23 +0200 Subject: [PATCH] Double clicking now starts the call. --- src/gui/contactlistitem.cpp | 7 +++++++ src/gui/contactlistitem.h | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/src/gui/contactlistitem.cpp b/src/gui/contactlistitem.cpp index 7e8bbeff..cdd4ddb6 100644 --- a/src/gui/contactlistitem.cpp +++ b/src/gui/contactlistitem.cpp @@ -3,6 +3,7 @@ #include "participantinterface.h" #include +#include ContactListItem::ContactListItem(QString name, QString username, QString ip): name_(name), @@ -71,3 +72,9 @@ QString ContactListItem::getAddress() { return ip_; } + +void ContactListItem::mouseDoubleClickEvent(QMouseEvent *e) +{ + QWidget::mouseDoubleClickEvent(e); + call(); +} diff --git a/src/gui/contactlistitem.h b/src/gui/contactlistitem.h index 3bcc2cc5..b69892aa 100644 --- a/src/gui/contactlistitem.h +++ b/src/gui/contactlistitem.h @@ -26,6 +26,10 @@ public slots: void call(); void chat(); +protected: + + void mouseDoubleClickEvent(QMouseEvent *e); + private: QString name_;