on xenial help sign in
s/m_emitActivatedIfNoTouchesAroundTimer/m_activationTimer
8b4a46cDaniel d'Andrada
plugins/Utils/HomeKeyWatcher.cpp+6−6
@@ -31,22 +31,22 @@ HomeKeyWatcher::HomeKeyWatcher(UnityUtil::AbstractTimer *timer,
31 : QQuickItem(parent)
31 : QQuickItem(parent)
32 , m_windowBeingTouched(false)
32 , m_windowBeingTouched(false)
33 , m_windowLastTouchedTimer(elapsedTimer)
33 , m_windowLastTouchedTimer(elapsedTimer)
34− , m_emitActivatedIfNoTouchesAroundTimer(timer)
34+ , m_activationTimer(timer)
35{
35{
36 m_windowLastTouchedTimer->start();
36 m_windowLastTouchedTimer->start();
37
37
38 connect(this, &QQuickItem::windowChanged,
38 connect(this, &QQuickItem::windowChanged,
39 this, &HomeKeyWatcher::setupFilterOnWindow);
39 this, &HomeKeyWatcher::setupFilterOnWindow);
40
40
41− connect(m_emitActivatedIfNoTouchesAroundTimer, &UnityUtil::AbstractTimer::timeout,
41+ connect(m_activationTimer, &UnityUtil::AbstractTimer::timeout,
42 this, &HomeKeyWatcher::emitActivatedIfNoTouchesAround);
42 this, &HomeKeyWatcher::emitActivatedIfNoTouchesAround);
43− m_emitActivatedIfNoTouchesAroundTimer->setInterval(msecsWithoutTouches);
43+ m_activationTimer->setInterval(msecsWithoutTouches);
44}
44}
45
45
46HomeKeyWatcher::~HomeKeyWatcher()
46HomeKeyWatcher::~HomeKeyWatcher()
47{
47{
48 delete m_windowLastTouchedTimer;
48 delete m_windowLastTouchedTimer;
49− delete m_emitActivatedIfNoTouchesAroundTimer;
49+ delete m_activationTimer;
50}
50}
51
51
52bool HomeKeyWatcher::eventFilter(QObject *watched, QEvent *event)
52bool HomeKeyWatcher::eventFilter(QObject *watched, QEvent *event)
@@ -69,12 +69,12 @@ void HomeKeyWatcher::update(QEvent *event)
69 if (keyEvent->key() == Qt::Key_Super_L && !keyEvent->isAutoRepeat()
69 if (keyEvent->key() == Qt::Key_Super_L && !keyEvent->isAutoRepeat()
70 && !m_windowBeingTouched
70 && !m_windowBeingTouched
71 && m_windowLastTouchedTimer->elapsed() >= msecsWithoutTouches) {
71 && m_windowLastTouchedTimer->elapsed() >= msecsWithoutTouches) {
72− m_emitActivatedIfNoTouchesAroundTimer->start();
72+ m_activationTimer->start();
73 }
73 }
74
74
75 } else if (event->type() == QEvent::TouchBegin) {
75 } else if (event->type() == QEvent::TouchBegin) {
76
76
77− m_emitActivatedIfNoTouchesAroundTimer->stop();
77+ m_activationTimer->stop();
78 m_windowBeingTouched = true;
78 m_windowBeingTouched = true;
79
79
80 } else if (event->type() == QEvent::TouchEnd) {
80 } else if (event->type() == QEvent::TouchEnd) {
plugins/Utils/HomeKeyWatcher.h+1−1
@@ -67,7 +67,7 @@ private:
67 QPointer<QQuickWindow> m_filteredWindow;
67 QPointer<QQuickWindow> m_filteredWindow;
68 bool m_windowBeingTouched;
68 bool m_windowBeingTouched;
69 UnityUtil::AbstractElapsedTimer *m_windowLastTouchedTimer;
69 UnityUtil::AbstractElapsedTimer *m_windowLastTouchedTimer;
70− UnityUtil::AbstractTimer *m_emitActivatedIfNoTouchesAroundTimer;
70+ UnityUtil::AbstractTimer *m_activationTimer;
71};
71};
72
72
73#endif // UNITY_HOMEKEYWATCHER_H
73#endif // UNITY_HOMEKEYWATCHER_H