mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 07:20:04 +00:00 
			
		
		
		
	Pinch to zoom clang-tidy fixes
This commit is contained in:
		
							parent
							
								
									b169f46f5f
								
							
						
					
					
						commit
						dcc7a1f637
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		|  | @ -611,8 +611,8 @@ void MapWidgetImpl::HandlePinchGesture(QPinchGesture* gesture) | ||||||
| { | { | ||||||
|    if (gesture->changeFlags() & QPinchGesture::ChangeFlag::ScaleFactorChanged) |    if (gesture->changeFlags() & QPinchGesture::ChangeFlag::ScaleFactorChanged) | ||||||
|    { |    { | ||||||
|       double scale = gesture->scaleFactor(); |       map_->scaleBy(gesture->scaleFactor(), | ||||||
|       map_->scaleBy(scale, widget_->mapFromGlobal(gesture->centerPoint())); |                     widget_->mapFromGlobal(gesture->centerPoint())); | ||||||
|    } |    } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | @ -1412,6 +1412,8 @@ bool MapWidget::event(QEvent* e) | ||||||
|    switch (e->type()) |    switch (e->type()) | ||||||
|    { |    { | ||||||
|    case QEvent::Type::Gesture: |    case QEvent::Type::Gesture: | ||||||
|  |       // QEvent is always a QGestureEvent
 | ||||||
|  |       // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
 | ||||||
|       gestureEvent(static_cast<QGestureEvent*>(e)); |       gestureEvent(static_cast<QGestureEvent*>(e)); | ||||||
|       break; |       break; | ||||||
| 
 | 
 | ||||||
|  | @ -1452,6 +1454,8 @@ void MapWidget::gestureEvent(QGestureEvent* ev) | ||||||
| { | { | ||||||
|    if (QGesture* pinch = ev->gesture(Qt::PinchGesture)) |    if (QGesture* pinch = ev->gesture(Qt::PinchGesture)) | ||||||
|    { |    { | ||||||
|  |       // QGesture is always a QPinchGesture
 | ||||||
|  |       // NOLINTNEXTLINE(cppcoreguidelines-pro-type-static-cast-downcast)
 | ||||||
|       p->HandlePinchGesture(static_cast<QPinchGesture*>(pinch)); |       p->HandlePinchGesture(static_cast<QPinchGesture*>(pinch)); | ||||||
|    } |    } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat