Skip to content

Commit

Permalink
Codestyle changes
Browse files Browse the repository at this point in the history
  • Loading branch information
EdnY1 authored and tishion committed Jul 19, 2024
1 parent 5541dce commit 90b22f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
7 changes: 5 additions & 2 deletions include/QCefView.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,6 @@ class QCEFVIEW_EXPORT QCefView : public QWidget
/// <returns>True to allow the close, false to cancel the close</returns>
virtual bool onRequestCloseFromWeb();

virtual void leaveEvent(QEvent* event) override;

#pragma region QWidget
public slots:
/// <summary>
Expand Down Expand Up @@ -547,6 +545,11 @@ public slots:
/// </summary>
void wheelEvent(QWheelEvent* event) override;

/// <summary>
/// Please refer to QWidget::leaveEvent
/// </summary>
void leaveEvent(QEvent* event) override;

/// <summary>
/// Please refer to QWidget::contextMenuEvent
/// </summary>
Expand Down
14 changes: 7 additions & 7 deletions src/QCefView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,15 +330,15 @@ QCefView::onRequestCloseFromWeb()
void
QCefView::leaveEvent(QEvent* event)
{
QWidget::leaveEvent(event);
Q_D(QCefView);

if (d_ptr->isOSRModeEnabled()) {
QPoint localPos{ -1, -1 };
QPoint globalPos = mapToGlobal(localPos);
QPoint localPos = QCursor::pos();
QPoint globalPos = mapToGlobal(localPos);

QMouseEvent moveEvent(QEvent::MouseMove, localPos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
mouseMoveEvent(&moveEvent);
}
QMouseEvent moveEvent(QEvent::MouseMove, localPos, globalPos, Qt::NoButton, Qt::NoButton, Qt::NoModifier);
d->onViewMouseEvent(&moveEvent);

QWidget::leaveEvent(event);
}

QVariant
Expand Down

0 comments on commit 90b22f3

Please sign in to comment.