[QGIS Commit] r12923 - in trunk/qgis/src: plugins/grass providers/grass

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Feb 11 02:41:38 EST 2010


Author: jef
Date: 2010-02-11 02:41:35 -0500 (Thu, 11 Feb 2010)
New Revision: 12923

Modified:
   trunk/qgis/src/plugins/grass/qgis.g.browser.cpp
   trunk/qgis/src/providers/grass/qgsgrass.h
Log:
fix windows build errors

Modified: trunk/qgis/src/plugins/grass/qgis.g.browser.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgis.g.browser.cpp	2010-02-10 20:17:49 UTC (rev 12922)
+++ trunk/qgis/src/plugins/grass/qgis.g.browser.cpp	2010-02-11 07:41:35 UTC (rev 12923)
@@ -4,15 +4,23 @@
 #include <QUrl>
 #include <QDesktopServices>
 
+#ifdef Q_OS_WIN
+#include <windows.h>
+#endif
+
 // Open a URL by default browser
-int main(int argc, char **argv) 
+int main( int argc, char **argv )
 {
-  if ( argc < 2 ) 
-  {  
-    fprintf ( stderr, "URL argument missing\n" );
-    exit (1);
+  if ( argc < 2 )
+  {
+    fprintf( stderr, "URL argument missing\n" );
+    exit( 1 );
   }
-  QDesktopServices::openUrl ( QUrl ( argv[1] ) );
-  sleep(1); // not nice but if it exits immediately the page sometimes does not open
-  exit ( 0 );
+  QDesktopServices::openUrl( QUrl( argv[1] ) );
+#ifdef Q_OS_WIN
+  Sleep( 1000 );
+#else
+  sleep( 1 ); // not nice but if it exits immediately the page sometimes does not open
+#endif
+  exit( 0 );
 }

Modified: trunk/qgis/src/providers/grass/qgsgrass.h
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrass.h	2010-02-10 20:17:49 UTC (rev 12922)
+++ trunk/qgis/src/providers/grass/qgsgrass.h	2010-02-11 07:41:35 UTC (rev 12923)
@@ -161,25 +161,25 @@
     static GRASS_EXPORT QString lockFilePath();
 
     // ! Get current gisrc path
-    static QString gisrcFilePath();
+    static GRASS_EXPORT QString gisrcFilePath();
 
     // ! Run a GRASS module in any gisdbase/location
     static GRASS_EXPORT QByteArray runModule( QString gisdbase, QString location, QString module, QStringList arguments );
 
     // ! Get info string from qgis.g.info module
-    static GRASS_EXPORT QString getInfo( QString info, QString gisdbase, 
-                            QString location, QString mapset=0, QString map=0, MapType type = None, double x=0, double y=0 );
+    static GRASS_EXPORT QString getInfo( QString info, QString gisdbase,
+                                         QString location, QString mapset = 0, QString map = 0, MapType type = None, double x = 0, double y = 0 );
 
-    // ! Get location projection 
-    static GRASS_EXPORT QgsCoordinateReferenceSystem crs( QString gisdbase, QString location);
+    // ! Get location projection
+    static GRASS_EXPORT QgsCoordinateReferenceSystem crs( QString gisdbase, QString location );
 
     // ! Get map extent
-   static GRASS_EXPORT QgsRectangle extent( QString gisdbase, QString location, 
-                      QString mapset, QString map, MapType type = None );
+    static GRASS_EXPORT QgsRectangle extent( QString gisdbase, QString location,
+        QString mapset, QString map, MapType type = None );
 
     // ! Get map value / feautre info
-   static GRASS_EXPORT QMap<QString, QString> query( QString gisdbase, QString location, 
-                      QString mapset, QString map, MapType type, double x, double y);
+    static GRASS_EXPORT QMap<QString, QString> query( QString gisdbase, QString location,
+        QString mapset, QString map, MapType type, double x, double y );
 
     //! Library version
     static GRASS_EXPORT int versionMajor();



More information about the QGIS-commit mailing list