Skip to content

Commit

Permalink
Fix more globe warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pka committed Jul 13, 2011
1 parent f037766 commit 13cc17d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
25 changes: 14 additions & 11 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -76,8 +76,8 @@ GlobePlugin::GlobePlugin( QgisInterface* theQgisInterface )
viewer(),
mQDockWidget( tr( "Globe" ) ),
mSettingsDialog( &viewer, theQgisInterface->mainWindow(), QgisGui::ModalDialogFlags ),
mTileSource( 0 ),
mQgisMapLayer( 0 ),
mTileSource( 0 ),
mElevationManager( NULL ),
mObjectPlacer( NULL )
{
Expand All @@ -97,7 +97,7 @@ GlobePlugin::~GlobePlugin()
struct PanControlHandler : public NavigationControlHandler
{
PanControlHandler( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
virtual void onMouseDown( Control* control, int mouseButtonMask )
virtual void onMouseDown( Control* /*control*/, int /*mouseButtonMask*/ )
{
_manip->pan( _dx, _dy );
}
Expand All @@ -110,7 +110,7 @@ struct PanControlHandler : public NavigationControlHandler
struct RotateControlHandler : public NavigationControlHandler
{
RotateControlHandler( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
virtual void onMouseDown( Control* control, int mouseButtonMask )
virtual void onMouseDown( Control* /*control*/, int /*mouseButtonMask*/ )
{
if ( 0 == _dx && 0 == _dy )
{
Expand All @@ -130,7 +130,7 @@ struct RotateControlHandler : public NavigationControlHandler
struct ZoomControlHandler : public NavigationControlHandler
{
ZoomControlHandler( osgEarth::Util::EarthManipulator* manip, double dx, double dy ) : _manip( manip ), _dx( dx ), _dy( dy ) { }
virtual void onMouseDown( Control* control, int mouseButtonMask )
virtual void onMouseDown( Control* /*control*/, int /*mouseButtonMask*/ )
{
_manip->zoom( _dx, _dy );
}
Expand All @@ -143,7 +143,7 @@ struct ZoomControlHandler : public NavigationControlHandler
struct HomeControlHandler : public NavigationControlHandler
{
HomeControlHandler( osgEarth::Util::EarthManipulator* manip ) : _manip( manip ) { }
virtual void onClick( Control* control, int mouseButtonMask, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
virtual void onClick( Control* /*control*/, int /*mouseButtonMask*/, const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
{
_manip->home( ea, aa );
}
Expand All @@ -154,7 +154,7 @@ struct HomeControlHandler : public NavigationControlHandler
struct RefreshControlHandler : public ControlEventHandler
{
RefreshControlHandler( GlobePlugin* globe ) : mGlobe( globe ) { }
virtual void onClick( Control* control, int mouseButtonMask )
virtual void onClick( Control* /*control*/, int /*mouseButtonMask*/ )
{
mGlobe->layersChanged();
}
Expand All @@ -165,7 +165,7 @@ struct RefreshControlHandler : public ControlEventHandler
struct SyncExtentControlHandler : public ControlEventHandler
{
SyncExtentControlHandler( GlobePlugin* globe ) : mGlobe( globe ) { }
virtual void onClick( Control* control, int mouseButtonMask )
virtual void onClick( Control* /*control*/, int /*mouseButtonMask*/ )
{
mGlobe->syncExtent();
}
Expand Down Expand Up @@ -838,6 +838,8 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
}
_mouse_down_event = NULL;
break;
default:
/* ignore */;
}
if ( _mouse_down_event )
{
Expand All @@ -854,7 +856,7 @@ bool NavigationControl::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActi
return Control::handle( ea, aa, cx );
}

bool KeyboardControlHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
bool KeyboardControlHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/ )
{
/*
osgEarth::Util::EarthManipulator::Settings* _manipSettings = _manip->getSettings();
Expand Down Expand Up @@ -961,7 +963,7 @@ bool KeyboardControlHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GU
return false;
}

bool FlyToExtentHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa )
bool FlyToExtentHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& /*aa*/ )
{
if ( ea.getEventType() == ea.KEYDOWN && ea.getKey() == '1' )
{
Expand Down Expand Up @@ -1002,6 +1004,7 @@ bool QueryCoordinatesHandler::handle( const osgGA::GUIEventAdapter& ea, osgGA::G
osg::Vec3d QueryCoordinatesHandler::getCoords( float x, float y, osgViewer::View* view, bool getElevation )
{
osgUtil::LineSegmentIntersector::Intersections results;
osg::Vec3d coords;
if ( view->computeIntersections( x, y, results, 0x01 ) )
{
// find the first hit under the mouse:
Expand Down Expand Up @@ -1041,9 +1044,9 @@ osg::Vec3d QueryCoordinatesHandler::getCoords( float x, float y, osgViewer::View
}
}

osg::Vec3d coords = osg::Vec3d( lon_deg, lat_deg, elevation );
return coords;
coords = osg::Vec3d( lon_deg, lat_deg, elevation );
}
return coords;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/globe/qgsosgviewer.h
Expand Up @@ -96,7 +96,7 @@ class QgsOsgViewer : public osgViewer::Viewer, public QgsGLWidgetAdapter

virtual void paintGL()
{
frame();
if ( isVisible() ) frame();
}

protected:
Expand Down

0 comments on commit 13cc17d

Please sign in to comment.