Skip to content

Commit d76e1b8

Browse files
committedOct 3, 2012
fix globe warnings
1 parent bc1bce1 commit d76e1b8

File tree

6 files changed

+38
-25
lines changed

6 files changed

+38
-25
lines changed
 

‎debian/changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ qgis (1.9.0) UNRELEASED; urgency=low
99
* add python-unittest2 build dependency for maverick and squeeze
1010
* disable PyQgsRectangle test on lucid (depends on unittest2)
1111
* add python-qscintilla2 dependency to python-qgis
12+
* add support for ubuntu quantal
1213

1314
-- Jürgen E. Fischer <jef@norbit.de> Tue, 18 Sep 2012 22:18:25 +0200
1415

‎src/core/symbology-ng/qgssymbollayerv2utils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,9 @@ QgsSymbolV2* QgsSymbolLayerV2Utils::loadSymbol( QDomElement& element )
702702
QgsSymbolV2* subSymbol = loadSymbol( s );
703703
bool res = layer->setSubSymbol( subSymbol );
704704
if ( !res )
705+
{
705706
QgsDebugMsg( "symbol layer refused subsymbol: " + s.attribute( "name" ) );
707+
}
706708
}
707709
layers.append( layer );
708710
}

‎src/plugins/globe/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ SET (globe_plugin_UIS
2727
SET (globe_plugin_MOC_HDRS
2828
globe_plugin.h
2929
globe_plugin_dialog.h
30-
osgEarthQt/Common
31-
osgEarthQt/ViewerWidget
3230
)
3331

3432
SET (globe_plugin_RCCS globe_plugin.qrc)

‎src/plugins/globe/osgEarthQt/ViewerWidget.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ void ViewerWidget::reconfigure( osgViewer::View* view )
158158

159159
void ViewerWidget::paintEvent(QPaintEvent* e)
160160
{
161+
Q_UNUSED( e );
161162
if (_viewer->getRunFrameScheme() == osgViewer::ViewerBase::CONTINUOUS ||
162163
_viewer->checkNeedToDoFrame() )
163164
{

‎src/plugins/globe/osgEarthUtil/Controls

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <osgText/Text>
3434
#include <vector>
3535
#include <queue>
36+
#include <qglobal.h>
3637

3738
#undef OSGEARTHUTIL_EXPORT
3839
#define OSGEARTHUTIL_EXPORT
@@ -100,25 +101,25 @@ namespace osgEarth { namespace Util { namespace Controls21
100101
{
101102
public:
102103
/** Click event. */
103-
virtual void onClick( class Control* control ) { }
104+
virtual void onClick( class Control* control ) { Q_UNUSED(control); }
104105

105106
/** Click event with mouse button mask (see osgGA::GUIEventAdapter::MouseButtonMask) */
106-
virtual void onClick( class Control* control, int mouseButtonMask ) { onClick(control); }
107+
virtual void onClick( class Control* control, int mouseButtonMask ) { Q_UNUSED( mouseButtonMask ); onClick(control); }
107108

108109
/** Click event with click position (negative values mean you're in the left/top padding) */
109-
virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { onClick(control, mouseButtonMask); }
110+
virtual void onClick( class Control* control, const osg::Vec2f& pos, int mouseButtonMask ) { Q_UNUSED( pos); onClick(control, mouseButtonMask); }
110111

111112
/** Value events */
112-
virtual void onValueChanged( class Control* control, bool value ) { }
113-
virtual void onValueChanged( class Control* control, double value ) { }
114-
virtual void onValueChanged( class Control* control, float value ) { }
115-
virtual void onValueChanged( class Control* control, int value ) { }
116-
virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { }
117-
virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { }
118-
virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { }
119-
virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { }
120-
virtual void onValueChanged( class Control* control, const std::string& value ) { }
121-
virtual void onValueChanged( class Control* control, void* value ) { }
113+
virtual void onValueChanged( class Control* control, bool value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
114+
virtual void onValueChanged( class Control* control, double value ) { Q_UNUSED( control ); Q_UNUSED( value );}
115+
virtual void onValueChanged( class Control* control, float value ) { Q_UNUSED( control ); Q_UNUSED( value );}
116+
virtual void onValueChanged( class Control* control, int value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
117+
virtual void onValueChanged( class Control* control, const osg::Vec3f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
118+
virtual void onValueChanged( class Control* control, const osg::Vec2f& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
119+
virtual void onValueChanged( class Control* control, const osg::Vec3d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
120+
virtual void onValueChanged( class Control* control, const osg::Vec2d& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
121+
virtual void onValueChanged( class Control* control, const std::string& value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
122+
virtual void onValueChanged( class Control* control, void* value ) { Q_UNUSED( control ); Q_UNUSED( value ); }
122123
};
123124

124125
typedef std::list< osg::ref_ptr<ControlEventHandler> > ControlEventHandlerList;
@@ -181,10 +182,10 @@ namespace osgEarth { namespace Util { namespace Controls21
181182
bool horizFill() const { return _hfill; }
182183

183184
void setVertFill( bool value, float minHeight =0.0f );
184-
const bool vertFill() const { return _vfill; }
185+
bool vertFill() const { return _vfill; }
185186

186187
void setVisible( bool value );
187-
const bool visible() const { return _visible; }
188+
bool visible() const { return _visible; }
188189

189190
void setForeColor( const osg::Vec4f& value );
190191
void setForeColor( float r, float g, float b, float a ) { setForeColor( osg::Vec4f(r,g,b,a) ); }
@@ -218,7 +219,7 @@ namespace osgEarth { namespace Util { namespace Controls21
218219
bool isDirty() const { return _dirty; }
219220

220221
virtual void calcSize( const ControlContext& context, osg::Vec2f& out_size );
221-
virtual void calcFill( const ControlContext& context ) { }
222+
virtual void calcFill( const ControlContext& context ) { Q_UNUSED( context ); }
222223
virtual void calcPos ( const ControlContext& context, const osg::Vec2f& cursor, const osg::Vec2f& parentSize );
223224
virtual void draw ( const ControlContext& context, DrawableList& out_drawables );
224225

@@ -248,15 +249,15 @@ namespace osgEarth { namespace Util { namespace Controls21
248249

249250
private:
250251
osgEarth::optional<float> _x, _y, _width, _height;
251-
bool _hfill, _vfill;
252252
Gutter _margin;
253253
Gutter _padding;
254254
bool _visible;
255255
optional<Alignment> _valign, _halign;
256256
optional<osg::Vec4f> _backColor, _foreColor, _activeColor;
257-
osg::observer_ptr<Control> _parent;
258257
bool _active;
259258
bool _absorbEvents;
259+
bool _hfill, _vfill;
260+
osg::observer_ptr<Control> _parent;
260261
osg::ref_ptr<osg::Geometry> _geom;
261262
};
262263

@@ -561,8 +562,8 @@ namespace osgEarth { namespace Util { namespace Controls21
561562
{
562563
PerViewData();
563564
bool _obscured;
564-
osg::Vec3f _screenPos;
565565
float _visibleTime;
566+
osg::Vec3f _screenPos;
566567
unsigned _visitFrame;
567568
osg::ref_ptr<osg::Uniform> _uniform;
568569
osg::observer_ptr<osg::Camera> _canvas;
@@ -609,9 +610,9 @@ namespace osgEarth { namespace Util { namespace Controls21
609610

610611
osg::ref_ptr<osg::Group> _group;
611612
std::vector<osg::BoundingBox> _taken;
613+
bool _sortingEnabled;
612614
bool _sortByDistance;
613615
bool _fading;
614-
bool _sortingEnabled;
615616

616617
friend class ControlCanvas;
617618
friend class ControlNode;

‎src/plugins/globe/osgEarthUtil/Controls.cpp

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ namespace
4343
{
4444
// ControlNodeBin shaders.
4545

46-
char* s_controlVertexShader =
46+
const char* s_controlVertexShader =
4747
"void main() \n"
4848
"{ \n"
4949
" gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
5050
" gl_TexCoord[0] = gl_MultiTexCoord0; \n"
5151
" gl_FrontColor = gl_Color; \n"
5252
"} \n";
5353

54-
char* s_imageControlFragmentShader =
54+
const char* s_imageControlFragmentShader =
5555
"uniform sampler2D tex0; \n"
5656
"uniform float visibleTime; \n"
5757
"uniform float osg_FrameTime; \n"
@@ -62,7 +62,7 @@ namespace
6262
" gl_FragColor = vec4(texel.rgb, texel.a * opacity); \n"
6363
"} \n";
6464

65-
char* s_labelControlFragmentShader =
65+
const char* s_labelControlFragmentShader =
6666
"uniform sampler2D tex0; \n"
6767
"uniform float visibleTime; \n"
6868
"uniform float osg_FrameTime; \n"
@@ -318,6 +318,7 @@ Control::dirty()
318318
void
319319
Control::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
320320
{
321+
Q_UNUSED( cx );
321322
if ( visible() == true )
322323
{
323324
_renderSize.set(
@@ -337,6 +338,7 @@ Control::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
337338
void
338339
Control::calcPos(const ControlContext& cx, const osg::Vec2f& cursor, const osg::Vec2f& parentSize)
339340
{
341+
Q_UNUSED( cx );
340342
if ( _x.isSet() )
341343
{
342344
_renderPos.x() = cursor.x() + margin().left() + padding().left() + *x();
@@ -426,6 +428,7 @@ Control::draw(const ControlContext& cx, DrawableList& out )
426428
bool
427429
Control::handle( const osgGA::GUIEventAdapter& ea, osgGA::GUIActionAdapter& aa, ControlContext& cx )
428430
{
431+
Q_UNUSED( aa );
429432
bool handled = false;
430433

431434
if ( _eventHandlers.size() > 0 )
@@ -495,6 +498,7 @@ ImageControl::setFixSizeForRotation( bool value )
495498
void
496499
ImageControl::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
497500
{
501+
Q_UNUSED( cx );
498502
if ( visible() == true )
499503
{
500504
_renderSize.set( 0, 0 );
@@ -862,6 +866,8 @@ Frame::Frame()
862866
void
863867
Frame::calcPos(const ControlContext& context, const osg::Vec2f& cursor, const osg::Vec2f& parentSize)
864868
{
869+
Q_UNUSED( context );
870+
Q_UNUSED( parentSize );
865871
_renderPos = cursor;
866872
}
867873

@@ -1009,6 +1015,7 @@ Container::applyChildAligns()
10091015
void
10101016
Container::calcSize(const ControlContext& cx, osg::Vec2f& out_size)
10111017
{
1018+
Q_UNUSED( out_size );
10121019
if ( visible() == true )
10131020
{
10141021
if ( _frame.valid() )
@@ -1412,6 +1419,7 @@ Grid::expandToInclude( int col, int row )
14121419
void
14131420
Grid::addControl( Control* control, int index )
14141421
{
1422+
Q_UNUSED( index );
14151423
// creates a new row and puts the control in its first column
14161424
setControl( 0, _rows.size(), control );
14171425
}
@@ -1628,6 +1636,7 @@ namespace osgEarth { namespace Util { namespace Controls21
16281636

16291637
void operator()( osg::Node* node, osg::NodeVisitor* nv )
16301638
{
1639+
Q_UNUSED( nv );
16311640
osg::Camera* camera = static_cast<osg::Camera*>(node);
16321641
osgViewer::View* view2 = dynamic_cast<osgViewer::View*>(camera->getView());
16331642
install( view2, _canvas.get() );
@@ -1778,6 +1787,7 @@ void
17781787
ControlNodeBin::draw( const ControlContext& context, bool newContext, int bin )
17791788
{
17801789
const osg::Viewport* vp = context._vp.get();
1790+
Q_UNUSED( vp );
17811791
osg::Vec2f surfaceSize( context._vp->width(), context._vp->height() );
17821792

17831793
// we don't really need to keep this list in the object, but that prevents it from having to

0 commit comments

Comments
 (0)
Please sign in to comment.