Skip to content
Permalink
Browse files

fix windows build errors

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12923 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Feb 11, 2010
1 parent b402d29 commit 389cbb4536aa777c32b034c364ad59618696baad
Showing with 25 additions and 17 deletions.
  1. +16 −8 src/plugins/grass/qgis.g.browser.cpp
  2. +9 −9 src/providers/grass/qgsgrass.h
@@ -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 );
}
@@ -161,25 +161,25 @@ class QgsGrass
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();

0 comments on commit 389cbb4

Please sign in to comment.
You can’t perform that action at this time.