[QGIS Commit] r11168 - in trunk/qgis: cmake src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Fri Jul 24 08:32:22 EDT 2009


Author: jef
Date: 2009-07-24 08:32:21 -0400 (Fri, 24 Jul 2009)
New Revision: 11168

Modified:
   trunk/qgis/cmake/FindGRASS.cmake
   trunk/qgis/src/app/main.cpp
Log:
unload plugins before terminating after taking a snapshot

Modified: trunk/qgis/cmake/FindGRASS.cmake
===================================================================
--- trunk/qgis/cmake/FindGRASS.cmake	2009-07-24 12:26:35 UTC (rev 11167)
+++ trunk/qgis/cmake/FindGRASS.cmake	2009-07-24 12:32:21 UTC (rev 11168)
@@ -11,7 +11,7 @@
 
   FOREACH (LIB ${GRASS_LIB_NAMES})
     SET(LIB_PATH NOTFOUND)
-    FIND_LIBRARY(LIB_PATH grass_${LIB} PATHS ${G_PREFIX}/lib)
+    FIND_LIBRARY(LIB_PATH NAMES grass_${LIB} PATHS ${G_PREFIX}/lib NO_DEFAULT_PATH)
 
     IF (LIB_PATH)
       IF (NOT GRASS_LIBRARIES STREQUAL NOTFOUND)

Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp	2009-07-24 12:26:35 UTC (rev 11167)
+++ trunk/qgis/src/app/main.cpp	2009-07-24 12:32:21 UTC (rev 11168)
@@ -34,6 +34,8 @@
 #include <QTranslator>
 #include <QImageReader>
 
+#include "qgspluginregistry.h"
+
 #include <cstdio>
 #include <stdio.h>
 #include <stdlib.h>
@@ -694,7 +696,7 @@
       It looks like you don't run the event loop in non-interactive mode, so the
       event is never occuring.
 
-      To achieve this without runing the event loop: show the window, then call
+      To achieve this without running the event loop: show the window, then call
       qApp->processEvents(), grab the pixmap, save it, hide the window and exit.
       */
     //qgis->show();
@@ -704,6 +706,9 @@
     qgis->saveMapAsImage( mySnapshotFileName, myQPixmap );
     myApp.processEvents();
     qgis->hide();
+
+    QgsPluginRegistry::instance()->unloadAll();
+
     return 1;
   }
 
@@ -717,5 +722,4 @@
   mypSplash->finish( qgis );
   delete mypSplash;
   return myApp.exec();
-
 }



More information about the QGIS-commit mailing list