on xenial help sign in
s/m_emitActivatedIfNoTouchesAroundTimer/m_activationTimer
commit8b4a46c9b48505282dad9cc4fc18fa16c3feb211 authorDaniel d'Andrada <daniel.dandrada@canonical.com> dateWed 22 Apr 2015, 09:06 (12 years ago) parentfeea5e1
2 files changed+7−7
plugins/Utils/HomeKeyWatcher.cpp+6−6 plugins/Utils/HomeKeyWatcher.h+1−1
plugins/Utils/HomeKeyWatcher.cpp+6−6
@@ -31,22 +31,22 @@ HomeKeyWatcher::HomeKeyWatcher(UnityUtil::AbstractTimer *timer,
3131 : QQuickItem(parent)
3232 , m_windowBeingTouched(false)
3333 , m_windowLastTouchedTimer(elapsedTimer)
34− , m_emitActivatedIfNoTouchesAroundTimer(timer)
34+ , m_activationTimer(timer)
3535{
3636 m_windowLastTouchedTimer->start();
3737
3838 connect(this, &QQuickItem::windowChanged,
3939 this, &HomeKeyWatcher::setupFilterOnWindow);
4040
41− connect(m_emitActivatedIfNoTouchesAroundTimer, &UnityUtil::AbstractTimer::timeout,
41+ connect(m_activationTimer, &UnityUtil::AbstractTimer::timeout,
4242 this, &HomeKeyWatcher::emitActivatedIfNoTouchesAround);
43− m_emitActivatedIfNoTouchesAroundTimer->setInterval(msecsWithoutTouches);
43+ m_activationTimer->setInterval(msecsWithoutTouches);
4444}
4545
4646HomeKeyWatcher::~HomeKeyWatcher()
4747{
4848 delete m_windowLastTouchedTimer;
49− delete m_emitActivatedIfNoTouchesAroundTimer;
49+ delete m_activationTimer;
5050}
5151
5252bool HomeKeyWatcher::eventFilter(QObject *watched, QEvent *event)
@@ -69,12 +69,12 @@ void HomeKeyWatcher::update(QEvent *event)
6969 if (keyEvent->key() == Qt::Key_Super_L && !keyEvent->isAutoRepeat()
7070 && !m_windowBeingTouched
7171 && m_windowLastTouchedTimer->elapsed() >= msecsWithoutTouches) {
72− m_emitActivatedIfNoTouchesAroundTimer->start();
72+ m_activationTimer->start();
7373 }
7474
7575 } else if (event->type() == QEvent::TouchBegin) {
7676
77− m_emitActivatedIfNoTouchesAroundTimer->stop();
77+ m_activationTimer->stop();
7878 m_windowBeingTouched = true;
7979
8080 } else if (event->type() == QEvent::TouchEnd) {
plugins/Utils/HomeKeyWatcher.h+1−1
@@ -67,7 +67,7 @@ private:
6767 QPointer<QQuickWindow> m_filteredWindow;
6868 bool m_windowBeingTouched;
6969 UnityUtil::AbstractElapsedTimer *m_windowLastTouchedTimer;
70− UnityUtil::AbstractTimer *m_emitActivatedIfNoTouchesAroundTimer;
70+ UnityUtil::AbstractTimer *m_activationTimer;
7171};
7272
7373#endif // UNITY_HOMEKEYWATCHER_H