Skip to content

Commit f112adf

Browse files
author
jef
committed
unload plugins before terminating after taking a snapshot
git-svn-id: http://svn.osgeo.org/qgis/trunk@11168 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 3c01031 commit f112adf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

cmake/FindGRASS.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MACRO (CHECK_GRASS G_PREFIX)
1111

1212
FOREACH (LIB ${GRASS_LIB_NAMES})
1313
SET(LIB_PATH NOTFOUND)
14-
FIND_LIBRARY(LIB_PATH grass_${LIB} PATHS ${G_PREFIX}/lib)
14+
FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
1515

1616
IF (LIB_PATH)
1717
IF (NOT GRASS_LIBRARIES STREQUAL NOTFOUND)

src/app/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
#include <QTranslator>
3535
#include <QImageReader>
3636

37+
#include "qgspluginregistry.h"
38+
3739
#include <cstdio>
3840
#include <stdio.h>
3941
#include <stdlib.h>
@@ -694,7 +696,7 @@ int main( int argc, char *argv[] )
694696
It looks like you don't run the event loop in non-interactive mode, so the
695697
event is never occuring.
696698
697-
To achieve this without runing the event loop: show the window, then call
699+
To achieve this without running the event loop: show the window, then call
698700
qApp->processEvents(), grab the pixmap, save it, hide the window and exit.
699701
*/
700702
//qgis->show();
@@ -704,6 +706,9 @@ int main( int argc, char *argv[] )
704706
qgis->saveMapAsImage( mySnapshotFileName, myQPixmap );
705707
myApp.processEvents();
706708
qgis->hide();
709+
710+
QgsPluginRegistry::instance()->unloadAll();
711+
707712
return 1;
708713
}
709714

@@ -717,5 +722,4 @@ int main( int argc, char *argv[] )
717722
mypSplash->finish( qgis );
718723
delete mypSplash;
719724
return myApp.exec();
720-
721725
}

0 commit comments

Comments
 (0)