diff --git a/effects/presentwindows/presentwindows.cpp b/effects/presentwindows/presentwindows.cpp
index 1fc31dedf5..87a31db17b 100644
--- a/effects/presentwindows/presentwindows.cpp
+++ b/effects/presentwindows/presentwindows.cpp
@@ -38,7 +38,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
#include
#include
@@ -1936,27 +1935,26 @@ void PresentWindowsEffect::reCreateGrids()
CloseWindowView::CloseWindowView(QObject *parent)
: EffectQuickScene(parent)
- , m_armTimer(new QElapsedTimer())
{
setSource(QUrl(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/effects/presentwindows/main.qml"))));
if (QQuickItem *item = rootItem()) {
connect(item, SIGNAL(clicked()), this, SLOT(clicked()));
setGeometry(QRect(QPoint(), QSize(item->implicitWidth(), item->implicitHeight())));
}
- m_armTimer->restart();
+ m_armTimer.restart();
}
void CloseWindowView::clicked()
{
// 50ms until the window is elevated (seen!) and 300ms more to be "realized" by the user.
- if (m_armTimer->hasExpired(350)) {
+ if (m_armTimer.hasExpired(350)) {
emit requestClose();
}
}
void CloseWindowView::disarm()
{
- m_armTimer->restart();
+ m_armTimer.restart();
}
diff --git a/effects/presentwindows/presentwindows.h b/effects/presentwindows/presentwindows.h
index b260ec61e1..523b46a3ef 100644
--- a/effects/presentwindows/presentwindows.h
+++ b/effects/presentwindows/presentwindows.h
@@ -27,8 +27,9 @@ along with this program. If not, see .
#include
#include
+#include
+
class QMouseEvent;
-class QElapsedTimer;
class QQuickView;
namespace KWin
@@ -44,7 +45,7 @@ Q_SIGNALS:
private Q_SLOTS:
void clicked();
private:
- QElapsedTimer *m_armTimer;
+ QElapsedTimer m_armTimer;
};
/**