diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2019-04-16 16:32:08 +0200 |
commit | 6630937e63ae5797487b86743a7733c8ae5cc42c (patch) | |
tree | 3d53dacf6430f9099e1fb20835881205de674961 /src/platformsupport/input/tslib/qtslib.cpp | |
parent | 37ed6dae00640f9cc980ffda05347c12a7eb5d7e (diff) | |
parent | c7af193d2e49e9f10b86262e63d8d13abf72b5cf (diff) |
Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
Diffstat (limited to 'src/platformsupport/input/tslib/qtslib.cpp')
-rw-r--r-- | src/platformsupport/input/tslib/qtslib.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platformsupport/input/tslib/qtslib.cpp b/src/platformsupport/input/tslib/qtslib.cpp index 75ac3c50e0..f8fdc151ec 100644 --- a/src/platformsupport/input/tslib/qtslib.cpp +++ b/src/platformsupport/input/tslib/qtslib.cpp @@ -57,7 +57,7 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key, const QString &specification, QObject *parent) : QObject(parent), - m_notify(0), m_x(0), m_y(0), m_pressed(0), m_rawMode(false) + m_rawMode(!key.compare(QLatin1String("TslibRaw"), Qt::CaseInsensitive)) { qCDebug(qLcTsLib) << "Initializing tslib plugin" << key << specification; setObjectName(QLatin1String("TSLib Mouse Handler")); @@ -79,13 +79,11 @@ QTsLibMouseHandler::QTsLibMouseHandler(const QString &key, if (ts_config(m_dev)) qErrnoWarning(errno, "ts_config() failed"); - m_rawMode = !key.compare(QLatin1String("TslibRaw"), Qt::CaseInsensitive); - int fd = ts_fd(m_dev); if (fd >= 0) { qCDebug(qLcTsLib) << "tslib device is" << device; m_notify = new QSocketNotifier(fd, QSocketNotifier::Read, this); - connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData())); + connect(m_notify, &QSocketNotifier::activated, this, &QTsLibMouseHandler::readMouseData); } else { qErrnoWarning(errno, "tslib: Cannot open input device %s", device.constData()); } @@ -129,7 +127,9 @@ void QTsLibMouseHandler::readMouseData() } QPoint pos(x, y); - QWindowSystemInterface::handleMouseEvent(0, pos, pos, pressed ? Qt::LeftButton : Qt::NoButton); + QWindowSystemInterface::handleMouseEvent(nullptr, pos, pos, + pressed ? Qt::LeftButton : Qt::NoButton, + Qt::NoButton, QEvent::None); m_x = x; m_y = y; |