Skip to content

Commit

Permalink
[win-linux] tabbar: small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplestStudio committed Jul 24, 2024
1 parent 717e665 commit 5e51f9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions win-linux/src/components/ctabbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,7 @@ bool CTabBar::eventFilter(QObject *watched, QEvent *event)
if (watched == d->tabArea) {
switch (event->type()) {
case QEvent::MouseMove: {
QMouseEvent* me = dynamic_cast<QMouseEvent*>(event);
QMouseEvent* me = static_cast<QMouseEvent*>(event);
if (me->buttons().testFlag(Qt::LeftButton)) {
if (d->movedTab && !d->lock) {
int currPosX = d->movedTab->x();
Expand Down Expand Up @@ -1150,7 +1150,7 @@ bool CTabBar::eventFilter(QObject *watched, QEvent *event)
break;
}
case QEvent::MouseButtonPress: {
QMouseEvent* me = dynamic_cast<QMouseEvent*>(event);
QMouseEvent* me = static_cast<QMouseEvent*>(event);
if (me->button() == Qt::LeftButton) {
if (!d->animationInProgress) {
for (int i = 0; i < d->tabList.size(); i++) {
Expand Down Expand Up @@ -1185,7 +1185,7 @@ bool CTabBar::eventFilter(QObject *watched, QEvent *event)
break;
}
case QEvent::MouseButtonRelease: {
QMouseEvent* mouse_event = dynamic_cast<QMouseEvent*>(event);
QMouseEvent* mouse_event = static_cast<QMouseEvent*>(event);
if (mouse_event->button() == Qt::LeftButton) {
while (d->animationInProgress)
PROCESSEVENTS();
Expand Down

0 comments on commit 5e51f9c

Please sign in to comment.