Merge branch '1216-main' into 'dbus-interface'
双击事件仍会触发mousepressevent??? See merge request kylin-desktop/kylin-nm!483
This commit is contained in:
commit
b4b36d8bfd
|
@ -1,7 +1,7 @@
|
|||
#include "drownlabel.h"
|
||||
#include "deviceframe.h"
|
||||
|
||||
#define ICONSIZE 12,12
|
||||
#define ICONSIZE 16,16
|
||||
DrownLabel::DrownLabel(QString devName, QWidget * parent) : QLabel(parent)
|
||||
{
|
||||
m_devName = devName;
|
||||
|
|
|
@ -86,6 +86,10 @@ MobileHotspotWidget::~MobileHotspotWidget()
|
|||
|
||||
bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
|
||||
{
|
||||
if (event->type() == QEvent::MouseButtonDblClick && watched == m_switchBtn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (event->type() == QEvent::MouseButtonPress) {
|
||||
if (watched == m_switchBtn) {
|
||||
if (!m_interface->isValid()) {
|
||||
|
@ -97,7 +101,7 @@ bool MobileHotspotWidget::eventFilter(QObject *watched, QEvent *event)
|
|||
}
|
||||
if (m_switchBtn->isChecked()) {
|
||||
showDesktopNotify(tr("start to close hotspot"));
|
||||
QDBusReply<void> reply = m_interface->call("deactiveWirelessAp", m_apNameLabel->text(), m_uuid);
|
||||
QDBusReply<void> reply = m_interface->call("deactiveWirelessAp", m_apNameLine->text(), m_uuid);
|
||||
if (!reply.isValid()) {
|
||||
qDebug() << "[MobileHotspotWidget] call deactiveWirelessAp failed ";
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue