Skip to content
Permalink
Browse files
add cppcheck fixes
  • Loading branch information
jef-n committed Oct 3, 2015
1 parent e694474 commit 1b4ca622c90b1d0a265ff1b1798285cb5401c1ba
Showing with 348 additions and 343 deletions.
  1. +1 −1 doc/CODING.t2t
  2. +3 −3 src/app/composer/qgsattributeselectiondialog.h
  3. +1 −1 src/app/composer/qgscomposerarrowwidget.h
  4. +1 −1 src/app/composer/qgscomposerlabelwidget.h
  5. +1 −1 src/app/composer/qgscomposerlegendwidget.h
  6. +1 −1 src/app/composer/qgscomposermanager.h
  7. +1 −2 src/app/composer/qgscomposermapwidget.h
  8. +1 −2 src/app/composer/qgscomposerpicturewidget.h
  9. +1 −1 src/app/composer/qgscomposerscalebarwidget.h
  10. +1 −1 src/app/composer/qgscomposershapewidget.h
  11. +1 −1 src/app/composer/qgscomposertablewidget.h
  12. +1 −2 src/app/gps/qgsgpsmarker.h
  13. +1 −1 src/app/nodetool/qgsmaptoolnodetool.h
  14. +1 −1 src/app/pluginmanager/qgspluginitemdelegate.h
  15. +1 −1 src/app/pluginmanager/qgspluginsortfilterproxymodel.h
  16. +2 −2 src/app/qgisapp.cpp
  17. +1 −1 src/app/qgsalignrasterdialog.cpp
  18. +2 −3 src/app/qgsbrowserdockwidget.cpp
  19. +3 −3 src/app/qgsbrowserdockwidget.h
  20. +1 −1 src/app/qgsdxfexportdialog.h
  21. +2 −2 src/app/qgsfieldsproperties.h
  22. +1 −1 src/app/qgsmaptooladdcircularstring.h
  23. +2 −3 src/app/qgsmaptoolpinlabels.cpp
  24. +1 −1 src/app/qgsmaptoolselect.cpp
  25. +1 −1 src/app/qgsmaptoolselectrectangle.cpp
  26. +2 −2 src/app/qgsmaptoolselectutils.cpp
  27. +1 −1 src/app/qgsmaptoolshowhidelabels.cpp
  28. +1 −1 src/app/qgsmaptoolsplitparts.h
  29. +1 −1 src/app/qgsnewspatialitelayerdialog.cpp
  30. +1 −1 src/app/qgssettingstree.h
  31. +1 −1 src/app/qgsvariantdelegate.h
  32. +1 −1 src/app/qgsvectorlayerproperties.cpp
  33. +1 −1 src/app/qgswelcomepage.h
  34. +2 −2 src/app/qgswelcomepageitemsmodel.h
  35. +5 −5 src/core/auth/qgsauthcertutils.cpp
  36. +1 −1 src/core/composer/qgscomposerlegend.h
  37. +1 −1 src/core/composer/qgscomposerutils.cpp
  38. +1 −1 src/core/composer/qgscomposerutils.h
  39. +5 −5 src/core/effects/qgsimageoperation.h
  40. +1 −1 src/core/geometry/qgsgeometry.h
  41. +5 −5 src/core/geometry/qgsgeos.cpp
  42. +2 −2 src/core/geometry/qgsgeos.h
  43. +1 −1 src/core/pal/costcalculator.h
  44. +1 −1 src/core/pal/layer.cpp
  45. +12 −12 src/core/pal/problem.cpp
  46. +6 −0 src/core/pal/rtree.hpp
  47. +1 −1 src/core/qgsfeature_p.h
  48. +3 −3 src/core/qgsgeometryvalidator.cpp
  49. +2 −2 src/core/qgsmessagelog.h
  50. +2 −2 src/core/qgspallabeling.cpp
  51. +2 −2 src/core/qgspointlocator.cpp
  52. +5 −3 src/core/qgsspatialindex.cpp
  53. +1 −1 src/core/qgsvectorfilewriter.h
  54. +1 −1 src/core/qgsvectorlayerfeatureiterator.cpp
  55. +1 −1 src/core/qgsvectorlayerfeatureiterator.h
  56. +4 −1 src/core/raster/qgsrasterfilewriter.cpp
  57. +5 −1 src/core/raster/qgsrasterpipe.cpp
  58. +2 −2 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  59. +1 −1 src/core/symbology-ng/qgsrulebasedrendererv2.h
  60. +2 −2 src/gui/auth/qgsauthimportcertdialog.cpp
  61. +4 −4 src/gui/qgscomposerview.cpp
  62. +1 −1 src/gui/qgsmapoverviewcanvas.cpp
  63. +1 −1 src/gui/qgsvariableeditorwidget.h
  64. +1 −1 src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.h
  65. +1 −1 src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.h
  66. +1 −1 src/gui/symbology-ng/qgssizescalewidget.cpp
  67. +2 −2 src/gui/symbology-ng/qgssymbollayerv2widget.cpp
  68. +1 −1 src/gui/symbology-ng/qgssymbollevelsv2dialog.cpp
  69. +2 −2 src/gui/symbology-ng/qgssymbolv2selectordialog.cpp
  70. +1 −1 src/plugins/compass/qgscompassplugin.h
  71. +1 −1 src/plugins/coordinate_capture/coordinatecapture.h
  72. +1 −1 src/plugins/coordinate_capture/coordinatecapturemaptool.h
  73. +1 −1 src/plugins/dxf2shp_converter/dxf2shpconverter.h
  74. +3 −3 src/plugins/evis/evis.h
  75. +1 −1 src/plugins/evis/idtool/eviseventidtool.h
  76. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h
  77. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h
  78. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h
  79. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h
  80. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryholecheck.h
  81. +1 −1 src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h
  82. +1 −1 src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h
  83. +1 −1 src/plugins/geometry_checker/qgsgeometrychecker.h
  84. +1 −1 src/plugins/geometry_checker/qgsgeometrycheckerplugin.h
  85. +1 −1 src/plugins/geometry_snapper/qgsgeometrysnapper.h
  86. +1 −1 src/plugins/geometry_snapper/qgsgeometrysnapperdialog.h
  87. +1 −1 src/plugins/geometry_snapper/qgsgeometrysnapperplugin.h
  88. +2 −2 src/plugins/geometry_snapper/qgssnapindex.h
  89. +3 −3 src/plugins/georeferencer/qgsgcplistmodel.cpp
  90. +1 −1 src/plugins/georeferencer/qgsgcplistmodel.h
  91. +1 −1 src/plugins/georeferencer/qgsgcplistwidget.h
  92. +1 −1 src/plugins/georeferencer/qgsgeorefconfigdialog.h
  93. +3 −3 src/plugins/georeferencer/qgsgeorefdelegates.h
  94. +1 −1 src/plugins/georeferencer/qgsgeorefdescriptiondialog.h
  95. +1 −1 src/plugins/georeferencer/qgsgeorefplugin.h
  96. +1 −1 src/plugins/georeferencer/qgsgeoreftooladdpoint.h
  97. +1 −1 src/plugins/georeferencer/qgsgeoreftooldeletepoint.h
  98. +1 −1 src/plugins/georeferencer/qgsgeoreftoolmovepoint.h
  99. +1 −1 src/plugins/georeferencer/qgsgeoreftransform.h
  100. +1 −1 src/plugins/georeferencer/qgsgeorefvalidators.h
  101. +1 −1 src/plugins/georeferencer/qgsimagewarper.h
  102. +2 −2 src/plugins/georeferencer/qgsmapcoordsdialog.h
  103. +1 −1 src/plugins/georeferencer/qgsopenrasterdialog.h
  104. +1 −1 src/plugins/georeferencer/qgsresidualplotitem.h
  105. +3 −3 src/plugins/globe/globe_plugin.cpp
  106. +4 −4 src/plugins/globe/globe_plugin.h
  107. +2 −2 src/plugins/globe/osgEarthQt/ViewerWidget
  108. +4 −4 src/plugins/globe/osgEarthUtil/Controls
  109. +2 −2 src/plugins/globe/osgEarthUtil/Controls.cpp
  110. +1 −1 src/plugins/gps_importer/qgsbabelformat.h
  111. +1 −1 src/plugins/gps_importer/qgsgpsdevicedialog.h
  112. +1 −1 src/plugins/gps_importer/qgsgpsplugin.h
  113. +2 −2 src/plugins/grass/qgsgrassmapcalc.h
  114. +1 −0 src/plugins/grass/qgsgrassplugin.cpp
  115. +1 −1 src/plugins/grass/qgsgrassplugin.h
  116. +1 −1 src/plugins/grass/qgsgrassregion.h
  117. +1 −2 src/plugins/grass/qgsgrasstools.cpp
  118. +1 −1 src/plugins/grass/qgsgrassutils.h
  119. +1 −1 src/plugins/heatmap/heatmap.h
  120. +1 −1 src/plugins/interpolation/qgsinterpolationplugin.h
  121. +1 −1 src/plugins/offline_editing/offline_editing_plugin.h
  122. +1 −1 src/plugins/oracle_raster/qgsoracle_plugin.h
  123. +1 −1 src/plugins/raster_terrain_analysis/qgsrasterterrainanalysisplugin.h
  124. +1 −1 src/plugins/roadgraph/roadgraphplugin.h
  125. +1 −1 src/plugins/spatialquery/qgsmngprogressbar.h
  126. +1 −1 src/plugins/spatialquery/qgsrubberselectid.h
  127. +1 −1 src/plugins/spatialquery/qgsspatialquery.h
  128. +1 −1 src/plugins/spatialquery/qgsspatialqueryplugin.h
  129. +1 −1 src/plugins/spit/qgsspitplugin.h
  130. +2 −2 src/plugins/topology/topol.h
  131. +8 −8 src/plugins/topology/topolTest.h
  132. +1 −1 src/plugins/zonal_statistics/qgszonalstatisticsdialog.h
  133. +1 −1 src/plugins/zonal_statistics/qgszonalstatisticsplugin.h
  134. +1 −1 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp
  135. +1 −1 src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.h
  136. +1 −1 src/providers/delimitedtext/qgsdelimitedtextfile.h
  137. +1 −1 src/providers/delimitedtext/qgsdelimitedtextprovider.h
  138. +1 −2 src/providers/gpx/gpsdata.h
  139. +1 −1 src/providers/gpx/qgsgpxfeatureiterator.h
  140. +1 −2 src/providers/gpx/qgsgpxprovider.h
  141. +1 −1 src/providers/grass/qgsgrass.h
  142. +2 −2 src/providers/grass/qgsgrassprovidermodule.h
  143. +1 −1 src/providers/grass/qgsgrassrasterprovider.h
  144. +1 −1 src/providers/memory/qgsmemoryfeatureiterator.h
  145. +1 −1 src/providers/memory/qgsmemoryprovider.h
  146. +1 −1 src/providers/mssql/qgsmssqlfeatureiterator.h
  147. +1 −2 src/providers/mssql/qgsmssqlprovider.h
  148. +2 −2 src/providers/mssql/qgsmssqlsourceselect.h
  149. +1 −1 src/providers/ogr/qgsogrconnpool.h
  150. +1 −1 src/providers/ogr/qgsogrfeatureiterator.h
  151. +1 −1 src/providers/ogr/qgsogrprovider.h
  152. +2 −2 src/providers/oracle/ocispatial/qsql_ocispatial.cpp
  153. +2 −2 src/providers/oracle/qgsoracleconn.h
  154. +1 −1 src/providers/oracle/qgsoraclefeatureiterator.h
  155. +1 −1 src/providers/oracle/qgsoracleprovider.h
  156. +2 −2 src/providers/oracle/qgsoraclesourceselect.h
  157. +1 −1 src/providers/ows/qgsowsprovider.h
  158. +2 −2 src/providers/postgres/qgspgsourceselect.h
  159. +6 −6 src/providers/postgres/qgspostgresconn.cpp
  160. +1 −1 src/providers/postgres/qgspostgresconn.h
  161. +1 −1 src/providers/postgres/qgspostgresconnpool.h
  162. +5 −5 src/providers/postgres/qgspostgresdataitems.cpp
  163. +1 −1 src/providers/postgres/qgspostgresexpressioncompiler.h
  164. +1 −1 src/providers/postgres/qgspostgresfeatureiterator.h
  165. +33 −34 src/providers/postgres/qgspostgresprovider.cpp
  166. +2 −2 src/providers/postgres/qgspostgresprovider.h
  167. +1 −1 src/providers/postgres/qgspostgrestransaction.cpp
  168. +1 −1 src/providers/postgres/qgspostgrestransaction.h
  169. +2 −2 src/providers/spatialite/qgsspatialiteconnection.h
  170. +1 −1 src/providers/spatialite/qgsspatialiteconnpool.h
  171. +1 −1 src/providers/spatialite/qgsspatialitefeatureiterator.h
  172. +2 −2 src/providers/spatialite/qgsspatialiteprovider.h
  173. +1 −1 src/providers/spatialite/qspatialite/qsql_spatialite.cpp
  174. +1 −1 src/providers/wcs/qgswcscapabilities.h
  175. +1 −1 src/providers/wcs/qgswcsprovider.h
  176. +1 −1 src/providers/wfs/qgswfscapabilities.h
  177. +1 −1 src/providers/wfs/qgswfsfeatureiterator.h
  178. +1 −6 src/providers/wfs/qgswfsprovider.cpp
  179. +1 −1 src/providers/wfs/qgswfsprovider.h
  180. +1 −2 src/providers/wfs/qgswfssourceselect.h
  181. +1 −1 src/providers/wms/qgswmscapabilities.h
  182. +1 −1 src/providers/wms/qgswmsconnection.h
  183. +2 −2 src/providers/wms/qgswmsprovider.h
  184. +1 −1 src/server/qgsgetrequesthandler.h
  185. +1 −1 src/server/qgshttprequesthandler.h
  186. +1 −1 src/server/qgsinterpolationlayerbuilder.h
  187. +1 −1 src/server/qgspostrequesthandler.h
  188. +1 −1 src/server/qgsremoteowsbuilder.h
  189. +2 −2 src/server/qgsrequesthandler.h
  190. +1 −1 src/server/qgsserverinterfaceimpl.h
  191. +4 −0 src/server/qgssldconfigparser.cpp
  192. +1 −1 src/server/qgssoaprequesthandler.h
  193. +1 −1 tests/qt_modeltest/dynamictreemodel.h
  194. +1 −1 tests/qt_modeltest/tst_modeltest.cpp
  195. +2 −2 tests/src/core/testqgis.cpp
  196. +1 −2 tests/src/core/testqgsexpressioncontext.cpp
  197. +2 −0 tests/src/core/testqgslabelingenginev2.cpp
  198. +2 −1 tests/src/core/testqgslayertree.cpp
  199. +0 −1 tests/src/core/testqgspainteffectregistry.cpp
  200. +1 −1 tests/src/core/testqgspointlocator.cpp
  201. +1 −1 tests/src/core/testqgssnappingutils.cpp
  202. +1 −1 tests/src/providers/testqgswcspublicservers.h
@@ -831,7 +831,7 @@ The class **must** inherit from QObject and include the Q_OBJECT macro.
```
class TestQgsRasterLayer: public QObject
{
Q_OBJECT;
Q_OBJECT
```

All our test methods are implemented as **private slots**. The QtTest framework
@@ -44,7 +44,7 @@ class QgsComposerColumnAlignmentDelegate : public QItemDelegate
Q_OBJECT

public:
QgsComposerColumnAlignmentDelegate( QObject *parent = 0 );
explicit QgsComposerColumnAlignmentDelegate( QObject *parent = 0 );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
@@ -81,7 +81,7 @@ class QgsComposerColumnWidthDelegate : public QItemDelegate
Q_OBJECT

public:
QgsComposerColumnWidthDelegate( QObject *parent = 0 );
explicit QgsComposerColumnWidthDelegate( QObject *parent = 0 );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
@@ -98,7 +98,7 @@ class QgsComposerColumnSortOrderDelegate : public QItemDelegate
Q_OBJECT

public:
QgsComposerColumnSortOrderDelegate( QObject *parent = 0 );
explicit QgsComposerColumnSortOrderDelegate( QObject *parent = 0 );
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
@@ -27,7 +27,7 @@ class QgsComposerArrowWidget: public QgsComposerItemBaseWidget, private Ui::QgsC
{
Q_OBJECT
public:
QgsComposerArrowWidget( QgsComposerArrow* arrow );
explicit QgsComposerArrowWidget( QgsComposerArrow* arrow );
~QgsComposerArrowWidget();

private:
@@ -30,7 +30,7 @@ class QgsComposerLabelWidget: public QgsComposerItemBaseWidget, private Ui::QgsC
{
Q_OBJECT
public:
QgsComposerLabelWidget( QgsComposerLabel* label );
explicit QgsComposerLabelWidget( QgsComposerLabel* label );

public slots:
void on_mHtmlCheckBox_stateChanged( int i );
@@ -34,7 +34,7 @@ class QgsComposerLegendWidget: public QgsComposerItemBaseWidget, private Ui::Qgs
Q_OBJECT

public:
QgsComposerLegendWidget( QgsComposerLegend* legend );
explicit QgsComposerLegendWidget( QgsComposerLegend* legend );
~QgsComposerLegendWidget();

/** Updates the legend layers and groups*/
@@ -30,7 +30,7 @@ class QgsComposerNameDelegate : public QItemDelegate
Q_OBJECT

public:
QgsComposerNameDelegate( QObject *parent = 0 );
explicit QgsComposerNameDelegate( QObject *parent = 0 );

QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option,
const QModelIndex &index ) const override;
@@ -33,8 +33,7 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom
Q_OBJECT

public:

QgsComposerMapWidget( QgsComposerMap* composerMap );
explicit QgsComposerMapWidget( QgsComposerMap* composerMap );
virtual ~QgsComposerMapWidget();

public slots:
@@ -31,8 +31,7 @@ class QgsComposerPictureWidget: public QgsComposerItemBaseWidget, private Ui::Qg
Q_OBJECT

public:

QgsComposerPictureWidget( QgsComposerPicture* picture );
explicit QgsComposerPictureWidget( QgsComposerPicture* picture );
~QgsComposerPictureWidget();

/** Add the icons of the standard directories to the preview*/
@@ -30,7 +30,7 @@ class QgsComposerScaleBarWidget: public QgsComposerItemBaseWidget, private Ui::Q
Q_OBJECT

public:
QgsComposerScaleBarWidget( QgsComposerScaleBar* scaleBar );
explicit QgsComposerScaleBarWidget( QgsComposerScaleBar* scaleBar );
~QgsComposerScaleBarWidget();

public slots:
@@ -28,7 +28,7 @@ class QgsComposerShapeWidget: public QgsComposerItemBaseWidget, private Ui::QgsC
{
Q_OBJECT
public:
QgsComposerShapeWidget( QgsComposerShape* composerShape );
explicit QgsComposerShapeWidget( QgsComposerShape* composerShape );
~QgsComposerShapeWidget();

private:
@@ -27,7 +27,7 @@ class QgsComposerTableWidget: public QgsComposerItemBaseWidget, private Ui::QgsC
{
Q_OBJECT
public:
QgsComposerTableWidget( QgsComposerAttributeTable* table );
explicit QgsComposerTableWidget( QgsComposerAttributeTable* table );
~QgsComposerTableWidget();

protected:
@@ -29,8 +29,7 @@ class QPainter;
class QgsGpsMarker : public QgsMapCanvasItem
{
public:

QgsGpsMarker( QgsMapCanvas* mapCanvas );
explicit QgsGpsMarker( QgsMapCanvas* mapCanvas );

void setCenter( const QgsPoint& point );

@@ -31,7 +31,7 @@ class QgsMapToolNodeTool: public QgsMapToolEdit
{
Q_OBJECT
public:
QgsMapToolNodeTool( QgsMapCanvas* canvas );
explicit QgsMapToolNodeTool( QgsMapCanvas* canvas );
virtual ~QgsMapToolNodeTool();

void canvasMoveEvent( QgsMapMouseEvent* e ) override;
@@ -26,7 +26,7 @@ class QgsPluginItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
QgsPluginItemDelegate( QObject * parent = 0 );
explicit QgsPluginItemDelegate( QObject * parent = 0 );
QSize sizeHint( const QStyleOptionViewItem & theOption, const QModelIndex & theIndex ) const override;
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
};
@@ -42,7 +42,7 @@ class QgsPluginSortFilterProxyModel : public QSortFilterProxyModel
Q_OBJECT

public:
QgsPluginSortFilterProxyModel( QObject *parent = 0 );
explicit QgsPluginSortFilterProxyModel( QObject *parent = 0 );

//! (Re)configire the status filter
void setAcceptedStatuses( QStringList statuses );
@@ -7176,7 +7176,7 @@ QList<QgsMapLayer *> QgisApp::editableLayers( bool modified ) const
if ( !vl )
continue;

if ( vl->isEditable() && ( !modified || ( modified && vl->isModified() ) ) )
if ( vl->isEditable() && ( !modified || vl->isModified() ) )
editLayers << vl;
}
return editLayers;
@@ -7760,7 +7760,7 @@ void QgisApp::showPluginManager()
class QgsPythonRunnerImpl : public QgsPythonRunner
{
public:
QgsPythonRunnerImpl( QgsPythonUtils* pythonUtils ) : mPythonUtils( pythonUtils ) {}
explicit QgsPythonRunnerImpl( QgsPythonUtils* pythonUtils ) : mPythonUtils( pythonUtils ) {}

virtual bool runCommand( QString command, QString messageOnError = QString() ) override
{
@@ -44,7 +44,7 @@ static QString _rasterLayerName( const QString& filename )
/** Helper class to report progress */
struct QgsAlignRasterDialogProgress : public QgsAlignRaster::ProgressHandler
{
QgsAlignRasterDialogProgress( QProgressBar* pb ) : mPb( pb ) {}
explicit QgsAlignRasterDialogProgress( QProgressBar* pb ) : mPb( pb ) {}
virtual bool progress( double complete ) override
{
mPb->setValue(( int ) qRound( complete * 100 ) );
@@ -49,7 +49,7 @@ items on the tree view although the drop is actually managed by qgis app.
class QgsDockBrowserTreeView : public QgsBrowserTreeView
{
public:
QgsDockBrowserTreeView( QWidget* parent ) : QgsBrowserTreeView( parent )
explicit QgsDockBrowserTreeView( QWidget* parent ) : QgsBrowserTreeView( parent )
{
setDragDropMode( QTreeView::DragDrop ); // sets also acceptDrops + dragEnabled
setSelectionMode( QAbstractItemView::ExtendedSelection );
@@ -91,8 +91,7 @@ Utility class for filtering browser items
class QgsBrowserTreeFilterProxyModel : public QSortFilterProxyModel
{
public:

QgsBrowserTreeFilterProxyModel( QObject *parent )
explicit QgsBrowserTreeFilterProxyModel( QObject *parent )
: QSortFilterProxyModel( parent ), mModel( 0 )
, mFilter( "" ), mPatternSyntax( "normal" ), mCaseSensitivity( Qt::CaseInsensitive )
{
@@ -45,7 +45,7 @@ class QgsBrowserPropertiesWidget : public QWidget
{
Q_OBJECT
public:
QgsBrowserPropertiesWidget( QWidget* parent = 0 );
explicit QgsBrowserPropertiesWidget( QWidget* parent = 0 );
static QgsBrowserPropertiesWidget* createWidget( QgsDataItem* item, QWidget* parent = 0 );
virtual void setItem( QgsDataItem* item ) { Q_UNUSED( item ) }
/** Set content widget, usually item paramWidget. Takes ownership. */
@@ -63,7 +63,7 @@ class QgsBrowserLayerProperties : public QgsBrowserPropertiesWidget, private Ui:
{
Q_OBJECT
public:
QgsBrowserLayerProperties( QWidget* parent = 0 );
explicit QgsBrowserLayerProperties( QWidget* parent = 0 );
void setItem( QgsDataItem* item ) override;

virtual void setCondensedMode( bool condensedMode ) override;
@@ -76,7 +76,7 @@ class QgsBrowserDirectoryProperties : public QgsBrowserPropertiesWidget , privat
{
Q_OBJECT
public:
QgsBrowserDirectoryProperties( QWidget* parent = 0 );
explicit QgsBrowserDirectoryProperties( QWidget* parent = 0 );

void setItem( QgsDataItem* item ) override;
private:
@@ -34,7 +34,7 @@ class FieldSelectorDelegate : public QItemDelegate
{
Q_OBJECT
public:
FieldSelectorDelegate( QObject *parent = 0 );
explicit FieldSelectorDelegate( QObject *parent = 0 );

QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
@@ -80,7 +80,7 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope
class DragList : public QTableWidget
{
public:
DragList( QWidget* parent = 0 )
explicit DragList( QWidget* parent = 0 )
: QTableWidget( parent )
{}

@@ -98,7 +98,7 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope
class DesignerTree : public QTreeWidget
{
public:
DesignerTree( QWidget* parent = 0 )
explicit DesignerTree( QWidget* parent = 0 )
: QTreeWidget( parent )
{}
QTreeWidgetItem* addItem( QTreeWidgetItem* parent, DesignerTreeItemData data );
@@ -38,7 +38,7 @@ class QgsMapToolAddCircularString: public QgsMapToolCapture
void setParentTool( QgsMapTool* newTool, QgsMapTool* oldTool );

protected:
QgsMapToolAddCircularString( QgsMapCanvas* canvas ); //forbidden
explicit QgsMapToolAddCircularString( QgsMapCanvas* canvas ); //forbidden

QgsMapToolCapture* mParentTool;
/** Circular string points (in map coordinates)*/
@@ -233,9 +233,8 @@ void QgsMapToolPinLabels::removePinnedHighlights()

void QgsMapToolPinLabels::pinUnpinLabels( const QgsRectangle& ext, QMouseEvent * e )
{

bool doUnpin = e->modifiers() & Qt::ShiftModifier ? true : false;
bool toggleUnpinOrPin = e->modifiers() & Qt::ControlModifier ? true : false;
bool doUnpin = e->modifiers() & Qt::ShiftModifier;
bool toggleUnpinOrPin = e->modifiers() & Qt::ControlModifier;

// get list of all drawn labels from all layers within, or touching, chosen extent
bool labelChanged = false;
@@ -51,7 +51,7 @@ void QgsMapToolSelect::canvasReleaseEvent( QgsMapMouseEvent* e )
QgsMapToolSelectUtils::expandSelectRectangle( selectRect, vlayer, e->pos() );
QgsMapToolSelectUtils::setRubberBand( mCanvas, selectRect, &rubberBand );
QgsGeometry* selectGeom = rubberBand.asGeometry();
bool doDifference = e->modifiers() & Qt::ControlModifier ? true : false;
bool doDifference = e->modifiers() & Qt::ControlModifier;
QgsMapToolSelectUtils::setSelectFeatures( mCanvas, selectGeom, false, doDifference, true );
delete selectGeom;
rubberBand.reset( QGis::Polygon );
@@ -106,7 +106,7 @@ void QgsMapToolSelectFeatures::canvasReleaseEvent( QgsMapMouseEvent* e )
QgsGeometry* selectGeom = mRubberBand->asGeometry();
if ( !mDragging )
{
bool doDifference = e->modifiers() & Qt::ControlModifier ? true : false;
bool doDifference = e->modifiers() & Qt::ControlModifier;
QgsMapToolSelectUtils::setSelectFeatures( mCanvas, selectGeom, false, doDifference, true );
}
else
@@ -233,7 +233,7 @@ void QgsMapToolSelectUtils::setSelectFeatures( QgsMapCanvas* canvas,

void QgsMapToolSelectUtils::setSelectFeatures( QgsMapCanvas* canvas, QgsGeometry* selectGeometry, QMouseEvent * e )
{
bool doContains = e->modifiers() & Qt::ShiftModifier ? true : false;
bool doDifference = e->modifiers() & Qt::ControlModifier ? true : false;
bool doContains = e->modifiers() & Qt::ShiftModifier;
bool doDifference = e->modifiers() & Qt::ControlModifier;
setSelectFeatures( canvas, selectGeometry, doContains, doDifference );
}
@@ -118,7 +118,7 @@ void QgsMapToolShowHideLabels::showHideLabels( QMouseEvent * e )
return;
}

bool doHide = e->modifiers() & Qt::ShiftModifier ? true : false;
bool doHide = e->modifiers() & Qt::ShiftModifier;

QgsFeatureIds selectedFeatIds;

@@ -24,7 +24,7 @@ class QgsMapToolSplitParts: public QgsMapToolCapture
{
Q_OBJECT
public:
QgsMapToolSplitParts( QgsMapCanvas* canvas );
explicit QgsMapToolSplitParts( QgsMapCanvas* canvas );
virtual ~QgsMapToolSplitParts();
void cadCanvasReleaseEvent( QgsMapMouseEvent * e ) override;
};
@@ -154,7 +154,7 @@ QString QgsNewSpatialiteLayerDialog::selectedType() const
return "MULTIPOLYGON";
}

Q_ASSERT( "no type selected" == 0 );
Q_ASSERT( !"no type selected" );
return "";
}

@@ -52,7 +52,7 @@ class QgsSettingsTree : public QTreeWidget
Q_OBJECT

public:
QgsSettingsTree( QWidget *parent = 0 );
explicit QgsSettingsTree( QWidget *parent = 0 );

void setSettingsObject( QSettings *settings );
QSize sizeHint() const override;
@@ -49,7 +49,7 @@ class QgsVariantDelegate : public QItemDelegate
Q_OBJECT

public:
QgsVariantDelegate( QObject* parent = 0 );
explicit QgsVariantDelegate( QObject* parent = 0 );

void paint( QPainter* painter, const QStyleOptionViewItem& option,
const QModelIndex& index ) const override;
@@ -490,7 +490,7 @@ void QgsVectorLayerProperties::syncToLayer( void )
// NOTE: this is not ideal, but a quick fix for QGIS 2.0 release
bool ok;
bool dl = QgsProject::instance()->readBoolEntry( "DeprecatedLabels", "/Enabled", false, &ok );
if ( !ok || ( ok && !dl ) ) // project not flagged or set to use deprecated labels
if ( !ok || !dl ) // project not flagged or set to use deprecated labels
{
if ( mOptsPage_LabelsOld )
{
@@ -28,7 +28,7 @@ class QgsWelcomePage : public QWidget
Q_OBJECT

public:
QgsWelcomePage( QWidget* parent = 0 );
explicit QgsWelcomePage( QWidget* parent = 0 );

~QgsWelcomePage();

@@ -25,7 +25,7 @@ class QgsWelcomePageItemDelegate : public QStyledItemDelegate
Q_OBJECT

public:
QgsWelcomePageItemDelegate( QObject * parent = 0 );
explicit QgsWelcomePageItemDelegate( QObject * parent = 0 );
void paint( QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index ) const override;
QSize sizeHint( const QStyleOptionViewItem & option, const QModelIndex & index ) const override;
};
@@ -51,7 +51,7 @@ class QgsWelcomePageItemsModel : public QAbstractListModel
QString crs;
};

QgsWelcomePageItemsModel( QObject* parent = 0 );
explicit QgsWelcomePageItemsModel( QObject* parent = 0 );

void setRecentProjects( const QList<RecentProjectData>& recentProjects );

0 comments on commit 1b4ca62

Please sign in to comment.