Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Sep 5, 2012
1 parent 8cb578f commit ba0bed0
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 17 deletions.
3 changes: 3 additions & 0 deletions src/core/diagram/qgspiediagram.cpp
Expand Up @@ -31,6 +31,7 @@ QgsPieDiagram::~QgsPieDiagram()

QSizeF QgsPieDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is )
{
Q_UNUSED( c );
QgsAttributeMap::const_iterator attIt = attributes.find( is.classificationAttribute );
if ( attIt == attributes.constEnd() )
{
Expand Down Expand Up @@ -74,6 +75,8 @@ QSizeF QgsPieDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsR

QSizeF QgsPieDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s )
{
Q_UNUSED( c );
Q_UNUSED( attributes );
return s.size;
}

Expand Down
12 changes: 9 additions & 3 deletions src/core/diagram/qgstextdiagram.cpp
Expand Up @@ -32,7 +32,10 @@ QgsTextDiagram::~QgsTextDiagram()

QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s, const QgsDiagramInterpolationSettings& is )
{
QgsAttributeMap::const_iterator attIt = attributes.find( is.classificationAttribute );
Q_UNUSED( c );

QgsAttributeMap::const_iterator attIt = attributes.find( is.classificationAttribute );

if ( attIt == attributes.constEnd() )
{
return QSizeF(); //zero size if attribute is missing
Expand Down Expand Up @@ -74,8 +77,11 @@ QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const Qgs
}

QSizeF QgsTextDiagram::diagramSize( const QgsAttributeMap& attributes, const QgsRenderContext& c, const QgsDiagramSettings& s )
{
return s.size;
{
Q_UNUSED( c );
Q_UNUSED( attributes );

return s.size;
}

void QgsTextDiagram::renderDiagram( const QgsAttributeMap& att, QgsRenderContext& c, const QgsDiagramSettings& s, const QPointF& position )
Expand Down
31 changes: 17 additions & 14 deletions src/ui/qgsdiagrampropertiesbase.ui
Expand Up @@ -11,6 +11,9 @@
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QGroupBox" name="mDisplayDiagramsGroupBox">
<property name="title">
Expand All @@ -36,8 +39,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>742</width>
<height>610</height>
<width>756</width>
<height>627</height>
</rect>
</property>
<layout class="QVBoxLayout" name="scrollAreaLayout">
Expand Down Expand Up @@ -121,8 +124,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>708</width>
<height>278</height>
<width>723</width>
<height>356</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -331,8 +334,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>708</width>
<height>239</height>
<width>640</width>
<height>289</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -520,8 +523,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>165</width>
<height>220</height>
<width>216</width>
<height>284</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -682,8 +685,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>109</width>
<height>151</height>
<width>137</width>
<height>191</height>
</rect>
</property>
<attribute name="label">
Expand Down Expand Up @@ -747,7 +750,7 @@
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string>mOrientationButtonGroup</string>
<string notr="true">mOrientationButtonGroup</string>
</attribute>
</widget>
</item>
Expand All @@ -757,7 +760,7 @@
<string>Down</string>
</property>
<attribute name="buttonGroup">
<string>mOrientationButtonGroup</string>
<string notr="true">mOrientationButtonGroup</string>
</attribute>
</widget>
</item>
Expand All @@ -767,7 +770,7 @@
<string>Right</string>
</property>
<attribute name="buttonGroup">
<string>mOrientationButtonGroup</string>
<string notr="true">mOrientationButtonGroup</string>
</attribute>
</widget>
</item>
Expand All @@ -777,7 +780,7 @@
<string>Left</string>
</property>
<attribute name="buttonGroup">
<string>mOrientationButtonGroup</string>
<string notr="true">mOrientationButtonGroup</string>
</attribute>
</widget>
</item>
Expand Down

0 comments on commit ba0bed0

Please sign in to comment.