Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Get rid of compiler warnings and dont link to qtsql lib
git-svn-id: http://svn.osgeo.org/qgis/trunk@7169 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Aug 29, 2007
1 parent a3d5f96 commit ecafdfb
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/core/CMakeLists.txt
Expand Up @@ -147,7 +147,7 @@ TARGET_LINK_LIBRARIES(qgis_core
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
${QT_QTSQL_LIBRARY}
#${QT_QTSQL_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTNETWORK_LIBRARY}
${QT_QTMAIN_LIBRARY}
Expand Down
7 changes: 6 additions & 1 deletion src/core/qgscoordinatetransform.h
Expand Up @@ -180,7 +180,7 @@ class CORE_EXPORT QgsCoordinateTransform: public QObject
* Flag to indicate whether the coordinate systems have been initialised
* @return true if initialised, otherwise false
*/
bool isInitialised() {return mInitialisedFlag;};
bool isInitialised() const {return mInitialisedFlag;};

/*! See if the transform short circuits because src and dest are equivalent
* @return bool True if it short circuits
Expand Down Expand Up @@ -263,6 +263,11 @@ inline std::ostream& operator << (std::ostream& os, const QgsCoordinateTransform
{
QString mySummary ("\n%%%%%%%%%%%%%%%%%%%%%%%%\nCoordinate Transform def begins:");
mySummary += "\n\tInitialised? : ";
//prevent warnings
if (r.isInitialised())
{
//do nothing this is a dummy
}
/*
if (r.isInitialised())
{
Expand Down
15 changes: 15 additions & 0 deletions src/core/qgsdataprovider.h
Expand Up @@ -115,6 +115,11 @@ class CORE_EXPORT QgsDataProvider : public QObject
*/
virtual void setSubsetString(QString subset)
{
//prevent unused var warnings
if (subset.isEmpty())
{
return;
}
// NOP by default
}

Expand Down Expand Up @@ -172,6 +177,11 @@ class CORE_EXPORT QgsDataProvider : public QObject
*/
virtual void setLayerOrder(QStringList layers)
{
//prevent unused var warnings
if (layers.count() < 1)
{
return;
}
// NOOP
}

Expand All @@ -181,6 +191,11 @@ class CORE_EXPORT QgsDataProvider : public QObject
*/
virtual void setSubLayerVisibility(QString name, bool vis)
{
//prevent unused var warnings
if (name.isEmpty() || !vis)
{
return;
}
// NOOP
}

Expand Down
6 changes: 6 additions & 0 deletions src/core/qgsrasterdataprovider.h
Expand Up @@ -90,6 +90,12 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider
QString const & user,
QString const & pass)
{
//this is mainly to prevent compiler warnings
if (host.isEmpty() || port < 1 || user.isEmpty() || pass.isEmpty())
{
return FALSE;
}

return FALSE;
}

Expand Down
9 changes: 8 additions & 1 deletion src/core/raster/qgsrasterlayer.h
Expand Up @@ -756,7 +756,14 @@ class CORE_EXPORT QgsRasterLayer : public QgsMapLayer
static QDateTime lastModified ( QString const & name );

/**Copies the symbology settings from another layer. Returns true in case of success*/
bool copySymbologySettings(const QgsMapLayer& other) {return false;} //todo
bool copySymbologySettings(const QgsMapLayer& other) {
//preventwarnings
if (other.type() < 0)
{
return false;
}
return false;
} //todo

bool isSymbologyCompatible(const QgsMapLayer& other) const {return false;} //todo

Expand Down
10 changes: 9 additions & 1 deletion src/core/renderer/qgsrenderer.h
Expand Up @@ -43,7 +43,15 @@ class CORE_EXPORT QgsRenderer
virtual ~QgsRenderer();
/** Determines if a feature will be rendered or not
@param f a pointer to the feature to determine if rendering will happen*/
virtual bool willRenderFeature(QgsFeature *f) {return true;}
virtual bool willRenderFeature(QgsFeature *f)
{
//prevent unused var warnings
if (!f)
{
return true;
}
return true;
}
/**A vector layer passes features to a renderer object to change the brush and pen of the qpainter
@param p the painter storing brush and pen
@param f a pointer to the feature to be rendered
Expand Down

0 comments on commit ecafdfb

Please sign in to comment.