[Qgis-developer] acecss to qgisapp / qgisappinterface from tests (c++ or python?)
etourigny.dev at gmail.com
Tue Nov 20 08:52:42 PST 2012
I am trying to add some tests for the addRasterLayer() and
addVectorLayer() members in QgisApp, and it seems I cannot have access
to them from the test environment.
I tried including qgisapp.h, but that needed an extra rule in
CMakeLists (to add src/app to INCLUDE_DIRECTORIES), but this generated
the following error when building
In file included from /data/src/qgis/qgis-etiennesky/src/app/qgisapp.h:91:0,
fatal error: ui_qgssnappingdialogbase.h: No such file or directory
I also tried using QgsInterface from a python test, but it doesn't
work because in tests/src/python/utilities.py
"QgisInterface is a stub implementation of the QGIS plugin interface"
How to get the "real" QgsAppInterface like when using a plugin?
More information about the Qgis-developer