Applied Jürgens patch with improvements for MSVC build and initial attempts at GRASS under MSVC

git-svn-id: http://svn.osgeo.org/qgis/trunk@7322 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
timlinux 2007-11-05 01:23:41 +00:00
parent 0c57520123
commit aca333feb4
54 changed files with 274 additions and 238 deletions

View File

@ -1,9 +1,16 @@
IF (WIN32)
SET(BINDINGS_CORE_LIB ${CMAKE_CURRENT_BINARY_DIR}/core/core.pyd)
SET(BINDINGS_GUI_LIB ${CMAKE_CURRENT_BINARY_DIR}/gui/gui.pyd)
SET(QGIS_CORE_LIB ${CMAKE_BINARY_DIR}/src/core/libqgis_core.dll)
SET(QGIS_GUI_LIB ${CMAKE_BINARY_DIR}/src/gui/libqgis_gui.dll)
IF (NOT MSVC)
SET(QGIS_CORE_LIB ${CMAKE_BINARY_DIR}/src/core/libqgis_core.dll)
SET(QGIS_GUI_LIB ${CMAKE_BINARY_DIR}/src/gui/libqgis_gui.dll)
ELSE (NOT MSVC)
SET(QGIS_CORE_LIB ${CMAKE_BINARY_DIR}/src/core/${CMAKE_CFG_INTDIR}/qgis_core.lib)
SET(QGIS_GUI_LIB ${CMAKE_BINARY_DIR}/src/gui/${CMAKE_CFG_INTDIR}/qgis_gui.lib)
GET_FILENAME_COMPONENT(GDAL_LIB_PATH ${GDAL_LIBRARY} PATH)
GET_FILENAME_COMPONENT(GDAL_LIB_NAME ${GDAL_LIBRARY} NAME_WE)
SET(GDAL_LIB_PATHNAME ${GDAL_LIB_PATH}/${GDAL_LIB_NAME})
ENDIF (NOT MSVC)
ELSE (WIN32)
SET(BINDINGS_CORE_LIB ${CMAKE_CURRENT_BINARY_DIR}/core/core.so)
SET(BINDINGS_GUI_LIB ${CMAKE_CURRENT_BINARY_DIR}/gui/gui.so)
@ -35,6 +42,12 @@ FILE(GLOB GUI_SIP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/gui/*.sip")
# create file configure.py from configure.py.in
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/configure.py.in
${CMAKE_CURRENT_BINARY_DIR}/configure.py)
IF (MSVC)
SET(EXPORT "__declspec(dllimport)")
ELSE (MSVC)
SET(EXPORT "")
ENDIF (MSVC)
# Step 2: during make
# run python configure.py
@ -42,7 +55,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/configure.py.in
# should be run everytime core or gui library has been changed
ADD_CUSTOM_COMMAND(OUTPUT ${BINDINGS_CORE_MAKEFILE} ${BINDINGS_GUI_MAKEFILE} PRE_BUILD
COMMAND ${PYTHON_EXECUTABLE}
ARGS ${CMAKE_CURRENT_BINARY_DIR}/configure.py
ARGS ${CMAKE_CURRENT_BINARY_DIR}/configure.py ${CMAKE_CFG_INTDIR} ${EXPORT}
DEPENDS ${QGIS_CORE_LIB} ${QGIS_GUI_LIB}
${CMAKE_CURRENT_BINARY_DIR}/configure.py
${CORE_SIP_FILES} ${GUI_SIP_FILES})

View File

@ -9,12 +9,23 @@ build_path = '@CMAKE_BINARY_DIR@'
python_path = src_path + '/python'
gdal_inc_dir = '@GDAL_INCLUDE_DIR@'
geos_inc_dir = '@GEOS_INCLUDE_DIR@'
gdal_library = '@GDAL_LIB_PATHNAME@'
qt_libs = ["QtCore","QtGui","QtNetwork","QtSvg","QtXml"]
if sys.platform == 'darwin':
qt_libs.append("Qt3Support")
qt_libs.append("QtSql")
if len(sys.argv)>1:
intdir = "/" + sys.argv[1]
else:
intdir = ""
if len(sys.argv)>2:
export = sys.argv[2]
else:
export = ""
# create paths for temporary files if don't exist
if not os.path.isdir("./core"):
os.mkdir("./core")
@ -99,7 +110,9 @@ makefile_gui = sipconfig.ModuleMakefile(
# common settings for both core and gui libs
for mk in [ makefile_core, makefile_gui ]:
mk.extra_libs = ["qgis_core"]
mk.extra_lib_dirs = [build_path+"/src/core"]
if gdal_library!="":
mk.extra_libs.append(gdal_library)
mk.extra_lib_dirs = [build_path+"/src/core"+intdir]
mk.extra_include_dirs = [src_path+"/src/core",
src_path+"/src/core/raster",
src_path+"/src/core/renderer",
@ -108,16 +121,16 @@ for mk in [ makefile_core, makefile_gui ]:
build_path, # qgsconfig.h, qgssvnversion.h
gdal_inc_dir,
geos_inc_dir]
mk.extra_cxxflags = ["-DCORE_EXPORT="]
mk.extra_cxxflags = ["-DCORE_EXPORT="+export]
# more settings for gui lib
makefile_gui.extra_libs.append("qgis_gui")
makefile_gui.extra_lib_dirs.append(build_path+"/src/gui")
makefile_gui.extra_lib_dirs.append(build_path+"/src/gui"+intdir)
makefile_gui.extra_include_dirs.append(src_path+"/src/gui")
makefile_gui.extra_include_dirs.append(build_path+"/src/gui")
makefile_gui.extra_include_dirs.append(build_path+"/src/ui")
makefile_gui.extra_include_dirs.append(src_path+"/src/plugins") # because of qgisplugin.h TODO: sort out
makefile_gui.extra_cxxflags.append("-DGUI_EXPORT=")
makefile_gui.extra_cxxflags.append("-DGUI_EXPORT="+export)
# Generate the Makefile itself.
makefile_core.generate()

View File

@ -600,6 +600,7 @@ void QgsComposition::paperSizeChanged ( void )
}
catch (std::bad_alloc& ba)
{
UNUSED(ba);
// A better solution here would be to set the canvas back to the
// original size and carry on, but for the moment this will
// prevent a crash due to an uncaught exception.

View File

@ -42,6 +42,7 @@
#include <iostream>
#include <QFont>
#include <QDomDocument>
#include <QHeaderView>
#include <QMenu>
#include <QMessageBox>

View File

@ -3020,6 +3020,7 @@ void QgisApp::openProject(const QString & fileName)
}
catch ( QgsIOException & io_exception )
{
UNUSED(io_exception);
QMessageBox::critical( this,
tr("QGIS: Unable to load project"),
tr("Unable to load project ") + fileName );

View File

@ -23,7 +23,7 @@
class QString;
class QWidget;
class Q3ListViewItem;
class sqlite3;
struct sqlite3;
class QgsBookmarks : public QDialog, private Ui::QgsBookmarksBase
{
Q_OBJECT

View File

@ -112,6 +112,7 @@ void QgsMapToolAddFeature::canvasReleaseEvent(QMouseEvent * e)
}
catch(QgsCsException &cse)
{
UNUSED(cse);
QMessageBox::information(0, QObject::tr("Coordinate transform error"), \
QObject::tr("Cannot transform the point to the layers coordinate system"));
return;

View File

@ -113,6 +113,7 @@ int QgsMapToolCapture::addVertex(const QPoint& p)
}
catch(QgsCsException &cse)
{
UNUSED(cse); // unused
return 2; //cannot reproject point to layer coordinate system
}

View File

@ -500,6 +500,7 @@ QString QgsVectorLayerProperties::getMetadata()
}
catch(QgsCsException &cse)
{
UNUSED(cse);
QgsDebugMsg( cse.what() );
myMetadataQString += "<tr><td bgcolor=\"white\">";

View File

@ -130,5 +130,24 @@ public:
* or user (~/.qgis.qgis.db) defined projection. */
const int USER_PROJECTION_START_ID=100000;
#ifdef WIN32
// fake use to make unused variable warnings go away in Visual C++
#define UNUSED(symbol) symbol
#else
# define UNUSED(symbol)
#endif
// FIXME: also in qgisinterface.h
#ifndef QGISEXTERN
#ifdef WIN32
# define QGISEXTERN extern "C" __declspec( dllexport )
# ifdef _MSC_VER
// do not warn about C bindings returing QString
# pragma warning(disable:4190)
# endif
#else
# define QGISEXTERN extern "C"
#endif
#endif
#endif

View File

@ -282,6 +282,7 @@ double QgsDistanceArea::measureLine(const QList<QgsPoint>& points)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
return 0.0;
}
@ -306,6 +307,7 @@ double QgsDistanceArea::measureLine(const QgsPoint& p1, const QgsPoint& p2)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate line length."));
return 0.0;
}
@ -365,6 +367,7 @@ unsigned char* QgsDistanceArea::measurePolygon(unsigned char* feature, double* a
}
catch (QgsCsException &cse)
{
UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
}
@ -393,6 +396,7 @@ double QgsDistanceArea::measurePolygon(const QList<QgsPoint>& points)
}
catch (QgsCsException &cse)
{
UNUSED(cse);
QgsLogger::warning(QObject::tr("Caught a coordinate system exception while trying to transform a point. Unable to calculate polygon area."));
return 0.0;
}

View File

@ -352,9 +352,10 @@ void QgsLabel::renderLabel(QPainter* painter, QgsPoint point,
}
catch(QgsCsException &cse)
{
QgsDebugMsg("Caught transform error in QgsLabel::renderLabel(). "
"Skipping rendering this label");
return;
UNUSED(cse); // unused otherwise
QgsDebugMsg("Caught transform error in QgsLabel::renderLabel(). "
"Skipping rendering this label");
return;
}
}

View File

@ -454,6 +454,7 @@ bool QgsMapRender::splitLayersExtent(QgsMapLayer* layer, QgsRect& extent, QgsRec
}
catch (QgsCsException &cse)
{
UNUSED(cse);
QgsLogger::warning("Transform error caught in " + QString(__FILE__) + ", line " + QString::number(__LINE__));
extent = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);
r2 = QgsRect(-DBL_MAX, -DBL_MAX, DBL_MAX, DBL_MAX);

View File

@ -316,6 +316,7 @@ void QgsVectorLayer::drawLabels(QPainter * p, QgsRect & viewExtent, QgsMapToPixe
}
catch (QgsCsException &e)
{
UNUSED(e);
QgsLogger::critical("Error projecting label locations, caught in " + QString(__FILE__) + ", line " +QString(__LINE__));
}

View File

@ -59,8 +59,8 @@ email : tim at linfiniti.com
// workaround for MSVC compiler which already has defined macro max
// that interferes with calling std::numeric_limits<int>::max
#ifdef _MSC_VER
# ifdef max(x,y)
# undef max(x,y)
# ifdef max
# undef max
# endif
#endif

View File

@ -30,6 +30,14 @@
#include "BulkLoader.h"
#ifdef _MSC_VER
// tell MSVC not to complain about exception declarations
#pragma warning(disable:4290)
#define UNUSED(symbol) symbol
#else
#define UNUSED(symbol)
#endif
using namespace SpatialIndex::RTree;
BulkLoadSource::BulkLoadSource(
@ -179,6 +187,7 @@ IData* BulkLoader::TmpFile::getNext()
}
catch (Tools::EndOfStreamException& e)
{
UNUSED(e);
m_pNext = 0;
}
catch (...)
@ -220,6 +229,7 @@ void BulkLoader::TmpFile::rewind()
}
catch (Tools::EndOfStreamException& e)
{
UNUSED(e);
}
}

View File

@ -22,6 +22,12 @@
#ifndef __spatialindex_rtree_bulk_loader_h
#define __spatialindex_rtree_bulk_loader_h
#ifdef _MSC_VER
// tell MSVC not to complain about exception declarations
#pragma warning(push)
#pragma warning(disable:4290)
#endif
namespace SpatialIndex
{
namespace RTree
@ -108,5 +114,10 @@ namespace SpatialIndex
}
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#endif /* __spatialindex_rtree_bulk_loader_h */

View File

@ -1065,7 +1065,7 @@ void SpatialIndex::RTree::RTree::loadHeader()
ptr += sizeof(unsigned long);
char c;
memcpy(&c, ptr, sizeof(char));
m_bTightMBRs = (bool) c;
m_bTightMBRs = c!=0;
ptr += sizeof(char);
memcpy(&(m_stats.m_nodes), ptr, sizeof(unsigned long));
ptr += sizeof(unsigned long);

View File

@ -26,6 +26,12 @@
#include "ExternalSort.h"
#ifdef _MSC_VER
#define UNUSED(symbol) symbol
#else
#define UNUSED(symbol)
#endif
using namespace std;
Tools::ExternalSort::PQEntry::PQEntry(
@ -202,6 +208,7 @@ void Tools::ExternalSort::mergeRuns()
}
catch (EndOfStreamException& e)
{
UNUSED(e);
// if there are no more records in the file, do nothing.
}
@ -222,6 +229,7 @@ void Tools::ExternalSort::mergeRuns()
}
catch (EndOfStreamException& e)
{
UNUSED(e);
// if there are no more records in the file, do nothing.
delete pqe;
}

View File

@ -205,7 +205,7 @@ void Tools::PropertySet::loadFromByteArray(const byte* ptr)
byte bl;
memcpy(&bl, ptr, sizeof(byte));
ptr += sizeof(byte);
v.m_val.blVal = static_cast<bool>(bl);
v.m_val.blVal = bl!=0;
break;
default:
throw IllegalStateException(

View File

@ -124,4 +124,17 @@ class GUI_EXPORT QgisInterface : public QObject
};
// FIXME: also in core/qgis.h
#ifndef QGISEXTERN
#ifdef WIN32
# define QGISEXTERN extern "C" __declspec( dllexport )
# ifdef _MSC_VER
// do not warn about C bindings returing QString
# pragma warning(disable:4190)
# endif
#else
# define QGISEXTERN extern "C"
#endif
#endif
#endif //#ifndef QGISINTERFACE_H

View File

@ -21,7 +21,7 @@
#define QGSHELPVIEWER_H
# include "ui_qgshelpviewerbase.h"
class QString;
class sqlite3;
struct sqlite3;
class QgsHelpViewer : public QDialog, private Ui::QgsHelpViewerBase
{
Q_OBJECT

View File

@ -46,12 +46,6 @@ email : tim@linfiniti.com
// xpm for creating the toolbar icon
#include "icon.xpm"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const ident_ = "$Id$";
static const QString name_ = QObject::tr("CopyrightLabel");

View File

@ -40,11 +40,6 @@ Functions:
// xpm for creating the toolbar icon
#include "icon.xpm"
//
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString pluginVersion = QObject::tr("Version 0.2");
static const QString description_ = QObject::tr("Loads and displays delimited text files containing x,y coordinates");

View File

@ -53,12 +53,6 @@
#include "plugingui.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const sIdent = "$Id$";
static const QString sName = QObject::tr("Georeferencer");
static const QString sDescription = QObject::tr("Adding projection info to rasters");

View File

@ -48,12 +48,6 @@
// xpm for creating the toolbar icon
#include "icon.xpm"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const ident_ =
"$Id$";

View File

@ -4,14 +4,23 @@ SUBDIRS(config modules themes)
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassplugin.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to teh grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
FILE (GLOB files *.cpp)
SET_SOURCE_FILES_PROPERTIES(${files} PROPERTIES COMPILE_FLAGS -Wno-error )
IF (NOT MSVC)
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassplugin.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to teh grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
FILE (GLOB files *.cpp)
SET_SOURCE_FILES_PROPERTIES(${files} PROPERTIES COMPILE_FLAGS -Wno-error )
ENDIF (NOT MSVC)
IF (WIN32)
ADD_DEFINITIONS("-DGRASS_EXPORT=__declspec(dllimport)")
ELSE (WIN32)
ADD_DEFINITIONS("-DGRASS_EXPORT=")
ENDIF (WIN32)
########################################################
# Files
@ -74,16 +83,17 @@ QT4_WRAP_CPP (GRASS_PLUGIN_MOC_SRCS ${GRASS_PLUGIN_MOC_HDRS})
########################################################
# deal with warnings
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassplugin.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to teh grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
FILE (GLOB files *.cpp)
SET_SOURCE_FILES_PROPERTIES(${files} PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(${GRASS_PLUGIN_MOC_SRCS} PROPERTIES COMPILE_FLAGS -Wno-error )
IF (NOT MSVC)
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassplugin.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to teh grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
FILE (GLOB files *.cpp)
SET_SOURCE_FILES_PROPERTIES(${files} PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(${GRASS_PLUGIN_MOC_SRCS} PROPERTIES COMPILE_FLAGS -Wno-error )
ENDIF (NOT MSVC)
########################################################
# build lib

View File

@ -1149,6 +1149,7 @@ double QgsGrassEdit::threshold ( void )
}
catch(QgsCsException& cse)
{
UNUSED(cse);
//error
}
}

View File

@ -1185,7 +1185,7 @@ void QgsGrassModule::run()
QStringList outsideRegion = mOptions->checkRegion();
if ( outsideRegion.size() > 0 )
{
QMessageBox::QMessageBox questionBox( QMessageBox::Question, "Warning",
QMessageBox questionBox( QMessageBox::Question, "Warning",
"Input " + outsideRegion.join(",") + " outside current region!",
QMessageBox::Ok | QMessageBox::Cancel );
QPushButton *resetButton = NULL;

View File

@ -597,7 +597,8 @@ void QgsGrassNewMapset::setRegionPage()
}
catch(QgsCsException &cse)
{
std::cerr << "Cannot transform point" << std::endl;
UNUSED(cse);
std::cerr << "Cannot transform point" << std::endl;
ok = false;
break;
}
@ -942,7 +943,8 @@ void QgsGrassNewMapset::setSelectedRegion()
}
catch(QgsCsException &cse)
{
std::cerr << "Cannot transform point" << std::endl;
UNUSED(cse);
std::cerr << "Cannot transform point" << std::endl;
ok = false;
break;
}
@ -1031,6 +1033,7 @@ void QgsGrassNewMapset::setCurrentRegion()
}
catch(QgsCsException &cse)
{
UNUSED(cse);
std::cerr << "Cannot transform point" << std::endl;
ok = false;
break;
@ -1176,7 +1179,8 @@ void QgsGrassNewMapset::drawRegion()
}
catch(QgsCsException &cse)
{
std::cerr << "Cannot transform point" << std::endl;
UNUSED(cse);
std::cerr << "Cannot transform point" << std::endl;
ok = false;
break;
}

View File

@ -50,7 +50,11 @@
extern "C" {
#include <stdio.h>
#include <stdlib.h>
#ifndef _MSC_VER
#include <unistd.h>
#else
#include <io.h>
#endif
#ifndef WIN32
#ifdef Q_OS_MACX

View File

@ -37,13 +37,6 @@ email : tim@linfiniti.com
// xpm for creating the toolbar icon
#include "icon.xpm"
//
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const ident_ = "$Id$";

View File

@ -47,11 +47,6 @@ email : tim@linfiniti.com
// xpm for creating the toolbar icon
#include "icon.xpm"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
#ifdef _MSC_VER
#define round(x) ((x) >= 0 ? floor((x)+0.5) : floor((x)-0.5))
@ -324,6 +319,7 @@ bool QgsNorthArrowPlugin::calculateNorthDirection()
}
catch (QgsException &e)
{
UNUSED(e);
// just give up
return false;
}

View File

@ -34,13 +34,6 @@
#include <QToolBar>
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const sIdent = "$Id$";
static const QString sName = QObject::tr("[menuitemname]");
static const QString sDescription = QObject::tr("[plugindescription]");

View File

@ -52,11 +52,6 @@ email : sbr00pwb@users.sourceforge.net
// xpm for creating the toolbar icon
#include "icon.xpm"
//
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
#ifdef _MSC_VER
#define round(x) ((x) >= 0 ? floor((x)+0.5) : floor((x)-0.5))

View File

@ -92,7 +92,7 @@ bool QgsShapeFile::scanGeometries()
qApp->processEvents();
OGRFeature *feat;
unsigned int currentType = 0;
OGRwkbGeometryType currentType = wkbUnknown;
bool multi = false;
while((feat = ogrLayer->GetNextFeature()))
{
@ -127,10 +127,10 @@ bool QgsShapeFile::scanGeometries()
// a hack to support 2.5D geometries (their wkb is equivalent to 2D variants
// except that the highest bit is set also). For now we will ignore 3rd coordinate.
hasMoreDimensions = false;
if (currentType & 0x80000000)
if (currentType & wkb25DBit)
{
QgsDebugMsg("Got a shapefile with 2.5D geometry.");
currentType &= ~0x80000000;
currentType = wkbFlatten(currentType);
hasMoreDimensions = true;
}

View File

@ -31,11 +31,6 @@
// xpm for creating the toolbar icon
#include "spiticon.xpm"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const char * const ident_ = "$Id$";

View File

@ -24,11 +24,6 @@
#include "mIconAddWfsLayer.xpm"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString name_ = QObject::tr("WFS plugin");
static const QString description_ = QObject::tr("Adds WFS layers to the QGIS canvas");

View File

@ -40,13 +40,6 @@
#include "qgsspatialrefsys.h"
#include "qgis.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString TEXT_PROVIDER_KEY = "delimitedtext";
static const QString TEXT_PROVIDER_DESCRIPTION = "Delimited text data provider";

View File

@ -35,8 +35,8 @@
// workaround for MSVC compiler which already has defined macro max
// that interferes with calling std::numeric_limits<int>::max
#ifdef _MSC_VER
# ifdef max(x,y)
# undef max(x,y)
# ifdef max
# undef max
# endif
#endif

View File

@ -43,13 +43,6 @@
#include "gpsdata.h"
#include "qgslogger.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
const char* QgsGPXProvider::attr[] = { "name", "elevation", "symbol", "number",
"comment", "description", "source",
"url", "url name" };

View File

@ -1,4 +1,3 @@
ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
########################################################
@ -8,15 +7,17 @@ SET(GRASS_PROVIDER_SRCS provider.cpp)
SET(GRASS_LIB_SRCS qgsgrassprovider.cpp qgsgrass.cpp)
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassprovider.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to teh grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
SET_SOURCE_FILES_PROPERTIES(qgsgrassprovider.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(qgsgrass.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(provider.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
IF (NOT MSVC)
IF (PEDANTIC)
MESSAGE("providers/grass : -Werror removed for qgsgrassprovider.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
# The warnings are caused by multiple definitions of NDEBUG in grass sources
# I have submitted a bug to the grass folks in the meantime we need to
# disable treating warnings as errors for the affected files
SET_SOURCE_FILES_PROPERTIES(qgsgrassprovider.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(qgsgrass.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
SET_SOURCE_FILES_PROPERTIES(provider.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
ENDIF (NOT MSVC)
########################################################
# Build
@ -28,8 +29,15 @@ INCLUDE_DIRECTORIES (
${PROJ_INCLUDE_DIR}
)
ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
IF (WIN32)
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES COMPILE_FLAGS "-DGRASS_EXPORT=__declspec(dllexport)" )
ELSE (WIN32)
SET_TARGET_PROPERTIES(qgisgrass PROPERTIES COMPILE_FLAGS "-DGRASS_EXPORT=" )
ENDIF (WIN32)
TARGET_LINK_LIBRARIES (qgisgrass
${QT_QTCORE_LIBRARY}
${QT_QTXML_LIBRARY}
@ -39,6 +47,12 @@ TARGET_LINK_LIBRARIES (qgisgrass
ADD_LIBRARY (grassprovider MODULE ${GRASS_PROVIDER_SRCS})
IF (WIN32)
SET_TARGET_PROPERTIES(grassprovider PROPERTIES COMPILE_FLAGS "-DGRASS_EXPORT=__declspec(dllimport)" )
ELSE (WIN32)
SET_TARGET_PROPERTIES(grassprovider PROPERTIES COMPILE_FLAGS "-DGRASS_EXPORT=" )
ENDIF (WIN32)
TARGET_LINK_LIBRARIES (grassprovider
${QT_QTCORE_LIBRARY}
${QT_QTXML_LIBRARY}

View File

@ -40,26 +40,25 @@ extern "C" {
* Class factory to return a pointer to a newly created
* QgsGrassProvider object
*/
extern "C" QgsGrassProvider * classFactory(const QString *uri)
QGISEXTERN QgsGrassProvider * classFactory(const QString *uri)
{
return new QgsGrassProvider(*uri);
}
/** Required key function (used to map the plugin to a data store type)
*/
extern "C" QString providerKey(){
QGISEXTERN QString providerKey(){
return QString("grass");
}
/**
* Required description function
*/
extern "C" QString description(){
QGISEXTERN QString description(){
return QString("GRASS data provider");
}
/**
* Required isProvider function. Used to determine if this shared library
* is a data provider plugin
*/
extern "C" bool isProvider(){
QGISEXTERN bool isProvider(){
return true;
}
}

View File

@ -33,13 +33,19 @@
#include "qgsgrass.h"
extern "C" {
#ifndef _MSC_VER
#include <unistd.h>
#endif
#include <grass/gis.h>
#include <grass/Vect.h>
#include <grass/version.h>
}
void QgsGrass::init( void )
#if defined(_MSC_VER)
#include <windows.h> // for GetCurrentProcessId()
#endif
void GRASS_EXPORT QgsGrass::init( void )
{
// Warning!!!
// G_set_error_routine() once called from plugin
@ -370,25 +376,25 @@ int QgsGrass::error_routine ( const char *msg, int fatal) {
return 1;
}
void QgsGrass::resetError ( void ) {
void GRASS_EXPORT QgsGrass::resetError ( void ) {
error = OK;
}
int QgsGrass::getError ( void ) {
int GRASS_EXPORT QgsGrass::getError ( void ) {
return error;
}
QString QgsGrass::getErrorMessage ( void ) {
QString GRASS_EXPORT QgsGrass::getErrorMessage ( void ) {
return error_message;
}
jmp_buf& QgsGrass::fatalErrorEnv()
jmp_buf GRASS_EXPORT &QgsGrass::fatalErrorEnv()
{
return mFatalErrorEnv;
}
QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapset )
QString GRASS_EXPORT QgsGrass::openMapset ( QString gisdbase, QString location, QString mapset )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::openMapset" << std::endl;
@ -416,7 +422,11 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
process->addArgument ( lock ); // lock file
// TODO: getpid() probably is not portable
#ifndef _MSC_VER
int pid = getpid();
#else
int pid = GetCurrentProcessId();
#endif
#ifdef QGISDEBUG
std::cerr << "pid = " << pid << std::endl;
#endif
@ -594,7 +604,7 @@ QString QgsGrass::closeMapset ( )
return NULL;
}
QStringList QgsGrass::locations ( QString gisbase )
QStringList GRASS_EXPORT QgsGrass::locations ( QString gisbase )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::locations gisbase = "
@ -619,7 +629,7 @@ QStringList QgsGrass::locations ( QString gisbase )
return list;
}
QStringList QgsGrass::mapsets ( QString gisbase, QString locationName )
QStringList GRASS_EXPORT QgsGrass::mapsets ( QString gisbase, QString locationName )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::mapsets gisbase = " << gisbase.ascii()
@ -632,7 +642,7 @@ QStringList QgsGrass::mapsets ( QString gisbase, QString locationName )
return QgsGrass::mapsets ( gisbase + "/" + locationName );
}
QStringList QgsGrass::mapsets ( QString locationPath )
QStringList GRASS_EXPORT QgsGrass::mapsets ( QString locationPath )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::mapsets locationPath = "
@ -656,7 +666,7 @@ QStringList QgsGrass::mapsets ( QString locationPath )
return list;
}
QStringList QgsGrass::vectors ( QString gisbase, QString locationName,
QStringList GRASS_EXPORT QgsGrass::vectors ( QString gisbase, QString locationName,
QString mapsetName)
{
std::cerr << "QgsGrass::vectors()" << std::endl;
@ -693,7 +703,7 @@ QStringList QgsGrass::vectors ( QString gisbase, QString locationName,
return QgsGrass::vectors ( gisbase + "/" + locationName + "/" + mapsetName );
}
QStringList QgsGrass::vectors ( QString mapsetPath )
QStringList GRASS_EXPORT QgsGrass::vectors ( QString mapsetPath )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::vectors mapsetPath = "
@ -720,7 +730,7 @@ QStringList QgsGrass::vectors ( QString mapsetPath )
return list;
}
QStringList QgsGrass::rasters ( QString gisbase, QString locationName,
QStringList GRASS_EXPORT QgsGrass::rasters ( QString gisbase, QString locationName,
QString mapsetName)
{
std::cerr << "QgsGrass::rasters()" << std::endl;
@ -758,7 +768,7 @@ QStringList QgsGrass::rasters ( QString gisbase, QString locationName,
return QgsGrass::rasters ( gisbase + "/" + locationName + "/" + mapsetName );
}
QStringList QgsGrass::rasters ( QString mapsetPath )
QStringList GRASS_EXPORT QgsGrass::rasters ( QString mapsetPath )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::rasters mapsetPath = "
@ -779,7 +789,7 @@ QStringList QgsGrass::rasters ( QString mapsetPath )
return list;
}
QStringList QgsGrass::elements ( QString gisbase, QString locationName,
QStringList GRASS_EXPORT QgsGrass::elements ( QString gisbase, QString locationName,
QString mapsetName, QString element)
{
if ( gisbase.isEmpty() || locationName.isEmpty() || mapsetName.isEmpty() )
@ -789,7 +799,7 @@ QStringList QgsGrass::elements ( QString gisbase, QString locationName,
element );
}
QStringList QgsGrass::elements ( QString mapsetPath, QString element )
QStringList GRASS_EXPORT QgsGrass::elements ( QString mapsetPath, QString element )
{
#ifdef QGISDEBUG
std::cerr << "QgsGrass::elements mapsetPath = "
@ -810,7 +820,7 @@ QStringList QgsGrass::elements ( QString mapsetPath, QString element )
return list;
}
QString QgsGrass::regionString( struct Cell_head *window )
QString GRASS_EXPORT QgsGrass::regionString( struct Cell_head *window )
{
QString reg;
int fmt;
@ -847,7 +857,7 @@ QString QgsGrass::regionString( struct Cell_head *window )
return reg;
}
bool QgsGrass::region( QString gisbase,
bool GRASS_EXPORT QgsGrass::region( QString gisbase,
QString location, QString mapset,
struct Cell_head *window )
{
@ -860,7 +870,7 @@ bool QgsGrass::region( QString gisbase,
return true;
}
bool QgsGrass::writeRegion( QString gisbase,
bool GRASS_EXPORT QgsGrass::writeRegion( QString gisbase,
QString location, QString mapset,
struct Cell_head *window )
{
@ -877,7 +887,7 @@ bool QgsGrass::writeRegion( QString gisbase,
return true;
}
void QgsGrass::copyRegionExtent( struct Cell_head *source,
void GRASS_EXPORT QgsGrass::copyRegionExtent( struct Cell_head *source,
struct Cell_head *target )
{
target->north = source->north;
@ -888,7 +898,7 @@ void QgsGrass::copyRegionExtent( struct Cell_head *source,
target->bottom = source->bottom;
}
void QgsGrass::copyRegionResolution( struct Cell_head *source,
void GRASS_EXPORT QgsGrass::copyRegionResolution( struct Cell_head *source,
struct Cell_head *target )
{
target->ns_res = source->ns_res;
@ -898,7 +908,7 @@ void QgsGrass::copyRegionResolution( struct Cell_head *source,
target->ew_res3 = source->ew_res3;
}
void QgsGrass::extendRegion( struct Cell_head *source,
void GRASS_EXPORT QgsGrass::extendRegion( struct Cell_head *source,
struct Cell_head *target )
{
if ( source->north > target->north )
@ -920,7 +930,7 @@ void QgsGrass::extendRegion( struct Cell_head *source,
target->bottom = source->bottom;
}
bool QgsGrass::mapRegion( int type, QString gisbase,
bool GRASS_EXPORT QgsGrass::mapRegion( int type, QString gisbase,
QString location, QString mapset, QString map,
struct Cell_head *window )
{
@ -1003,7 +1013,7 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
// http://freegis.org/cgi-bin/viewcvs.cgi/grass6/include/version.h.in.diff?r1=1.4&r2=1.5
// The following lines workaround this change
int QgsGrass::versionMajor()
int GRASS_EXPORT QgsGrass::versionMajor()
{
#ifdef GRASS_VERSION_MAJOR
return GRASS_VERSION_MAJOR;
@ -1011,7 +1021,7 @@ int QgsGrass::versionMajor()
return QString(GRASS_VERSION_MAJOR).toInt();
#endif
}
int QgsGrass::versionMinor()
int GRASS_EXPORT QgsGrass::versionMinor()
{
#ifdef GRASS_VERSION_MINOR
return GRASS_VERSION_MINOR;
@ -1019,7 +1029,7 @@ int QgsGrass::versionMinor()
return QString(GRASS_VERSION_MINOR).toInt();
#endif
}
int QgsGrass::versionRelease()
int GRASS_EXPORT QgsGrass::versionRelease()
{
#ifdef GRASS_VERSION_RELEASE
#define QUOTE(x) #x
@ -1028,12 +1038,12 @@ int QgsGrass::versionRelease()
return QString(GRASS_VERSION_RELEASE).toInt();
#endif
}
QString QgsGrass::versionString()
QString GRASS_EXPORT QgsGrass::versionString()
{
return QString(GRASS_VERSION_STRING);
}
bool QgsGrass::isMapset ( QString path )
bool GRASS_EXPORT QgsGrass::isMapset ( QString path )
{
/* TODO: G_is_mapset() was added to GRASS 6.1 06-05-24,
enable its use after some period (others do update) */

View File

@ -35,23 +35,23 @@ public:
* Active mode means that GISRC is set up and GISRC file is available,
* in that case default GISDBASE, LOCATION and MAPSET may be read by GetDefaul*() functions.
* Passive mode means, that GISRC is not available. */
static bool activeMode ( void );
static GRASS_EXPORT bool activeMode ( void );
//! Get default GISDBASE, returns GISDBASE name or empty string if not in active mode
static QString getDefaultGisdbase ( void );
static GRASS_EXPORT QString getDefaultGisdbase ( void );
//! Get default LOCATION_NAME, returns LOCATION_NAME name or empty string if not in active mode
static QString getDefaultLocation ( void );
static GRASS_EXPORT QString getDefaultLocation ( void );
//! Get default MAPSET, returns MAPSET name or empty string if not in active mode
static QString getDefaultMapset ( void );
static GRASS_EXPORT QString getDefaultMapset ( void );
//! Init or reset GRASS library
/*!
\param gisdbase full path to GRASS GISDBASE.
\param location location name (not path!).
*/
static void setLocation( QString gisdbase, QString location);
static GRASS_EXPORT void setLocation( QString gisdbase, QString location);
/*!
\param gisdbase full path to GRASS GISDBASE.
@ -59,7 +59,7 @@ public:
\param mapset current mupset. Note that some variables depend on mapset and
may influence behaviour of some functions (e.g. search path etc.)
*/
static void setMapset( QString gisdbase, QString location, QString mapset);
static GRASS_EXPORT void setMapset( QString gisdbase, QString location, QString mapset);
//! Error codes returned by GetError()
enum GERROR { OK, /*!< OK. No error. */
@ -71,90 +71,90 @@ public:
enum MapType { Raster, Vector, Region };
//! Reset error code (to OK). Call this before a piece of code where an error is expected
static void resetError ( void ); // reset error status
static GRASS_EXPORT void resetError ( void ); // reset error status
//! Check if any error occured in lately called functions. Returns value from ERROR.
static int getError ( void );
static GRASS_EXPORT int getError ( void );
//! Get last error message
static QString getErrorMessage ( void );
static GRASS_EXPORT QString getErrorMessage ( void );
/** \brief Open existing GRASS mapset
* \return NULL string or error message
*/
static QString openMapset ( QString gisdbase,
static GRASS_EXPORT QString openMapset ( QString gisdbase,
QString location, QString mapset );
/** \brief Close mapset if it was opened from QGIS.
* Delete GISRC, lock and temporary directory
* \return NULL string or error message
*/
static QString closeMapset ();
static GRASS_EXPORT QString closeMapset ();
//! Check if given directory contains a GRASS installation
static bool isValidGrassBaseDir(QString const gisBase);
static GRASS_EXPORT bool isValidGrassBaseDir(QString const gisBase);
//! Returns list of locations in given gisbase
static QStringList locations(QString gisbase);
static QStringList GRASS_EXPORT locations(QString gisbase);
//! Returns list of mapsets in location
static QStringList mapsets(QString gisbase, QString locationName);
static QStringList mapsets(QString locationPath);
static GRASS_EXPORT QStringList mapsets(QString gisbase, QString locationName);
static GRASS_EXPORT QStringList mapsets(QString locationPath);
//! List of vectors and rasters
static QStringList vectors(QString gisbase, QString locationName,
static GRASS_EXPORT QStringList vectors(QString gisbase, QString locationName,
QString mapsetName);
static QStringList vectors(QString mapsetPath);
static GRASS_EXPORT QStringList vectors(QString mapsetPath);
static QStringList rasters(QString gisbase, QString locationName,
static GRASS_EXPORT QStringList rasters(QString gisbase, QString locationName,
QString mapsetName);
static QStringList rasters(QString mapsetPath);
static GRASS_EXPORT QStringList rasters(QString mapsetPath);
//! List of elements
static QStringList elements(QString gisbase, QString locationName,
static GRASS_EXPORT QStringList elements(QString gisbase, QString locationName,
QString mapsetName, QString element);
static QStringList elements(QString mapsetPath, QString element);
static GRASS_EXPORT QStringList elements(QString mapsetPath, QString element);
// ! Get map region
static bool mapRegion( int type, QString gisbase,
static GRASS_EXPORT bool mapRegion( int type, QString gisbase,
QString location, QString mapset, QString map,
struct Cell_head *window );
// ! String representation of region
static QString regionString( struct Cell_head *window );
static GRASS_EXPORT QString regionString( struct Cell_head *window );
// ! Read current mapset region
static bool region( QString gisbase, QString location, QString mapset,
static GRASS_EXPORT bool region( QString gisbase, QString location, QString mapset,
struct Cell_head *window );
// ! Write current mapset region
static bool writeRegion( QString gisbase, QString location, QString mapset,
static GRASS_EXPORT bool writeRegion( QString gisbase, QString location, QString mapset,
struct Cell_head *window );
// ! Set (copy) region extent, resolution is not changed
static void copyRegionExtent( struct Cell_head *source,
static GRASS_EXPORT void copyRegionExtent( struct Cell_head *source,
struct Cell_head *target );
// ! Set (copy) region resolution, extent is not changed
static void copyRegionResolution( struct Cell_head *source,
static GRASS_EXPORT void copyRegionResolution( struct Cell_head *source,
struct Cell_head *target );
// ! Extend region in target to source
static void extendRegion( struct Cell_head *source,
static GRASS_EXPORT void extendRegion( struct Cell_head *source,
struct Cell_head *target );
static void init (void);
static GRASS_EXPORT void init (void);
// ! test if the directory is mapset
static bool isMapset ( QString path );
static GRASS_EXPORT bool isMapset ( QString path );
//! Library version
static int versionMajor();
static int versionMinor();
static int versionRelease();
static QString versionString();
static GRASS_EXPORT int versionMajor();
static GRASS_EXPORT int versionMinor();
static GRASS_EXPORT int versionRelease();
static GRASS_EXPORT QString versionString();
static jmp_buf& fatalErrorEnv();
static GRASS_EXPORT jmp_buf& fatalErrorEnv();
private:

View File

@ -108,7 +108,7 @@ struct GMAP
\class QgsGrassProvider
\brief Data provider for GRASS vectors
*/
class QgsGrassProvider : public QgsVectorDataProvider
class GRASS_EXPORT QgsGrassProvider : public QgsVectorDataProvider
{
public:

View File

@ -39,11 +39,6 @@
#include "../../src/qgsfield.h"
#include "../../src/qgsrect.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString TEXT_PROVIDER_KEY = "mysql";

View File

@ -16,14 +16,9 @@
#include <iostream>
#include <qmessagebox.h>
#include "qgis.h"
#include "qgsogrfactory.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
QgsOGRFactory::QgsOGRFactory()
{
}

View File

@ -53,14 +53,6 @@ email : sherman at mrcc.com
#include "qgsgeometry.h"
#include "qgslogger.h"
#include "qgsspatialrefsys.h"
#include "qgis.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString TEXT_PROVIDER_KEY = "ogr";
static const QString TEXT_PROVIDER_DESCRIPTION =

View File

@ -55,12 +55,6 @@
#include "qgspostgisbox3d.h"
#include "qgslogger.h"
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
const QString POSTGRES_KEY = "postgres";
const QString POSTGRES_DESCRIPTION = "PostgreSQL/PostGIS data provider";

View File

@ -8,12 +8,12 @@ SET (WFS_MOC_HDRS
qgswfsdata.h
)
IF (PEDANTIC)
MESSAGE("providers/wfs : -Werror removed for qgswfsprovider.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
IF(NOT MSVC)
IF (PEDANTIC)
MESSAGE("providers/wfs : -Werror removed for qgswfsprovider.cpp for now - please get rid of any compiler warnings!")
ENDIF (PEDANTIC)
SET_SOURCE_FILES_PROPERTIES(qgswfsprovider.cpp PROPERTIES COMPILE_FLAGS -Wno-error )
ENDIF(NOT MSVC)
ENDIF (NOT MSVC)
########################################################
# Build

View File

@ -29,12 +29,6 @@
#include <QFile>
#include <cfloat>
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static const QString TEXT_PROVIDER_KEY = "WFS";
static const QString TEXT_PROVIDER_DESCRIPTION = "WFS data provider";

View File

@ -44,13 +44,6 @@
#include <QFile>
#endif
#ifdef WIN32
#define QGISEXTERN extern "C" __declspec( dllexport )
#else
#define QGISEXTERN extern "C"
#endif
static QString WMS_KEY = "wms";
static QString WMS_DESCRIPTION = "OGC Web Map Service version 1.3 data provider";
@ -1938,6 +1931,7 @@ bool QgsWmsProvider::calculateExtent()
}
catch(QgsCsException &cse)
{
UNUSED(cse);
continue; //ignore extents of layers which cannot be transformed info the required CRS
}

View File

@ -43,7 +43,7 @@ QgsMapserverExport::QgsMapserverExport(QWidget * parent, Qt::WFlags fl)
txtQgisFilePath->setSuffixFilter("qgs");
// initialize python
initPy();
qDebug("Reading setttings");
qDebug("Reading settings");
QSettings mySettings;
txtMapFilePath->setText(mySettings.value("mapserverExport/lastMapFile","").toString());
txtQgisFilePath->setText(mySettings.value("mapserverExport/lastQgsFile","").toString());
@ -104,7 +104,7 @@ void QgsMapserverExport::on_chkExpLayersOnly_clicked(bool isChecked)
void QgsMapserverExport::apply()
{
qDebug("Writing setttings");
qDebug("Writing settings");
QSettings mySettings;
mySettings.setValue("mapserverExport/lastMapFile",txtMapFilePath->text());
mySettings.setValue("mapserverExport/lastQgsFile",txtQgisFilePath->text());