Skip to content

Commit

Permalink
fix windows build errors
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12923 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Feb 11, 2010
1 parent b402d29 commit 389cbb4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 deletions.
24 changes: 16 additions & 8 deletions src/plugins/grass/qgis.g.browser.cpp
Expand Up @@ -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 );
}
18 changes: 9 additions & 9 deletions src/providers/grass/qgsgrass.h
Expand Up @@ -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();
Expand Down

0 comments on commit 389cbb4

Please sign in to comment.