From 1a2c387d6304c1f30dd709175e8d729a8f73458b Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 30 Mar 2013 11:37:30 +0100 Subject: [PATCH] fix warnings --- src/app/qgsundowidget.cpp | 2 + src/core/composer/qgscomposition.h | 6 +-- src/core/qgscachedfeatureiterator.h | 2 +- src/core/qgsgml.h | 2 + src/core/qgsgmlschema.h | 3 +- src/core/qgsogcutils.cpp | 11 ++---- src/core/qgsogcutils.h | 39 +++++++++++-------- src/core/qgsvectorlayercache.h | 10 ++--- src/core/qgsvectorlayerundocommand.cpp | 2 + .../qgsattributetablefiltermodel.h | 2 +- .../attributetable/qgsattributetableview.h | 15 ++++--- src/gui/attributetable/qgsdualview.h | 4 +- src/gui/qgsbusyindicatordialog.h | 2 + src/gui/qgsexpressionselectiondialog.h | 1 + src/gui/qgsoptionsdialogbase.h | 2 + src/mapserver/qgswfsserver.cpp | 10 ++--- 16 files changed, 61 insertions(+), 52 deletions(-) diff --git a/src/app/qgsundowidget.cpp b/src/app/qgsundowidget.cpp index 1fbb6ce2f22..7f0b79fc25c 100644 --- a/src/app/qgsundowidget.cpp +++ b/src/app/qgsundowidget.cpp @@ -107,7 +107,9 @@ void QgsUndoWidget::indexChanged( int curIndx ) QgsDebugMsg( QString( "offset : %1" ).arg( offset ) ); QgsDebugMsg( QString( "curCount: %1" ).arg( curCount ) ); if ( lastRedo ) + { QgsDebugMsg( QString( "lastRedo: true" ) ); + } } // avoid canvas redraws when only new command was added to stack (i.e. no user undo/redo action) diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index 1c6931d2948..feeb1c8492a 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -172,12 +172,8 @@ class CORE_EXPORT QgsComposition: public QGraphicsScene /**Returns a composer item given its unique identifier. @note added in 2.0 - @param theId - A QString representing the UUID of the item to - @param inAllComposers - Whether the search should be done in all composers of the project - retrieve. - @return QgsComposerItem pointer or 0 pointer if no such item exists. + @param theUuid A QString representing the UUID of the item to **/ - //const QgsComposerItem* getComposerItemByUuid( QString theUuid, bool inAllComposers = false ) const;//does not work since it's impossible to get QGisApp::instance() const QgsComposerItem* getComposerItemByUuid( QString theUuid ) const; int printResolution() const {return mPrintResolution;} diff --git a/src/core/qgscachedfeatureiterator.h b/src/core/qgscachedfeatureiterator.h index 57dc1e59d21..da4322ade24 100644 --- a/src/core/qgscachedfeatureiterator.h +++ b/src/core/qgscachedfeatureiterator.h @@ -32,7 +32,7 @@ class CORE_EXPORT QgsCachedFeatureIterator : public QgsAbstractFeatureIterator /** * @brief * This constructor creates a feature iterator, that delivers only cached information, based on the - * {@link QgsFeatureIds}. No request is made to the backend. + * @link QgsFeatureIds @endlink. No request is made to the backend. * * @param vlCache The vector layer cache to use * @param featureRequest The feature request to answer diff --git a/src/core/qgsgml.h b/src/core/qgsgml.h index 9a8dd2fe0fe..1e8eb143b4c 100644 --- a/src/core/qgsgml.h +++ b/src/core/qgsgml.h @@ -48,6 +48,8 @@ class CORE_EXPORT QgsGml: public QObject /** Does the Http GET request to the wfs server * @param uri GML URL + * @param wkbType wkbType to retrieve + * @param extent retrieved extents * @return 0 in case of success */ int getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangle* extent = 0 ); diff --git a/src/core/qgsgmlschema.h b/src/core/qgsgmlschema.h index 5ddb63efcf9..489af8b1cef 100644 --- a/src/core/qgsgmlschema.h +++ b/src/core/qgsgmlschema.h @@ -154,6 +154,7 @@ class CORE_EXPORT QgsGmlSchema: public QObject QString stripNS( const QString & name ); /** Find GML base type for complex type of given name + * @param element input element * @param name complex type name * @return name of GML base type without NS, e.g. AbstractFeatureType or empty string if not pased on GML type */ @@ -183,7 +184,7 @@ class CORE_EXPORT QgsGmlSchema: public QObject /**Tuple separator for coordinate strings. Usually " " */ QString mTupleSeparator; - /* Schema informations guessed/parsed from GML in getSchema() */ + /* Schema information guessed/parsed from GML in getSchema() */ /** Depth level, root element is 0 */ int mLevel; diff --git a/src/core/qgsogcutils.cpp b/src/core/qgsogcutils.cpp index 61f50103f14..9b01a329880 100644 --- a/src/core/qgsogcutils.cpp +++ b/src/core/qgsogcutils.cpp @@ -865,7 +865,7 @@ bool QgsOgcUtils::readGMLPositions( std::list& coords, const QDomEleme { //tupel and coord separator are the same QString coordSeparator = " "; - QString tupleSeparator = " "; + QString tupelSeparator = " "; //"decimal" has to be "." @@ -893,9 +893,7 @@ bool QgsOgcUtils::readGMLPositions( std::list& coords, const QDomEleme srsDimension = 2; } } - //srsDimension was added by rdlhont for future support of 3d geometries - //currently it is unused so I have marked it as such. TS - Q_UNUSED(srsDimension); + for ( int i = 0; i < posSize / srsDimension; i++ ) { x = pos.at( i * srsDimension ).toDouble( &conversionSuccess ); @@ -976,9 +974,8 @@ QgsRectangle QgsOgcUtils::rectangleFromGMLEnvelope( const QDomNode& envelopeNode srsDimension = 2; } } - //srsDimension was added by rdlhont for future support of 3d geometries - //currently it is unused so I have marked it as such. TS - Q_UNUSED(srsDimension); + + Q_UNUSED( srsDimension ); bString = elem.text(); double xmax = bString.section( " ", 0, 0 ).toDouble( &conversionSuccess ); diff --git a/src/core/qgsogcutils.h b/src/core/qgsogcutils.h index d8a2ebac158..9a1b4b017c6 100644 --- a/src/core/qgsogcutils.h +++ b/src/core/qgsogcutils.h @@ -30,8 +30,9 @@ class CORE_EXPORT QgsOgcUtils public: /** static method that creates geometry from GML - @param XML representation of the geometry. GML elements are expected to be - in default namespace (...) or in "gml" namespace (...) + @param xmlString xml representation of the geometry. GML elements are expected to be + in default namespace (\verbatim {... \endverbatim) or in + "gml" namespace (\verbatim ... \endverbatim) */ static QgsGeometry* geometryFromGML( const QString& xmlString ); @@ -69,8 +70,10 @@ class CORE_EXPORT QgsOgcUtils /** Parse XML with OGC filter into QGIS expression */ static QgsExpression* expressionFromOgcFilter( const QDomElement& element ); - /** Creates OGC filter XML element. Supports minimum standard filter according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT) - @return valid QDomElement on success, otherwise null QDomElement + /** Creates OGC filter XML element. Supports minimum standard filter + * according to the OGC filter specs (=,!=,<,>,<=,>=,AND,OR,NOT) + * @return valid \verbatim \endverbatim QDomElement on success, + * otherwise null QDomElement */ static QDomElement expressionToOgcFilter( const QgsExpression& exp, QDomDocument& doc, QString* errorMessage = 0 ); @@ -87,27 +90,29 @@ class CORE_EXPORT QgsOgcUtils static QgsGeometry* geometryFromGMLMultiLineString( const QDomElement& geometryElement ); /** static method that creates geometry from GML MultiPolygon */ static QgsGeometry* geometryFromGMLMultiPolygon( const QDomElement& geometryElement ); - /** Reads the element and extracts the coordinates as points + /** Reads the \verbatim \endverbatim element and extracts the coordinates as points @param coords list where the found coordinates are appended - @param elem the element + @param elem the \verbatim \endverbatim element @return boolean for success*/ static bool readGMLCoordinates( std::list& coords, const QDomElement elem ); - /** Reads the or element and extracts the coordinates as points + /** Reads the \verbatim \endverbatim or \verbatim \endverbatim + and extracts the coordinates as points @param coords list where the found coordinates are appended - @param elem the or element + @param elem the \verbatim \endverbatim or + \verbatim \endverbatim element @return boolean for success*/ static bool readGMLPositions( std::list& coords, const QDomElement elem ); /**Create a GML coordinates element from a point list. @param points list of data points - @param the GML document + @param doc the GML document @return QDomElement */ static QDomElement createGMLCoordinates( const QVector points, QDomDocument& doc ); /**Create a GML pos or posList element from a point list. @param points list of data points - @param the GML document + @param doc the GML document @return QDomElement */ static QDomElement createGMLPositions( const QVector points, QDomDocument& doc ); @@ -115,19 +120,19 @@ class CORE_EXPORT QgsOgcUtils static QgsExpression::Node* nodeFromOgcFilter( QDomElement &element, QString &errorMessage ); //! handle a generic binary operator static QgsExpression::NodeBinaryOperator* nodeBinaryOperatorFromOgcFilter( QDomElement &element, QString &errorMessage ); - //! handles various spatial operation tags (, etc) + //! handles various spatial operation tags (\verbatim \endverbatim, \verbatim \endverbatim etc.) static QgsExpression::NodeFunction* nodeSpatialOperatorFromOgcFilter( QDomElement& element, QString& errorMessage ); - //! handle tag + //! handle \verbatim \endverbatim tag static QgsExpression::NodeUnaryOperator* nodeNotFromOgcFilter( QDomElement &element, QString &errorMessage ); - //! handles tag + //! handles \verbatim \endverbatim tag static QgsExpression::NodeFunction* nodeFunctionFromOgcFilter( QDomElement &element, QString &errorMessage ); - //! handles tag + //! handles \verbatim \endverbatim tag static QgsExpression::Node* nodeLiteralFromOgcFilter( QDomElement &element, QString &errorMessage ); - //! handles tag + //! handles \verbatim \endverbatim tag static QgsExpression::NodeColumnRef* nodeColumnRefFromOgcFilter( QDomElement &element, QString &errorMessage ); - //! handles tag + //! handles \verbatim \endverbatim tag static QgsExpression::Node* nodeIsBetweenFromOgcFilter( QDomElement& element, QString& errorMessage ); - //! handles tag + //! handles \verbatim \endverbatim tag static QgsExpression::NodeBinaryOperator* nodePropertyIsNullFromOgcFilter( QDomElement& element, QString& errorMessage ); static QDomElement expressionNodeToOgcFilter( const QgsExpression::Node* node, QDomDocument& doc, QString& errorMessage ); diff --git a/src/core/qgsvectorlayercache.h b/src/core/qgsvectorlayercache.h index 3275855b61b..24d6724e953 100644 --- a/src/core/qgsvectorlayercache.h +++ b/src/core/qgsvectorlayercache.h @@ -30,7 +30,7 @@ class QgsAbstractCacheIndex; * This class caches features of a given QgsVectorLayer. * * @brief - * The cached features can be indexed by @link {QgsAbstractCacheIndex}. + * The cached features can be indexed by @link QgsAbstractCacheIndex @endlink. * * Proper indexing for a given use-case may speed up performance substantially. */ @@ -41,9 +41,9 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject private: /** - * This is a wrapper class around a cached @link {QgsFeature}, which will inform - * the cache, when it has been deleted, so indexes can be updated that the wrapped - * feature needs to be fetched again if needed. + * This is a wrapper class around a cached @link QgsFeature @endlink, which + * will inform the cache, when it has been deleted, so indexes can be + * updated that the wrapped feature needs to be fetched again if needed. */ class QgsCachedFeature { @@ -212,7 +212,7 @@ class CORE_EXPORT QgsVectorLayerCache : public QObject /** * @brief Is emitted when the cached layer is deleted. Is emitted when the cached layers layerDelete() * signal is being emitted, but before the local reference to it has been set to NULL. So call to - * @link {layer()} will still return a valid pointer for cleanup purpose. + * @link layer() @endlink will still return a valid pointer for cleanup purpose. */ void cachedLayerDeleted(); diff --git a/src/core/qgsvectorlayerundocommand.cpp b/src/core/qgsvectorlayerundocommand.cpp index 29ebb668928..90e91009d4c 100644 --- a/src/core/qgsvectorlayerundocommand.cpp +++ b/src/core/qgsvectorlayerundocommand.cpp @@ -47,8 +47,10 @@ QgsVectorLayerUndoCommandAddFeature::QgsVectorLayerUndoCommandAddFeature( QgsVec void QgsVectorLayerUndoCommandAddFeature::undo() { +#ifdef QGISDEBUG QgsFeatureMap::const_iterator it = mBuffer->mAddedFeatures.find( mFeature.id() ); Q_ASSERT( it != mBuffer->mAddedFeatures.end() ); +#endif mBuffer->mAddedFeatures.remove( mFeature.id() ); if ( mFeature.geometry() ) diff --git a/src/gui/attributetable/qgsattributetablefiltermodel.h b/src/gui/attributetable/qgsattributetablefiltermodel.h index b9359cd13dd..0613d3d88c9 100644 --- a/src/gui/attributetable/qgsattributetablefiltermodel.h +++ b/src/gui/attributetable/qgsattributetablefiltermodel.h @@ -46,7 +46,7 @@ class GUI_EXPORT QgsAttributeTableFilterModel: public QSortFilterProxyModel * * Make sure, the master model is already loaded, so the selection will get synchronized. * - * @param layerCache The layer cache to use + * @param parent parent object (owner) * @param sourceModel The QgsAttributeTableModel to use as source (mostly referred to as master model) * @param canvas The mapCanvas. Used to identify the currently visible features. */ diff --git a/src/gui/attributetable/qgsattributetableview.h b/src/gui/attributetable/qgsattributetableview.h index af0c6c6cbd1..4ee448751fc 100644 --- a/src/gui/attributetable/qgsattributetableview.h +++ b/src/gui/attributetable/qgsattributetableview.h @@ -32,10 +32,10 @@ class QProgressDialog; /** * @brief - * Provides a table view of features of a {@link QgsVectorLayer}. + * Provides a table view of features of a @link QgsVectorLayer @endlink. * - * This can either be used as a standalone widget. {@link QgsBrowser} features a reference implementation. - * Or this can be used within the {@link QgsDualView} stacked widget. + * This can either be used as a standalone widget. QgsBrowser features a reference implementation. + * Or this can be used within the @link QgsDualView @endlink stacked widget. */ class GUI_EXPORT QgsAttributeTableView : public QTableView @@ -51,14 +51,13 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView /** * The selection used for synchronisation with other views. * - * @param masterSelection The selection to synchronize to and from */ QItemSelectionModel* masterSelection(); /** * Autocreates the models - * @param layerCach The {@link QgsVectorLayerCache} to use ( as backend ) - * @param canvas The {@link QgsMapCanvas} to use ( for the currently visible features filter ) + * @param layerCache The @link QgsVectorLayerCache @endlink to use ( as backend ) + * @param canvas The @link QgsMapCanvas @endlink to use ( for the currently visible features filter ) * * @deprecated */ @@ -99,7 +98,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView /** * @brief - * Is called when the context menu will be shown. Emits a {@link willShowContextMenu} signal, + * Is called when the context menu will be shown. Emits a @link willShowContextMenu @endlink signal, * so the menu can be populated by other parts of the application. * * @param event The associated event object. @@ -119,7 +118,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView * * @param menu If additional QMenuItems are added, they will show up in the context menu. * @param atIndex The QModelIndex, to which the context menu belongs. Relative to the source model. - * In most cases, this will be a {@link QgsAttributeTableFilterModel} + * In most cases, this will be a @link QgsAttributeTableFilterModel @endlink */ void willShowContextMenu( QMenu* menu, QModelIndex atIndex ); diff --git a/src/gui/attributetable/qgsdualview.h b/src/gui/attributetable/qgsdualview.h index 8fce4ed7d40..f851b7a5afc 100644 --- a/src/gui/attributetable/qgsdualview.h +++ b/src/gui/attributetable/qgsdualview.h @@ -116,8 +116,8 @@ class GUI_EXPORT QgsDualView : public QStackedWidget, private Ui::QgsDualViewBas /** * Will be called periodically, when loading layers from slow data providers. * - * @param i The number of features already loaded - * @param canceled Set to true to cancel + * @param i The number of features already loaded + * @param cancel Set to true to cancel */ virtual void progress( int i, bool& cancel ); diff --git a/src/gui/qgsbusyindicatordialog.h b/src/gui/qgsbusyindicatordialog.h index 3805fc704c3..60c3072fb43 100644 --- a/src/gui/qgsbusyindicatordialog.h +++ b/src/gui/qgsbusyindicatordialog.h @@ -35,6 +35,8 @@ class GUI_EXPORT QgsBusyIndicatorDialog : public QDialog /** Constructor * Modal busy indicator dialog with no buttons. * @param message Text to show above busy progress indicator. + * @param parent parent object (owner) + * @param fl widget flags * @note added in 1.9 */ QgsBusyIndicatorDialog( const QString& message = "", QWidget *parent = 0, Qt::WFlags fl = QgisGui::ModalDialogFlags ); diff --git a/src/gui/qgsexpressionselectiondialog.h b/src/gui/qgsexpressionselectiondialog.h index f3282ab56d5..1bc5bf9ddd6 100644 --- a/src/gui/qgsexpressionselectiondialog.h +++ b/src/gui/qgsexpressionselectiondialog.h @@ -36,6 +36,7 @@ class GUI_EXPORT QgsExpressionSelectionDialog : public QDialog, private Ui::QgsE * Creates a new selection dialog. * @param layer The layer on which the selection is to be performed. * @param startText A default expression text to be applied (Defaults to empty) + * @param parent parent object (owner) */ QgsExpressionSelectionDialog( QgsVectorLayer* layer, QString startText = QString(), QWidget* parent = NULL ); diff --git a/src/gui/qgsoptionsdialogbase.h b/src/gui/qgsoptionsdialogbase.h index 0defb855cca..000cfe215cb 100644 --- a/src/gui/qgsoptionsdialogbase.h +++ b/src/gui/qgsoptionsdialogbase.h @@ -51,6 +51,8 @@ class GUI_EXPORT QgsOptionsDialogBase : public QDialog public: /** Constructor * @param settingsKey QSettings subgroup key for saving/restore ui states, e.g. "ProjectProperties". + * @param parent parent object (owner) + * @param fl widget flags */ QgsOptionsDialogBase( QString settingsKey, QWidget* parent = 0, Qt::WFlags fl = 0 ); ~QgsOptionsDialogBase(); diff --git a/src/mapserver/qgswfsserver.cpp b/src/mapserver/qgswfsserver.cpp index 40ca8d88acc..9f274bb3719 100644 --- a/src/mapserver/qgswfsserver.cpp +++ b/src/mapserver/qgswfsserver.cpp @@ -600,7 +600,7 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format QString expFilter; // BBOX bool bboxOk = false; - double minx, miny, maxx, maxy; + double minx = 0.0, miny = 0.0, maxx = 0.0, maxy = 0.0; //read FEATUREDID bool featureIdOk = false; @@ -788,10 +788,10 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format if ( bboxOk ) searchRect.set( minx, miny, maxx, maxy ); else - searchRect.set( searchRect.xMinimum() - 0.000001 - , searchRect.yMinimum() - 0.000001 - , searchRect.xMaximum() + 0.000001 - , searchRect.yMaximum() + 0.000001 ); + searchRect.set( searchRect.xMinimum() - 0.000001, + searchRect.yMinimum() - 0.000001, + searchRect.xMaximum() + 0.000001, + searchRect.yMaximum() + 0.000001 ); QgsCoordinateReferenceSystem layerCrs = layer->crs(); long featCounter = 0;