mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
CMake : Improve handling of compiler flags (#8486)
#8478 Code cleanup to fix some warnings Several adjustments to improve the specification and usage of compile flags.
This commit is contained in:
@@ -57,7 +57,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
int translatedMousePosX, translatedMousePosY;
|
||||
cvfEventPos( me->x(), me->y(), &translatedMousePosX, &translatedMousePosY );
|
||||
|
||||
if ( me->button() == Qt::MidButton && me->modifiers() == Qt::NoModifier && isRotationEnabled() )
|
||||
if ( me->button() == Qt::MiddleButton && me->modifiers() == Qt::NoModifier && isRotationEnabled() )
|
||||
{
|
||||
this->pickAndSetPointOfInterest( me->x(), me->y() );
|
||||
|
||||
@@ -67,7 +67,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
isEventHandled = true;
|
||||
}
|
||||
else if ( me->button() == Qt::LeftButton ||
|
||||
( me->button() == Qt::MidButton && ( me->modifiers() & Qt::ShiftModifier ) ) )
|
||||
( me->button() == Qt::MiddleButton && ( me->modifiers() & Qt::ShiftModifier ) ) )
|
||||
{
|
||||
m_trackball->startNavigation( cvf::ManipulatorTrackball::PAN, translatedMousePosX, translatedMousePosY );
|
||||
m_isNavigating = true;
|
||||
@@ -82,7 +82,7 @@ bool RiuCadNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
if ( m_isNavigating )
|
||||
{
|
||||
QMouseEvent* me = static_cast<QMouseEvent*>( inputEvent );
|
||||
if ( me->button() == Qt::MidButton || me->button() == Qt::LeftButton )
|
||||
if ( me->button() == Qt::MiddleButton || me->button() == Qt::LeftButton )
|
||||
{
|
||||
m_trackball->endNavigation();
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ bool RiuGeoQuestNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
m_hasMovedMouseDuringNavigation = false;
|
||||
isEventHandled = true;
|
||||
}
|
||||
else if ( me->button() == Qt::MidButton )
|
||||
else if ( me->button() == Qt::MiddleButton )
|
||||
{
|
||||
if ( me->modifiers() == Qt::NoModifier )
|
||||
{
|
||||
@@ -84,7 +84,7 @@ bool RiuGeoQuestNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
if ( m_isNavigating )
|
||||
{
|
||||
QMouseEvent* me = static_cast<QMouseEvent*>( inputEvent );
|
||||
if ( me->button() == Qt::LeftButton || me->button() == Qt::MidButton )
|
||||
if ( me->button() == Qt::LeftButton || me->button() == Qt::MiddleButton )
|
||||
{
|
||||
m_trackball->endNavigation();
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ RiuGridCrossQwtPlot::RiuGridCrossQwtPlot( RimGridCrossPlot* plot, QWidget* paren
|
||||
|
||||
// MidButton for the panning
|
||||
QwtPlotPanner* panner = new QwtPlotPanner( qwtPlot()->canvas() );
|
||||
panner->setMouseButton( Qt::MidButton );
|
||||
panner->setMouseButton( Qt::MiddleButton );
|
||||
|
||||
auto wheelZoomer = new RiuQwtPlotWheelZoomer( qwtPlot() );
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ void RiuQwtPlotCurve::clearErrorBars()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiuQwtPlotCurve::numSamples() const
|
||||
{
|
||||
return dataSize();
|
||||
return static_cast<int>( dataSize() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -57,7 +57,7 @@ bool RiuRmsNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
int translatedMousePosX, translatedMousePosY;
|
||||
cvfEventPos( me->x(), me->y(), &translatedMousePosX, &translatedMousePosY );
|
||||
|
||||
if ( me->button() == Qt::MidButton && isRotationEnabled() )
|
||||
if ( me->button() == Qt::MiddleButton && isRotationEnabled() )
|
||||
{
|
||||
this->pickAndSetPointOfInterest( me->x(), me->y() );
|
||||
|
||||
@@ -100,7 +100,7 @@ bool RiuRmsNavigation::handleInputEvent( QInputEvent* inputEvent )
|
||||
if ( m_isNavigating )
|
||||
{
|
||||
QMouseEvent* me = static_cast<QMouseEvent*>( inputEvent );
|
||||
if ( me->button() == Qt::RightButton || me->button() == Qt::MidButton )
|
||||
if ( me->button() == Qt::RightButton || me->button() == Qt::MiddleButton )
|
||||
{
|
||||
m_trackball->endNavigation();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ RiuSummaryQwtPlot::RiuSummaryQwtPlot( RimSummaryPlot* plot, QWidget* parent /*=
|
||||
|
||||
// MidButton for the panning
|
||||
QwtPlotPanner* panner = new QwtPlotPanner( m_plotWidget->qwtPlot()->canvas() );
|
||||
panner->setMouseButton( Qt::MidButton );
|
||||
panner->setMouseButton( Qt::MiddleButton );
|
||||
|
||||
m_wheelZoomer = new RiuQwtPlotWheelZoomer( m_plotWidget->qwtPlot() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user