mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix several deprecation warnings (#8657)
* Use constructor instead of nullptr for WindowFlags * Use constructor instead of nullptr for Alignment * Disable deprecation warning for QProcess * Add string split method to RaTextStringTools * Add caf.cpp used to manage Qt function deprecations * Use position()
This commit is contained in:
@@ -18,7 +18,10 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuCadNavigation.h"
|
||||
|
||||
#include "caf.h"
|
||||
#include "cafViewer.h"
|
||||
|
||||
#include "cvfCamera.h"
|
||||
#include "cvfHitItemCollection.h"
|
||||
#include "cvfManipulatorTrackball.h"
|
||||
@@ -121,18 +124,19 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
{
|
||||
if ( inputEvent->modifiers() == Qt::NoModifier )
|
||||
{
|
||||
QWheelEvent* we = static_cast<QWheelEvent*>( inputEvent );
|
||||
QWheelEvent* we = static_cast<QWheelEvent*>( inputEvent );
|
||||
auto position = caf::position( we );
|
||||
|
||||
updatePointOfInterestDuringZoomIfNecessary( we->x(), we->y() );
|
||||
updatePointOfInterestDuringZoomIfNecessary( position.x(), position.y() );
|
||||
|
||||
if ( m_isRotCenterInitialized )
|
||||
{
|
||||
int translatedMousePosX, translatedMousePosY;
|
||||
cvfEventPos( we->x(), we->y(), &translatedMousePosX, &translatedMousePosY );
|
||||
cvfEventPos( position.x(), position.y(), &translatedMousePosX, &translatedMousePosY );
|
||||
|
||||
cvf::ref<cvf::Ray> ray = createZoomRay( translatedMousePosX, translatedMousePosY );
|
||||
|
||||
zoomAlongRay( ray.p(), -we->delta() );
|
||||
zoomAlongRay( ray.p(), -we->angleDelta().y() );
|
||||
}
|
||||
isEventHandled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user