Use QEnterEvent for QWidget::enterEvent on Qt 6 (#4365)

* fix: use concrete QEnterEvent on Qt 6

* chore: add changelog entry
This commit is contained in:
nerix 2023-02-11 18:13:29 +01:00 committed by GitHub
parent 1d3ca0bfa3
commit 5179567334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 48 additions and 7 deletions

View file

@ -48,6 +48,7 @@
- Dev: Changed conan generator to [`CMakeDeps`](https://docs.conan.io/en/latest/reference/conanfile/tools/cmake/cmakedeps.html) and [`CMakeToolchain`](https://docs.conan.io/en/latest/reference/conanfile/tools/cmake/cmaketoolchain.html). See PR for migration notes. (#4335)
- Dev: Refactored 7TV EventAPI implementation. (#4342)
- Dev: Don't rely on undocumented registry keys to find the default browser on Windows. (#4362)
- Dev: Use `QEnterEvent` for `QWidget::enterEvent` on Qt 6. (#4365)
## 2.4.0

View file

@ -217,7 +217,11 @@ void Button::fancyPaint(QPainter &painter)
}
}
void Button::enterEvent(QEvent *)
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void Button::enterEvent(QEnterEvent * /*event*/)
#else
void Button::enterEvent(QEvent * /*event*/)
#endif
{
this->mouseOver_ = true;
}

View file

@ -57,7 +57,11 @@ signals:
protected:
virtual void paintEvent(QPaintEvent *) override;
virtual void enterEvent(QEvent *) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent * /*event*/) override;
#else
void enterEvent(QEvent * /*event*/) override;
#endif
virtual void leaveEvent(QEvent *) override;
virtual void mousePressEvent(QMouseEvent *event) override;
virtual void mouseReleaseEvent(QMouseEvent *event) override;

View file

@ -1440,7 +1440,11 @@ void ChannelView::wheelEvent(QWheelEvent *event)
}
}
void ChannelView::enterEvent(QEvent *)
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void ChannelView::enterEvent(QEnterEvent * /*event*/)
#else
void ChannelView::enterEvent(QEvent * /*event*/)
#endif
{
}

View file

@ -167,7 +167,11 @@ protected:
void paintEvent(QPaintEvent *) override;
void wheelEvent(QWheelEvent *event) override;
void enterEvent(QEvent *) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent * /*event*/) override;
#else
void enterEvent(QEvent * /*event*/) override;
#endif
void leaveEvent(QEvent *) override;
void mouseMoveEvent(QMouseEvent *event) override;

View file

@ -674,7 +674,11 @@ void NotebookTab::mouseDoubleClickEvent(QMouseEvent *event)
}
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void NotebookTab::enterEvent(QEnterEvent *event)
#else
void NotebookTab::enterEvent(QEvent *event)
#endif
{
this->mouseOver_ = true;

View file

@ -61,7 +61,11 @@ protected:
virtual void mousePressEvent(QMouseEvent *event) override;
virtual void mouseReleaseEvent(QMouseEvent *event) override;
virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
virtual void enterEvent(QEvent *) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *event) override;
#else
void enterEvent(QEvent *event) override;
#endif
virtual void leaveEvent(QEvent *) override;
virtual void dragEnterEvent(QDragEnterEvent *event) override;

View file

@ -822,7 +822,11 @@ void Split::resizeEvent(QResizeEvent *event)
this->overlay_->setGeometry(this->rect());
}
void Split::enterEvent(QEvent *event)
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void Split::enterEvent(QEnterEvent * /*event*/)
#else
void Split::enterEvent(QEvent * /*event*/)
#endif
{
this->isMouseOver_ = true;

View file

@ -105,7 +105,11 @@ protected:
void keyPressEvent(QKeyEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void enterEvent(QEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent * /*event*/) override;
#else
void enterEvent(QEvent * /*event*/) override;
#endif
void leaveEvent(QEvent *event) override;
void dragEnterEvent(QDragEnterEvent *event) override;

View file

@ -945,7 +945,11 @@ void SplitHeader::mouseDoubleClickEvent(QMouseEvent *event)
this->doubleClicked_ = true;
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void SplitHeader::enterEvent(QEnterEvent *event)
#else
void SplitHeader::enterEvent(QEvent *event)
#endif
{
if (!this->tooltipText_.isEmpty())
{

View file

@ -42,7 +42,11 @@ protected:
void mousePressEvent(QMouseEvent *event) override;
void mouseReleaseEvent(QMouseEvent *event) override;
void mouseMoveEvent(QMouseEvent *event) override;
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void enterEvent(QEnterEvent *event) override;
#else
void enterEvent(QEvent *event) override;
#endif
void leaveEvent(QEvent *event) override;
void mouseDoubleClickEvent(QMouseEvent *event) override;