Skip to content

Commit

Permalink
Followup 722fdef: fix grass plugin build
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 5, 2016
1 parent 9242d22 commit 3b0486c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrasseditrenderer.cpp
Expand Up @@ -173,7 +173,7 @@ void QgsGrassEditRenderer::stopRender( QgsRenderContext& context )
mMarkerRenderer->stopRender( context );
}

QList<QString> QgsGrassEditRenderer::usedAttributes()
QSet<QString> QgsGrassEditRenderer::usedAttributes()
{
return mLineRenderer->usedAttributes();
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qgsgrasseditrenderer.h
Expand Up @@ -38,7 +38,7 @@ class QgsGrassEditRenderer : public QgsFeatureRenderer

virtual void stopRender( QgsRenderContext& context ) override;

virtual QList<QString> usedAttributes() override;
virtual QSet<QString> usedAttributes() override;

virtual QgsFeatureRenderer* clone() const override;

Expand Down

3 comments on commit 3b0486c

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 3b0486c Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn , I ge the following error while attempting to build master:

In file included from /home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrassplugin.cpp:23:0:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.h:41:27: error: ‘virtual QSet<QString> QgsGrassEditRenderer::usedAttributes()’ marked ‘override’, but does not override
     virtual QSet<QString> usedAttributes() override;
                           ^~~~~~~~~~~~~~
In file included from /home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp:30:0:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.h:41:27: error: ‘virtual QSet<QString> QgsGrassEditRenderer::usedAttributes()’ marked ‘override’, but does not override
     virtual QSet<QString> usedAttributes() override;
                           ^~~~~~~~~~~~~~
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp: In member function ‘virtual QgsFeatureRenderer* QgsGrassEditRenderer::clone() const’:
/home/webmaster/dev/cpp/QGIS/src/plugins/grass/qgsgrasseditrenderer.cpp:183:54: error: invalid new-expression of abstract class type ‘QgsGrassEditRenderer’
   QgsGrassEditRenderer* r = new QgsGrassEditRenderer();
                                                      ^

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 3b0486c Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it help if you change it to

virtual QSet<QString> usedAttributes() const override;

I was working on plain text files since I don't use grass.

@nirvn
Copy link
Contributor

@nirvn nirvn commented on 3b0486c Oct 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@m-kuhn , it not only helps, it actually works :)

Please sign in to comment.