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:
Magne Sjaastad
2022-03-11 13:24:01 +01:00
committed by GitHub
parent 72fc47e003
commit 806a149809
75 changed files with 472 additions and 206 deletions

View File

@@ -18,7 +18,10 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RiuGeoQuestNavigation.h"
#include "caf.h"
#include "cafViewer.h"
#include "cvfCamera.h"
#include "cvfHitItemCollection.h"
#include "cvfManipulatorTrackball.h"
@@ -132,18 +135,19 @@ bool RiuGeoQuestNavigation::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;
}