diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2021-07-19 12:46:49 +0200 |
---|---|---|
committer | Andre Hartmann <aha_1980@gmx.de> | 2021-07-20 12:47:14 +0200 |
commit | 117e99dffd800780e3f29f5d88c1cb171739ad50 (patch) | |
tree | 9cf83a36100979b264cc6680cc862c00cae4c607 /src/plugins/canbus/peakcan | |
parent | 993f5166e0d88e6e0d2d428038ba56d8338fc3a4 (diff) |
Peak/VectorCAN: Fix reading incoming frames on Windows
Overriding QWinEventNotifier::event seems unusual,
so let's use the documented way and connect to the
activated signal.
As this was broken after 5.15 and 6.2 is the first
Qt 6 release, no changelog is needed.
Pick-to: 6.2
Fixes: QTBUG-95040
Change-Id: I294aa398a2ccd99012db855ed74935a944b2e6d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/canbus/peakcan')
-rw-r--r-- | src/plugins/canbus/peakcan/peakcanbackend.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/canbus/peakcan/peakcanbackend.cpp b/src/plugins/canbus/peakcan/peakcanbackend.cpp index 45d8023..22bcf36 100644 --- a/src/plugins/canbus/peakcan/peakcanbackend.cpp +++ b/src/plugins/canbus/peakcan/peakcanbackend.cpp @@ -239,16 +239,10 @@ public: , dptr(d) { setHandle(dptr->readHandle); - } -protected: - bool event(QEvent *e) override - { - if (e->type() == QEvent::WinEventAct) { + connect(this, &QWinEventNotifier::activated, this, [this]() { dptr->startRead(); - return true; - } - return QWinEventNotifier::event(e); + }); } private: |