Skip to content

Commit

Permalink
COMP: Fix -Wdeprecated-declarations using Qt::MiddleButton instead of…
Browse files Browse the repository at this point in the history
… Qt::MidButton

This commit fixes warnings like the following:

  /path/to/CTK/Libs/Visualization/VTK/Widgets/ctkVTKChartView.cpp:438:30: warning: ‘Qt::MidButton’ is deprecated: MidButton is deprecated. Use MiddleButton instead [-Wdeprecated-declarations]
    438 |   if (event->button() == Qt::MidButton)
        |                              ^~~~~~~~~
  • Loading branch information
jcfr committed Apr 13, 2023
1 parent eb1dcba commit 6695b2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Libs/DICOM/Widgets/ctkDICOMItemView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void ctkDICOMItemView::mouseMoveEvent(QMouseEvent* event){
emit requestPreviousImage();
d->OldMousePos = event->pos();
}
}else if(event->buttons() == Qt::MidButton){
}else if(event->buttons() == Qt::MiddleButton){
event->accept();
QPoint nowPos = event->pos();

Expand Down
2 changes: 1 addition & 1 deletion Libs/Visualization/VTK/Widgets/ctkVTKChartView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ void ctkVTKChartView::chartBoundsToPlotBounds(double bounds[8], double plotBound
// ----------------------------------------------------------------------------
void ctkVTKChartView::mouseDoubleClickEvent(QMouseEvent* event)
{
if (event->button() == Qt::MidButton)
if (event->button() == Qt::MiddleButton)
{
this->setAxesToChartBounds();
}
Expand Down
2 changes: 1 addition & 1 deletion Libs/Widgets/ctkQImageView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ void ctkQImageView::mousePressEvent( QMouseEvent * event )
d->MouseLastIntensityLevel = this->intensityLevel();
break;
}
case Qt::MidButton:
case Qt::MiddleButton:
{
d->MouseMiddleDragging = true;
d->MouseLastX = event->x();
Expand Down

0 comments on commit 6695b2e

Please sign in to comment.