From bf73e2c240875922a8f3a2d0fc50c0a988a4262f Mon Sep 17 00:00:00 2001 From: rldhont Date: Sat, 7 Jan 2017 10:53:08 +0100 Subject: [PATCH 001/332] [BUGFIX][Server] Re-enable Transparent and Bgcolor parameter for GetMap Fixed #15990 wms png transparency not honoured And add tests for transparent and bgcolor in GetMap and GetLegendGraphic --- .../services/wms/qgswmsservertransitional.cpp | 32 +++++ tests/src/python/test_qgsserver.py | 127 ++++++++++++++++++ .../WMS_GetLegendGraphic_Background.png | Bin 0 -> 590 bytes .../WMS_GetLegendGraphic_Background_Hex.png | Bin 0 -> 590 bytes .../WMS_GetLegendGraphic_Transparent.png | Bin 0 -> 685 bytes .../WMS_GetLegendGraphic_Transparent_mask.png | Bin 0 -> 190 bytes .../WMS_GetMap_Background.png | Bin 0 -> 29572 bytes .../WMS_GetMap_Background_Hex.png | Bin 0 -> 29572 bytes .../WMS_GetMap_Basic/WMS_GetMap_Basic.png | Bin 0 -> 31349 bytes .../WMS_GetMap_Transparent.png | Bin 0 -> 33108 bytes .../WMS_GetMap_Transparent_mask.png | Bin 0 -> 1744 bytes 11 files changed, 159 insertions(+) create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Background/WMS_GetLegendGraphic_Background.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Background_Hex/WMS_GetLegendGraphic_Background_Hex.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Transparent/WMS_GetLegendGraphic_Transparent.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Transparent/WMS_GetLegendGraphic_Transparent_mask.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetMap_Background/WMS_GetMap_Background.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetMap_Background_Hex/WMS_GetMap_Background_Hex.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetMap_Basic/WMS_GetMap_Basic.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetMap_Transparent/WMS_GetMap_Transparent.png create mode 100644 tests/testdata/control_images/qgis_server/WMS_GetMap_Transparent/WMS_GetMap_Transparent_mask.png diff --git a/src/server/services/wms/qgswmsservertransitional.cpp b/src/server/services/wms/qgswmsservertransitional.cpp index a3b667604007..be3d8c39b32d 100644 --- a/src/server/services/wms/qgswmsservertransitional.cpp +++ b/src/server/services/wms/qgswmsservertransitional.cpp @@ -1629,6 +1629,7 @@ namespace QgsWms QImage* theImage = nullptr; + //Define the image background color in case of map settings is not used //is format jpeg? QString format = mParameters.value( QStringLiteral( "FORMAT" ) ); bool jpeg = format.compare( QLatin1String( "jpg" ), Qt::CaseInsensitive ) == 0 @@ -1757,6 +1758,37 @@ namespace QgsWms } mapSettings.setExtent( mapExtent ); + + /* Define the background color + * Transparent or colored + */ + //is format jpeg? + QString format = mParameters.value( QStringLiteral( "FORMAT" ) ); + bool jpeg = format.compare( QLatin1String( "jpg" ), Qt::CaseInsensitive ) == 0 + || format.compare( QLatin1String( "jpeg" ), Qt::CaseInsensitive ) == 0 + || format.compare( QLatin1String( "image/jpeg" ), Qt::CaseInsensitive ) == 0; + + //transparent parameter + bool transparent = mParameters.value( QStringLiteral( "TRANSPARENT" ) ).compare( QLatin1String( "true" ), Qt::CaseInsensitive ) == 0; + + //background color + QString bgColorString = mParameters.value( "BGCOLOR" ); + if ( bgColorString.startsWith( "0x", Qt::CaseInsensitive ) ) + { + bgColorString.replace( 0, 2, "#" ); + } + QColor backgroundColor; + backgroundColor.setNamedColor( bgColorString ); + + //set background color + if ( transparent && !jpeg ) + { + mapSettings.setBackgroundColor( QColor( 0, 0, 0, 0 ) ); + } + else if ( backgroundColor.isValid() ) + { + mapSettings.setBackgroundColor( backgroundColor ); + } } void QgsWmsServer::readLayersAndStyles( QStringList& layersList, QStringList& stylesList ) const diff --git a/tests/src/python/test_qgsserver.py b/tests/src/python/test_qgsserver.py index 7e08148c8254..e98337e32230 100644 --- a/tests/src/python/test_qgsserver.py +++ b/tests/src/python/test_qgsserver.py @@ -409,6 +409,80 @@ def test_getfeature_post(self): for id, req in tests: self.wfs_getfeature_post_compare(id, req) + def test_wms_getmap_basic(self): + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetMap", + "LAYERS": "Country", + "STYLES": "", + "FORMAT": "image/png", + "BBOX": "-16817707,-4710778,5696513,14587125", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetMap_Basic") + + def test_wms_getmap_transparent(self): + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetMap", + "LAYERS": "Country", + "STYLES": "", + "FORMAT": "image/png", + "BBOX": "-16817707,-4710778,5696513,14587125", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "TRANSPARENT": "TRUE" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetMap_Transparent") + + def test_wms_getmap_background(self): + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetMap", + "LAYERS": "Country", + "STYLES": "", + "FORMAT": "image/png", + "BBOX": "-16817707,-4710778,5696513,14587125", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "BGCOLOR": "green" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetMap_Background") + + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetMap", + "LAYERS": "Country", + "STYLES": "", + "FORMAT": "image/png", + "BBOX": "-16817707,-4710778,5696513,14587125", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "BGCOLOR": "0x008000" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetMap_Background_Hex") + def test_wms_getmap_order(self): qs = "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), @@ -699,6 +773,59 @@ def test_wms_GetLegendGraphic_Basic(self): r, h = self._result(self.server.handleRequest(qs)) self._img_diff_error(r, h, "WMS_GetLegendGraphic_Basic") + def test_wms_GetLegendGraphic_Transparent(self): + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetLegendGraphic", + "LAYER": "Country,Hello", + "LAYERTITLE": "FALSE", + "FORMAT": "image/png", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "TRANSPARENT": "TRUE" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetLegendGraphic_Transparent") + + def test_wms_GetLegendGraphic_Background(self): + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetLegendGraphic", + "LAYER": "Country,Hello", + "LAYERTITLE": "FALSE", + "FORMAT": "image/png", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "BGCOLOR": "green" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetLegendGraphic_Background") + + qs = "&".join(["%s=%s" % i for i in list({ + "MAP": urllib.parse.quote(self.projectPath), + "SERVICE": "WMS", + "VERSION": "1.1.1", + "REQUEST": "GetLegendGraphic", + "LAYER": "Country,Hello", + "LAYERTITLE": "FALSE", + "FORMAT": "image/png", + "HEIGHT": "500", + "WIDTH": "500", + "CRS": "EPSG:3857", + "BGCOLOR": "0x008000" + }.items())]) + + r, h = self._result(self.server.handleRequest(qs)) + self._img_diff_error(r, h, "WMS_GetLegendGraphic_Background_Hex") + def test_wms_GetLegendGraphic_BoxSpace(self): qs = "&".join(["%s=%s" % i for i in list({ "MAP": urllib.parse.quote(self.projectPath), diff --git a/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Background/WMS_GetLegendGraphic_Background.png b/tests/testdata/control_images/qgis_server/WMS_GetLegendGraphic_Background/WMS_GetLegendGraphic_Background.png new file mode 100644 index 0000000000000000000000000000000000000000..d5bc28ea8fb1329d65f9e069fb3c383b0dec83eb GIT binary patch literal 590 zcmV-U03SKsLa#um|zVq-V?7Fw$I~WXhpNAbh zO}xy5GDdn)7)0lgq}o1DcASU5Nz9YZ9G>s7gr}c2eeyhg7&cLojN1nMOH-&cg-TPX zG=)l2s5FI2Q>ZkBszek{y!IQ;$69Ipc6{XaiecQ-hAl~oNRKR1+J%d!+G4{-R(KfLs(#MDw_$#vb_ zlo$1StJPAV0JskTPT!dxpY}X2H|0hpEm46H_{YBg%U6G!&=_@4!V7!`Fa^DwG4@^9pzigmrPLvz#gIh zp#Vzt3o`$Q8SFOOV%FlwOUH3K7yeGTbDNY3t30jDj$0GY?e1Q8FOo^~d9X7m2Ko{` z0h!@Gm1r_+3YDf%X$n<|DAzn~;{f=oKDv~l8f6lg_=euHYr3OmL#Ce>U7PEAW6gUC z6dPCx0L%@~zP|gWClYt0#g%pv#J~-OujR@}N|f#M?FJvqvXZ6NIqxJd%Shev|IbP^ cnM*|Z3x(u-L?V^7UjP6A07*qoM6N<$f+*w3SKsLa#um|zVq-V?7Fw$I~WXhpNAbh zO}xy5GDdn)7)0lgq}o1DcASU5Nz9YZ9G>s7gr}c2eeyhg7&cLojN1nMOH-&cg-TPX zG=)l2s5FI2Q>ZkBszek{y!IQ;$69Ipc6{XaiecQ-hAl~oNRKR1+J%d!+G4{-R(KfLs(#MDw_$#vb_ zlo$1StJPAV0JskTPT!dxpY}X2H|0hpEm46H_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Z;j%v+fS&k>&ZmFGnf@;1RzXq5zaXF z82g9T!L%WWuft4}U3Iq|&b{zKQ5?vHvSA@OfF-e}8H6u5nE1J{mx!Px(^dTce@-VK z-|1J1oMS>T#=-a!rj>_E4fjg1`8>75Y(7oGSP{sWga9IOb@dW7+LknCyuS;4Rul9| MT2ZP(!Z_%E0N^^yY5)KL literal 0 HcmV?d00001 diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Background_Hex/WMS_GetMap_Background_Hex.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Background_Hex/WMS_GetMap_Background_Hex.png new file mode 100644 index 0000000000000000000000000000000000000000..de5f5d6bfc2540bc1cb542196c0b0065e1edb7b7 GIT binary patch literal 29572 zcmXt9by$?$)83`KyQD!H=?3W*0qI7%YYBm+1qtbHq#Fh4?k?#Cq;u(xZ+(B)_Xihn zo)dH5GiT0uX6A|fpeB!rMur9e05BC5WIh4_z^i{hC~&YAnV$-4uwSSy3VQCa=a>I} zfSk`_F8}~FKv70Y%RB3M%`=HYdl~6$FXd;fG9x}n{p)wYIX0dseRskJ*{U8<>Sr@o zBg;AlU9fDhG&LG(ANBh$<~*dg>3?RRaXBiXLkghv>eE}0VAes#VL8)iPQ>3oRR$Q? z!QV@LSuk_hCHbKgsC_$Bf#cU(!k&k;QOhMcOX#BL-b}Q(OlMeWqXOH33{{$---@ss#U@{aL|ni-Cz@ z*#I3HQb4BW`c#l|7Asv43Y&5?oPK}s0xSNjjH|V;93vo+^aok8UqPN5lZF{wGSHL@ zHs$bYb_xudEVy`t9t$QRp)7bc74)^w(oWyj&W=nnaTOmOhA4^_>9Z&lC$g+7dyZ?^ z$P`X2CquAwRZ+`9J%~R8);}pXC57-o5pYRD)nThJ_n|qll$iir2m_>osJB!GKnNEO zVQgl?fi2-fCFuz`@!3<5iQd`UE&`ZhXp>?7{@n!P?GKEwyp2` z`EE?{I;PU5a4_nW@IXb@mH@7FjRL|;7|;k9P{@R3S}$xVUBm-hQh*kZg63yDG?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3jpg}Ual@r02oYy;DaD3{9{INL&^VMa=83G4@;@e_DpLoMRMG}w9+Xpf1*<^ zjAzC)(`E3_d8QyAWpzQs>5G8o>Fp`@K~9Ji7&sFCdQ-Uuj0B8IOcH%Q=jrjzaw;3y z#LeFd*apBtFBpZX)yCgZslh30^Yl>R^CbK?q_(#%LppSUI7-N#g6Irhs&NFgdw|o*wU^~MJ7(sxahLm zIJn5K>{7;Npw>aL=3N7O+IWo_jud?pyRyG^SU6rJi>O8o{{(OYCyn+_W`DJeigoa? z&FxTNE6p)gvn-LV!e8q)5H;N7^&H8qc zDtv>?GF{4JGVvxWfMTuv4yYjJ!M(&f8-s!q17xO5Jr#mMZ7?QISLEhy7 z<4tQlE$WaAAGwEu+!7%D_B)7m>g12L+AuD!tANgW=0-k2zQcI|>J!Y@YzLOuL9P*` zrj(VE{Tn-w(flnKdmno+2mA~O7w|J2EUV~6+txRO@0-VZ1lk4i9OU8pi=4LE5;i?YaFbJPhqfEGH%{W`3gdAkz%qgjLi2CEP4 z-4rAFvJD}15a3kO`9byGXDdH8_qOPx-slepS(dvfocZEPhyg748Qhgk?86tN?7(dk zXq(?@r5K9S_Ig&6Rw0WlcMj?^o5{~0S~zbZZ;j%v+fS&k>&ZmFGnf@;1RzXq5zaXF z82g9T!L%WWuft4}U3Iq|&b{zKQ5?vHvSA@OfF-e}8H6u5nE1J{mx!Px(^dTce@-VK z-|1J1oMS>T#=-a!rj>_E4fjg1`8>75Y(7oGSP{sWga9IOb@dW7+LknCyuS;4Rul9| MT2ZP(!Z_%E0N^^yY5)KL literal 0 HcmV?d00001 diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Basic/WMS_GetMap_Basic.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Basic/WMS_GetMap_Basic.png new file mode 100644 index 0000000000000000000000000000000000000000..08305e2f789a428a9d7f7968022cef7465f1adae GIT binary patch literal 31349 zcmX_o1yof}wD$o7Bm|Tc>6Y&9ZlsZJkd(YM2nYhw-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*r(b>)w-UNGZ z1U;?F%9W;D)|az;b(lz6X9mQ%in!w}FHVo6i?QuI{>vg8PtRWezDHs>FbGi6cR)#B zU*|kVN}?(Y{~nfYzk4l8N=rsVLPo;e-TMQ_kDUN&)fq#P4TmeKE^(^_Q3_gyxZ5vv zJ!QhWwC~;6R9$)`X9_&jxr5nS2T0>o)o)BpsrvIKuD-&G)TvKYWZD;D3F+NpV3w0D z8nm!t=Va@AzMKR*I52RMf2kJlqZbqa8>&CpKPY(}L=_IcSQC78(8qsiU7tlr2R zfPAtz(H1aag3;x*wTWvi(sl-<&BZ0Q=nz>*_bXAR@PtKhyK@2NsItJT304$cdV)ic zHdi(&cjgrPl7Xe&#pyw}_8jcvSx8_u8W@rc=N5TgzuL5;c zsUZm%ZnTw?JH?J*O>FS{&R>Nf&G`4L_og1IX=fze#LS8-IRtWqfCYWT1N8W!lOo{S zFu#`?(P#Btf-SM&Cm_0fDk_uR5(BV_Z`S^jpoOx?mweW#e7ZahDJb~&Az;#hAGwT6 zYN-1vow$;}Yi@oLa&iC0wR)-4x#@F?#M37`+yh&>(n|mYsA&{10wH!2>X7QG0uCAqJ%P=nKx@_92AOKhO2?v$ zNJxtzvwR9_(f7e5kPqZQ2r0|``z}Afa$2Z-bed@RcLE5x7Kk4x%b^%t-1;Z!NxVtG QJJJvp1r7OXIrFgp14#TW$N&HU literal 0 HcmV?d00001 diff --git a/tests/testdata/control_images/qgis_server/WMS_GetMap_Transparent/WMS_GetMap_Transparent.png b/tests/testdata/control_images/qgis_server/WMS_GetMap_Transparent/WMS_GetMap_Transparent.png new file mode 100644 index 0000000000000000000000000000000000000000..6a426138297c58ba4e2abc7c1dbb5500fe0319c9 GIT binary patch literal 33108 zcmXs#1yq#L(u8zMHxf#Rv`b0|(jwg{-Ai|ON_QV!T2gAt^@-Ed-?i7Mg+bYo?ZzD{-M}OX*dGo7q1^!wkN@7 z7?^i3U&TKwyJj3Nxp*q8JolZAHM$)C!;6QCs(gEkM;dDRnYp2fF^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+1000 Subject: [PATCH 002/332] Remove duplicate QgsFeature::setFeatureId method Leave just QgsFeature::setId and document api break --- doc/api_break.dox | 1 + python/core/qgsfeature.sip | 6 ------ src/core/qgsfeature.cpp | 17 +---------------- src/core/qgsfeature.h | 10 +--------- src/core/qgsogrutils.cpp | 2 +- src/core/qgsvectorlayerdiagramprovider.cpp | 2 +- src/core/qgsvectorlayerfeatureiterator.cpp | 4 ++-- src/core/qgsvectorlayerundocommand.cpp | 2 +- .../attributetable/qgsattributetablemodel.cpp | 6 +++--- .../geometry_checker/utils/qgsfeaturepool.cpp | 2 +- src/providers/arcgisrest/qgsafsprovider.cpp | 2 +- src/providers/db2/qgsdb2featureiterator.cpp | 2 +- src/providers/db2/qgsdb2provider.cpp | 2 +- .../qgsdelimitedtextfeatureiterator.cpp | 2 +- .../delimitedtext/qgsdelimitedtextprovider.cpp | 4 ++-- src/providers/gpx/qgsgpxfeatureiterator.cpp | 6 +++--- src/providers/grass/qgsgrassfeatureiterator.cpp | 2 +- src/providers/memory/qgsmemoryprovider.cpp | 2 +- src/providers/mssql/qgsmssqlfeatureiterator.cpp | 2 +- src/providers/mssql/qgsmssqlprovider.cpp | 2 +- src/providers/ogr/qgsogrfeatureiterator.cpp | 2 +- src/providers/ogr/qgsogrprovider.cpp | 2 +- .../oracle/qgsoraclefeatureiterator.cpp | 2 +- src/providers/oracle/qgsoracleprovider.cpp | 6 +++--- .../postgres/qgspostgresfeatureiterator.cpp | 2 +- src/providers/postgres/qgspostgresprovider.cpp | 8 ++++---- .../spatialite/qgsspatialitefeatureiterator.cpp | 4 ++-- .../spatialite/qgsspatialiteprovider.cpp | 2 +- .../virtual/qgsvirtuallayerfeatureiterator.cpp | 4 ++-- src/providers/wfs/qgswfsfeatureiterator.cpp | 2 +- src/providers/wfs/qgswfsprovider.cpp | 2 +- src/providers/wfs/qgswfsshareddata.cpp | 6 +++--- tests/src/core/testqgsfeature.cpp | 8 ++++---- .../providers/grass/testqgsgrassprovider.cpp | 6 +++--- tests/src/python/test_layer_dependencies.py | 8 ++++---- tests/src/python/test_qgsspatialindex.py | 2 +- 36 files changed, 58 insertions(+), 86 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 3f4d27bead24..28ece9c2be77 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -914,6 +914,7 @@ None will need to be modified, as the method will return an empty geometry if th - The temporary constGeometry() method has been removed. Use geometry() instead. - setFields( const QgsFields*, bool ) has been removed, use setFields( const QgsFields&, bool ) instead. - fields() no longer returns a pointer, but instead a QgsFields value. +- The duplicate method setFeatureId() was removed. Use setId() instead. QgsFeatureRendererV2 {#qgis_api_break_3_0_QgsFeatureRendererV2} diff --git a/python/core/qgsfeature.sip b/python/core/qgsfeature.sip index 752bc6f5de9f..7f9ae38ef84f 100644 --- a/python/core/qgsfeature.sip +++ b/python/core/qgsfeature.sip @@ -241,12 +241,6 @@ class QgsFeature */ QgsFeatureId id() const; - /** Sets the feature ID for this feature. - * @param id feature id - * @see id - */ - void setFeatureId( QgsFeatureId id ); - /** Sets the feature ID for this feature. * @param id feature id * @see id diff --git a/src/core/qgsfeature.cpp b/src/core/qgsfeature.cpp index fd9137de8c45..52ac6eeb6050 100644 --- a/src/core/qgsfeature.cpp +++ b/src/core/qgsfeature.cpp @@ -115,21 +115,6 @@ QgsGeometry QgsFeature::geometry() const return d->geometry; } -/*************************************************************************** - * This class is considered CRITICAL and any change MUST be accompanied with - * full unit tests in testqgsfeature.cpp. - * See details in QEP #17 - ****************************************************************************/ - -void QgsFeature::setFeatureId( QgsFeatureId id ) -{ - if ( id == d->fid ) - return; - - d.detach(); - d->fid = id; -} - /*************************************************************************** * This class is considered CRITICAL and any change MUST be accompanied with * full unit tests in testqgsfeature.cpp. @@ -324,7 +309,7 @@ QDataStream& operator>>( QDataStream& in, QgsFeature& feature ) bool valid; QgsAttributes attr; in >> id >> attr >> geometry >> valid; - feature.setFeatureId( id ); + feature.setId( id ); feature.setGeometry( geometry ); feature.setAttributes( attr ); feature.setValid( valid ); diff --git a/src/core/qgsfeature.h b/src/core/qgsfeature.h index 2ae8557d0d0b..cde8d0899afa 100644 --- a/src/core/qgsfeature.h +++ b/src/core/qgsfeature.h @@ -172,22 +172,14 @@ class CORE_EXPORT QgsFeature */ bool operator!=( const QgsFeature& other ) const; - - virtual ~QgsFeature(); /** Get the feature ID for this feature. * @returns feature ID - * @see setFeatureId + * @see setId() */ QgsFeatureId id() const; - /** Sets the feature ID for this feature. - * @param id feature id - * @see id - */ - void setFeatureId( QgsFeatureId id ); - /** Sets the feature ID for this feature. * @param id feature id * @see id diff --git a/src/core/qgsogrutils.cpp b/src/core/qgsogrutils.cpp index 5d7d5a67a3cc..77776ec9c9cf 100644 --- a/src/core/qgsogrutils.cpp +++ b/src/core/qgsogrutils.cpp @@ -30,7 +30,7 @@ QgsFeature QgsOgrUtils::readOgrFeature( OGRFeatureH ogrFet, const QgsFields& fie return feature; } - feature.setFeatureId( OGR_F_GetFID( ogrFet ) ); + feature.setId( OGR_F_GetFID( ogrFet ) ); feature.setValid( true ); if ( !readOgrFeatureGeometry( ogrFet, feature ) ) diff --git a/src/core/qgsvectorlayerdiagramprovider.cpp b/src/core/qgsvectorlayerdiagramprovider.cpp index 57ae61d05039..50ad6bf02800 100644 --- a/src/core/qgsvectorlayerdiagramprovider.cpp +++ b/src/core/qgsvectorlayerdiagramprovider.cpp @@ -129,7 +129,7 @@ void QgsVectorLayerDiagramProvider::drawLabel( QgsRenderContext& context, pal::L QgsFeature feature; feature.setFields( mFields ); feature.setValid( true ); - feature.setFeatureId( label->getFeaturePart()->featureId() ); + feature.setId( label->getFeaturePart()->featureId() ); feature.setAttributes( dlf->attributes() ); //calculate top-left point for diagram diff --git a/src/core/qgsvectorlayerfeatureiterator.cpp b/src/core/qgsvectorlayerfeatureiterator.cpp index 11206c1bb521..b03d40dc26ea 100644 --- a/src/core/qgsvectorlayerfeatureiterator.cpp +++ b/src/core/qgsvectorlayerfeatureiterator.cpp @@ -376,7 +376,7 @@ bool QgsVectorLayerFeatureIterator::fetchNextAddedFeature( QgsFeature& f ) void QgsVectorLayerFeatureIterator::useAddedFeature( const QgsFeature& src, QgsFeature& f ) { - f.setFeatureId( src.id() ); + f.setId( src.id() ); f.setValid( true ); f.setFields( mSource->mFields ); @@ -450,7 +450,7 @@ bool QgsVectorLayerFeatureIterator::fetchNextChangedAttributeFeature( QgsFeature void QgsVectorLayerFeatureIterator::useChangedAttributeFeature( QgsFeatureId fid, const QgsGeometry& geom, QgsFeature& f ) { - f.setFeatureId( fid ); + f.setId( fid ); f.setValid( true ); f.setFields( mSource->mFields ); diff --git a/src/core/qgsvectorlayerundocommand.cpp b/src/core/qgsvectorlayerundocommand.cpp index 0bea9467950f..91d00f228d91 100644 --- a/src/core/qgsvectorlayerundocommand.cpp +++ b/src/core/qgsvectorlayerundocommand.cpp @@ -38,7 +38,7 @@ QgsVectorLayerUndoCommandAddFeature::QgsVectorLayerUndoCommandAddFeature( QgsVec // Force a feature ID (to keep other functions in QGIS happy, // providers will use their own new feature ID when we commit the new feature) // and add to the known added features. - f.setFeatureId( addedIdLowWaterMark ); + f.setId( addedIdLowWaterMark ); mFeature = f; } diff --git a/src/gui/attributetable/qgsattributetablemodel.cpp b/src/gui/attributetable/qgsattributetablemodel.cpp index 147df1844007..5e1bd566a163 100644 --- a/src/gui/attributetable/qgsattributetablemodel.cpp +++ b/src/gui/attributetable/qgsattributetablemodel.cpp @@ -53,7 +53,7 @@ QgsAttributeTableModel::QgsAttributeTableModel( QgsVectorLayerCache *layerCache, mFeatureRequest.setFlags( QgsFeatureRequest::NoGeometry ); } - mFeat.setFeatureId( std::numeric_limits::min() ); + mFeat.setId( std::numeric_limits::min() ); if ( !layer()->hasGeometryType() ) mFeatureRequest.setFlags( QgsFeatureRequest::NoGeometry ); @@ -744,7 +744,7 @@ Qt::ItemFlags QgsAttributeTableModel::flags( const QModelIndex &index ) const void QgsAttributeTableModel::reload( const QModelIndex &index1, const QModelIndex &index2 ) { - mFeat.setFeatureId( std::numeric_limits::min() ); + mFeat.setId( std::numeric_limits::min() ); emit dataChanged( index1, index2 ); } @@ -765,7 +765,7 @@ QgsFeature QgsAttributeTableModel::feature( const QModelIndex &idx ) const { QgsFeature f; f.initAttributes( mAttributes.size() ); - f.setFeatureId( rowToId( idx.row() ) ); + f.setId( rowToId( idx.row() ) ); for ( int i = 0; i < mAttributes.size(); i++ ) { f.setAttribute( mAttributes[i], data( index( idx.row(), i ), Qt::EditRole ) ); diff --git a/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp b/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp index 7231df386648..168120efbccb 100644 --- a/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp +++ b/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp @@ -89,7 +89,7 @@ void QgsFeaturePool::addFeature( QgsFeature& feature ) features.append( feature ); mLayerMutex.lock(); mLayer->dataProvider()->addFeatures( features ); - feature.setFeatureId( features.front().id() ); + feature.setId( features.front().id() ); if ( mSelectedOnly ) { QgsFeatureIds selectedFeatureIds = mLayer->selectedFeatureIds(); diff --git a/src/providers/arcgisrest/qgsafsprovider.cpp b/src/providers/arcgisrest/qgsafsprovider.cpp index 684f66b2f7d2..c76ed24c0516 100644 --- a/src/providers/arcgisrest/qgsafsprovider.cpp +++ b/src/providers/arcgisrest/qgsafsprovider.cpp @@ -223,7 +223,7 @@ bool QgsAfsProvider::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeome QgsFeature feature; // Set FID - feature.setFeatureId( startId + i ); + feature.setId( startId + i ); // Set attributes if ( !fetchAttribIdx.isEmpty() ) diff --git a/src/providers/db2/qgsdb2featureiterator.cpp b/src/providers/db2/qgsdb2featureiterator.cpp index eb36ab32677e..48a3858ab00e 100644 --- a/src/providers/db2/qgsdb2featureiterator.cpp +++ b/src/providers/db2/qgsdb2featureiterator.cpp @@ -347,7 +347,7 @@ bool QgsDb2FeatureIterator::fetchFeature( QgsFeature& feature ) } } // QgsDebugMsg( QString( "Fid: %1; value: %2" ).arg( mSource->mFidColName ).arg( record.value( mSource->mFidColName ).toLongLong() ) ); - feature.setFeatureId( mQuery->record().value( mSource->mFidColName ).toLongLong() ); + feature.setId( mQuery->record().value( mSource->mFidColName ).toLongLong() ); if ( mSource->isSpatial() ) { diff --git a/src/providers/db2/qgsdb2provider.cpp b/src/providers/db2/qgsdb2provider.cpp index 72499a4c1fd0..4a9c50f4afa7 100644 --- a/src/providers/db2/qgsdb2provider.cpp +++ b/src/providers/db2/qgsdb2provider.cpp @@ -1146,7 +1146,7 @@ bool QgsDb2Provider::addFeatures( QgsFeatureList & flist ) return false; } } - it->setFeatureId( queryFid.value( 0 ).toLongLong() ); + it->setId( queryFid.value( 0 ).toLongLong() ); writeCount++; // QgsDebugMsg( QString( "count: %1; featureId: %2" ).arg( writeCount ).arg( queryFid.value( 0 ).toLongLong() ) ); } diff --git a/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp b/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp index f41f3a2c65b1..9ef453506139 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextfeatureiterator.cpp @@ -331,7 +331,7 @@ bool QgsDelimitedTextFeatureIterator::nextFeatureInternal( QgsFeature& feature ) feature.setValid( true ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups - feature.setFeatureId( fid ); + feature.setId( fid ); feature.initAttributes( mSource->mFields.count() ); feature.setGeometry( geom ); diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp index 7a16be39aaef..6f55810a6bc5 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp @@ -473,7 +473,7 @@ void QgsDelimitedTextProvider::scanFile( bool buildIndexes ) if ( buildSpatialIndex ) { QgsFeature f; - f.setFeatureId( mFile->recordId() ); + f.setId( mFile->recordId() ); f.setGeometry( geom ); mSpatialIndex->insertFeature( f ); } @@ -528,7 +528,7 @@ void QgsDelimitedTextProvider::scanFile( bool buildIndexes ) if ( buildSpatialIndex && qIsFinite( pt.x() ) && qIsFinite( pt.y() ) ) { QgsFeature f; - f.setFeatureId( mFile->recordId() ); + f.setId( mFile->recordId() ); f.setGeometry( QgsGeometry::fromPoint( pt ) ); mSpatialIndex->insertFeature( f ); } diff --git a/src/providers/gpx/qgsgpxfeatureiterator.cpp b/src/providers/gpx/qgsgpxfeatureiterator.cpp index 03ae6f7d3f1f..169af61e49a2 100644 --- a/src/providers/gpx/qgsgpxfeatureiterator.cpp +++ b/src/providers/gpx/qgsgpxfeatureiterator.cpp @@ -191,7 +191,7 @@ bool QgsGPXFeatureIterator::readWaypoint( const QgsWaypoint& wpt, QgsFeature& fe feature.setGeometry( *g ); delete g; } - feature.setFeatureId( wpt.id ); + feature.setId( wpt.id ); feature.setValid( true ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups feature.initAttributes( mSource->mFields.count() ); @@ -235,7 +235,7 @@ bool QgsGPXFeatureIterator::readRoute( const QgsRoute& rte, QgsFeature& feature { delete theGeometry; } - feature.setFeatureId( rte.id ); + feature.setId( rte.id ); feature.setValid( true ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups feature.initAttributes( mSource->mFields.count() ); @@ -278,7 +278,7 @@ bool QgsGPXFeatureIterator::readTrack( const QgsTrack& trk, QgsFeature& feature { delete theGeometry; } - feature.setFeatureId( trk.id ); + feature.setId( trk.id ); feature.setValid( true ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups feature.initAttributes( mSource->mFields.count() ); diff --git a/src/providers/grass/qgsgrassfeatureiterator.cpp b/src/providers/grass/qgsgrassfeatureiterator.cpp index df1b7a544833..9d8317ac9685 100644 --- a/src/providers/grass/qgsgrassfeatureiterator.cpp +++ b/src/providers/grass/qgsgrassfeatureiterator.cpp @@ -485,7 +485,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) } QgsDebugMsgLevel( QString( "lid = %1 type = %2 cat = %3 featureId = %4" ).arg( lid ).arg( type ).arg( cat ).arg( featureId ), 3 ); - feature.setFeatureId( featureId ); + feature.setId( featureId ); //feature.initAttributes( mSource->mFields.count() ); QgsDebugMsgLevel( QString( "mSource->mFields.size() = %1" ).arg( mSource->mFields.size() ), 3 ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups diff --git a/src/providers/memory/qgsmemoryprovider.cpp b/src/providers/memory/qgsmemoryprovider.cpp index f82e3367a9bd..4f5ff913fe82 100644 --- a/src/providers/memory/qgsmemoryprovider.cpp +++ b/src/providers/memory/qgsmemoryprovider.cpp @@ -301,7 +301,7 @@ bool QgsMemoryProvider::addFeatures( QgsFeatureList & flist ) // TODO: sanity checks of fields and geometries for ( QgsFeatureList::iterator it = flist.begin(); it != flist.end(); ++it ) { - it->setFeatureId( mNextFeatureId ); + it->setId( mNextFeatureId ); it->setValid( true ); mFeatures.insert( mNextFeatureId, *it ); diff --git a/src/providers/mssql/qgsmssqlfeatureiterator.cpp b/src/providers/mssql/qgsmssqlfeatureiterator.cpp index caf6bdbe45aa..21539b4cac37 100644 --- a/src/providers/mssql/qgsmssqlfeatureiterator.cpp +++ b/src/providers/mssql/qgsmssqlfeatureiterator.cpp @@ -304,7 +304,7 @@ bool QgsMssqlFeatureIterator::fetchFeature( QgsFeature& feature ) feature.setAttribute( mAttributesToFetch.at( i ), v ); } - feature.setFeatureId( mQuery->record().value( mSource->mFidColName ).toLongLong() ); + feature.setId( mQuery->record().value( mSource->mFidColName ).toLongLong() ); if ( mSource->isSpatial() ) { diff --git a/src/providers/mssql/qgsmssqlprovider.cpp b/src/providers/mssql/qgsmssqlprovider.cpp index 1a86f6e7f1eb..4342a1611b02 100644 --- a/src/providers/mssql/qgsmssqlprovider.cpp +++ b/src/providers/mssql/qgsmssqlprovider.cpp @@ -1003,7 +1003,7 @@ bool QgsMssqlProvider::addFeatures( QgsFeatureList & flist ) return false; } } - it->setFeatureId( query.value( 0 ).toLongLong() ); + it->setId( query.value( 0 ).toLongLong() ); } return true; diff --git a/src/providers/ogr/qgsogrfeatureiterator.cpp b/src/providers/ogr/qgsogrfeatureiterator.cpp index bd77ceef1f5d..651a6549d90e 100644 --- a/src/providers/ogr/qgsogrfeatureiterator.cpp +++ b/src/providers/ogr/qgsogrfeatureiterator.cpp @@ -294,7 +294,7 @@ void QgsOgrFeatureIterator::getFeatureAttribute( OGRFeatureH ogrFet, QgsFeature bool QgsOgrFeatureIterator::readFeature( OGRFeatureH fet, QgsFeature& feature ) const { - feature.setFeatureId( OGR_F_GetFID( fet ) ); + feature.setId( OGR_F_GetFID( fet ) ); feature.initAttributes( mSource->mFields.count() ); feature.setFields( mSource->mFields ); // allow name-based attribute lookups diff --git a/src/providers/ogr/qgsogrprovider.cpp b/src/providers/ogr/qgsogrprovider.cpp index 6a508c70d981..2a466835c772 100644 --- a/src/providers/ogr/qgsogrprovider.cpp +++ b/src/providers/ogr/qgsogrprovider.cpp @@ -1299,7 +1299,7 @@ bool QgsOgrProvider::addFeature( QgsFeature& f ) QgsFeatureId id = static_cast( OGR_F_GetFID( feature ) ); if ( id >= 0 ) { - f.setFeatureId( id ); + f.setId( id ); if ( mFirstFieldIsFid && attrs.count() > 0 ) { diff --git a/src/providers/oracle/qgsoraclefeatureiterator.cpp b/src/providers/oracle/qgsoraclefeatureiterator.cpp index 41f7ae9f952e..894bfbd0fb61 100644 --- a/src/providers/oracle/qgsoraclefeatureiterator.cpp +++ b/src/providers/oracle/qgsoraclefeatureiterator.cpp @@ -361,7 +361,7 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature ) return false; } - feature.setFeatureId( fid ); + feature.setId( fid ); QgsDebugMsgLevel( QString( "fid=%1" ).arg( fid ), 5 ); // iterate attributes diff --git a/src/providers/oracle/qgsoracleprovider.cpp b/src/providers/oracle/qgsoracleprovider.cpp index f282d40ba978..1be8f29244a7 100644 --- a/src/providers/oracle/qgsoracleprovider.cpp +++ b/src/providers/oracle/qgsoracleprovider.cpp @@ -1410,7 +1410,7 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) if ( mPrimaryKeyType == pktRowId ) { - features->setFeatureId( mShared->lookupFid( QList() << QVariant( ins.lastInsertId() ) ) ); + features->setId( mShared->lookupFid( QList() << QVariant( ins.lastInsertId() ) ) ); QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); } else if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap ) @@ -1448,7 +1448,7 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) if ( mPrimaryKeyType == pktInt ) { - features->setFeatureId( STRING_TO_FID( attributevec[ mPrimaryKeyAttrs[0] ] ) ); + features->setId( STRING_TO_FID( attributevec[ mPrimaryKeyAttrs[0] ] ) ); } else { @@ -1459,7 +1459,7 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) primaryKeyVals << attributevec[ idx ]; } - features->setFeatureId( mShared->lookupFid( QVariant( primaryKeyVals ) ) ); + features->setId( mShared->lookupFid( QVariant( primaryKeyVals ) ) ); } QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); } diff --git a/src/providers/postgres/qgspostgresfeatureiterator.cpp b/src/providers/postgres/qgspostgresfeatureiterator.cpp index fe7eae986236..67f6330559e2 100644 --- a/src/providers/postgres/qgspostgresfeatureiterator.cpp +++ b/src/providers/postgres/qgspostgresfeatureiterator.cpp @@ -755,7 +755,7 @@ bool QgsPostgresFeatureIterator::getFeature( QgsPostgresResult &queryResult, int return false; } - feature.setFeatureId( fid ); + feature.setId( fid ); QgsDebugMsgLevel( QString( "fid=%1" ).arg( fid ), 4 ); // iterate attributes diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index de7897026482..d6d3286e7977 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -2146,7 +2146,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) if ( mPrimaryKeyType == pktOid ) { - features->setFeatureId( result.PQoidValue() ); + features->setId( result.PQoidValue() ); QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); } } @@ -2160,11 +2160,11 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) if ( mPrimaryKeyType == pktUint64 ) { - features->setFeatureId( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ); + features->setId( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ); } else if ( mPrimaryKeyType == pktInt ) { - features->setFeatureId( PKINT2FID( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ) ); + features->setId( PKINT2FID( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ) ); } else { @@ -2175,7 +2175,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) primaryKeyVals << attrs.at( idx ); } - features->setFeatureId( mShared->lookupFid( primaryKeyVals ) ); + features->setId( mShared->lookupFid( primaryKeyVals ) ); } QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); } diff --git a/src/providers/spatialite/qgsspatialitefeatureiterator.cpp b/src/providers/spatialite/qgsspatialitefeatureiterator.cpp index b77ea256d4a3..e67149f0fd27 100644 --- a/src/providers/spatialite/qgsspatialitefeatureiterator.cpp +++ b/src/providers/spatialite/qgsspatialitefeatureiterator.cpp @@ -479,13 +479,13 @@ bool QgsSpatiaLiteFeatureIterator::getFeature( sqlite3_stmt *stmt, QgsFeature &f // first column always contains the ROWID (or the primary key) QgsFeatureId fid = sqlite3_column_int64( stmt, ic ); QgsDebugMsgLevel( QString( "fid=%1" ).arg( fid ), 3 ); - feature.setFeatureId( fid ); + feature.setId( fid ); } else { // autoincrement a row number mRowNumber++; - feature.setFeatureId( mRowNumber ); + feature.setId( mRowNumber ); } } else if ( mFetchGeometry && ic == mGeomColIdx ) diff --git a/src/providers/spatialite/qgsspatialiteprovider.cpp b/src/providers/spatialite/qgsspatialiteprovider.cpp index 92ace54bbb9d..13de8f145c4d 100644 --- a/src/providers/spatialite/qgsspatialiteprovider.cpp +++ b/src/providers/spatialite/qgsspatialiteprovider.cpp @@ -3970,7 +3970,7 @@ bool QgsSpatiaLiteProvider::addFeatures( QgsFeatureList & flist ) if ( ret == SQLITE_DONE || ret == SQLITE_ROW ) { // update feature id - feature->setFeatureId( sqlite3_last_insert_rowid( mSqliteHandle ) ); + feature->setId( sqlite3_last_insert_rowid( mSqliteHandle ) ); mNumberFeatures++; } else diff --git a/src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp b/src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp index cf237d9fe680..3e2addad6221 100644 --- a/src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp +++ b/src/providers/virtual/qgsvirtuallayerfeatureiterator.cpp @@ -198,12 +198,12 @@ bool QgsVirtualLayerFeatureIterator::fetchFeature( QgsFeature& feature ) if ( mDefinition.uid().isNull() ) { // no id column => autoincrement - feature.setFeatureId( mFid++ ); + feature.setId( mFid++ ); } else { // first column: uid - feature.setFeatureId( mQuery->columnInt64( 0 ) ); + feature.setId( mQuery->columnInt64( 0 ) ); } int n = mQuery->columnCount(); diff --git a/src/providers/wfs/qgswfsfeatureiterator.cpp b/src/providers/wfs/qgswfsfeatureiterator.cpp index 331d1636ff11..4fa649eaf482 100644 --- a/src/providers/wfs/qgswfsfeatureiterator.cpp +++ b/src/providers/wfs/qgswfsfeatureiterator.cpp @@ -1217,7 +1217,7 @@ void QgsWFSFeatureIterator::copyFeature( const QgsFeature& srcFeature, QgsFeatur //id and valid dstFeature.setValid( true ); - dstFeature.setFeatureId( srcFeature.id() ); + dstFeature.setId( srcFeature.id() ); dstFeature.setFields( fields ); // allow name-based attribute lookups } diff --git a/src/providers/wfs/qgswfsprovider.cpp b/src/providers/wfs/qgswfsprovider.cpp index 27c7638d388f..ca01170d13c0 100644 --- a/src/providers/wfs/qgswfsprovider.cpp +++ b/src/providers/wfs/qgswfsprovider.cpp @@ -872,7 +872,7 @@ bool QgsWFSProvider::addFeatures( QgsFeatureList &flist ) for ( ; idIt != idList.constEnd() && featureIt != flist.end(); ++idIt, ++featureIt ) { if ( map.find( *idIt ) != map.end() ) - featureIt->setFeatureId( map[*idIt] ); + featureIt->setId( map[*idIt] ); } return true; diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp index 60a4ac91d463..dfaf202f4e5a 100644 --- a/src/providers/wfs/qgswfsshareddata.cpp +++ b/src/providers/wfs/qgswfsshareddata.cpp @@ -919,9 +919,9 @@ void QgsWFSSharedData::serializeFeatures( QVector& featu for ( int i = 0; i < updatedFeatureList.size(); i++ ) { if ( cacheOk ) - updatedFeatureList[i].first.setFeatureId( featureListToCache[i].id() ); + updatedFeatureList[i].first.setId( featureListToCache[i].id() ); else - updatedFeatureList[i].first.setFeatureId( mTotalFeaturesAttemptedToBeCached + i + 1 ); + updatedFeatureList[i].first.setId( mTotalFeaturesAttemptedToBeCached + i + 1 ); } { @@ -1023,7 +1023,7 @@ void QgsWFSSharedData::endOfDownload( bool success, int featureCount, QgsFeature f; f.setGeometry( QgsGeometry::fromRect( mRect ) ); QgsFeatureId id = mRegions.size(); - f.setFeatureId( id ); + f.setId( id ); f.initAttributes( 1 ); f.setAttribute( 0, QVariant( bDownloadLimit ) ); mRegions.push_back( f ); diff --git a/tests/src/core/testqgsfeature.cpp b/tests/src/core/testqgsfeature.cpp index 92e50859d12f..1f276045ec66 100644 --- a/tests/src/core/testqgsfeature.cpp +++ b/tests/src/core/testqgsfeature.cpp @@ -173,7 +173,7 @@ void TestQgsFeature::copy() QVERIFY( copy.id() == original.id() ); QCOMPARE( copy.attributes(), original.attributes() ); - copy.setFeatureId( 1001LL ); + copy.setId( 1001LL ); QCOMPARE( original.id(), 1000LL ); QVERIFY( copy.id() != original.id() ); } @@ -187,7 +187,7 @@ void TestQgsFeature::assignment() QCOMPARE( copy.id(), original.id() ); QCOMPARE( copy.attributes(), original.attributes() ); - copy.setFeatureId( 1001LL ); + copy.setId( 1001LL ); QCOMPARE( original.id(), 1000LL ); QVERIFY( copy.id() != original.id() ); QCOMPARE( copy.attributes(), original.attributes() ); @@ -196,7 +196,7 @@ void TestQgsFeature::assignment() void TestQgsFeature::gettersSetters() { QgsFeature feature; - feature.setFeatureId( 1000LL ); + feature.setId( 1000LL ); QCOMPARE( feature.id(), 1000LL ); feature.setValid( true ); @@ -289,7 +289,7 @@ void TestQgsFeature::geometry() emptyGeomFeature.setGeometry( QgsGeometry() ); QVERIFY( !emptyGeomFeature.hasGeometry() ); copy = emptyGeomFeature; - copy.setFeatureId( 5 ); //force detach + copy.setId( 5 ); //force detach //setGeometry //always start with a copy so that we can test implicit sharing detachment is working diff --git a/tests/src/providers/grass/testqgsgrassprovider.cpp b/tests/src/providers/grass/testqgsgrassprovider.cpp index eea1a75d73e6..692ec33b8ef8 100644 --- a/tests/src/providers/grass/testqgsgrassprovider.cpp +++ b/tests/src/providers/grass/testqgsgrassprovider.cpp @@ -928,7 +928,7 @@ QList< TestQgsGrassCommandGroup > TestQgsGrassProvider::createCommands() // Add point command = TestQgsGrassCommand( TestQgsGrassCommand::AddFeature ); grassFeature = TestQgsGrassFeature( GV_POINT ); - grassFeature.setFeatureId( 1 ); + grassFeature.setId( 1 ); geometry = new QgsGeometry( new QgsPointV2( QgsWkbTypes::Point, 10, 10, 0 ) ); grassFeature.setGeometry( *geometry ); delete geometry; @@ -1018,7 +1018,7 @@ QList< TestQgsGrassCommandGroup > TestQgsGrassProvider::createCommands() // Add line feature with attributes command = TestQgsGrassCommand( TestQgsGrassCommand::AddFeature ); grassFeature = TestQgsGrassFeature( GV_LINE ); - grassFeature.setFeatureId( 1 ); + grassFeature.setId( 1 ); line = new QgsLineString(); pointList.clear(); pointList << QgsPointV2( QgsWkbTypes::Point, 0, 0, 0 ); @@ -1059,7 +1059,7 @@ QList< TestQgsGrassCommandGroup > TestQgsGrassProvider::createCommands() command = TestQgsGrassCommand( TestQgsGrassCommand::AddFeature ); command.verify = false; grassFeature = TestQgsGrassFeature( GV_BOUNDARY ); - grassFeature.setFeatureId( 1 ); + grassFeature.setId( 1 ); line = new QgsLineString(); pointList.clear(); pointList << QgsPointV2( QgsWkbTypes::Point, 0, 0, 0 ); diff --git a/tests/src/python/test_layer_dependencies.py b/tests/src/python/test_layer_dependencies.py index 1c67606559e4..e98dfcda759c 100644 --- a/tests/src/python/test_layer_dependencies.py +++ b/tests/src/python/test_layer_dependencies.py @@ -126,7 +126,7 @@ def test_resetSnappingIndex(self): self.assertEqual(m.point(), QgsPoint(1, 0)) f = QgsFeature(self.linesLayer.fields()) - f.setFeatureId(1) + f.setId(1) geom = QgsGeometry.fromWkt("LINESTRING(0 0,1 1)") f.setGeometry(geom) self.linesLayer.startEditing() @@ -144,7 +144,7 @@ def test_resetSnappingIndex(self): self.pointsLayer.setDependencies([QgsMapLayerDependency(self.linesLayer.id())]) # add another line f = QgsFeature(self.linesLayer.fields()) - f.setFeatureId(2) + f.setId(2) geom = QgsGeometry.fromWkt("LINESTRING(0 0,0.5 0.5)") f.setGeometry(geom) self.linesLayer.startEditing() @@ -166,7 +166,7 @@ def test_resetSnappingIndex(self): self.pointsLayer2.setDependencies([QgsMapLayerDependency(self.pointsLayer.id())]) # add another line f = QgsFeature(self.linesLayer.fields()) - f.setFeatureId(3) + f.setId(3) geom = QgsGeometry.fromWkt("LINESTRING(0 0.2,0.5 0.8)") f.setGeometry(geom) self.linesLayer.startEditing() @@ -247,7 +247,7 @@ def test_signalConnection(self): u.setConfig(cfg) # add another line f = QgsFeature(self.linesLayer.fields()) - f.setFeatureId(4) + f.setId(4) geom = QgsGeometry.fromWkt("LINESTRING(0.5 0.2,0.6 0)") f.setGeometry(geom) self.linesLayer.startEditing() diff --git a/tests/src/python/test_qgsspatialindex.py b/tests/src/python/test_qgsspatialindex.py index e9214cdfe168..6bb04465e374 100644 --- a/tests/src/python/test_qgsspatialindex.py +++ b/tests/src/python/test_qgsspatialindex.py @@ -33,7 +33,7 @@ def testIndex(self): for y in range(5, 15, 5): for x in range(5, 25, 5): ft = QgsFeature() - ft.setFeatureId(fid) + ft.setId(fid) ft.setGeometry(QgsGeometry.fromPoint(QgsPoint(x, y))) idx.insertFeature(ft) fid += 1 From 748be8de7177f934e8d7d7870fcd7eaa102f20d3 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 19 Dec 2016 10:52:29 +0100 Subject: [PATCH 003/332] [spelling] replace behaviour by behavior --- NEWS | 10 ++-- cmake/SIPMacros.cmake | 2 +- cmake_templates/Doxyfile.in | 4 +- doc/api_break.dox | 22 +++++++-- doc/contributors.json | 2 +- doc/news.html | 10 ++-- doc/news.t2t | 10 ++-- .../interpolation/DualEdgeTriangulation.sip | 4 +- .../analysis/interpolation/TriDecorator.sip | 2 +- .../analysis/interpolation/Triangulation.sip | 14 +++--- .../core/composer/qgscomposermultiframe.sip | 2 +- python/core/composer/qgscomposertablev2.sip | 42 ++++++++--------- python/core/effects/qgspainteffect.sip | 2 +- python/core/qgscolorscheme.sip | 2 +- python/core/qgscoordinatereferencesystem.sip | 2 +- python/core/qgspallabeling.sip | 2 +- python/core/qgstaskmanager.sip | 2 +- python/core/qgsvectorlayer.sip | 16 +++---- python/core/symbology-ng/qgsrenderer.sip | 2 +- python/core/symbology-ng/qgssymbol.sip | 4 +- python/gui/editorwidgets/qgsdoublespinbox.sip | 2 +- python/gui/editorwidgets/qgsspinbox.sip | 2 +- python/gui/qgsannotationitem.sip | 2 +- python/gui/qgsattributeformeditorwidget.sip | 2 +- python/gui/qgscolorbutton.sip | 28 +++++------ python/gui/qgscolorrampbutton.sip | 2 +- python/gui/qgsfilterlineedit.sip | 6 +-- python/gui/qgsgenericprojectionselector.sip | 2 +- python/gui/qgsprojectionselector.sip | 2 +- .../db_manager/db_plugins/gpkg/connector.py | 2 +- .../db_plugins/spatialite/connector.py | 2 +- .../algs/qgis/SelectByExpression.py | 8 ++-- .../processing/algs/qgis/SnapGeometries.py | 8 ++-- .../plugins/processing/core/GeoAlgorithm.py | 2 +- .../tests/testdata/qgis_algorithm_tests.yaml | 4 +- .../plugins/processing/tools/dataobjects.py | 18 ++++---- python/plugins/processing/tools/vector.py | 2 +- python/server/qgsserver.sip | 2 +- resources/context_help/QgsPgNewConnection | 2 +- scripts/spelling.dat | 2 + .../interpolation/DualEdgeTriangulation.cc | 16 +++---- .../interpolation/DualEdgeTriangulation.h | 12 ++--- src/analysis/interpolation/TriDecorator.cc | 4 +- src/analysis/interpolation/TriDecorator.h | 2 +- src/analysis/interpolation/Triangulation.h | 14 +++--- .../qgscomposerattributetablewidget.cpp | 26 +++++------ .../qgscomposerattributetablewidget.h | 2 +- src/app/gps/qgsgpsinformationwidget.cpp | 4 +- src/app/main.cpp | 16 +++---- src/app/qgisapp.cpp | 6 +-- src/app/qgsattributetabledialog.cpp | 4 +- src/app/qgsattributetypedialog.h | 2 +- src/app/qgsbrowserdockwidget.cpp | 12 ++--- src/app/qgsmaptoolselectutils.cpp | 22 ++++----- src/app/qgsmaptoolselectutils.h | 4 +- src/app/qgsmergeattributesdialog.cpp | 14 +++--- src/app/qgsmergeattributesdialog.h | 4 +- src/app/qgsoptions.cpp | 26 +++++------ src/app/qgsrasterlayerproperties.h | 2 +- src/core/composer/qgscomposerarrow.cpp | 18 ++++---- src/core/composer/qgscomposerarrow.h | 4 +- src/core/composer/qgscomposermultiframe.cpp | 2 +- src/core/composer/qgscomposermultiframe.h | 2 +- src/core/composer/qgscomposerpicture.cpp | 2 +- src/core/composer/qgscomposertablev2.cpp | 20 ++++---- src/core/composer/qgscomposertablev2.h | 46 +++++++++---------- src/core/composer/qgscomposition.cpp | 2 +- src/core/effects/qgspainteffect.h | 2 +- .../gps/qextserialport/win_qextserialport.cpp | 2 +- src/core/pal/costcalculator.cpp | 2 +- src/core/qgscolorscheme.h | 2 +- src/core/qgscoordinatereferencesystem.h | 2 +- src/core/qgsexpression.cpp | 2 +- src/core/qgslabelfeature.h | 2 +- src/core/qgsnetworkaccessmanager.cpp | 2 +- src/core/qgspallabeling.h | 2 +- src/core/qgspluginlayerregistry.cpp | 2 +- src/core/qgsprojectfiletransform.cpp | 2 +- src/core/qgstaskmanager.h | 2 +- src/core/qgsvectorlayer.cpp | 20 ++++---- src/core/qgsvectorlayer.h | 16 +++---- src/core/symbology-ng/qgsrenderer.h | 2 +- src/core/symbology-ng/qgssymbol.h | 4 +- src/gui/editorwidgets/qgsdoublespinbox.h | 2 +- src/gui/editorwidgets/qgsspinbox.h | 2 +- src/gui/qgsannotationitem.h | 2 +- src/gui/qgsattributeform.cpp | 4 +- src/gui/qgsattributeform.h | 2 +- src/gui/qgsattributeformeditorwidget.h | 2 +- src/gui/qgscodeeditor.cpp | 2 +- src/gui/qgscollapsiblegroupbox.cpp | 6 +-- src/gui/qgscolorbutton.cpp | 10 ++-- src/gui/qgscolorbutton.h | 34 +++++++------- src/gui/qgscolorrampbutton.h | 2 +- src/gui/qgscomposerview.cpp | 4 +- src/gui/qgscompoundcolorwidget.cpp | 34 +++++++------- src/gui/qgsdatadefinedbutton.cpp | 2 +- src/gui/qgsfilterlineedit.h | 6 +-- src/gui/qgsgenericprojectionselector.h | 2 +- src/gui/qgsmaplayeractionregistry.cpp | 2 +- src/gui/qgsmaptoolemitpoint.h | 2 +- src/gui/qgsprojectionselector.h | 2 +- src/gui/qgsrasterformatsaveoptionswidget.cpp | 12 ++--- src/gui/raster/qgsrasterhistogramwidget.h | 2 +- .../ui/qgsgeometrycheckerresulttab.ui | 4 +- .../georeferencer/qgsopenrasterdialog.cpp | 6 +-- .../qgsglobevectorlayerpropertiespage.ui | 2 +- src/plugins/plugin_template/README.whatnext | 4 +- src/plugins/plugin_template/plugingui.cpp | 4 +- src/providers/grass/qgsgrass.h | 2 +- src/providers/wms/qgswmsdataitems.cpp | 2 +- .../qgscomposerattributetablewidgetbase.ui | 4 +- src/ui/qgsoptionsbase.ui | 8 ++-- tests/bench/main.cpp | 12 ++--- tests/src/core/testqgscomposertablev2.cpp | 8 ++-- tests/src/python/providertestbase.py | 2 +- tests/src/python/test_provider_wfs.py | 4 +- tests/src/python/test_provider_wfs_gui.py | 2 +- tests/src/python/test_qgsdistancearea.py | 2 +- tests/src/python/test_qgsfilterlineedit.py | 2 +- 120 files changed, 416 insertions(+), 398 deletions(-) diff --git a/NEWS b/NEWS index d8d59e6287b2..d9970b5fefe8 100644 --- a/NEWS +++ b/NEWS @@ -56,7 +56,7 @@ This release has following new features: - User Interface: Improved color pickers - User Interface: Copy cell contents from attribute table - User Interface: Improved HiDPI support -- User Interface: Improved map select tool behaviour +- User Interface: Improved map select tool behavior - Symbology: Arrow symbol layer - Symbology: New "Filled marker" symbol layer type - Symbology: New accessibility and low vision symbols @@ -166,7 +166,7 @@ This release has following new features: - Digitising : Configurable rubber band color - Digitising : Autotrace - Digitising : Trace digitising tool -- General : Changed behaviour of strpos function +- General : Changed behavior of strpos function - General : Field calculator can be used to update feature's geometry - General : Virtual layers - General : Zoom to feature with right-click in attribute table @@ -333,7 +333,7 @@ This is a minor release increment with the following feature: - New field calculator bar in attribute table. - DXF export improvements. - Advanced digitizing tools. -- Improved snapping options and behaviour. +- Improved snapping options and behavior. - Better simplify tool - including support for on the fly reprojection being enabled. - Qt5 support (optional - default packages are still currently built against Qt4). - Spatial bookmark import/export. @@ -636,7 +636,7 @@ were made. - Allow setting I/O encoding for OGR layers in vector layer properties. - Fix #4414 (SVG indicators for arrows are not shown) - Label direction symbol shouldn't depend on "map" vs. "line" orientation. -- Set prompt as default behaviour for unknown CRS +- Set prompt as default behavior for unknown CRS - For EPSG initialize GDAL CRS from authid instead of proj.4 string - Fix #4439 (Crash when changing style in Layer Properties) - Fix #4444 (Error when loading Python plugins) @@ -2184,7 +2184,7 @@ Fixed some more instances of the same bug in raster layer Disable overview widget for release. Minor bugfix in rasterlayer picker up by Larsl which is only encountered bu i8n users. Miscellaneous other fixes including proper rotation support for north arrows in all 4 corners of -display, inproved refresh behaviour of n-arrow and copyright plugin, better +display, inproved refresh behavior of n-arrow and copyright plugin, better state hadnling for copyright plugin. 2004-05-25 [larsl] 0.2.0devel34 diff --git a/cmake/SIPMacros.cmake b/cmake/SIPMacros.cmake index a4b471bfadb0..e170fd432ca6 100644 --- a/cmake/SIPMacros.cmake +++ b/cmake/SIPMacros.cmake @@ -16,7 +16,7 @@ # which is typically a shared library, should be linked to. The built # module will also be install into Python's site-packages directory. # -# The behaviour of the ADD_SIP_PYTHON_MODULE macro can be controlled by a +# The behavior of the ADD_SIP_PYTHON_MODULE macro can be controlled by a # number of variables: # # SIP_INCLUDES - List of directories which SIP will scan through when looking diff --git a/cmake_templates/Doxyfile.in b/cmake_templates/Doxyfile.in index 3b1fb1e6bb3a..40e199599d54 100644 --- a/cmake_templates/Doxyfile.in +++ b/cmake_templates/Doxyfile.in @@ -159,9 +159,9 @@ QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. +# comments) as a brief description. This used to be the default behavior. # The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# description. Set this tag to YES if you prefer the old behavior instead. MULTILINE_CPP_IS_BRIEF = NO diff --git a/doc/api_break.dox b/doc/api_break.dox index 28ece9c2be77..398a5947d515 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -475,6 +475,11 @@ QgsColorBrewerColorRampDialog {#qgis_api_break_3_0_QgsColorBrewerColorRam and the new ramp can be retrieved after executing the dialog by calling ramp(). - Some internal methods which were previously public or protected were made private. +QgsColorButton {#qgis_api_break_3_0_QgsColorButton} +-------------- + +- Behaviour enum and its corresponding setter/getter have been renamed to Behavior + QgsColorRampShader {#qgis_api_break_3_0_QgsColorRampShader} ------------------ @@ -611,7 +616,10 @@ QgsComposerTableV2 {#qgis_api_break_3_0_QgsComposerTableV2} - rowsVisible(), rowRange(), drawHorizontalGridLines() and drawVerticalGridLines() were removed. - +- WrapBehaviour enum and its setter and getter methods has been renamed to WrapBehavior +- EmptyTableBehaviour enum and its setter and getter methods has been renamed to EmptyTableBehavior + + QgsComposerView {#qgis_api_break_3_0_QgsComposerView} -------------------- @@ -1146,7 +1154,7 @@ and the new ramp can be retrieved after executing the dialog by calling ramp(). QgsLinearlyInterpolatedDiagramRenderer {#qgis_api_break_3_0_QgsLinearlyInterpolatedDiagramRenderer} -------------------------------------- -- The classificationAttribute() and setClassificationAttribute() methods were replace by +- The classificationAttribute() and setClassificationAttribute() methods were replace by classificationField() and setClassificationField() which use the field names instead of field indexes. @@ -1715,7 +1723,7 @@ capabilities have been removed, as they were unused and had no effect. - capabilities() now returns a typesafe QgsVectorDataProvider::Capabilities object, not an integer. - convertToProviderType() now takes a geometry reference, not a pointer. - geometryType() has been renamed to wkbType() to be in line with QgsVectorLayer -- The behaviour of defaultValue() has changed from 2.x. In 2.x, defaultValue() would return a SQL +- The behavior of defaultValue() has changed from 2.x. In 2.x, defaultValue() would return a SQL clause fragment which must be evaluated by the provider in order to calculate the default value. In QGIS 3.0 defaultValue() only returns literal, constant defaultValues. A new method defaultValueClause has been added which returns the SQL clause fragments which must be evaluated by the provider itself. @@ -1827,6 +1835,7 @@ optional property map passing down layer level properties to the SLD encoders. I - setScaleMethodToSymbol was removed. This is now handled using data defined scaling at a symbol layer level - usedAttributes is now a const method and returns QSet instead of QStringList + Processing {#qgis_api_break_3_0_Processing} ---------- @@ -1839,6 +1848,13 @@ object of type QgsProcessingFeedback, and will need to adapt their use of progre - SilentProgress was removed. Use the base QgsProcessingFeedback class instead. +Triangulation {#qgis_api_break_3_0_Triangulation} +------------- + +- forcedCrossBehaviour enum and its setter and getter have been renamed to ForcedCrossBehavior. Its members have been renamed: SnappingType_VERTICE: SnappingTypeVertex, DELETE_FIRST: DeleteFirst, INSERT_VERTEX: InsertVertex. + + + QGIS 2.4 {#qgis_api_break_2_4} ======== diff --git a/doc/contributors.json b/doc/contributors.json index ebc8404b3533..0192033bbae5 100644 --- a/doc/contributors.json +++ b/doc/contributors.json @@ -207,7 +207,7 @@ "properties": { "Name": "Marco Hugentobler", "Committer": "Yes", - "First Commit Message": "Changes in the display behaviour of qgsmapcanvas (updating the screen, avoid flickering when paning).", + "First Commit Message": "Changes in the display behavior of qgsmapcanvas (updating the screen, avoid flickering when paning).", "First Commit Date": "15-06-2003", "GIT Nickname": "mhugent" }, diff --git a/doc/news.html b/doc/news.html index 196f4c2f6c21..a62ebe5863a9 100644 --- a/doc/news.html +++ b/doc/news.html @@ -136,7 +136,7 @@

1. What's new in Version 2.16 'Nødebo'?

  • User Interface: Improved color pickers
  • User Interface: Copy cell contents from attribute table
  • User Interface: Improved HiDPI support -
  • User Interface: Improved map select tool behaviour +
  • User Interface: Improved map select tool behavior
  • Symbology: Arrow symbol layer
  • Symbology: New "Filled marker" symbol layer type
  • Symbology: New accessibility and low vision symbols @@ -249,7 +249,7 @@

    2. What's new in Version 2.14 'Essen'?

  • Digitising : Configurable rubber band color
  • Digitising : Autotrace
  • Digitising : Trace digitising tool -
  • General : Changed behaviour of strpos function +
  • General : Changed behavior of strpos function
  • General : Field calculator can be used to update feature's geometry
  • General : Virtual layers
  • General : Zoom to feature with right-click in attribute table @@ -425,7 +425,7 @@

    5. What's new in Version 2.8 'Wien'?

  • New field calculator bar in attribute table.
  • DXF export improvements.
  • Advanced digitizing tools. -
  • Improved snapping options and behaviour. +
  • Improved snapping options and behavior.
  • Better simplify tool - including support for on the fly reprojection being enabled.
  • Qt5 support (optional - default packages are still currently built against Qt4).
  • Spatial bookmark import/export. @@ -747,7 +747,7 @@

    12. Whats new in Version 1.7.2 'Wroclaw'?

  • Allow setting I/O encoding for OGR layers in vector layer properties.
  • Fix #4414 (SVG indicators for arrows are not shown)
  • Label direction symbol shouldn't depend on "map" vs. "line" orientation. -
  • Set prompt as default behaviour for unknown CRS +
  • Set prompt as default behavior for unknown CRS
  • For EPSG initialize GDAL CRS from authid instead of proj.4 string
  • Fix #4439 (Crash when changing style in Layer Properties)
  • Fix #4444 (Error when loading Python plugins) @@ -2421,7 +2421,7 @@

    28. 0.5

    Disable overview widget for release. Minor bugfix in rasterlayer picker up by Larsl which is only encountered bu i8n users. Miscellaneous other fixes including proper rotation support for north arrows in all 4 corners of -display, inproved refresh behaviour of n-arrow and copyright plugin, better +display, inproved refresh behavior of n-arrow and copyright plugin, better state hadnling for copyright plugin.

    diff --git a/doc/news.t2t b/doc/news.t2t index 889e5e24c0a6..b315114eaf72 100644 --- a/doc/news.t2t +++ b/doc/news.t2t @@ -50,7 +50,7 @@ This release has following new features: - User Interface: Improved color pickers - User Interface: Copy cell contents from attribute table - User Interface: Improved HiDPI support -- User Interface: Improved map select tool behaviour +- User Interface: Improved map select tool behavior - Symbology: Arrow symbol layer - Symbology: New "Filled marker" symbol layer type - Symbology: New accessibility and low vision symbols @@ -160,7 +160,7 @@ This release has following new features: - Digitising : Configurable rubber band color - Digitising : Autotrace - Digitising : Trace digitising tool -- General : Changed behaviour of strpos function +- General : Changed behavior of strpos function - General : Field calculator can be used to update feature's geometry - General : Virtual layers - General : Zoom to feature with right-click in attribute table @@ -325,7 +325,7 @@ This is a minor release increment with the following feature: - New field calculator bar in attribute table. - DXF export improvements. - Advanced digitizing tools. -- Improved snapping options and behaviour. +- Improved snapping options and behavior. - Better simplify tool - including support for on the fly reprojection being enabled. - Qt5 support (optional - default packages are still currently built against Qt4). - Spatial bookmark import/export. @@ -621,7 +621,7 @@ were made. - Allow setting I/O encoding for OGR layers in vector layer properties. - Fix #4414 (SVG indicators for arrows are not shown) - Label direction symbol shouldn't depend on "map" vs. "line" orientation. -- Set prompt as default behaviour for unknown CRS +- Set prompt as default behavior for unknown CRS - For EPSG initialize GDAL CRS from authid instead of proj.4 string - Fix #4439 (Crash when changing style in Layer Properties) - Fix #4444 (Error when loading Python plugins) @@ -2138,7 +2138,7 @@ Fixed some more instances of the same bug in raster layer Disable overview widget for release. Minor bugfix in rasterlayer picker up by Larsl which is only encountered bu i8n users. Miscellaneous other fixes including proper rotation support for north arrows in all 4 corners of -display, inproved refresh behaviour of n-arrow and copyright plugin, better +display, inproved refresh behavior of n-arrow and copyright plugin, better state hadnling for copyright plugin. 2004-05-25 [larsl] 0.2.0devel34 diff --git a/python/analysis/interpolation/DualEdgeTriangulation.sip b/python/analysis/interpolation/DualEdgeTriangulation.sip index 51d95d5f9c6a..8bf365066dfd 100644 --- a/python/analysis/interpolation/DualEdgeTriangulation.sip +++ b/python/analysis/interpolation/DualEdgeTriangulation.sip @@ -40,8 +40,8 @@ class DualEdgeTriangulation: Triangulation virtual double getYMin() const; /** Returns the number of points*/ virtual int getNumberOfPoints() const; - /** Sets the behaviour of the triangulation in case of crossing forced lines*/ - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ); + /** Sets the behavior of the triangulation in case of crossing forced lines*/ + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ); /** Sets the color of the normal edges*/ virtual void setEdgeColor( int r, int g, int b ); /** Sets the color of the forced edges*/ diff --git a/python/analysis/interpolation/TriDecorator.sip b/python/analysis/interpolation/TriDecorator.sip index 7d739b3c607e..b0979c9a620c 100644 --- a/python/analysis/interpolation/TriDecorator.sip +++ b/python/analysis/interpolation/TriDecorator.sip @@ -27,7 +27,7 @@ class TriDecorator : Triangulation virtual double getXMin() const; virtual double getYMax() const; virtual double getYMin() const; - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ); + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ); virtual void setEdgeColor( int r, int g, int b ); virtual void setForcedEdgeColor( int r, int g, int b ); virtual void setBreakEdgeColor( int r, int g, int b ); diff --git a/python/analysis/interpolation/Triangulation.sip b/python/analysis/interpolation/Triangulation.sip index 5e06f75b271d..796727a0ff7d 100644 --- a/python/analysis/interpolation/Triangulation.sip +++ b/python/analysis/interpolation/Triangulation.sip @@ -7,12 +7,12 @@ class Triangulation public: - //! Enumeration describing the behaviour, if two forced lines cross. - enum forcedCrossBehaviour + //! Enumeration describing the behavior, if two forced lines cross. + enum ForcedCrossBehavior { - SnappingType_VERTICE, //!< the second inserted forced line is snapped to the closest vertice of the first inserted forced line. - DELETE_FIRST, //!< the status of the first inserted forced line is reset to that of a normal edge (so that the second inserted forced line remain and the first not) - INSERT_VERTICE + SnappingTypeVertex, //!< the second inserted forced line is snapped to the closest vertice of the first inserted forced line. + DeleteFirst, //!< the status of the first inserted forced line is reset to that of a normal edge (so that the second inserted forced line remain and the first not) + InsertVertex }; virtual ~Triangulation(); @@ -91,8 +91,8 @@ class Triangulation /** Draws the points, edges and the forced lines*/ //virtual void draw(QPainter* p, double xlowleft, double ylowleft, double xupright, double yupright, double width, double height) const=0; - /** Sets the behaviour of the triangulation in case of crossing forced lines*/ - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) = 0; + /** Sets the behavior of the triangulation in case of crossing forced lines*/ + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) = 0; /** Sets the color of the normal edges*/ virtual void setEdgeColor( int r, int g, int b ) = 0; /** Sets the color of the forced edges*/ diff --git a/python/core/composer/qgscomposermultiframe.sip b/python/core/composer/qgscomposermultiframe.sip index 93fcb0e71588..f60e0ec8b7dd 100644 --- a/python/core/composer/qgscomposermultiframe.sip +++ b/python/core/composer/qgscomposermultiframe.sip @@ -33,7 +33,7 @@ class QgsComposerMultiFrame: QgsComposerObject public: - /** Specifies the behaviour for creating new frames to fit the multiframe's content + /** Specifies the behavior for creating new frames to fit the multiframe's content */ enum ResizeMode { diff --git a/python/core/composer/qgscomposertablev2.sip b/python/core/composer/qgscomposertablev2.sip index a8ade577d3d8..da14119766d7 100644 --- a/python/core/composer/qgscomposertablev2.sip +++ b/python/core/composer/qgscomposertablev2.sip @@ -95,7 +95,7 @@ class QgsComposerTableV2: QgsComposerMultiFrame /** Controls how long strings in the table are handled */ - enum WrapBehaviour + enum WrapBehavior { TruncateText = 0, /*!< text which doesn't fit inside the cell is truncated */ WrapText /*!< text which doesn't fit inside the cell is wrapped. Note that this only applies to text in columns with a fixed width. */ @@ -133,34 +133,34 @@ class QgsComposerTableV2: QgsComposerMultiFrame */ double cellMargin() const; - /** Sets the behaviour for empty tables with no content rows. - * @param mode behaviour mode for empty tables - * @see emptyTableBehaviour + /** Sets the behavior for empty tables with no content rows. + * @param mode behavior mode for empty tables + * @see emptyTableBehavior */ - void setEmptyTableBehaviour( const EmptyTableMode mode ); + void setEmptyTableBehavior( const EmptyTableMode mode ); - /** Returns the behaviour mode for empty tables. This property controls + /** Returns the behavior mode for empty tables. This property controls * how the table is drawn if it contains no content rows. - * @returns behaviour mode for empty tables - * @see setEmptyTableBehaviour + * @returns behavior mode for empty tables + * @see setEmptyTableBehavior */ - EmptyTableMode emptyTableBehaviour() const; + EmptyTableMode emptyTableBehavior() const; /** Sets the message for empty tables with no content rows. This message - * is displayed in the table body if the empty table behaviour is + * is displayed in the table body if the empty table behavior is * set to ShowMessage * @param message message to show for empty tables * @see emptyTableMessage - * @see setEmptyTableBehaviour + * @see setEmptyTableBehavior */ void setEmptyTableMessage( const QString& message ); /** Returns the message for empty tables with no content rows. This message - * is displayed in the table body if the empty table behaviour is + * is displayed in the table body if the empty table behavior is * set to ShowMessage * @returns message to show for empty tables * @see setEmptyTableMessage - * @see emptyTableBehaviour + * @see emptyTableBehavior */ QString emptyTableMessage() const; @@ -364,21 +364,21 @@ class QgsComposerTableV2: QgsComposerMultiFrame */ QColor backgroundColor() const; - /** Sets the wrap behaviour for the table, which controls how text within cells is + /** Sets the wrap behavior for the table, which controls how text within cells is * automatically wrapped. - * @param behaviour wrap behaviour - * @see wrapBehaviour + * @param behavior wrap behavior + * @see wrapBehavior * @note added in QGIS 2.12 */ - void setWrapBehaviour( WrapBehaviour behaviour ); + void setWrapBehavior( WrapBehavior behavior ); - /** Returns the wrap behaviour for the table, which controls how text within cells is + /** Returns the wrap behavior for the table, which controls how text within cells is * automatically wrapped. - * @returns current wrap behaviour - * @see setWrapBehaviour + * @returns current wrap behavior + * @see setWrapBehavior * @note added in QGIS 2.12 */ - WrapBehaviour wrapBehaviour() const; + WrapBehavior wrapBehavior() const; /** Returns a pointer to the list of QgsComposerTableColumns shown in the table * @returns pointer to list of columns in table diff --git a/python/core/effects/qgspainteffect.sip b/python/core/effects/qgspainteffect.sip index abaa64f7a5dc..008273821ea4 100644 --- a/python/core/effects/qgspainteffect.sip +++ b/python/core/effects/qgspainteffect.sip @@ -109,7 +109,7 @@ class QgsPaintEffect virtual void readProperties( const QgsStringMap& props ) = 0; /** Saves the current state of the effect to a DOM element. The default - * behaviour is to save the properties string map returned by + * behavior is to save the properties string map returned by * @link properties @endlink. * @param doc destination DOM document * @param element destination DOM element diff --git a/python/core/qgscolorscheme.sip b/python/core/qgscolorscheme.sip index f00f6b67deca..10fb470a57eb 100644 --- a/python/core/qgscolorscheme.sip +++ b/python/core/qgscolorscheme.sip @@ -33,7 +33,7 @@ class QgsColorScheme public: - /** Flags for controlling behaviour of color scheme + /** Flags for controlling behavior of color scheme */ enum SchemeFlag { diff --git a/python/core/qgscoordinatereferencesystem.sip b/python/core/qgscoordinatereferencesystem.sip index e8d551ab32de..77a9dbf89a01 100644 --- a/python/core/qgscoordinatereferencesystem.sip +++ b/python/core/qgscoordinatereferencesystem.sip @@ -346,7 +346,7 @@ class QgsCoordinateReferenceSystem bool isValid() const; /** Perform some validation on this CRS. If the CRS doesn't validate the - * default behaviour settings for layers with unknown CRS will be + * default behavior settings for layers with unknown CRS will be * consulted and acted on accordingly. By hell or high water this * method will do its best to make sure that this CRS is valid - even * if that involves resorting to a hard coded default of geocs:wgs84. diff --git a/python/core/qgspallabeling.sip b/python/core/qgspallabeling.sip index b764c25ab1dd..3635b1469fa4 100644 --- a/python/core/qgspallabeling.sip +++ b/python/core/qgspallabeling.sip @@ -150,7 +150,7 @@ class QgsPalLayerSettings BottomRight, //!< Label on bottom right of point }; - //! Behaviour modifier for label offset and distance, only applies in some + //! Behavior modifier for label offset and distance, only applies in some //! label placement modes. //TODO QGIS 3.0 - move to QgsLabelingEngine enum OffsetType diff --git a/python/core/qgstaskmanager.sip b/python/core/qgstaskmanager.sip index c77d92178ad1..71ff73d591bc 100644 --- a/python/core/qgstaskmanager.sip +++ b/python/core/qgstaskmanager.sip @@ -120,7 +120,7 @@ class QgsTask : QObject * Subtasks can have an optional list of dependent tasks, which must be completed * before the subtask can begin. By default subtasks are considered independent * of the parent task, ie they can be run either before, after, or at the same - * time as the parent task. This behaviour can be overridden through the subTaskDependency + * time as the parent task. This behavior can be overridden through the subTaskDependency * argument. * * The parent task must be added to a QgsTaskManager for subtasks to be utilised. diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 14756c550ff7..0f0ce14e5eda 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -334,8 +334,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator InvalidLayer, /**< Edit failed due to invalid layer */ }; - //! Selection behaviour - enum SelectBehaviour + //! Selection behavior + enum SelectBehavior { SetSelection, /**< Set selection, removing any existing selection */ AddToSelection, /**< Add selection to current selection */ @@ -506,34 +506,34 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator /** * Select features found within the search rectangle (in layer's coordinates) * @param rect search rectangle - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @see invertSelectionInRectangle(QgsRectangle & rect) * @see selectByExpression() * @see selectByIds() */ - void selectByRect( QgsRectangle & rect, SelectBehaviour behaviour = SetSelection ); + void selectByRect( QgsRectangle & rect, SelectBehavior behavior = SetSelection ); /** Select matching features using an expression. * @param expression expression to evaluate to select features - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @note added in QGIS 2.16 * @see selectByRect() * @see selectByIds() */ - void selectByExpression( const QString& expression, SelectBehaviour behaviour = SetSelection ); + void selectByExpression( const QString& expression, SelectBehavior behavior = SetSelection ); /** Select matching features using a list of feature IDs. Will emit the * selectionChanged() signal with the clearAndSelect flag set. * @param ids feature IDs to select - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @note added in QGIS 2.16 * @see selectByRect() * @see selectByExpression() */ - void selectByIds( const QgsFeatureIds &ids, SelectBehaviour behaviour = SetSelection ); + void selectByIds( const QgsFeatureIds &ids, SelectBehavior behavior = SetSelection ); /** * Modifies the current selection on this layer diff --git a/python/core/symbology-ng/qgsrenderer.sip b/python/core/symbology-ng/qgsrenderer.sip index b09f7e954272..94ad10dab75d 100644 --- a/python/core/symbology-ng/qgsrenderer.sip +++ b/python/core/symbology-ng/qgsrenderer.sip @@ -322,7 +322,7 @@ class QgsFeatureRenderer void setOrderByEnabled( bool enabled ); /** Sets an embedded renderer (subrenderer) for this feature renderer. The base class implementation - * does nothing with subrenderers, but individual derived classes can use these to modify their behaviour. + * does nothing with subrenderers, but individual derived classes can use these to modify their behavior. * @param subRenderer the embedded renderer. Ownership will be transferred. * @see embeddedRenderer() * @note added in QGIS 2.16 diff --git a/python/core/symbology-ng/qgssymbol.sip b/python/core/symbology-ng/qgssymbol.sip index 65459519976c..b9852c6746ec 100644 --- a/python/core/symbology-ng/qgssymbol.sip +++ b/python/core/symbology-ng/qgssymbol.sip @@ -39,7 +39,7 @@ class QgsSymbol ScaleDiameter //!< Calculate scale by the diameter }; - //! Flags controlling behaviour of symbols during rendering + //! Flags controlling behavior of symbols during rendering enum RenderHint { DynamicRotation, //!< Rotation of symbol may be changed during rendering and symbol should not be cached @@ -308,7 +308,7 @@ class QgsSymbolRenderContext * @param u * @param alpha * @param selected set to true if symbol should be drawn in a "selected" state - * @param renderHints flags controlling rendering behaviour + * @param renderHints flags controlling rendering behavior * @param f * @param fields * @param mapUnitScale diff --git a/python/gui/editorwidgets/qgsdoublespinbox.sip b/python/gui/editorwidgets/qgsdoublespinbox.sip index 1666a02ef712..5597d3140116 100644 --- a/python/gui/editorwidgets/qgsdoublespinbox.sip +++ b/python/gui/editorwidgets/qgsdoublespinbox.sip @@ -12,7 +12,7 @@ class QgsDoubleSpinBox : QDoubleSpinBox public: - //! Behaviour when widget is cleared. + //! Behavior when widget is cleared. enum ClearValueMode { MinimumValue, //!< Reset value to minimum() diff --git a/python/gui/editorwidgets/qgsspinbox.sip b/python/gui/editorwidgets/qgsspinbox.sip index d5606414d98c..3cf1fdcf1dfb 100644 --- a/python/gui/editorwidgets/qgsspinbox.sip +++ b/python/gui/editorwidgets/qgsspinbox.sip @@ -12,7 +12,7 @@ class QgsSpinBox : QSpinBox public: - //! Behaviour when widget is cleared. + //! Behavior when widget is cleared. enum ClearValueMode { MinimumValue, //!< Reset value to minimum() diff --git a/python/gui/qgsannotationitem.sip b/python/gui/qgsannotationitem.sip index b17f8a75810a..251c9fbea014 100644 --- a/python/gui/qgsannotationitem.sip +++ b/python/gui/qgsannotationitem.sip @@ -53,7 +53,7 @@ class QgsAnnotationItem: QgsMapCanvasItem, QgsAnnotation virtual QSizeF minimumFrameSize() const; - /** Returns the mouse move behaviour for a given position + /** Returns the mouse move behavior for a given position @param pos the position in scene coordinates*/ QgsAnnotationItem::MouseMoveAction moveActionForPosition( QPointF pos ) const; /** Returns suitable cursor shape for mouse move action*/ diff --git a/python/gui/qgsattributeformeditorwidget.sip b/python/gui/qgsattributeformeditorwidget.sip index cc85331551ee..06ab8efc8f4d 100644 --- a/python/gui/qgsattributeformeditorwidget.sip +++ b/python/gui/qgsattributeformeditorwidget.sip @@ -1,6 +1,6 @@ /** \ingroup gui * \class QgsAttributeFormEditorWidget - * A widget consisting of both an editor widget and additional widgets for controlling the behaviour + * A widget consisting of both an editor widget and additional widgets for controlling the behavior * of the editor widget depending on a number of possible modes. For instance, if the parent attribute * form is in the multi edit mode, this widget will show both the editor widget and a tool button for * controlling the multi edit results. diff --git a/python/gui/qgscolorbutton.sip b/python/gui/qgscolorbutton.sip index 475b4c70ff07..c0c56778fdf9 100644 --- a/python/gui/qgscolorbutton.sip +++ b/python/gui/qgscolorbutton.sip @@ -15,9 +15,9 @@ class QgsColorButton : QToolButton public: - /** Specifies the behaviour when the button is clicked + /** Specifies the behavior when the button is clicked */ - enum Behaviour + enum Behavior { ShowDialog, /*!< show a color picker dialog when clicked */ SignalOnly /*!< emit colorClicked signal only, no dialog */ @@ -80,7 +80,7 @@ class QgsColorButton : QToolButton */ void setAcceptLiveUpdates( const bool accept ); - /** Sets whether the drop down menu should be shown for the button. The default behaviour is to + /** Sets whether the drop down menu should be shown for the button. The default behavior is to * show the menu. * @param showMenu set to false to hide the drop down menu * @see showMenu @@ -93,18 +93,18 @@ class QgsColorButton : QToolButton */ bool showMenu() const; - /** Sets the behaviour for when the button is clicked. The default behaviour is to show + /** Sets the behavior for when the button is clicked. The default behavior is to show * a color picker dialog. - * @param behaviour behaviour when button is clicked - * @see behaviour + * @param behavior behavior when button is clicked + * @see behavior */ - void setBehaviour( const Behaviour behaviour ); + void setBehavior( const Behavior behavior ); - /** Returns the behaviour for when the button is clicked. - * @returns behaviour when button is clicked - * @see setBehaviour + /** Returns the behavior for when the button is clicked. + * @returns behavior when button is clicked + * @see setBehavior */ - Behaviour behaviour() const; + Behavior behavior() const; /** Sets the default color for the button, which is shown in the button's drop down menu for the * "default color" option. @@ -274,10 +274,10 @@ class QgsColorButton : QToolButton */ void colorChanged( const QColor &color ); - /** Emitted when the button is clicked, if the button's behaviour is set to SignalOnly + /** Emitted when the button is clicked, if the button's behavior is set to SignalOnly * @param color button color - * @see setBehaviour - * @see behaviour + * @see setBehavior + * @see behavior */ void colorClicked( const QColor &color ); diff --git a/python/gui/qgscolorrampbutton.sip b/python/gui/qgscolorrampbutton.sip index 7c20277fc023..5fa54d1a1291 100644 --- a/python/gui/qgscolorrampbutton.sip +++ b/python/gui/qgscolorrampbutton.sip @@ -55,7 +55,7 @@ class QgsColorRampButton : QToolButton */ void setAcceptLiveUpdates( const bool accept ); - /** Sets whether the drop down menu should be shown for the button. The default behaviour is to + /** Sets whether the drop down menu should be shown for the button. The default behavior is to * show the menu. * @param showMenu set to false to hide the drop down menu * @see showMenu diff --git a/python/gui/qgsfilterlineedit.sip b/python/gui/qgsfilterlineedit.sip index 9304e639bd2b..57f9dad21d2e 100644 --- a/python/gui/qgsfilterlineedit.sip +++ b/python/gui/qgsfilterlineedit.sip @@ -14,7 +14,7 @@ class QgsFilterLineEdit : QLineEdit %End public: - //! Behaviour when clearing value of widget + //! Behavior when clearing value of widget enum ClearMode { ClearToNull, //!< Reset value to null @@ -40,14 +40,14 @@ class QgsFilterLineEdit : QLineEdit */ void setShowClearButton( bool visible ); - /** Returns the clear mode for the widget. The clear mode defines the behaviour of the + /** Returns the clear mode for the widget. The clear mode defines the behavior of the * widget when its value is cleared. This defaults to ClearToNull. * @see setClearMode() * @note added in QGIS 3.0 */ ClearMode clearMode() const; - /** Sets the clear mode for the widget. The clear mode defines the behaviour of the + /** Sets the clear mode for the widget. The clear mode defines the behavior of the * widget when its value is cleared. This defaults to ClearToNull. * @see clearMode() * @note added in QGIS 3.0 diff --git a/python/gui/qgsgenericprojectionselector.sip b/python/gui/qgsgenericprojectionselector.sip index 95c141567607..7cfd2312b1f6 100644 --- a/python/gui/qgsgenericprojectionselector.sip +++ b/python/gui/qgsgenericprojectionselector.sip @@ -58,7 +58,7 @@ class QgsGenericProjectionSelector : QDialog //, private Ui::QgsGenericProjectio * list of projections by. This is useful in (e.g.) WMS situations * where you just want to offer what the WMS server can support. * - * \warning This function's behaviour is undefined if it is called after the dialog is shown. + * \warning This function's behavior is undefined if it is called after the dialog is shown. */ void setOgcWmsCrsFilter( const QSet& crsFilter ); }; diff --git a/python/gui/qgsprojectionselector.sip b/python/gui/qgsprojectionselector.sip index 451f995b420e..c5cc7157f887 100644 --- a/python/gui/qgsprojectionselector.sip +++ b/python/gui/qgsprojectionselector.sip @@ -78,7 +78,7 @@ class QgsProjectionSelector : QWidget * list of projections by. This is useful in (e.g.) WMS situations * where you just want to offer what the WMS server can support. * - * \warning This function's behaviour is undefined if it is called after the widget is shown. + * \warning This function's behavior is undefined if it is called after the widget is shown. */ void setOgcWmsCrsFilter( const QSet& crsFilter ); void on_lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev ); diff --git a/python/plugins/db_manager/db_plugins/gpkg/connector.py b/python/plugins/db_manager/db_plugins/gpkg/connector.py index a08eefcebc57..b27f5a617a38 100644 --- a/python/plugins/db_manager/db_plugins/gpkg/connector.py +++ b/python/plugins/db_manager/db_plugins/gpkg/connector.py @@ -408,7 +408,7 @@ def getTableIndexes(self, table): for i, idx in enumerate(indexes): # sqlite has changed the number of columns returned by index_list since 3.8.9 - # I am not using self.getInfo() here because this behaviour + # I am not using self.getInfo() here because this behavior # can be changed back without notice as done for index_info, see: # http://repo.or.cz/sqlite.git/commit/53555d6da78e52a430b1884b5971fef33e9ccca4 if len(idx) == 3: diff --git a/python/plugins/db_manager/db_plugins/spatialite/connector.py b/python/plugins/db_manager/db_plugins/spatialite/connector.py index 7ab9820963e5..6a88e05b519b 100644 --- a/python/plugins/db_manager/db_plugins/spatialite/connector.py +++ b/python/plugins/db_manager/db_plugins/spatialite/connector.py @@ -339,7 +339,7 @@ def getTableIndexes(self, table): for i, idx in enumerate(indexes): # sqlite has changed the number of columns returned by index_list since 3.8.9 - # I am not using self.getInfo() here because this behaviour + # I am not using self.getInfo() here because this behavior # can be changed back without notice as done for index_info, see: # http://repo.or.cz/sqlite.git/commit/53555d6da78e52a430b1884b5971fef33e9ccca4 if len(idx) == 3: diff --git a/python/plugins/processing/algs/qgis/SelectByExpression.py b/python/plugins/processing/algs/qgis/SelectByExpression.py index 355b0b210544..26946b81f6ec 100644 --- a/python/plugins/processing/algs/qgis/SelectByExpression.py +++ b/python/plugins/processing/algs/qgis/SelectByExpression.py @@ -65,18 +65,18 @@ def processAlgorithm(self, feedback): method = self.getParameterValue(self.METHOD) if method == 0: - behaviour = QgsVectorLayer.SetSelection + behavior = QgsVectorLayer.SetSelection elif method == 1: - behaviour = QgsVectorLayer.AddToSelection + behavior = QgsVectorLayer.AddToSelection elif method == 2: behavior = QgsVectorLayer.RemoveFromSelection elif method == 3: - behaviour = QgsVectorLayer.IntersectSelection + behavior = QgsVectorLayer.IntersectSelection expression = self.getParameterValue(self.EXPRESSION) qExp = QgsExpression(expression) if qExp.hasParserError(): raise GeoAlgorithmExecutionException(qExp.parserErrorString()) - layer.selectByExpression(expression, behaviour) + layer.selectByExpression(expression, behavior) self.setOutputValue(self.RESULT, filename) diff --git a/python/plugins/processing/algs/qgis/SnapGeometries.py b/python/plugins/processing/algs/qgis/SnapGeometries.py index c42fff971af8..6c32c917e883 100644 --- a/python/plugins/processing/algs/qgis/SnapGeometries.py +++ b/python/plugins/processing/algs/qgis/SnapGeometries.py @@ -41,7 +41,7 @@ class SnapGeometriesToLayer(GeoAlgorithm): REFERENCE_LAYER = 'REFERENCE_LAYER' TOLERANCE = 'TOLERANCE' OUTPUT = 'OUTPUT' - BEHAVIOUR = 'BEHAVIOUR' + BEHAVIOR = 'BEHAVIOR' def defineCharacteristics(self): self.name, self.i18n_name = self.trAlgorithm('Snap geometries to layer') @@ -54,8 +54,8 @@ def defineCharacteristics(self): self.modes = [self.tr('Prefer aligning nodes'), self.tr('Prefer closest point')] self.addParameter(ParameterSelection( - self.BEHAVIOUR, - self.tr('Behaviour'), + self.BEHAVIOR, + self.tr('Behavior'), self.modes, default=0)) self.addOutput(OutputVector(self.OUTPUT, self.tr('Snapped geometries'))) @@ -63,7 +63,7 @@ def processAlgorithm(self, feedback): layer = dataobjects.getObjectFromUri(self.getParameterValue(self.INPUT)) reference_layer = dataobjects.getObjectFromUri(self.getParameterValue(self.REFERENCE_LAYER)) tolerance = self.getParameterValue(self.TOLERANCE) - mode = self.getParameterValue(self.BEHAVIOUR) + mode = self.getParameterValue(self.BEHAVIOR) writer = self.getOutputFromName(self.OUTPUT).getVectorWriter( layer.fields(), layer.wkbType(), layer.crs()) diff --git a/python/plugins/processing/core/GeoAlgorithm.py b/python/plugins/processing/core/GeoAlgorithm.py index 7cd795621e53..bed9c85b4409 100644 --- a/python/plugins/processing/core/GeoAlgorithm.py +++ b/python/plugins/processing/core/GeoAlgorithm.py @@ -82,7 +82,7 @@ def __init__(self): # If the algorithm is run as part of a model, the parent model # can be set in this variable, to allow for customized - # behaviour, in case some operations should be run differently + # behavior, in case some operations should be run differently # when running as part of a model self.model = None diff --git a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml index 666ac39ae9b9..838bd5574d9a 100644 --- a/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml +++ b/python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml @@ -1477,7 +1477,7 @@ tests: - algorithm: qgis:snapgeometriestolayer name: Snap points to lines (prefer nodes) params: - BEHAVIOUR: '0' + BEHAVIOR: '0' INPUT: name: snap_points.gml type: vector @@ -1493,7 +1493,7 @@ tests: - algorithm: qgis:snapgeometriestolayer name: Snap points to lines (prefer closest) params: - BEHAVIOUR: '1' + BEHAVIOR: '1' INPUT: name: snap_points.gml type: vector diff --git a/python/plugins/processing/tools/dataobjects.py b/python/plugins/processing/tools/dataobjects.py index 061dff6dc84c..06b079cfc33f 100644 --- a/python/plugins/processing/tools/dataobjects.py +++ b/python/plugins/processing/tools/dataobjects.py @@ -190,8 +190,8 @@ def load(fileName, name=None, crs=None, style=None): prjSetting = None settings = QSettings() if crs is not None: - prjSetting = settings.value('/Projections/defaultBehaviour') - settings.setValue('/Projections/defaultBehaviour', '') + prjSetting = settings.value('/Projections/defaultBehavior') + settings.setValue('/Projections/defaultBehavior', '') if name is None: name = os.path.split(fileName)[1] qgslayer = QgsVectorLayer(fileName, name, 'ogr') @@ -218,11 +218,11 @@ def load(fileName, name=None, crs=None, style=None): QgsProject.instance().addMapLayers([qgslayer]) else: if prjSetting: - settings.setValue('/Projections/defaultBehaviour', prjSetting) + settings.setValue('/Projections/defaultBehavior', prjSetting) raise RuntimeError('Could not load layer: ' + str(fileName) + '\nCheck the processing framework log to look for errors') if prjSetting: - settings.setValue('/Projections/defaultBehaviour', prjSetting) + settings.setValue('/Projections/defaultBehavior', prjSetting) return qgslayer @@ -273,8 +273,8 @@ def getObjectFromUri(uri, forceLoad=True): return table if forceLoad and os.path.exists(uri): settings = QSettings() - prjSetting = settings.value('/Projections/defaultBehaviour') - settings.setValue('/Projections/defaultBehaviour', '') + prjSetting = settings.value('/Projections/defaultBehavior') + settings.setValue('/Projections/defaultBehavior', '') # If is not opened, we open it name = os.path.basename(uri) @@ -282,17 +282,17 @@ def getObjectFromUri(uri, forceLoad=True): layer = QgsVectorLayer(uri, name, provider) if layer.isValid(): if prjSetting: - settings.setValue('/Projections/defaultBehaviour', prjSetting) + settings.setValue('/Projections/defaultBehavior', prjSetting) _loadedLayers[normalizeLayerSource(layer.source())] = layer return layer layer = QgsRasterLayer(uri, name) if layer.isValid(): if prjSetting: - settings.setValue('/Projections/defaultBehaviour', prjSetting) + settings.setValue('/Projections/defaultBehavior', prjSetting) _loadedLayers[normalizeLayerSource(layer.source())] = layer return layer if prjSetting: - settings.setValue('/Projections/defaultBehaviour', prjSetting) + settings.setValue('/Projections/defaultBehavior', prjSetting) else: return None diff --git a/python/plugins/processing/tools/vector.py b/python/plugins/processing/tools/vector.py index 38735aebd1c2..ff9e3b9a3c1d 100644 --- a/python/plugins/processing/tools/vector.py +++ b/python/plugins/processing/tools/vector.py @@ -91,7 +91,7 @@ def features(layer, request=QgsFeatureRequest()): or all of them. This should be used by algorithms instead of calling the Qgis API - directly, to ensure a consistent behaviour across algorithms. + directly, to ensure a consistent behavior across algorithms. """ class Features(object): diff --git a/python/server/qgsserver.sip b/python/server/qgsserver.sip index cc168aacd6d6..a54b8e2faa61 100644 --- a/python/server/qgsserver.sip +++ b/python/server/qgsserver.sip @@ -146,7 +146,7 @@ sipReleaseType(qba2, sipType_QByteArray, state); // The instance should be regarded as temporary (and be destroyed as // soon as it has been used) unless it has been transferred from // Python. sipGetState() is a convenience function that implements -// this common transfer behaviour. +// this common transfer behavior. return sipGetState(sipTransferObj); %End diff --git a/resources/context_help/QgsPgNewConnection b/resources/context_help/QgsPgNewConnection index e744d548f74d..d77c01ca7cf7 100644 --- a/resources/context_help/QgsPgNewConnection +++ b/resources/context_help/QgsPgNewConnection @@ -27,6 +27,6 @@ This dialog allows you to define the settings for a connection to a PostgreSQL/P

  • Indicates that tables without geometry should also be listed by default. -
  • When initializing layers, various queries may be needed to establish the characteristics of the geometries stored in the database table. When this option is checked, these queries examine only a sample of the rows and use the table statistics, rather than the entire table. This can drastically speed up operations on large datasets, but may result in incorrect characterization of layers (e.g., the feature count of filtered layers will not be accurately determined) and may even cause strange behaviour in case columns that are supposed to be unique actually are not. +
  • When initializing layers, various queries may be needed to establish the characteristics of the geometries stored in the database table. When this option is checked, these queries examine only a sample of the rows and use the table statistics, rather than the entire table. This can drastically speed up operations on large datasets, but may result in incorrect characterization of layers (eg. the feature count of filtered layers will not be accurately determined) and may even cause strange behavior in case columns that are supposed to be unique actually are not. diff --git a/scripts/spelling.dat b/scripts/spelling.dat index da5cdda8f865..9df2ba2c556a 100644 --- a/scripts/spelling.dat +++ b/scripts/spelling.dat @@ -88,6 +88,7 @@ batery:battery becomming:becoming becuase:because begining:beginning +behaviour:behavior calender:calendar cancelation:cancellation capabilites:capabilities @@ -205,6 +206,7 @@ forse:force fortan:fortran forwardig:forwarding framwork:framework +frist:first fuction:function fuctions:functions functionaly:functionally diff --git a/src/analysis/interpolation/DualEdgeTriangulation.cc b/src/analysis/interpolation/DualEdgeTriangulation.cc index 53e8700dfde4..e3274acac575 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.cc +++ b/src/analysis/interpolation/DualEdgeTriangulation.cc @@ -1268,7 +1268,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) } else if ( MathUtils::lineIntersection( mPointVector[p1], mPointVector[p2], mPointVector[mHalfEdge[mHalfEdge[actedge]->getNext()]->getPoint()], mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[actedge]->getNext()]->getDual()]->getPoint()] ) ) { - if ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::SnappingType_VERTICE )//if the crossed edge is a forced edge, we have to snap the forced line to the next node + if ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge, we have to snap the forced line to the next node { Point3D crosspoint; int p3, p4; @@ -1290,7 +1290,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) return e; } } - else if ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::INSERT_VERTICE )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge + else if ( mHalfEdge[mHalfEdge[actedge]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge { Point3D crosspoint; int p3, p4; @@ -1356,7 +1356,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) { if ( MathUtils::lineIntersection( mPointVector[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getPoint()], mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getPoint()], mPointVector[p1], mPointVector[p2] ) ) { - if ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::SnappingType_VERTICE )//if the crossed edge is a forced edge and mForcedCrossBehaviour is SnappingType_VERTICE, we have to snap the forced line to the next node + if ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge and mForcedCrossBehavior is SnappingType_VERTICE, we have to snap the forced line to the next node { Point3D crosspoint; int p3, p4; @@ -1378,7 +1378,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) return e; } } - else if ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::INSERT_VERTICE )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge + else if ( mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge { Point3D crosspoint; int p3, p4; @@ -1403,7 +1403,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) } else if ( MathUtils::lineIntersection( mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getPoint()], mPointVector[mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getPoint()], mPointVector[p1], mPointVector[p2] ) ) { - if ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::SnappingType_VERTICE )//if the crossed edge is a forced edge and mForcedCrossBehaviour is SnappingType_VERTICE, we have to snap the forced line to the next node + if ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::SnappingTypeVertex )//if the crossed edge is a forced edge and mForcedCrossBehavior is SnappingType_VERTICE, we have to snap the forced line to the next node { Point3D crosspoint; int p3, p4; @@ -1425,7 +1425,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) return e; } } - else if ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehaviour == Triangulation::INSERT_VERTICE )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge + else if ( mHalfEdge[mHalfEdge[mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext()]->getNext()]->getForced() && mForcedCrossBehavior == Triangulation::InsertVertex )//if the crossed edge is a forced edge, we have to insert a new vertice on this edge { Point3D crosspoint; int p3, p4; @@ -1568,9 +1568,9 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) return leftPolygon.first(); } -void DualEdgeTriangulation::setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) +void DualEdgeTriangulation::setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) { - mForcedCrossBehaviour = b; + mForcedCrossBehavior = b; } void DualEdgeTriangulation::setEdgeColor( int r, int g, int b ) diff --git a/src/analysis/interpolation/DualEdgeTriangulation.h b/src/analysis/interpolation/DualEdgeTriangulation.h index 289fda8ed453..c5f5466510a9 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.h +++ b/src/analysis/interpolation/DualEdgeTriangulation.h @@ -75,8 +75,8 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation virtual double getYMin() const override { return yMin; } //! Returns the number of points virtual int getNumberOfPoints() const override; - //! Sets the behaviour of the triangulation in case of crossing forced lines - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) override; + //! Sets the behavior of the triangulation in case of crossing forced lines + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) override; //! Sets the color of the normal edges virtual void setEdgeColor( int r, int g, int b ) override; //! Sets the color of the forced edges @@ -123,8 +123,8 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation QVector mHalfEdge; //! Association to an interpolator object TriangleInterpolator* mTriangleInterpolator; - //! Member to store the behaviour in case of crossing forced segments - Triangulation::forcedCrossBehaviour mForcedCrossBehaviour; + //! Member to store the behavior in case of crossing forced segments + Triangulation::ForcedCrossBehavior mForcedCrossBehavior; //! Color to paint the normal edges QColor mEdgeColor; //! Color to paint the forced edges @@ -183,7 +183,7 @@ inline DualEdgeTriangulation::DualEdgeTriangulation() , yMax( 0 ) , yMin( 0 ) , mTriangleInterpolator( nullptr ) - , mForcedCrossBehaviour( Triangulation::DELETE_FIRST ) + , mForcedCrossBehavior( Triangulation::DeleteFirst ) , mEdgeColor( 0, 255, 0 ) , mForcedEdgeColor( 0, 0, 255 ) , mBreakEdgeColor( 100, 100, 0 ) @@ -204,7 +204,7 @@ inline DualEdgeTriangulation::DualEdgeTriangulation( int nop, Triangulation* dec , yMax( 0 ) , yMin( 0 ) , mTriangleInterpolator( nullptr ) - , mForcedCrossBehaviour( Triangulation::DELETE_FIRST ) + , mForcedCrossBehavior( Triangulation::DeleteFirst ) , mEdgeColor( 0, 255, 0 ) , mForcedEdgeColor( 0, 0, 255 ) , mBreakEdgeColor( 100, 100, 0 ) diff --git a/src/analysis/interpolation/TriDecorator.cc b/src/analysis/interpolation/TriDecorator.cc index a51ba661d1ee..02f530e59ad1 100644 --- a/src/analysis/interpolation/TriDecorator.cc +++ b/src/analysis/interpolation/TriDecorator.cc @@ -221,11 +221,11 @@ double TriDecorator::getYMin() const } } -void TriDecorator::setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) +void TriDecorator::setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) { if ( mTIN ) { - mTIN->setForcedCrossBehaviour( b ); + mTIN->setForcedCrossBehavior( b ); } else { diff --git a/src/analysis/interpolation/TriDecorator.h b/src/analysis/interpolation/TriDecorator.h index c2d7876c73d3..ceecb81da9f6 100644 --- a/src/analysis/interpolation/TriDecorator.h +++ b/src/analysis/interpolation/TriDecorator.h @@ -46,7 +46,7 @@ class ANALYSIS_EXPORT TriDecorator : public Triangulation virtual double getXMin() const override; virtual double getYMax() const override; virtual double getYMin() const override; - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) override; + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) override; virtual void setEdgeColor( int r, int g, int b ) override; virtual void setForcedEdgeColor( int r, int g, int b ) override; virtual void setBreakEdgeColor( int r, int g, int b ) override; diff --git a/src/analysis/interpolation/Triangulation.h b/src/analysis/interpolation/Triangulation.h index 33d0aa29e2b5..0962a219e70f 100644 --- a/src/analysis/interpolation/Triangulation.h +++ b/src/analysis/interpolation/Triangulation.h @@ -29,12 +29,12 @@ class Line3D; class ANALYSIS_EXPORT Triangulation { public: - //! Enumeration describing the behaviour, if two forced lines cross. - enum forcedCrossBehaviour + //! Enumeration describing the behavior, if two forced lines cross. + enum ForcedCrossBehavior { - SnappingType_VERTICE, //!< The second inserted forced line is snapped to the closest vertice of the first inserted forced line. - DELETE_FIRST, //!< The status of the first inserted forced line is reset to that of a normal edge (so that the second inserted forced line remain and the first not) - INSERT_VERTICE + SnappingTypeVertex, //!< The second inserted forced line is snapped to the closest vertice of the first inserted forced line. + DeleteFirst, //!< The status of the first inserted forced line is reset to that of a normal edge (so that the second inserted forced line remain and the first not) + InsertVertex }; virtual ~Triangulation(); @@ -113,8 +113,8 @@ class ANALYSIS_EXPORT Triangulation //! Draws the points, edges and the forced lines //virtual void draw(QPainter* p, double xlowleft, double ylowleft, double xupright, double yupright, double width, double height) const=0; - //! Sets the behaviour of the triangulation in case of crossing forced lines - virtual void setForcedCrossBehaviour( Triangulation::forcedCrossBehaviour b ) = 0; + //! Sets the behavior of the triangulation in case of crossing forced lines + virtual void setForcedCrossBehavior( Triangulation::ForcedCrossBehavior b ) = 0; //! Sets the color of the normal edges virtual void setEdgeColor( int r, int g, int b ) = 0; diff --git a/src/app/composer/qgscomposerattributetablewidget.cpp b/src/app/composer/qgscomposerattributetablewidget.cpp index 8f37fdab4e9a..abe6c6edf358 100644 --- a/src/app/composer/qgscomposerattributetablewidget.cpp +++ b/src/app/composer/qgscomposerattributetablewidget.cpp @@ -50,8 +50,8 @@ QgsComposerAttributeTableWidget::QgsComposerAttributeTableWidget( QgsComposerAtt mEmptyModeComboBox->addItem( tr( "Hide entire table" ), QgsComposerTableV2::HideTable ); mEmptyModeComboBox->addItem( tr( "Show set message" ), QgsComposerTableV2::ShowMessage ); - mWrapBehaviourComboBox->addItem( tr( "Truncate text" ), QgsComposerTableV2::TruncateText ); - mWrapBehaviourComboBox->addItem( tr( "Wrap text" ), QgsComposerTableV2::WrapText ); + mWrapBehaviorComboBox->addItem( tr( "Truncate text" ), QgsComposerTableV2::TruncateText ); + mWrapBehaviorComboBox->addItem( tr( "Wrap text" ), QgsComposerTableV2::WrapText ); bool atlasEnabled = atlasComposition() && atlasComposition()->enabled(); mSourceComboBox->addItem( tr( "Layer features" ), QgsComposerAttributeTableV2::LayerAttributes ); @@ -503,13 +503,13 @@ void QgsComposerAttributeTableWidget::updateGuiElements() mHeaderHAlignmentComboBox->setCurrentIndex(( int )mComposerTable->headerHAlignment() ); mHeaderModeComboBox->setCurrentIndex(( int )mComposerTable->headerMode() ); - mEmptyModeComboBox->setCurrentIndex( mEmptyModeComboBox->findData( mComposerTable->emptyTableBehaviour() ) ); + mEmptyModeComboBox->setCurrentIndex( mEmptyModeComboBox->findData( mComposerTable->emptyTableBehavior() ) ); mEmptyMessageLineEdit->setText( mComposerTable->emptyTableMessage() ); - mEmptyMessageLineEdit->setEnabled( mComposerTable->emptyTableBehaviour() == QgsComposerTableV2::ShowMessage ); - mEmptyMessageLabel->setEnabled( mComposerTable->emptyTableBehaviour() == QgsComposerTableV2::ShowMessage ); + mEmptyMessageLineEdit->setEnabled( mComposerTable->emptyTableBehavior() == QgsComposerTableV2::ShowMessage ); + mEmptyMessageLabel->setEnabled( mComposerTable->emptyTableBehavior() == QgsComposerTableV2::ShowMessage ); mDrawEmptyCheckBox->setChecked( mComposerTable->showEmptyRows() ); mWrapStringLineEdit->setText( mComposerTable->wrapString() ); - mWrapBehaviourComboBox->setCurrentIndex( mWrapBehaviourComboBox->findData( mComposerTable->wrapBehaviour() ) ); + mWrapBehaviorComboBox->setCurrentIndex( mWrapBehaviorComboBox->findData( mComposerTable->wrapBehavior() ) ); mResizeModeComboBox->setCurrentIndex( mResizeModeComboBox->findData( mComposerTable->resizeMode() ) ); mAddFramePushButton->setEnabled( mComposerTable->resizeMode() == QgsComposerMultiFrame::UseExistingFrames ); @@ -627,7 +627,7 @@ void QgsComposerAttributeTableWidget::blockAllSignals( bool b ) mHideEmptyBgCheckBox->blockSignals( b ); mDrawEmptyCheckBox->blockSignals( b ); mWrapStringLineEdit->blockSignals( b ); - mWrapBehaviourComboBox->blockSignals( b ); + mWrapBehaviorComboBox->blockSignals( b ); } void QgsComposerAttributeTableWidget::setMaximumNumberOfFeatures( int n ) @@ -986,15 +986,15 @@ void QgsComposerAttributeTableWidget::on_mEmptyModeComboBox_currentIndexChanged( QgsComposition* composition = mComposerTable->composition(); if ( composition ) { - composition->beginMultiFrameCommand( mComposerTable, tr( "Change empty table behaviour" ) ); - mComposerTable->setEmptyTableBehaviour(( QgsComposerTableV2::EmptyTableMode ) mEmptyModeComboBox->itemData( index ).toInt() ); + composition->beginMultiFrameCommand( mComposerTable, tr( "Change empty table behavior" ) ); + mComposerTable->setEmptyTableBehavior(( QgsComposerTableV2::EmptyTableMode ) mEmptyModeComboBox->itemData( index ).toInt() ); composition->endMultiFrameCommand(); - mEmptyMessageLineEdit->setEnabled( mComposerTable->emptyTableBehaviour() == QgsComposerTableV2::ShowMessage ); - mEmptyMessageLabel->setEnabled( mComposerTable->emptyTableBehaviour() == QgsComposerTableV2::ShowMessage ); + mEmptyMessageLineEdit->setEnabled( mComposerTable->emptyTableBehavior() == QgsComposerTableV2::ShowMessage ); + mEmptyMessageLabel->setEnabled( mComposerTable->emptyTableBehavior() == QgsComposerTableV2::ShowMessage ); } } -void QgsComposerAttributeTableWidget::on_mWrapBehaviourComboBox_currentIndexChanged( int index ) +void QgsComposerAttributeTableWidget::on_mWrapBehaviorComboBox_currentIndexChanged( int index ) { if ( !mComposerTable ) { @@ -1005,7 +1005,7 @@ void QgsComposerAttributeTableWidget::on_mWrapBehaviourComboBox_currentIndexChan if ( composition ) { composition->beginMultiFrameCommand( mComposerTable, tr( "Change table wrap mode" ) ); - mComposerTable->setWrapBehaviour(( QgsComposerTableV2::WrapBehaviour ) mWrapBehaviourComboBox->itemData( index ).toInt() ); + mComposerTable->setWrapBehavior(( QgsComposerTableV2::WrapBehavior ) mWrapBehaviorComboBox->itemData( index ).toInt() ); composition->endMultiFrameCommand(); } } diff --git a/src/app/composer/qgscomposerattributetablewidget.h b/src/app/composer/qgscomposerattributetablewidget.h index 104dbbf7e663..f337e3851a74 100644 --- a/src/app/composer/qgscomposerattributetablewidget.h +++ b/src/app/composer/qgscomposerattributetablewidget.h @@ -77,7 +77,7 @@ class QgsComposerAttributeTableWidget: public QgsComposerItemBaseWidget, private void on_mUniqueOnlyCheckBox_stateChanged( int state ); void on_mEmptyFrameCheckBox_toggled( bool checked ); void on_mHideEmptyBgCheckBox_toggled( bool checked ); - void on_mWrapBehaviourComboBox_currentIndexChanged( int index ); + void on_mWrapBehaviorComboBox_currentIndexChanged( int index ); void on_mAdvancedCustomisationButton_clicked(); //! Inserts a new maximum number of features into the spin box (without the spinbox emitting a signal) diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index 4525fd64bbec..8a6e6f2a8e8f 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -208,7 +208,7 @@ QgsGPSInformationWidget::QgsGPSInformationWidget( QgsMapCanvas * thepCanvas, QWi mRadAutodetect->setChecked( true ); #endif - //auto digitising behaviour + //auto digitising behavior mCbxAutoAddVertices->setChecked( mySettings.value( QStringLiteral( "/gps/autoAddVertices" ), "false" ).toBool() ); mCbxAutoCommit->setChecked( mySettings.value( QStringLiteral( "/gps/autoCommit" ), "false" ).toBool() ); @@ -688,7 +688,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in { mLastGpsPosition = myNewCenter; - // Pan based on user specified behaviour + // Pan based on user specified behavior if ( radRecenterMap->isChecked() || radRecenterWhenNeeded->isChecked() ) { QgsCoordinateReferenceSystem mypSRS = mpCanvas->mapSettings().destinationCrs(); diff --git a/src/app/main.cpp b/src/app/main.cpp index efb088e3e028..9b311a9317a8 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -159,13 +159,13 @@ void usage( const QString& appName ) ///////////////////////////////////////////////////////////////// -// Command line options 'behaviour' flag setup +// Command line options 'behavior' flag setup //////////////////////////////////////////////////////////////// // These two are global so that they can be set by the OpenDocuments // AppleEvent handler as well as by the main routine argv processing -// This behaviour will cause QGIS to autoload a project +// This behavior will cause QGIS to autoload a project static QString myProjectFileName = QLatin1String( "" ); // This is the 'leftover' arguments collection @@ -500,16 +500,16 @@ int main( int argc, char *argv[] ) qsrand( time( nullptr ) ); ///////////////////////////////////////////////////////////////// - // Command line options 'behaviour' flag setup + // Command line options 'behavior' flag setup //////////////////////////////////////////////////////////////// // // Parse the command line arguments, looking to see if the user has asked for any - // special behaviours. Any remaining non command arguments will be kept aside to + // special behaviors. Any remaining non command arguments will be kept aside to // be passed as a list of layers and / or a project that should be loaded. // - // This behaviour is used to load the app, snapshot the map, + // This behavior is used to load the app, snapshot the map, // save the image to disk and then exit QString mySnapshotFileName = QLatin1String( "" ); int mySnapshotWidth = 800; @@ -533,7 +533,7 @@ int main( int argc, char *argv[] ) QString dxfPreset; QgsRectangle dxfExtent; - // This behaviour will set initial extent of map canvas, but only if + // This behavior will set initial extent of map canvas, but only if // there are no command line arguments. This gives a usable map // extent when qgis starts with no layers loaded. When layers are // loaded, we let the layers define the initial extent. @@ -541,7 +541,7 @@ int main( int argc, char *argv[] ) if ( argc == 1 ) myInitialExtent = QStringLiteral( "-1,-1,1,1" ); - // This behaviour will allow you to force the use of a translation file + // This behavior will allow you to force the use of a translation file // which is useful for testing QString myTranslationCode; @@ -763,7 +763,7 @@ int main( int argc, char *argv[] ) ///////////////////////////////////////////////////////////////////// - // Now we have the handlers for the different behaviours... + // Now we have the handlers for the different behaviors... //////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 7121276b92c6..354a5ebb2a8b 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -503,7 +503,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) { static QString authid = QString::null; QSettings mySettings; - QString myDefaultProjectionOption = mySettings.value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString(); + QString myDefaultProjectionOption = mySettings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString(); if ( myDefaultProjectionOption == QLatin1String( "prompt" ) ) { // @note this class is not a descendent of QWidget so we can't pass @@ -544,7 +544,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) QgsDebugMsg( "Layer srs set from project: " + authid ); messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( authid, srs.description() ), QgsMessageBar::WARNING, messageTimeout() ); } - else ///Projections/defaultBehaviour==useGlobal + else ///Projections/defaultBehavior==useGlobal { authid = mySettings.value( QStringLiteral( "/Projections/layerDefaultCrs" ), GEO_EPSG_CRS_AUTHID ).toString(); srs.createFromOgcWmsCrs( authid ); @@ -2497,7 +2497,7 @@ void QgisApp::createStatusBar() mOnTheFlyProjectionStatusButton->setWhatsThis( tr( "This icon shows whether " "on the fly coordinate reference system transformation is enabled or not. " "Click the icon to bring up " - "the project properties dialog to alter this behaviour." ) ); + "the project properties dialog to alter this behavior." ) ); mOnTheFlyProjectionStatusButton->setToolTip( tr( "CRS status - Click " "to open coordinate reference system dialog" ) ); connect( mOnTheFlyProjectionStatusButton, SIGNAL( clicked() ), diff --git a/src/app/qgsattributetabledialog.cpp b/src/app/qgsattributetabledialog.cpp index 328aaa5b218a..476eea847e4c 100644 --- a/src/app/qgsattributetabledialog.cpp +++ b/src/app/qgsattributetabledialog.cpp @@ -134,7 +134,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid QgsFeatureRequest r; if ( mLayer->geometryType() != QgsWkbTypes::NullGeometry && - settings.value( QStringLiteral( "/qgis/attributeTableBehaviour" ), QgsAttributeTableFilterModel::ShowAll ).toInt() == QgsAttributeTableFilterModel::ShowVisible ) + settings.value( QStringLiteral( "/qgis/attributeTableBehavior" ), QgsAttributeTableFilterModel::ShowAll ).toInt() == QgsAttributeTableFilterModel::ShowVisible ) { QgsMapCanvas *mc = QgisApp::instance()->mapCanvas(); QgsRectangle extent( mc->mapSettings().mapToLayerCoordinates( theLayer, mc->extent() ) ); @@ -258,7 +258,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid mMainViewButtonGroup->setId( mAttributeViewButton, QgsDualView::AttributeEditor ); // Load default attribute table filter - QgsAttributeTableFilterModel::FilterMode defaultFilterMode = ( QgsAttributeTableFilterModel::FilterMode ) settings.value( QStringLiteral( "/qgis/attributeTableBehaviour" ), QgsAttributeTableFilterModel::ShowAll ).toInt(); + QgsAttributeTableFilterModel::FilterMode defaultFilterMode = ( QgsAttributeTableFilterModel::FilterMode ) settings.value( QStringLiteral( "/qgis/attributeTableBehavior" ), QgsAttributeTableFilterModel::ShowAll ).toInt(); switch ( defaultFilterMode ) { diff --git a/src/app/qgsattributetypedialog.h b/src/app/qgsattributetypedialog.h index 33173be68428..5b2408a7d57c 100644 --- a/src/app/qgsattributetypedialog.h +++ b/src/app/qgsattributetypedialog.h @@ -72,7 +72,7 @@ class APP_EXPORT QgsAttributeTypeDialog: public QDialog, private Ui::QgsAttribut bool fieldEditable() const; /** - * Sets any provider side constraints which may affect this field's behaviour. + * Sets any provider side constraints which may affect this field's behavior. */ void setProviderConstraints( QgsFieldConstraints::Constraints constraints ); diff --git a/src/app/qgsbrowserdockwidget.cpp b/src/app/qgsbrowserdockwidget.cpp index 04b8ed21c2ac..690daeb26871 100644 --- a/src/app/qgsbrowserdockwidget.cpp +++ b/src/app/qgsbrowserdockwidget.cpp @@ -122,12 +122,12 @@ void QgsBrowserLayerProperties::setItem( QgsDataItem* item ) QString layerMetadata = tr( "Error" ); QgsCoordinateReferenceSystem layerCrs; - // temporarily override /Projections/defaultBehaviour to avoid dialog prompt + // temporarily override /Projections/defaultBehavior to avoid dialog prompt QSettings settings; - QString defaultProjectionOption = settings.value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString(); - if ( settings.value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) + QString defaultProjectionOption = settings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString(); + if ( settings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) { - settings.setValue( QStringLiteral( "/Projections/defaultBehaviour" ), "useProject" ); + settings.setValue( QStringLiteral( "/Projections/defaultBehavior" ), "useProject" ); } // find root item @@ -169,10 +169,10 @@ void QgsBrowserLayerProperties::setItem( QgsDataItem* item ) return; } - // restore /Projections/defaultBehaviour + // restore /Projections/defaultBehavior if ( defaultProjectionOption == QLatin1String( "prompt" ) ) { - settings.setValue( QStringLiteral( "/Projections/defaultBehaviour" ), defaultProjectionOption ); + settings.setValue( QStringLiteral( "/Projections/defaultBehavior" ), defaultProjectionOption ); } mNameLabel->setText( layerItem->name() ); diff --git a/src/app/qgsmaptoolselectutils.cpp b/src/app/qgsmaptoolselectutils.cpp index 73e78e17b341..5037744e9a5b 100644 --- a/src/app/qgsmaptoolselectutils.cpp +++ b/src/app/qgsmaptoolselectutils.cpp @@ -88,16 +88,16 @@ void QgsMapToolSelectUtils::expandSelectRectangle( QRect& selectRect, void QgsMapToolSelectUtils::selectMultipleFeatures( QgsMapCanvas* canvas, const QgsGeometry& selectGeometry, QMouseEvent* e ) { - QgsVectorLayer::SelectBehaviour behaviour = QgsVectorLayer::SetSelection; + QgsVectorLayer::SelectBehavior behavior = QgsVectorLayer::SetSelection; if ( e->modifiers() & Qt::ShiftModifier && e->modifiers() & Qt::ControlModifier ) - behaviour = QgsVectorLayer::IntersectSelection; + behavior = QgsVectorLayer::IntersectSelection; else if ( e->modifiers() & Qt::ShiftModifier ) - behaviour = QgsVectorLayer::AddToSelection; + behavior = QgsVectorLayer::AddToSelection; else if ( e->modifiers() & Qt::ControlModifier ) - behaviour = QgsVectorLayer::RemoveFromSelection; + behavior = QgsVectorLayer::RemoveFromSelection; bool doContains = e->modifiers() & Qt::AltModifier; - setSelectedFeatures( canvas, selectGeometry, behaviour, doContains ); + setSelectedFeatures( canvas, selectGeometry, behavior, doContains ); } void QgsMapToolSelectUtils::selectSingleFeature( QgsMapCanvas* canvas, const QgsGeometry& selectGeometry, QMouseEvent* e ) @@ -123,7 +123,7 @@ void QgsMapToolSelectUtils::selectSingleFeature( QgsMapCanvas* canvas, const Qgs return; } - QgsVectorLayer::SelectBehaviour behaviour = QgsVectorLayer::SetSelection; + QgsVectorLayer::SelectBehavior behavior = QgsVectorLayer::SetSelection; //either shift or control modifier switches to "toggle" selection mode if ( e->modifiers() & Qt::ShiftModifier || e->modifiers() & Qt::ControlModifier ) @@ -131,18 +131,18 @@ void QgsMapToolSelectUtils::selectSingleFeature( QgsMapCanvas* canvas, const Qgs QgsFeatureId selectId = *selectedFeatures.constBegin(); QgsFeatureIds layerSelectedFeatures = vlayer->selectedFeatureIds(); if ( layerSelectedFeatures.contains( selectId ) ) - behaviour = QgsVectorLayer::RemoveFromSelection; + behavior = QgsVectorLayer::RemoveFromSelection; else - behaviour = QgsVectorLayer::AddToSelection; + behavior = QgsVectorLayer::AddToSelection; } - vlayer->selectByIds( selectedFeatures, behaviour ); + vlayer->selectByIds( selectedFeatures, behavior ); QApplication::restoreOverrideCursor(); } void QgsMapToolSelectUtils::setSelectedFeatures( QgsMapCanvas* canvas, const QgsGeometry& selectGeometry, - QgsVectorLayer::SelectBehaviour selectBehaviour, bool doContains, bool singleSelect ) + QgsVectorLayer::SelectBehavior selectBehavior, bool doContains, bool singleSelect ) { QgsVectorLayer* vlayer = QgsMapToolSelectUtils::getCurrentVectorLayer( canvas ); if ( !vlayer ) @@ -151,7 +151,7 @@ void QgsMapToolSelectUtils::setSelectedFeatures( QgsMapCanvas* canvas, const Qgs QApplication::setOverrideCursor( Qt::WaitCursor ); QgsFeatureIds selectedFeatures = getMatchingFeatures( canvas, selectGeometry, doContains, singleSelect ); - vlayer->selectByIds( selectedFeatures, selectBehaviour ); + vlayer->selectByIds( selectedFeatures, selectBehavior ); QApplication::restoreOverrideCursor(); } diff --git a/src/app/qgsmaptoolselectutils.h b/src/app/qgsmaptoolselectutils.h index 123a96caeba5..66a23158e290 100644 --- a/src/app/qgsmaptoolselectutils.h +++ b/src/app/qgsmaptoolselectutils.h @@ -52,7 +52,7 @@ namespace QgsMapToolSelectUtils for any required geometry transformations @param selectGeometry the geometry to select the layers features. This geometry must be in terms of the canvas coordinate system. - @param selectBehaviour behaviour of select (ie replace selection, add to selection) + @param selectBehavior behavior of select (ie replace selection, add to selection) @param doContains features will only be selected if fully contained within the selection rubber band (otherwise intersection is enough). @param singleSelect only selects the closest feature to the selectGeometry. @@ -60,7 +60,7 @@ namespace QgsMapToolSelectUtils */ void setSelectedFeatures( QgsMapCanvas* canvas, const QgsGeometry& selectGeometry, - QgsVectorLayer::SelectBehaviour selectBehaviour = QgsVectorLayer::SetSelection, + QgsVectorLayer::SelectBehavior selectBehavior = QgsVectorLayer::SetSelection, bool doContains = true, bool singleSelect = false ); diff --git a/src/app/qgsmergeattributesdialog.cpp b/src/app/qgsmergeattributesdialog.cpp index c8a80c811037..a0fe17d79590 100644 --- a/src/app/qgsmergeattributesdialog.cpp +++ b/src/app/qgsmergeattributesdialog.cpp @@ -287,25 +287,25 @@ void QgsMergeAttributesDialog::refreshMergedValue( int col ) return; } - //evaluate behaviour (feature value or min / max / mean ) - QString mergeBehaviourString = comboBox->currentData().toString(); + //evaluate behavior (feature value or min / max / mean ) + QString mergeBehaviorString = comboBox->currentData().toString(); QVariant mergeResult; // result to show in the merge result field - if ( mergeBehaviourString == QLatin1String( "concat" ) ) + if ( mergeBehaviorString == QLatin1String( "concat" ) ) { mergeResult = concatenationAttribute( col ); } - else if ( mergeBehaviourString == QLatin1String( "skip" ) ) + else if ( mergeBehaviorString == QLatin1String( "skip" ) ) { mergeResult = tr( "Skipped" ); } - else if ( mergeBehaviourString == QLatin1String( "manual" ) ) + else if ( mergeBehaviorString == QLatin1String( "manual" ) ) { return; //nothing to do } - else if ( mergeBehaviourString.startsWith( 'f' ) ) + else if ( mergeBehaviorString.startsWith( 'f' ) ) { //an existing feature value - QgsFeatureId featureId = STRING_TO_FID( mergeBehaviourString.mid( 1 ) ); + QgsFeatureId featureId = STRING_TO_FID( mergeBehaviorString.mid( 1 ) ); mergeResult = featureAttribute( featureId, col ); } else diff --git a/src/app/qgsmergeattributesdialog.h b/src/app/qgsmergeattributesdialog.h index 7d79d26d3643..8ce17b2e1c6f 100644 --- a/src/app/qgsmergeattributesdialog.h +++ b/src/app/qgsmergeattributesdialog.h @@ -31,7 +31,7 @@ class QgsVectorLayer; class QComboBox; -//! A dialog to insert the merge behaviour for attributes (e.g. for the union features editing tool) +//! A dialog to insert the merge behavior for attributes (e.g. for the union features editing tool) class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeAttributesDialogBase { Q_OBJECT @@ -75,7 +75,7 @@ class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeA /** Returns the table widget column index of a combo box @return the column index or -1 in case of error*/ int findComboColumn( QComboBox* c ) const; - //! Calculates the merged value of a column (depending on the selected merge behaviour) and inserts the value in the corresponding cell + //! Calculates the merged value of a column (depending on the selected merge behavior) and inserts the value in the corresponding cell void refreshMergedValue( int col ); //! Inserts the attribute value of a specific feature into the row of merged attributes QVariant featureAttribute( QgsFeatureId featureId, int col ); diff --git a/src/app/qgsoptions.cpp b/src/app/qgsoptions.cpp index 9967ea665804..12ad3b5649b4 100644 --- a/src/app/qgsoptions.cpp +++ b/src/app/qgsoptions.cpp @@ -327,11 +327,11 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) leWmsSearch->setText( mSettings->value( QStringLiteral( "/qgis/WMSSearchUrl" ), "http://geopole.org/wms/search?search=%1&type=rss" ).toString() ); // set the attribute table default filter - cmbAttrTableBehaviour->clear(); - cmbAttrTableBehaviour->addItem( tr( "Show all features" ), QgsAttributeTableFilterModel::ShowAll ); - cmbAttrTableBehaviour->addItem( tr( "Show selected features" ), QgsAttributeTableFilterModel::ShowSelected ); - cmbAttrTableBehaviour->addItem( tr( "Show features visible on map" ), QgsAttributeTableFilterModel::ShowVisible ); - cmbAttrTableBehaviour->setCurrentIndex( cmbAttrTableBehaviour->findData( mSettings->value( QStringLiteral( "/qgis/attributeTableBehaviour" ), QgsAttributeTableFilterModel::ShowAll ).toInt() ) ); + cmbAttrTableBehavior->clear(); + cmbAttrTableBehavior->addItem( tr( "Show all features" ), QgsAttributeTableFilterModel::ShowAll ); + cmbAttrTableBehavior->addItem( tr( "Show selected features" ), QgsAttributeTableFilterModel::ShowSelected ); + cmbAttrTableBehavior->addItem( tr( "Show features visible on map" ), QgsAttributeTableFilterModel::ShowVisible ); + cmbAttrTableBehavior->setCurrentIndex( cmbAttrTableBehavior->findData( mSettings->value( QStringLiteral( "/qgis/attributeTableBehavior" ), QgsAttributeTableFilterModel::ShowAll ).toInt() ) ); mAttrTableViewComboBox->clear(); mAttrTableViewComboBox->addItem( tr( "Remember last view" ), -1 ); @@ -375,12 +375,12 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) // log rendering events, for userspace debugging mLogCanvasRefreshChkBx->setChecked( mSettings->value( QStringLiteral( "/Map/logCanvasRefreshEvent" ), false ).toBool() ); - //set the default projection behaviour radio buttongs - if ( mSettings->value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) + //set the default projection behavior radio buttongs + if ( mSettings->value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) { radPromptForProjection->setChecked( true ); } - else if ( mSettings->value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString() == QLatin1String( "useProject" ) ) + else if ( mSettings->value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString() == QLatin1String( "useProject" ) ) { radUseProjectProjection->setChecked( true ); } @@ -1179,7 +1179,7 @@ void QgsOptions::saveOptions() mSettings->setValue( QStringLiteral( "/qgis/showTips%1" ).arg( Qgis::QGIS_VERSION_INT / 100 ), cbxShowTips->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/checkVersion" ), cbxCheckVersion->isChecked() ); mSettings->setValue( QStringLiteral( "/qgis/dockAttributeTable" ), cbxAttributeTableDocked->isChecked() ); - mSettings->setValue( QStringLiteral( "/qgis/attributeTableBehaviour" ), cmbAttrTableBehaviour->currentData() ); + mSettings->setValue( QStringLiteral( "/qgis/attributeTableBehavior" ), cmbAttrTableBehavior->currentData() ); mSettings->setValue( QStringLiteral( "/qgis/attributeTableView" ), mAttrTableViewComboBox->currentData() ); mSettings->setValue( QStringLiteral( "/qgis/attributeTableRowCache" ), spinBoxAttrTableRowCache->value() ); mSettings->setValue( QStringLiteral( "/qgis/promptForRasterSublayers" ), cmbPromptRasterSublayers->currentIndex() ); @@ -1283,19 +1283,19 @@ void QgsOptions::saveOptions() // log rendering events, for userspace debugging mSettings->setValue( QStringLiteral( "/Map/logCanvasRefreshEvent" ), mLogCanvasRefreshChkBx->isChecked() ); - //check behaviour so default projection when new layer is added with no + //check behavior so default projection when new layer is added with no //projection defined... if ( radPromptForProjection->isChecked() ) { - mSettings->setValue( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ); + mSettings->setValue( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ); } else if ( radUseProjectProjection->isChecked() ) { - mSettings->setValue( QStringLiteral( "/Projections/defaultBehaviour" ), "useProject" ); + mSettings->setValue( QStringLiteral( "/Projections/defaultBehavior" ), "useProject" ); } else //assumes radUseGlobalProjection is checked { - mSettings->setValue( QStringLiteral( "/Projections/defaultBehaviour" ), "useGlobal" ); + mSettings->setValue( QStringLiteral( "/Projections/defaultBehavior" ), "useGlobal" ); } mSettings->setValue( QStringLiteral( "/Projections/layerDefaultCrs" ), mLayerDefaultCrs.authid() ); diff --git a/src/app/qgsrasterlayerproperties.h b/src/app/qgsrasterlayerproperties.h index 004504d9ddcd..6621fa663b24 100644 --- a/src/app/qgsrasterlayerproperties.h +++ b/src/app/qgsrasterlayerproperties.h @@ -147,7 +147,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private //! \brief Flag to indicate if RGB minimum maximum values are actual minimum maximum values bool mRGBMinimumMaximumEstimated; - //! \brief Pointer to the raster layer that this property dilog changes the behaviour of. + //! \brief Pointer to the raster layer that this property dilog changes the behavior of. QgsRasterLayer * mRasterLayer; /** \brief If the underlying raster layer doesn't have a provider diff --git a/src/core/composer/qgscomposerarrow.cpp b/src/core/composer/qgscomposerarrow.cpp index 0352e56998f6..c5c7a98ef120 100644 --- a/src/core/composer/qgscomposerarrow.cpp +++ b/src/core/composer/qgscomposerarrow.cpp @@ -37,7 +37,7 @@ QgsComposerArrow::QgsComposerArrow( QgsComposition* c ) , mArrowHeadOutlineWidth( 1.0 ) , mArrowHeadOutlineColor( Qt::black ) , mArrowHeadFillColor( Qt::black ) - , mBoundsBehaviour( 24 ) + , mBoundsBehavior( 24 ) , mLineSymbol( nullptr ) { init(); @@ -51,7 +51,7 @@ QgsComposerArrow::QgsComposerArrow( QPointF startPoint, QPointF stopPoint, QgsCo , mArrowHeadOutlineWidth( 1.0 ) , mArrowHeadOutlineColor( Qt::black ) , mArrowHeadFillColor( Qt::black ) - , mBoundsBehaviour( 24 ) + , mBoundsBehavior( 24 ) , mLineSymbol( nullptr ) { mStartXIdx = mStopPoint.x() < mStartPoint.x(); @@ -206,7 +206,7 @@ void QgsComposerArrow::drawLine( QPainter *painter ) void QgsComposerArrow::drawHardcodedMarker( QPainter *p, MarkerType type ) { Q_UNUSED( type ); - if ( mBoundsBehaviour == 22 ) + if ( mBoundsBehavior == 22 ) { //if arrow was created in versions prior to 2.4, use the old rendering style QgsComposerUtils::drawArrowHead( p, mStopPoint.x() - pos().x(), mStopPoint.y() - pos().y(), QgsComposerUtils::angle( mStartPoint, mStopPoint ), mArrowHeadWidth ); @@ -264,7 +264,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin p->save(); p->setRenderHint( QPainter::Antialiasing ); - if ( mBoundsBehaviour == 22 ) + if ( mBoundsBehavior == 22 ) { //if arrow was created in versions prior to 2.4, use the old rendering style //rotate image fix point for backtransform @@ -370,7 +370,7 @@ double QgsComposerArrow::computeMarkerMargin() const { double margin = 0; - if ( mBoundsBehaviour == 22 ) + if ( mBoundsBehavior == 22 ) { //if arrow was created in versions prior to 2.4, use the old rendering style if ( mMarkerMode == DefaultMarker ) @@ -434,7 +434,7 @@ bool QgsComposerArrow::writeXml( QDomElement& elem, QDomDocument & doc ) const composerArrowElem.setAttribute( QStringLiteral( "markerMode" ), mMarkerMode ); composerArrowElem.setAttribute( QStringLiteral( "startMarkerFile" ), mStartMarkerFile ); composerArrowElem.setAttribute( QStringLiteral( "endMarkerFile" ), mEndMarkerFile ); - composerArrowElem.setAttribute( QStringLiteral( "boundsBehaviourVersion" ), QString::number( mBoundsBehaviour ) ); + composerArrowElem.setAttribute( QStringLiteral( "boundsBehaviorVersion" ), QString::number( mBoundsBehavior ) ); QDomElement styleElem = doc.createElement( QStringLiteral( "lineStyle" ) ); QDomElement lineStyleElem = QgsSymbolLayerUtils::saveSymbol( QString(), mLineSymbol, doc ); @@ -466,8 +466,8 @@ bool QgsComposerArrow::readXml( const QDomElement& itemElem, const QDomDocument& setStartMarker( itemElem.attribute( QStringLiteral( "startMarkerFile" ), QLatin1String( "" ) ) ); setEndMarker( itemElem.attribute( QStringLiteral( "endMarkerFile" ), QLatin1String( "" ) ) ); mMarkerMode = QgsComposerArrow::MarkerMode( itemElem.attribute( QStringLiteral( "markerMode" ), QStringLiteral( "0" ) ).toInt() ); - //if bounds behaviour version is not set, default to 2.2 behaviour - mBoundsBehaviour = itemElem.attribute( QStringLiteral( "boundsBehaviourVersion" ), QStringLiteral( "22" ) ).toInt(); + //if bounds behavior version is not set, default to 2.2 behavior + mBoundsBehavior = itemElem.attribute( QStringLiteral( "boundsBehaviorVersion" ), QStringLiteral( "22" ) ).toInt(); //arrow style QDomElement styleElem = itemElem.firstChildElement( QStringLiteral( "lineStyle" ) ); @@ -488,7 +488,7 @@ bool QgsComposerArrow::readXml( const QDomElement& itemElem, const QDomDocument& QgsStringMap properties; properties.insert( QStringLiteral( "width" ), itemElem.attribute( QStringLiteral( "outlineWidth" ), QStringLiteral( "1.0" ) ) ); - if ( mBoundsBehaviour == 22 ) + if ( mBoundsBehavior == 22 ) { //if arrow was created in versions prior to 2.4, use the old rendering style properties.insert( QStringLiteral( "capstyle" ), QStringLiteral( "flat" ) ); diff --git a/src/core/composer/qgscomposerarrow.h b/src/core/composer/qgscomposerarrow.h index 5e929ada1e74..8b8c78f88031 100644 --- a/src/core/composer/qgscomposerarrow.h +++ b/src/core/composer/qgscomposerarrow.h @@ -228,10 +228,10 @@ class CORE_EXPORT QgsComposerArrow: public QgsComposerItem QColor mArrowHeadOutlineColor; QColor mArrowHeadFillColor; - /** Indicates QGIS version to mimic bounding box behaviour for. The line placement changed in version 2.4, so a value + /** Indicates QGIS version to mimic bounding box behavior for. The line placement changed in version 2.4, so a value * of 22 is used to indicate that the line should be drawn using the older placement routine. */ - int mBoundsBehaviour; + int mBoundsBehavior; QgsLineSymbol* mLineSymbol; diff --git a/src/core/composer/qgscomposermultiframe.cpp b/src/core/composer/qgscomposermultiframe.cpp index 6ac757556698..2663967c31f2 100644 --- a/src/core/composer/qgscomposermultiframe.cpp +++ b/src/core/composer/qgscomposermultiframe.cpp @@ -230,7 +230,7 @@ void QgsComposerMultiFrame::handleFrameRemoval( QgsComposerItem* item ) if ( resizeMode() != QgsComposerMultiFrame::RepeatOnEveryPage && !mIsRecalculatingSize ) { //removing a frame forces the multi frame to UseExistingFrames resize mode - //otherwise the frame may not actually be removed, leading to confusing ui behaviour + //otherwise the frame may not actually be removed, leading to confusing ui behavior mResizeMode = QgsComposerMultiFrame::UseExistingFrames; emit changed(); recalculateFrameSizes(); diff --git a/src/core/composer/qgscomposermultiframe.h b/src/core/composer/qgscomposermultiframe.h index 467e72096712..0aafaa3aa6e2 100644 --- a/src/core/composer/qgscomposermultiframe.h +++ b/src/core/composer/qgscomposermultiframe.h @@ -43,7 +43,7 @@ class CORE_EXPORT QgsComposerMultiFrame: public QgsComposerObject public: - /** Specifies the behaviour for creating new frames to fit the multiframe's content + /** Specifies the behavior for creating new frames to fit the multiframe's content */ enum ResizeMode { diff --git a/src/core/composer/qgscomposerpicture.cpp b/src/core/composer/qgscomposerpicture.cpp index 291e2b776923..977d61469174 100644 --- a/src/core/composer/qgscomposerpicture.cpp +++ b/src/core/composer/qgscomposerpicture.cpp @@ -781,7 +781,7 @@ bool QgsComposerPicture::readXml( const QDomElement& itemElem, const QDomDocumen mPictureWidth = itemElem.attribute( QStringLiteral( "pictureWidth" ), QStringLiteral( "10" ) ).toDouble(); mPictureHeight = itemElem.attribute( QStringLiteral( "pictureHeight" ), QStringLiteral( "10" ) ).toDouble(); mResizeMode = QgsComposerPicture::ResizeMode( itemElem.attribute( QStringLiteral( "resizeMode" ), QStringLiteral( "0" ) ).toInt() ); - //when loading from xml, default to anchor point of middle to match pre 2.4 behaviour + //when loading from xml, default to anchor point of middle to match pre 2.4 behavior mPictureAnchor = static_cast< QgsComposerItem::ItemPositionMode >( itemElem.attribute( QStringLiteral( "anchorPoint" ), QString::number( QgsComposerItem::Middle ) ).toInt() ); mSvgFillColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "svgFillColor" ), QgsSymbolLayerUtils::encodeColor( QColor( 255, 255, 255 ) ) ) ); diff --git a/src/core/composer/qgscomposertablev2.cpp b/src/core/composer/qgscomposertablev2.cpp index eedd3c829e43..6e012c3c8ea5 100644 --- a/src/core/composer/qgscomposertablev2.cpp +++ b/src/core/composer/qgscomposertablev2.cpp @@ -61,7 +61,7 @@ QgsComposerTableV2::QgsComposerTableV2( QgsComposition *composition, bool create , mHorizontalGrid( true ) , mVerticalGrid( true ) , mBackgroundColor( Qt::white ) - , mWrapBehaviour( TruncateText ) + , mWrapBehavior( TruncateText ) { if ( mComposition ) @@ -96,7 +96,7 @@ QgsComposerTableV2::QgsComposerTableV2() , mHorizontalGrid( true ) , mVerticalGrid( true ) , mBackgroundColor( Qt::white ) - , mWrapBehaviour( TruncateText ) + , mWrapBehavior( TruncateText ) { initStyles(); } @@ -128,7 +128,7 @@ bool QgsComposerTableV2::writeXml( QDomElement& elem, QDomDocument & doc, bool i elem.setAttribute( QStringLiteral( "verticalGrid" ), mVerticalGrid ); elem.setAttribute( QStringLiteral( "showGrid" ), mShowGrid ); elem.setAttribute( QStringLiteral( "backgroundColor" ), QgsSymbolLayerUtils::encodeColor( mBackgroundColor ) ); - elem.setAttribute( QStringLiteral( "wrapBehaviour" ), QString::number( static_cast< int >( mWrapBehaviour ) ) ); + elem.setAttribute( QStringLiteral( "wrapBehavior" ), QString::number( static_cast< int >( mWrapBehavior ) ) ); //columns QDomElement displayColumnsElem = doc.createElement( QStringLiteral( "displayColumns" ) ); @@ -198,7 +198,7 @@ bool QgsComposerTableV2::readXml( const QDomElement &itemElem, const QDomDocumen mShowGrid = itemElem.attribute( QStringLiteral( "showGrid" ), QStringLiteral( "1" ) ).toInt(); mGridColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "gridColor" ), QStringLiteral( "0,0,0,255" ) ) ); mBackgroundColor = QgsSymbolLayerUtils::decodeColor( itemElem.attribute( QStringLiteral( "backgroundColor" ), QStringLiteral( "255,255,255,0" ) ) ); - mWrapBehaviour = QgsComposerTableV2::WrapBehaviour( itemElem.attribute( QStringLiteral( "wrapBehaviour" ), QStringLiteral( "0" ) ).toInt() ); + mWrapBehavior = QgsComposerTableV2::WrapBehavior( itemElem.attribute( QStringLiteral( "wrapBehavior" ), QStringLiteral( "0" ) ).toInt() ); //restore column specifications qDeleteAll( mColumns ); @@ -473,7 +473,7 @@ void QgsComposerTableV2::render( QPainter *p, const QRectF &, const int frameInd QString str = cellContents.toString(); Qt::TextFlag textFlag = static_cast< Qt::TextFlag >( 0 ); - if ( column->width() <= 0 && mWrapBehaviour == TruncateText ) + if ( column->width() <= 0 && mWrapBehavior == TruncateText ) { //automatic column width, so we use the Qt::TextDontClip flag when drawing contents, as this works nicer for italicised text //which may slightly exceed the calculated width @@ -581,7 +581,7 @@ void QgsComposerTableV2::setCellMargin( const double margin ) emit changed(); } -void QgsComposerTableV2::setEmptyTableBehaviour( const QgsComposerTableV2::EmptyTableMode mode ) +void QgsComposerTableV2::setEmptyTableBehavior( const QgsComposerTableV2::EmptyTableMode mode ) { if ( mode == mEmptyTableMode ) { @@ -785,14 +785,14 @@ void QgsComposerTableV2::setBackgroundColor( const QColor &color ) emit changed(); } -void QgsComposerTableV2::setWrapBehaviour( QgsComposerTableV2::WrapBehaviour behaviour ) +void QgsComposerTableV2::setWrapBehavior( QgsComposerTableV2::WrapBehavior behavior ) { - if ( behaviour == mWrapBehaviour ) + if ( behavior == mWrapBehavior ) { return; } - mWrapBehaviour = behaviour; + mWrapBehavior = behavior; recalculateTableSize(); emit changed(); @@ -1151,7 +1151,7 @@ void QgsComposerTableV2::drawHorizontalGridLines( QPainter *painter, int firstRo bool QgsComposerTableV2::textRequiresWrapping( const QString& text, double columnWidth, const QFont &font ) const { - if ( qgsDoubleNear( columnWidth, 0.0 ) || mWrapBehaviour != WrapText ) + if ( qgsDoubleNear( columnWidth, 0.0 ) || mWrapBehavior != WrapText ) return false; QStringList multiLineSplit = text.split( '\n' ); diff --git a/src/core/composer/qgscomposertablev2.h b/src/core/composer/qgscomposertablev2.h index 2552cade2053..7834e2caf569 100644 --- a/src/core/composer/qgscomposertablev2.h +++ b/src/core/composer/qgscomposertablev2.h @@ -124,7 +124,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame /** Controls how long strings in the table are handled */ - enum WrapBehaviour + enum WrapBehavior { TruncateText = 0, //!< Text which doesn't fit inside the cell is truncated WrapText //!< Text which doesn't fit inside the cell is wrapped. Note that this only applies to text in columns with a fixed width. @@ -162,34 +162,34 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame */ double cellMargin() const { return mCellMargin; } - /** Sets the behaviour for empty tables with no content rows. - * @param mode behaviour mode for empty tables - * @see emptyTableBehaviour + /** Sets the behavior for empty tables with no content rows. + * @param mode behavior mode for empty tables + * @see emptyTableBehavior */ - void setEmptyTableBehaviour( const EmptyTableMode mode ); + void setEmptyTableBehavior( const EmptyTableMode mode ); - /** Returns the behaviour mode for empty tables. This property controls + /** Returns the behavior mode for empty tables. This property controls * how the table is drawn if it contains no content rows. - * @returns behaviour mode for empty tables - * @see setEmptyTableBehaviour + * @returns behavior mode for empty tables + * @see setEmptyTableBehavior */ - EmptyTableMode emptyTableBehaviour() const { return mEmptyTableMode; } + EmptyTableMode emptyTableBehavior() const { return mEmptyTableMode; } /** Sets the message for empty tables with no content rows. This message - * is displayed in the table body if the empty table behaviour is + * is displayed in the table body if the empty table behavior is * set to ShowMessage * @param message message to show for empty tables * @see emptyTableMessage - * @see setEmptyTableBehaviour + * @see setEmptyTableBehavior */ void setEmptyTableMessage( const QString& message ); /** Returns the message for empty tables with no content rows. This message - * is displayed in the table body if the empty table behaviour is + * is displayed in the table body if the empty table behavior is * set to ShowMessage * @returns message to show for empty tables * @see setEmptyTableMessage - * @see emptyTableBehaviour + * @see emptyTableBehavior */ QString emptyTableMessage() const { return mEmptyTableMessage; } @@ -393,21 +393,21 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame */ QColor backgroundColor() const { return mBackgroundColor; } - /** Sets the wrap behaviour for the table, which controls how text within cells is + /** Sets the wrap behavior for the table, which controls how text within cells is * automatically wrapped. - * @param behaviour wrap behaviour - * @see wrapBehaviour + * @param behavior wrap behavior + * @see wrapBehavior * @note added in QGIS 2.12 */ - void setWrapBehaviour( WrapBehaviour behaviour ); + void setWrapBehavior( WrapBehavior behavior ); - /** Returns the wrap behaviour for the table, which controls how text within cells is + /** Returns the wrap behavior for the table, which controls how text within cells is * automatically wrapped. - * @returns current wrap behaviour - * @see setWrapBehaviour + * @returns current wrap behavior + * @see setWrapBehavior * @note added in QGIS 2.12 */ - WrapBehaviour wrapBehaviour() const { return mWrapBehaviour; } + WrapBehavior wrapBehavior() const { return mWrapBehavior; } /** Returns a pointer to the list of QgsComposerTableColumns shown in the table * @returns pointer to list of columns in table @@ -482,7 +482,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame //! Margin between cell borders and cell text double mCellMargin; - //! Behaviour for empty tables + //! Behavior for empty tables EmptyTableMode mEmptyTableMode; //! String to show in empty tables @@ -541,7 +541,7 @@ class CORE_EXPORT QgsComposerTableV2: public QgsComposerMultiFrame QSizeF mTableSize; - WrapBehaviour mWrapBehaviour; + WrapBehavior mWrapBehavior; QMap< CellStyleGroup, QgsComposerTableStyle* > mCellStyles; diff --git a/src/core/composer/qgscomposition.cpp b/src/core/composer/qgscomposition.cpp index 1182ba218262..b3aaaf43075e 100644 --- a/src/core/composer/qgscomposition.cpp +++ b/src/core/composer/qgscomposition.cpp @@ -1902,7 +1902,7 @@ void QgsComposition::unlockAllItems() QgsComposerItemCommand* subcommand = new QgsComposerItemCommand( mypItem, QLatin1String( "" ), parentCommand ); subcommand->savePreviousState(); mypItem->setPositionLock( false ); - //select unlocked items, same behaviour as illustrator + //select unlocked items, same behavior as illustrator mypItem->setSelected( true ); emit selectedItemChanged( mypItem ); subcommand->saveAfterState(); diff --git a/src/core/effects/qgspainteffect.h b/src/core/effects/qgspainteffect.h index b368a8fc8bed..76e0c8e60c8b 100644 --- a/src/core/effects/qgspainteffect.h +++ b/src/core/effects/qgspainteffect.h @@ -94,7 +94,7 @@ class CORE_EXPORT QgsPaintEffect virtual void readProperties( const QgsStringMap& props ) = 0; /** Saves the current state of the effect to a DOM element. The default - * behaviour is to save the properties string map returned by + * behavior is to save the properties string map returned by * @link properties @endlink. * @param doc destination DOM document * @param element destination DOM element diff --git a/src/core/gps/qextserialport/win_qextserialport.cpp b/src/core/gps/qextserialport/win_qextserialport.cpp index 5da735dd6332..5ffb70fbbee8 100644 --- a/src/core/gps/qextserialport/win_qextserialport.cpp +++ b/src/core/gps/qextserialport/win_qextserialport.cpp @@ -848,7 +848,7 @@ void QextSerialPort::onWinEvent(HANDLE h) Sets the read and write timeouts for the port to millisec milliseconds. Setting 0 indicates that timeouts are not used for read nor write operations; however read() and write() functions will still block. Set -1 to provide -non-blocking behaviour (read() and write() will return immediately). +non-blocking behavior (read() and write() will return immediately). \note this function does nothing in event driven mode. */ diff --git a/src/core/pal/costcalculator.cpp b/src/core/pal/costcalculator.cpp index 43cef7fa05b8..f5d0a7d393fb 100644 --- a/src/core/pal/costcalculator.cpp +++ b/src/core/pal/costcalculator.cpp @@ -63,7 +63,7 @@ void CostCalculator::addObstacleCostPenalty( LabelPosition* lp, FeaturePart* obs break; case GEOS_POLYGON: - // behaviour depends on obstacle avoid type + // behavior depends on obstacle avoid type switch ( obstacle->layer()->obstacleType() ) { case QgsPalLayerSettings::PolygonInterior: diff --git a/src/core/qgscolorscheme.h b/src/core/qgscolorscheme.h index 725a37ebe79a..516684ee39d8 100644 --- a/src/core/qgscolorscheme.h +++ b/src/core/qgscolorscheme.h @@ -44,7 +44,7 @@ class CORE_EXPORT QgsColorScheme { public: - /** Flags for controlling behaviour of color scheme + /** Flags for controlling behavior of color scheme */ enum SchemeFlag { diff --git a/src/core/qgscoordinatereferencesystem.h b/src/core/qgscoordinatereferencesystem.h index 21239400dd6b..6259f425a3dc 100644 --- a/src/core/qgscoordinatereferencesystem.h +++ b/src/core/qgscoordinatereferencesystem.h @@ -403,7 +403,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem bool isValid() const; /** Perform some validation on this CRS. If the CRS doesn't validate the - * default behaviour settings for layers with unknown CRS will be + * default behavior settings for layers with unknown CRS will be * consulted and acted on accordingly. By hell or high water this * method will do its best to make sure that this CRS is valid - even * if that involves resorting to a hard coded default of geocs:wgs84. diff --git a/src/core/qgsexpression.cpp b/src/core/qgsexpression.cpp index 8ffde6da1c8d..801abca3a0e8 100644 --- a/src/core/qgsexpression.cpp +++ b/src/core/qgsexpression.cpp @@ -1612,7 +1612,7 @@ static QVariant fcnDayOfWeek( const QVariantList& values, const QgsExpressionCon return QVariant(); // return dayOfWeek() % 7 so that values range from 0 (sun) to 6 (sat) - // (to match PostgreSQL behaviour) + // (to match PostgreSQL behavior) return date.dayOfWeek() % 7; } diff --git a/src/core/qgslabelfeature.h b/src/core/qgslabelfeature.h index 8024935b028b..9ae2a2428ddd 100644 --- a/src/core/qgslabelfeature.h +++ b/src/core/qgslabelfeature.h @@ -112,7 +112,7 @@ class CORE_EXPORT QgsLabelFeature * within this zone, and the feature will not be labeled if no candidates can be generated which * are not contained within the zone. * @param geometry permissible zone geometry. If an invalid QgsGeometry is passed then no zone limit - * will be applied to the label candidates (this is the default behaviour). + * will be applied to the label candidates (this is the default behavior). * @note added in QGIS 3.0 * @see permissibleZone() */ diff --git a/src/core/qgsnetworkaccessmanager.cpp b/src/core/qgsnetworkaccessmanager.cpp index c9d5f315f879..d41e480e186c 100644 --- a/src/core/qgsnetworkaccessmanager.cpp +++ b/src/core/qgsnetworkaccessmanager.cpp @@ -97,7 +97,7 @@ class QgsNetworkProxyFactory : public QNetworkProxyFactory ///@endcond // -// Static calls to enforce singleton behaviour +// Static calls to enforce singleton behavior // QgsNetworkAccessManager* QgsNetworkAccessManager::instance() { diff --git a/src/core/qgspallabeling.h b/src/core/qgspallabeling.h index 5297d333745a..2faa7c1c9d38 100644 --- a/src/core/qgspallabeling.h +++ b/src/core/qgspallabeling.h @@ -169,7 +169,7 @@ class CORE_EXPORT QgsPalLayerSettings BottomRight, //!< Label on bottom right of point }; - //! Behaviour modifier for label offset and distance, only applies in some + //! Behavior modifier for label offset and distance, only applies in some //! label placement modes. //TODO QGIS 3.0 - move to QgsLabelingEngine enum OffsetType diff --git a/src/core/qgspluginlayerregistry.cpp b/src/core/qgspluginlayerregistry.cpp index 032c5356bf4a..82dcaf92b884 100644 --- a/src/core/qgspluginlayerregistry.cpp +++ b/src/core/qgspluginlayerregistry.cpp @@ -92,7 +92,7 @@ bool QgsPluginLayerRegistry::removePluginLayerType( const QString& typeName ) if ( !mPluginLayerTypes.contains( typeName ) ) return false; - // remove all remaining layers of this type - to avoid invalid behaviour + // remove all remaining layers of this type - to avoid invalid behavior QList layers = QgsProject::instance()->mapLayers().values(); Q_FOREACH ( QgsMapLayer* layer, layers ) { diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp index 36dc925215ee..ff9d0117bd93 100644 --- a/src/core/qgsprojectfiletransform.cpp +++ b/src/core/qgsprojectfiletransform.cpp @@ -609,7 +609,7 @@ void QgsProjectFileTransform::transform1800to1900() void QgsProjectFileTransform::transform2200to2300() { - //composer: set placement for all picture items to middle, to mimic <=2.2 behaviour + //composer: set placement for all picture items to middle, to mimic <=2.2 behavior QDomNodeList composerPictureList = mDom.elementsByTagName( QStringLiteral( "ComposerPicture" ) ); for ( int i = 0; i < composerPictureList.size(); ++i ) { diff --git a/src/core/qgstaskmanager.h b/src/core/qgstaskmanager.h index 4dc4f994a43c..83a386297b42 100644 --- a/src/core/qgstaskmanager.h +++ b/src/core/qgstaskmanager.h @@ -153,7 +153,7 @@ class CORE_EXPORT QgsTask : public QObject * Subtasks can have an optional list of dependent tasks, which must be completed * before the subtask can begin. By default subtasks are considered independent * of the parent task, ie they can be run either before, after, or at the same - * time as the parent task. This behaviour can be overridden through the subTaskDependency + * time as the parent task. This behavior can be overridden through the subTaskDependency * argument. Note that subtasks should NEVER be dependent on their parent task, and violating * this constraint will prevent the task from completing successfully. * diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index c1e91d2d39c3..dac585acff15 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -283,7 +283,7 @@ void QgsVectorLayer::deselect( const QgsFeatureIds& featureIds ) emit selectionChanged( QgsFeatureIds(), featureIds, false ); } -void QgsVectorLayer::selectByRect( QgsRectangle& rect, QgsVectorLayer::SelectBehaviour behaviour ) +void QgsVectorLayer::selectByRect( QgsRectangle& rect, QgsVectorLayer::SelectBehavior behavior ) { // normalize the rectangle rect.normalize(); @@ -302,16 +302,16 @@ void QgsVectorLayer::selectByRect( QgsRectangle& rect, QgsVectorLayer::SelectBeh } features.close(); - selectByIds( newSelection, behaviour ); + selectByIds( newSelection, behavior ); } -void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLayer::SelectBehaviour behaviour ) +void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLayer::SelectBehavior behavior ) { QgsFeatureIds newSelection; QgsExpressionContext context( QgsExpressionContextUtils::globalProjectLayerScopes( this ) ); - if ( behaviour == SetSelection || behaviour == AddToSelection ) + if ( behavior == SetSelection || behavior == AddToSelection ) { QgsFeatureRequest request = QgsFeatureRequest().setFilterExpression( expression ) .setExpressionContext( context ) @@ -320,7 +320,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay QgsFeatureIterator features = getFeatures( request ); - if ( behaviour == AddToSelection ) + if ( behavior == AddToSelection ) { newSelection = selectedFeatureIds(); } @@ -331,7 +331,7 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay } features.close(); } - else if ( behaviour == IntersectSelection || behaviour == RemoveFromSelection ) + else if ( behavior == IntersectSelection || behavior == RemoveFromSelection ) { QgsExpression exp( expression ); exp.prepare( &context ); @@ -351,11 +351,11 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay context.setFeature( feat ); bool matches = exp.evaluate( &context ).toBool(); - if ( matches && behaviour == IntersectSelection ) + if ( matches && behavior == IntersectSelection ) { newSelection << feat.id(); } - else if ( !matches && behaviour == RemoveFromSelection ) + else if ( !matches && behavior == RemoveFromSelection ) { newSelection << feat.id(); } @@ -365,11 +365,11 @@ void QgsVectorLayer::selectByExpression( const QString& expression, QgsVectorLay selectByIds( newSelection ); } -void QgsVectorLayer::selectByIds( const QgsFeatureIds& ids, QgsVectorLayer::SelectBehaviour behaviour ) +void QgsVectorLayer::selectByIds( const QgsFeatureIds& ids, QgsVectorLayer::SelectBehavior behavior ) { QgsFeatureIds newSelection; - switch ( behaviour ) + switch ( behavior ) { case SetSelection: newSelection = ids; diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 4198c7841948..c11fdee50433 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -430,8 +430,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte InvalidLayer = 4, //!< Edit failed due to invalid layer }; - //! Selection behaviour - enum SelectBehaviour + //! Selection behavior + enum SelectBehavior { SetSelection, //!< Set selection, removing any existing selection AddToSelection, //!< Add selection to current selection @@ -607,34 +607,34 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * Select features found within the search rectangle (in layer's coordinates) * @param rect search rectangle - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @see invertSelectionInRectangle(QgsRectangle & rect) * @see selectByExpression() * @see selectByIds() */ - void selectByRect( QgsRectangle & rect, SelectBehaviour behaviour = SetSelection ); + void selectByRect( QgsRectangle & rect, SelectBehavior behavior = SetSelection ); /** Select matching features using an expression. * @param expression expression to evaluate to select features - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @note added in QGIS 2.16 * @see selectByRect() * @see selectByIds() */ - void selectByExpression( const QString& expression, SelectBehaviour behaviour = SetSelection ); + void selectByExpression( const QString& expression, SelectBehavior behavior = SetSelection ); /** Select matching features using a list of feature IDs. Will emit the * selectionChanged() signal with the clearAndSelect flag set. * @param ids feature IDs to select - * @param behaviour selection type, allows adding to current selection, removing + * @param behavior selection type, allows adding to current selection, removing * from selection, etc. * @note added in QGIS 2.16 * @see selectByRect() * @see selectByExpression() */ - void selectByIds( const QgsFeatureIds &ids, SelectBehaviour behaviour = SetSelection ); + void selectByIds( const QgsFeatureIds &ids, SelectBehavior behavior = SetSelection ); /** * Modifies the current selection on this layer diff --git a/src/core/symbology-ng/qgsrenderer.h b/src/core/symbology-ng/qgsrenderer.h index 0f4f7cc7564d..2d30ca83de23 100644 --- a/src/core/symbology-ng/qgsrenderer.h +++ b/src/core/symbology-ng/qgsrenderer.h @@ -376,7 +376,7 @@ class CORE_EXPORT QgsFeatureRenderer void setOrderByEnabled( bool enabled ); /** Sets an embedded renderer (subrenderer) for this feature renderer. The base class implementation - * does nothing with subrenderers, but individual derived classes can use these to modify their behaviour. + * does nothing with subrenderers, but individual derived classes can use these to modify their behavior. * @param subRenderer the embedded renderer. Ownership will be transferred. * @see embeddedRenderer() * @note added in QGIS 2.16 diff --git a/src/core/symbology-ng/qgssymbol.h b/src/core/symbology-ng/qgssymbol.h index d9a0f76682d0..c94f925ea92d 100644 --- a/src/core/symbology-ng/qgssymbol.h +++ b/src/core/symbology-ng/qgssymbol.h @@ -82,7 +82,7 @@ class CORE_EXPORT QgsSymbol }; - //! Flags controlling behaviour of symbols during rendering + //! Flags controlling behavior of symbols during rendering enum RenderHint { DynamicRotation = 2, //!< Rotation of symbol may be changed during rendering and symbol should not be cached @@ -383,7 +383,7 @@ class CORE_EXPORT QgsSymbolRenderContext * @param u * @param alpha * @param selected set to true if symbol should be drawn in a "selected" state - * @param renderHints flags controlling rendering behaviour + * @param renderHints flags controlling rendering behavior * @param f * @param fields * @param mapUnitScale diff --git a/src/gui/editorwidgets/qgsdoublespinbox.h b/src/gui/editorwidgets/qgsdoublespinbox.h index e38a5bb65cc2..3c181ee8cca5 100644 --- a/src/gui/editorwidgets/qgsdoublespinbox.h +++ b/src/gui/editorwidgets/qgsdoublespinbox.h @@ -35,7 +35,7 @@ class GUI_EXPORT QgsDoubleSpinBox : public QDoubleSpinBox public: - //! Behaviour when widget is cleared. + //! Behavior when widget is cleared. enum ClearValueMode { MinimumValue, //!< Reset value to minimum() diff --git a/src/gui/editorwidgets/qgsspinbox.h b/src/gui/editorwidgets/qgsspinbox.h index f5254b5b80f5..db0dad3dcec9 100644 --- a/src/gui/editorwidgets/qgsspinbox.h +++ b/src/gui/editorwidgets/qgsspinbox.h @@ -35,7 +35,7 @@ class GUI_EXPORT QgsSpinBox : public QSpinBox public: - //! Behaviour when widget is cleared. + //! Behavior when widget is cleared. enum ClearValueMode { MinimumValue, //!< Reset value to minimum() diff --git a/src/gui/qgsannotationitem.h b/src/gui/qgsannotationitem.h index 54d3ed6d9506..7dba589970f8 100644 --- a/src/gui/qgsannotationitem.h +++ b/src/gui/qgsannotationitem.h @@ -60,7 +60,7 @@ class GUI_EXPORT QgsAnnotationItem: public QgsMapCanvasItem, public QgsAnnotatio virtual QSizeF minimumFrameSize() const; - /** Returns the mouse move behaviour for a given position + /** Returns the mouse move behavior for a given position @param pos the position in scene coordinates*/ QgsAnnotationItem::MouseMoveAction moveActionForPosition( QPointF pos ) const; //! Returns suitable cursor shape for mouse move action diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp index cdf472eeb16f..ec659ed0f913 100644 --- a/src/gui/qgsattributeform.cpp +++ b/src/gui/qgsattributeform.cpp @@ -456,13 +456,13 @@ void QgsAttributeForm::pushSelectedFeaturesMessage() } } -void QgsAttributeForm::runSearchSelect( QgsVectorLayer::SelectBehaviour behaviour ) +void QgsAttributeForm::runSearchSelect( QgsVectorLayer::SelectBehavior behavior ) { QString filter = createFilterExpression(); if ( filter.isEmpty() ) return; - mLayer->selectByExpression( filter, behaviour ); + mLayer->selectByExpression( filter, behavior ); pushSelectedFeaturesMessage(); if ( mContext.formMode() == QgsAttributeEditorContext::Embed ) setMode( SingleEditMode ); diff --git a/src/gui/qgsattributeform.h b/src/gui/qgsattributeform.h index af0bbc9fefc3..1f3a0ce2199c 100644 --- a/src/gui/qgsattributeform.h +++ b/src/gui/qgsattributeform.h @@ -305,7 +305,7 @@ class GUI_EXPORT QgsAttributeForm : public QWidget int messageTimeout(); void clearMultiEditMessages(); void pushSelectedFeaturesMessage(); - void runSearchSelect( QgsVectorLayer::SelectBehaviour behaviour ); + void runSearchSelect( QgsVectorLayer::SelectBehavior behavior ); QString createFilterExpression() const; diff --git a/src/gui/qgsattributeformeditorwidget.h b/src/gui/qgsattributeformeditorwidget.h index d3955de9cd02..6c0847167e5e 100644 --- a/src/gui/qgsattributeformeditorwidget.h +++ b/src/gui/qgsattributeformeditorwidget.h @@ -32,7 +32,7 @@ class QgsAttributeEditorContext; /** \ingroup gui * \class QgsAttributeFormEditorWidget - * A widget consisting of both an editor widget and additional widgets for controlling the behaviour + * A widget consisting of both an editor widget and additional widgets for controlling the behavior * of the editor widget depending on a number of possible modes. For instance, if the parent attribute * form is in the multi edit mode, this widget will show both the editor widget and a tool button for * controlling the multi edit results. diff --git a/src/gui/qgscodeeditor.cpp b/src/gui/qgscodeeditor.cpp index a6b407f293bd..5d7ff8c59837 100644 --- a/src/gui/qgscodeeditor.cpp +++ b/src/gui/qgscodeeditor.cpp @@ -69,7 +69,7 @@ void QgsCodeEditor::focusOutEvent( QFocusEvent *event ) } // This workaround a likely bug in QScintilla. The ESC key should not be consumned -// by the main entry, so that the default behaviour (Dialog closing) can trigger, +// by the main entry, so that the default behavior (Dialog closing) can trigger, // but only is the auto-completion suggestion list isn't displayed void QgsCodeEditor::keyPressEvent( QKeyEvent * event ) { diff --git a/src/gui/qgscollapsiblegroupbox.cpp b/src/gui/qgscollapsiblegroupbox.cpp index bd204d4005b0..ca5b77652336 100644 --- a/src/gui/qgscollapsiblegroupbox.cpp +++ b/src/gui/qgscollapsiblegroupbox.cpp @@ -138,7 +138,7 @@ void QgsCollapsibleGroupBoxBasic::mousePressEvent( QMouseEvent *event ) return; } - // default behaviour - pass to QGroupBox + // default behavior - pass to QGroupBox QGroupBox::mousePressEvent( event ); } @@ -158,7 +158,7 @@ void QgsCollapsibleGroupBoxBasic::mouseReleaseEvent( QMouseEvent *event ) return; } - // default behaviour - pass to QGroupBox + // default behavior - pass to QGroupBox QGroupBox::mouseReleaseEvent( event ); } @@ -167,7 +167,7 @@ void QgsCollapsibleGroupBoxBasic::changeEvent( QEvent *event ) // always re-enable mCollapseButton when groupbox was previously disabled // e.g. resulting from a disabled parent of groupbox, or a signal/slot connection - // default behaviour - pass to QGroupBox + // default behavior - pass to QGroupBox QGroupBox::changeEvent( event ); if ( event->type() == QEvent::EnabledChange && isEnabled() ) diff --git a/src/gui/qgscolorbutton.cpp b/src/gui/qgscolorbutton.cpp index a7705efefaf6..9a530d728a71 100644 --- a/src/gui/qgscolorbutton.cpp +++ b/src/gui/qgscolorbutton.cpp @@ -40,7 +40,7 @@ QgsColorButton::QgsColorButton( QWidget *parent, const QString& cdt, QgsColorSchemeRegistry* registry ) : QToolButton( parent ) - , mBehaviour( QgsColorButton::ShowDialog ) + , mBehavior( QgsColorButton::ShowDialog ) , mColorDialogTitle( cdt.isEmpty() ? tr( "Select Color" ) : cdt ) , mColor( QColor() ) , mDefaultColor( QColor() ) //default to invalid color @@ -319,7 +319,7 @@ void QgsColorButton::keyPressEvent( QKeyEvent *e ) { if ( !mPickingColor ) { - //if not picking a color, use default tool button behaviour + //if not picking a color, use default tool button behavior QToolButton::keyPressEvent( e ); return; } @@ -409,7 +409,7 @@ QPixmap QgsColorButton::createMenuIcon( const QColor &color, const bool showChec void QgsColorButton::buttonClicked() { - switch ( mBehaviour ) + switch ( mBehavior ) { case ShowDialog: showColorDialog(); @@ -711,9 +711,9 @@ void QgsColorButton::setShowMenu( const bool showMenu ) setButtonBackground( mColor ); } -void QgsColorButton::setBehaviour( const QgsColorButton::Behaviour behaviour ) +void QgsColorButton::setBehavior( const QgsColorButton::Behavior behavior ) { - mBehaviour = behaviour; + mBehavior = behavior; } void QgsColorButton::setDefaultColor( const QColor& color ) diff --git a/src/gui/qgscolorbutton.h b/src/gui/qgscolorbutton.h index 9ec8763a22e0..bb8e197bc781 100644 --- a/src/gui/qgscolorbutton.h +++ b/src/gui/qgscolorbutton.h @@ -35,13 +35,13 @@ class QgsPanelWidget; class GUI_EXPORT QgsColorButton : public QToolButton { Q_OBJECT - Q_ENUMS( Behaviour ) + Q_ENUMS( Behavior ) Q_PROPERTY( QString colorDialogTitle READ colorDialogTitle WRITE setColorDialogTitle ) Q_PROPERTY( bool acceptLiveUpdates READ acceptLiveUpdates WRITE setAcceptLiveUpdates ) Q_PROPERTY( QColor color READ color WRITE setColor ) Q_PROPERTY( bool allowAlpha READ allowAlpha WRITE setAllowAlpha ) Q_PROPERTY( bool showMenu READ showMenu WRITE setShowMenu ) - Q_PROPERTY( Behaviour behaviour READ behaviour WRITE setBehaviour ) + Q_PROPERTY( Behavior behavior READ behavior WRITE setBehavior ) Q_PROPERTY( QColor defaultColor READ defaultColor WRITE setDefaultColor ) Q_PROPERTY( bool showNoColor READ showNoColor WRITE setShowNoColor ) Q_PROPERTY( QString noColorString READ noColorString WRITE setNoColorString ) @@ -49,9 +49,9 @@ class GUI_EXPORT QgsColorButton : public QToolButton public: - /** Specifies the behaviour when the button is clicked + /** Specifies the behavior when the button is clicked */ - enum Behaviour + enum Behavior { ShowDialog = 0, //!< Show a color picker dialog when clicked SignalOnly //!< Emit colorClicked signal only, no dialog @@ -112,7 +112,7 @@ class GUI_EXPORT QgsColorButton : public QToolButton */ void setAcceptLiveUpdates( const bool accept ) { mAcceptLiveUpdates = accept; } - /** Sets whether the drop down menu should be shown for the button. The default behaviour is to + /** Sets whether the drop down menu should be shown for the button. The default behavior is to * show the menu. * @param showMenu set to false to hide the drop down menu * @see showMenu @@ -125,18 +125,18 @@ class GUI_EXPORT QgsColorButton : public QToolButton */ bool showMenu() const { return menu() ? true : false; } - /** Sets the behaviour for when the button is clicked. The default behaviour is to show + /** Sets the behavior for when the button is clicked. The default behavior is to show * a color picker dialog. - * @param behaviour behaviour when button is clicked - * @see behaviour + * @param behavior behavior when button is clicked + * @see behavior */ - void setBehaviour( const Behaviour behaviour ); + void setBehavior( const Behavior behavior ); - /** Returns the behaviour for when the button is clicked. - * @returns behaviour when button is clicked - * @see setBehaviour + /** Returns the behavior for when the button is clicked. + * @returns behavior when button is clicked + * @see setBehavior */ - Behaviour behaviour() const { return mBehaviour; } + Behavior behavior() const { return mBehavior; } /** Sets the default color for the button, which is shown in the button's drop down menu for the * "default color" option. @@ -308,10 +308,10 @@ class GUI_EXPORT QgsColorButton : public QToolButton */ void colorChanged( const QColor &color ); - /** Emitted when the button is clicked, if the button's behaviour is set to SignalOnly + /** Emitted when the button is clicked, if the button's behavior is set to SignalOnly * @param color button color - * @see setBehaviour - * @see behaviour + * @see setBehavior + * @see behavior */ void colorClicked( const QColor &color ); @@ -363,7 +363,7 @@ class GUI_EXPORT QgsColorButton : public QToolButton private: - Behaviour mBehaviour; + Behavior mBehavior; QString mColorDialogTitle; QColor mColor; diff --git a/src/gui/qgscolorrampbutton.h b/src/gui/qgscolorrampbutton.h index 407f4bdac171..eec76897d14b 100644 --- a/src/gui/qgscolorrampbutton.h +++ b/src/gui/qgscolorrampbutton.h @@ -84,7 +84,7 @@ class GUI_EXPORT QgsColorRampButton : public QToolButton */ void setAcceptLiveUpdates( const bool accept ) { mAcceptLiveUpdates = accept; } - /** Sets whether the drop down menu should be shown for the button. The default behaviour is to + /** Sets whether the drop down menu should be shown for the button. The default behavior is to * show the menu. * @param showMenu set to false to hide the drop down menu * @see showMenu diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp index 3696a284ef5d..5303b3f01f04 100644 --- a/src/gui/qgscomposerview.cpp +++ b/src/gui/qgscomposerview.cpp @@ -242,7 +242,7 @@ void QgsComposerView::mousePressEvent( QMouseEvent* e ) selectedItem = composition()->composerItemAt( scenePoint, previousSelectedItem, true ); //if we didn't find a lower item we'll use the top-most as fall-back - //this duplicates mapinfo/illustrator/etc behaviour where ctrl-clicks are "cyclic" + //this duplicates mapinfo/illustrator/etc behavior where ctrl-clicks are "cyclic" if ( !selectedItem ) { selectedItem = composition()->composerItemAt( scenePoint, true ); @@ -2005,7 +2005,7 @@ void QgsComposerView::wheelEvent( QWheelEvent* event ) void QgsComposerView::wheelZoom( QWheelEvent * event ) { - //get mouse wheel zoom behaviour settings + //get mouse wheel zoom behavior settings QSettings mySettings; double zoomFactor = mySettings.value( QStringLiteral( "/qgis/zoom_factor" ), 2 ).toDouble(); diff --git a/src/gui/qgscompoundcolorwidget.cpp b/src/gui/qgscompoundcolorwidget.cpp index cd695b7966b8..72dc90ddeefb 100644 --- a/src/gui/qgscompoundcolorwidget.cpp +++ b/src/gui/qgscompoundcolorwidget.cpp @@ -116,37 +116,37 @@ QgsCompoundColorWidget::QgsCompoundColorWidget( QWidget *parent, const QColor& c mAlphaSlider->setComponent( QgsColorWidget::Alpha ); mSwatchButton1->setShowMenu( false ); - mSwatchButton1->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton1->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton2->setShowMenu( false ); - mSwatchButton2->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton2->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton3->setShowMenu( false ); - mSwatchButton3->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton3->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton4->setShowMenu( false ); - mSwatchButton4->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton4->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton5->setShowMenu( false ); - mSwatchButton5->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton5->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton6->setShowMenu( false ); - mSwatchButton6->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton6->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton7->setShowMenu( false ); - mSwatchButton7->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton7->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton8->setShowMenu( false ); - mSwatchButton8->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton8->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton9->setShowMenu( false ); - mSwatchButton9->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton9->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton10->setShowMenu( false ); - mSwatchButton10->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton10->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton11->setShowMenu( false ); - mSwatchButton11->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton11->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton12->setShowMenu( false ); - mSwatchButton12->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton12->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton13->setShowMenu( false ); - mSwatchButton13->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton13->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton14->setShowMenu( false ); - mSwatchButton14->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton14->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton15->setShowMenu( false ); - mSwatchButton15->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton15->setBehavior( QgsColorButton::SignalOnly ); mSwatchButton16->setShowMenu( false ); - mSwatchButton16->setBehaviour( QgsColorButton::SignalOnly ); + mSwatchButton16->setBehavior( QgsColorButton::SignalOnly ); //restore custom colors mSwatchButton1->setColor( settings.value( QStringLiteral( "/Windows/ColorDialog/customColor1" ), QVariant( QColor() ) ).value() ); mSwatchButton2->setColor( settings.value( QStringLiteral( "/Windows/ColorDialog/customColor2" ), QVariant( QColor() ) ).value() ); @@ -735,7 +735,7 @@ void QgsCompoundColorWidget::keyPressEvent( QKeyEvent *e ) { if ( !mPickingColor ) { - //if not picking a color, use default tool button behaviour + //if not picking a color, use default tool button behavior QWidget::keyPressEvent( e ); return; } diff --git a/src/gui/qgsdatadefinedbutton.cpp b/src/gui/qgsdatadefinedbutton.cpp index a391261f832e..388f88f6ce1a 100644 --- a/src/gui/qgsdatadefinedbutton.cpp +++ b/src/gui/qgsdatadefinedbutton.cpp @@ -235,7 +235,7 @@ void QgsDataDefinedButton::mouseReleaseEvent( QMouseEvent *event ) return; } - // pass to default behaviour + // pass to default behavior QToolButton::mousePressEvent( event ); } diff --git a/src/gui/qgsfilterlineedit.h b/src/gui/qgsfilterlineedit.h index bcba651f872a..c52c7a3c4e30 100644 --- a/src/gui/qgsfilterlineedit.h +++ b/src/gui/qgsfilterlineedit.h @@ -44,7 +44,7 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit public: - //! Behaviour when clearing value of widget + //! Behavior when clearing value of widget enum ClearMode { ClearToNull = 0, //!< Reset value to null @@ -70,14 +70,14 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit */ void setShowClearButton( bool visible ); - /** Returns the clear mode for the widget. The clear mode defines the behaviour of the + /** Returns the clear mode for the widget. The clear mode defines the behavior of the * widget when its value is cleared. This defaults to ClearToNull. * @see setClearMode() * @note added in QGIS 3.0 */ ClearMode clearMode() const { return mClearMode; } - /** Sets the clear mode for the widget. The clear mode defines the behaviour of the + /** Sets the clear mode for the widget. The clear mode defines the behavior of the * widget when its value is cleared. This defaults to ClearToNull. * @see clearMode() * @note added in QGIS 3.0 diff --git a/src/gui/qgsgenericprojectionselector.h b/src/gui/qgsgenericprojectionselector.h index 858e730d2a92..37d1a343a434 100644 --- a/src/gui/qgsgenericprojectionselector.h +++ b/src/gui/qgsgenericprojectionselector.h @@ -84,7 +84,7 @@ class GUI_EXPORT QgsGenericProjectionSelector : public QDialog, private Ui::QgsG * list of projections by. This is useful in (e.g.) WMS situations * where you just want to offer what the WMS server can support. * - * \warning This function's behaviour is undefined if it is called after the dialog is shown. + * \warning This function's behavior is undefined if it is called after the dialog is shown. */ void setOgcWmsCrsFilter( const QSet& crsFilter ); }; diff --git a/src/gui/qgsmaplayeractionregistry.cpp b/src/gui/qgsmaplayeractionregistry.cpp index 666a21d732b4..67977e9cd73d 100644 --- a/src/gui/qgsmaplayeractionregistry.cpp +++ b/src/gui/qgsmaplayeractionregistry.cpp @@ -93,7 +93,7 @@ void QgsMapLayerAction::triggerForLayer( QgsMapLayer* layer ) } // -// Static calls to enforce singleton behaviour +// Static calls to enforce singleton behavior // QgsMapLayerActionRegistry *QgsMapLayerActionRegistry::mInstance = nullptr; QgsMapLayerActionRegistry *QgsMapLayerActionRegistry::instance() diff --git a/src/gui/qgsmaptoolemitpoint.h b/src/gui/qgsmaptoolemitpoint.h index 1e409bb9bcbc..ca9c807d31c9 100644 --- a/src/gui/qgsmaptoolemitpoint.h +++ b/src/gui/qgsmaptoolemitpoint.h @@ -24,7 +24,7 @@ class QgsMapCanvas; /** \ingroup gui * A map tool that simply emits a point when clicking on the map. * Connecting a slot to its canvasClicked() signal will - * let you implement custom behaviour for the passed in point. + * let you implement custom behavior for the passed in point. */ class GUI_EXPORT QgsMapToolEmitPoint : public QgsMapTool { diff --git a/src/gui/qgsprojectionselector.h b/src/gui/qgsprojectionselector.h index dc43388bc3f6..3767e784a07d 100644 --- a/src/gui/qgsprojectionselector.h +++ b/src/gui/qgsprojectionselector.h @@ -97,7 +97,7 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti * list of projections by. This is useful in (e.g.) WMS situations * where you just want to offer what the WMS server can support. * - * \warning This function's behaviour is undefined if it is called after the widget is shown. + * \warning This function's behavior is undefined if it is called after the widget is shown. */ void setOgcWmsCrsFilter( const QSet& crsFilter ); void on_lstCoordinateSystems_currentItemChanged( QTreeWidgetItem *current, QTreeWidgetItem *prev ); diff --git a/src/gui/qgsrasterformatsaveoptionswidget.cpp b/src/gui/qgsrasterformatsaveoptionswidget.cpp index 4a479a01a81b..65a77991aafc 100644 --- a/src/gui/qgsrasterformatsaveoptionswidget.cpp +++ b/src/gui/qgsrasterformatsaveoptionswidget.cpp @@ -317,21 +317,21 @@ QString QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui, bool report bool tmpLayer = false; if ( !( mRasterLayer && rasterLayer->dataProvider() ) && ! mRasterFileName.isNull() ) { - // temporarily override /Projections/defaultBehaviour to avoid dialog prompt + // temporarily override /Projections/defaultBehavior to avoid dialog prompt // this is taken from qgsbrowserdockwidget.cpp // TODO - integrate this into qgis core QSettings settings; - QString defaultProjectionOption = settings.value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString(); - if ( settings.value( QStringLiteral( "/Projections/defaultBehaviour" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) + QString defaultProjectionOption = settings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString(); + if ( settings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString() == QLatin1String( "prompt" ) ) { - settings.setValue( QStringLiteral( "/Projections/defaultBehaviour" ), "useProject" ); + settings.setValue( QStringLiteral( "/Projections/defaultBehavior" ), "useProject" ); } tmpLayer = true; rasterLayer = new QgsRasterLayer( mRasterFileName, QFileInfo( mRasterFileName ).baseName(), QStringLiteral( "gdal" ) ); - // restore /Projections/defaultBehaviour + // restore /Projections/defaultBehavior if ( defaultProjectionOption == QLatin1String( "prompt" ) ) { - settings.setValue( QStringLiteral( "/Projections/defaultBehaviour" ), defaultProjectionOption ); + settings.setValue( QStringLiteral( "/Projections/defaultBehavior" ), defaultProjectionOption ); } } diff --git a/src/gui/raster/qgsrasterhistogramwidget.h b/src/gui/raster/qgsrasterhistogramwidget.h index 733a5574e46c..750be0ba7a6d 100644 --- a/src/gui/raster/qgsrasterhistogramwidget.h +++ b/src/gui/raster/qgsrasterhistogramwidget.h @@ -103,7 +103,7 @@ class GUI_EXPORT QgsRasterHistogramWidget : public QgsMapLayerConfigWidget, priv ShowRGB = 2 }; - //! \brief Pointer to the raster layer that this property dilog changes the behaviour of. + //! \brief Pointer to the raster layer that this property dilog changes the behavior of. QgsRasterLayer * mRasterLayer; //! \brief Pointer to the renderer widget, to get/set min/max. QgsRasterRendererWidget* mRendererWidget; diff --git a/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui b/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui index a8e45a7e6e6f..7a0f7ae630fa 100644 --- a/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui +++ b/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui @@ -153,7 +153,7 @@ - + When a row is selected, move canvas to @@ -226,7 +226,7 @@ - + 0 diff --git a/src/plugins/georeferencer/qgsopenrasterdialog.cpp b/src/plugins/georeferencer/qgsopenrasterdialog.cpp index 19941aa33dd1..8434e9692830 100644 --- a/src/plugins/georeferencer/qgsopenrasterdialog.cpp +++ b/src/plugins/georeferencer/qgsopenrasterdialog.cpp @@ -92,15 +92,15 @@ void QgsOpenRasterDialog::on_tbnSelectRaster_clicked() // What DOING this code? QgsProject* prj = QgsProject::instance(); - QString projBehaviour = settings.value( "/Projections/defaultBehaviour", "prompt" ).toString(); + QString projBehavior = settings.value( "/Projections/defaultBehavior", "prompt" ).toString(); QString projectCRS = prj->readEntry( "SpatialRefSys", "/ProjectCRSProj4String" ); int projectCrsId = prj->readNumEntry( "SpatialRefSys", "/ProjectCrsId" ); - settings.setValue( "/Projections/defaultBehaviour", "useProject" ); + settings.setValue( "/Projections/defaultBehavior", "useProject" ); prj->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", GEOPROJ4 ); prj->writeEntry( "SpatialRefSys", "/ProjectCrsId", int( GEOCRS_ID ) ); - settings.setValue( "/Projections/defaultBehaviour", projBehaviour ); + settings.setValue( "/Projections/defaultBehavior", projBehavior ); prj->writeEntry( "SpatialRefSys", "/ProjectCRSProj4String", projectCRS ); prj->writeEntry( "SpatialRefSys", "/ProjectCrsId", projectCrsId ); } diff --git a/src/plugins/globe/qgsglobevectorlayerpropertiespage.ui b/src/plugins/globe/qgsglobevectorlayerpropertiespage.ui index 6da702aaee1d..31b0156f8130 100644 --- a/src/plugins/globe/qgsglobevectorlayerpropertiespage.ui +++ b/src/plugins/globe/qgsglobevectorlayerpropertiespage.ui @@ -33,7 +33,7 @@ - Terrain following behaviour + Terrain following behavior Clamping diff --git a/src/plugins/plugin_template/README.whatnext b/src/plugins/plugin_template/README.whatnext index 5eb4f4f62f7e..5664ebad3d18 100644 --- a/src/plugins/plugin_template/README.whatnext +++ b/src/plugins/plugin_template/README.whatnext @@ -24,7 +24,7 @@ instance of the QgisInterface is passed to the plugin when it loads. Please consult the QGIS development team if there is functionality required in the QGisInterface that is not available. -QgsPlugin is an ABC that defines required behaviour your plugin must provide. +QgsPlugin is an ABC that defines required behavior your plugin must provide. See below for more details. What are all the files in my generated plugin directory for? @@ -40,7 +40,7 @@ This is the class that provides the 'glue' between your custom application logic and the QGIS application. You will see that a number of methods are already implemented for you - including some examples of how to add a raster or vector layer to the main application map canvas. This class is a concrete -implementation of QgisPlugin (which defines required behaviour for a plugin). +implementation of QgisPlugin (which defines required behavior for a plugin). In particular, a plugin has a number of static methods and members so that the QgsPluginManager and plugin loader logic can identify each plugin, create an appropriate menu entry for it etc. Note there is nothing stopping you creating diff --git a/src/plugins/plugin_template/plugingui.cpp b/src/plugins/plugin_template/plugingui.cpp index 9c0c20818b9f..678d606c1cdf 100644 --- a/src/plugins/plugin_template/plugingui.cpp +++ b/src/plugins/plugin_template/plugingui.cpp @@ -59,10 +59,10 @@ .arg( tr( "In particular look at the following classes:" ) ) .arg( table ) .arg( "QGisInterface is an abstract base class (ABC) that specifies what publicly available features of QGIS are exposed to third party code and plugins. An instance of the QgisInterface is passed to the plugin when it loads. Please consult the QGIS development team if there is functionality required in the QGisInterface that is not available." ) - .arg( tr( "QgsPlugin is an ABC that defines required behaviour your plugin must provide. See below for more details." ) ) + .arg( tr( "QgsPlugin is an ABC that defines required behavior your plugin must provide. See below for more details." ) ) .arg( tr( "What are all the files in my generated plugin directory for?" ) ) .arg( tr( "This is the generated CMake file that builds the plugin. You should add you application specific dependencies and source files to this file." ) ) - .arg( tr( "This is the class that provides the 'glue' between your custom application logic and the QGIS application. You will see that a number of methods are already implemented for you - including some examples of how to add a raster or vector layer to the main application map canvas. This class is a concrete instance of the QgisPlugin interface which defines required behaviour for a plugin. In particular, a plugin has a number of static methods and members so that the QgsPluginManager and plugin loader logic can identify each plugin, create an appropriate menu entry for it etc. Note there is nothing stopping you creating multiple toolbar icons and menu entries for a single plugin. By default though a single menu entry and toolbar button is created and its pre-configured to call the run() method in this class when selected. This default implementation provided for you by the plugin builder is well documented, so please refer to the code for further advice." ) ) + .arg( tr( "This is the class that provides the 'glue' between your custom application logic and the QGIS application. You will see that a number of methods are already implemented for you - including some examples of how to add a raster or vector layer to the main application map canvas. This class is a concrete instance of the QgisPlugin interface which defines required behavior for a plugin. In particular, a plugin has a number of static methods and members so that the QgsPluginManager and plugin loader logic can identify each plugin, create an appropriate menu entry for it etc. Note there is nothing stopping you creating multiple toolbar icons and menu entries for a single plugin. By default though a single menu entry and toolbar button is created and its pre-configured to call the run() method in this class when selected. This default implementation provided for you by the plugin builder is well documented, so please refer to the code for further advice." ) ) .arg( tr( "This is a Qt designer 'ui' file. It defines the look of the default plugin dialog without implementing any application logic. You can modify this form to suite your needs or completely remove it if your plugin does not need to display a user form (e.g. for custom MapTools)." ) ) .arg( tr( "This is the concrete class where application logic for the above mentioned dialog should go. The world is your oyster here really...." ) ) .arg( tr( "This is the Qt4 resources file for your plugin. The Makefile generated for your plugin is all set up to compile the resource file so all you need to do is add your additional icons etc using the simple xml file format. Note the namespace used for all your resources e.g. (':/Homann/'). It is important to use this prefix for all your resources. We suggest you include any other images and run time data in this resurce file too." ) ) diff --git a/src/providers/grass/qgsgrass.h b/src/providers/grass/qgsgrass.h index b1a4057da7e1..2b27c6823df7 100644 --- a/src/providers/grass/qgsgrass.h +++ b/src/providers/grass/qgsgrass.h @@ -226,7 +226,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject * @param gisdbase full path to GRASS GISDBASE. * @param location location name (not path!). * @param mapset current mupset. Note that some variables depend on mapset and - * may influence behaviour of some functions (e.g. search path etc.) + * may influence behavior of some functions (e.g. search path etc.) */ static void setMapset( const QString &gisdbase, const QString &location, const QString &mapset ); diff --git a/src/providers/wms/qgswmsdataitems.cpp b/src/providers/wms/qgswmsdataitems.cpp index e375def97f11..eb273a8edf25 100644 --- a/src/providers/wms/qgswmsdataitems.cpp +++ b/src/providers/wms/qgswmsdataitems.cpp @@ -107,7 +107,7 @@ QVector QgsWMSConnectionItem::createChildren() } // Otherwise if we have just one single top-level layers with children, then // skip this top-level layer and iterate directly on its children - // Note (E. Rouault): this was the historical behaviour before fixing #13762 + // Note (E. Rouault): this was the historical behavior before fixing #13762 else if ( capabilityProperty.layers.size() == 1 ) { Q_FOREACH ( const QgsWmsLayerProperty &layerProperty, capabilityProperty.layers[0].layer ) diff --git a/src/ui/composer/qgscomposerattributetablewidgetbase.ui b/src/ui/composer/qgscomposerattributetablewidgetbase.ui index 7c02ff77da46..159cfae99213 100644 --- a/src/ui/composer/qgscomposerattributetablewidgetbase.ui +++ b/src/ui/composer/qgscomposerattributetablewidgetbase.ui @@ -356,7 +356,7 @@ - + @@ -836,7 +836,7 @@ mBackgroundColorButton mAdvancedCustomisationButton mWrapStringLineEdit - mWrapBehaviourComboBox + mWrapBehaviorComboBox mShowGridGroupCheckBox mGridStrokeWidthSpinBox mGridColorButton diff --git a/src/ui/qgsoptionsbase.ui b/src/ui/qgsoptionsbase.ui index d74860f2bc6a..e441d7bd0db3 100644 --- a/src/ui/qgsoptionsbase.ui +++ b/src/ui/qgsoptionsbase.ui @@ -1572,7 +1572,7 @@ - + @@ -1589,7 +1589,7 @@ - Attribute table behaviour + Attribute table behavior @@ -4565,7 +4565,7 @@ - + CRS for new layers @@ -5509,7 +5509,7 @@ mCurrentVariablesQGISChxBx mOptionsScrollArea_11 cbxAttributeTableDocked - cmbAttrTableBehaviour + cmbAttrTableBehavior mAttrTableViewComboBox spinBoxAttrTableRowCache leNullValue diff --git a/tests/bench/main.cpp b/tests/bench/main.cpp index c5e7103e9e99..d599be9daa0a 100644 --- a/tests/bench/main.cpp +++ b/tests/bench/main.cpp @@ -98,13 +98,13 @@ void usage( std::string const & appName ) ///////////////////////////////////////////////////////////////// -// Command line options 'behaviour' flag setup +// Command line options 'behavior' flag setup //////////////////////////////////////////////////////////////// // These two are global so that they can be set by the OpenDocuments // AppleEvent handler as well as by the main routine argv processing -// This behaviour will cause QGIS to autoload a project +// This behavior will cause QGIS to autoload a project static QString myProjectFileName = QLatin1String( "" ); // This is the 'leftover' arguments collection @@ -121,12 +121,12 @@ int main( int argc, char *argv[] ) #endif // Q_OS_WIN ///////////////////////////////////////////////////////////////// - // Command line options 'behaviour' flag setup + // Command line options 'behavior' flag setup //////////////////////////////////////////////////////////////// // // Parse the command line arguments, looking to see if the user has asked for any - // special behaviours. Any remaining non command arguments will be kept aside to + // special behaviors. Any remaining non command arguments will be kept aside to // be passed as a list of layers and / or a project that should be loaded. // @@ -140,7 +140,7 @@ int main( int argc, char *argv[] ) bool myParallel = false; QString myPrintTime = QStringLiteral( "total" ); - // This behaviour will set initial extent of map canvas, but only if + // This behavior will set initial extent of map canvas, but only if // there are no command line arguments. This gives a usable map // extent when qgis starts with no layers loaded. When layers are // loaded, we let the layers define the initial extent. @@ -351,7 +351,7 @@ int main( int argc, char *argv[] ) #endif // Q_OS_WIN ///////////////////////////////////////////////////////////////////// - // Now we have the handlers for the different behaviours... + // Now we have the handlers for the different behaviors... //////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////// diff --git a/tests/src/core/testqgscomposertablev2.cpp b/tests/src/core/testqgscomposertablev2.cpp index 2bfe2f73e9a9..71883c645995 100644 --- a/tests/src/core/testqgscomposertablev2.cpp +++ b/tests/src/core/testqgscomposertablev2.cpp @@ -352,17 +352,17 @@ void TestQgsComposerTableV2::attributeTableEmpty() mComposerAttributeTable->setFeatureFilter( QStringLiteral( "1=2" ) ); mComposerAttributeTable->setFilterFeatures( true ); - mComposerAttributeTable->setEmptyTableBehaviour( QgsComposerTableV2::HeadersOnly ); + mComposerAttributeTable->setEmptyTableBehavior( QgsComposerTableV2::HeadersOnly ); QgsCompositionChecker checker( QStringLiteral( "composerattributetable_headersonly" ), mComposition ); checker.setControlPathPrefix( QStringLiteral( "composer_table" ) ); QVERIFY( checker.testComposition( mReport, 0 ) ); - mComposerAttributeTable->setEmptyTableBehaviour( QgsComposerTableV2::HideTable ); + mComposerAttributeTable->setEmptyTableBehavior( QgsComposerTableV2::HideTable ); QgsCompositionChecker checker2( QStringLiteral( "composerattributetable_hidetable" ), mComposition ); checker2.setControlPathPrefix( QStringLiteral( "composer_table" ) ); QVERIFY( checker2.testComposition( mReport, 0 ) ); - mComposerAttributeTable->setEmptyTableBehaviour( QgsComposerTableV2::ShowMessage ); + mComposerAttributeTable->setEmptyTableBehavior( QgsComposerTableV2::ShowMessage ); mComposerAttributeTable->setEmptyTableMessage( QStringLiteral( "no rows" ) ); QgsCompositionChecker checker3( QStringLiteral( "composerattributetable_showmessage" ), mComposition ); checker3.setControlPathPrefix( QStringLiteral( "composer_table" ) ); @@ -844,7 +844,7 @@ void TestQgsComposerTableV2::autoWrap() mComposerAttributeTable->setMaximumNumberOfFeatures( 20 ); mComposerAttributeTable->setVectorLayer( multiLineLayer ); - mComposerAttributeTable->setWrapBehaviour( QgsComposerTableV2::WrapText ); + mComposerAttributeTable->setWrapBehavior( QgsComposerTableV2::WrapText ); mComposerAttributeTable->columns()->at( 0 )->setWidth( 25 ); mComposerAttributeTable->columns()->at( 1 )->setWidth( 25 ); diff --git a/tests/src/python/providertestbase.py b/tests/src/python/providertestbase.py index 8309ccd968ed..1848c422dc80 100644 --- a/tests/src/python/providertestbase.py +++ b/tests/src/python/providertestbase.py @@ -698,7 +698,7 @@ def testFeatureCount(self): assert count == 3, 'Got {}'.format(count) def testClosedIterators(self): - """ Test behaviour of closed iterators """ + """ Test behavior of closed iterators """ # Test retrieving feature after closing iterator f_it = self.provider.getFeatures(QgsFeatureRequest()) diff --git a/tests/src/python/test_provider_wfs.py b/tests/src/python/test_provider_wfs.py index d66ddfba58d5..fd37cf385536 100644 --- a/tests/src/python/test_provider_wfs.py +++ b/tests/src/python/test_provider_wfs.py @@ -1831,9 +1831,9 @@ def testSelectDistinct(self): self.assertEqual(values, [(1), (2)]) def testWrongCapabilityExtent(self): - """Test behaviour when capability extent is wrong.""" + """Test behavior when capability extent is wrong.""" - # Note the logic that is tested is purely heuristic, trying to recover from wrong server behaviour, + # Note the logic that is tested is purely heuristic, trying to recover from wrong server behavior, # so it might be legitimate to change that at a later point. endpoint = self.__class__.basetestpath + '/fake_qgis_http_endpoint_wrong_capability_extent' diff --git a/tests/src/python/test_provider_wfs_gui.py b/tests/src/python/test_provider_wfs_gui.py index e25ab5abf1a3..498fbb35104d 100644 --- a/tests/src/python/test_provider_wfs_gui.py +++ b/tests/src/python/test_provider_wfs_gui.py @@ -90,7 +90,7 @@ def wait_object_destruction(self, my_object): def test(self): - # This test is quite fragile as it depends on windows manager behaviour + # This test is quite fragile as it depends on windows manager behavior # regarding focus, so not surprising it doesn't pass # on other platforms than Linux. #if 'TRAVIS_OS_NAME' in os.environ and os.environ['TRAVIS_OS_NAME'] == 'osx': diff --git a/tests/src/python/test_qgsdistancearea.py b/tests/src/python/test_qgsdistancearea.py index 3cb6b31c79cf..9bc64a970778 100644 --- a/tests/src/python/test_qgsdistancearea.py +++ b/tests/src/python/test_qgsdistancearea.py @@ -111,7 +111,7 @@ def testMeasurePolygonWithHole(self): area = da.measureArea(polygon) assert area == 8, "Expected:\n%f\nGot:\n%f\n" % (8, area) -# MH150729: Changed behaviour to consider inner rings for perimeter calculation. Therefore, expected result is 16. +# MH150729: Changed behavior to consider inner rings for perimeter calculation. Therefore, expected result is 16. perimeter = da.measurePerimeter(polygon) assert perimeter == 16, "Expected:\n%f\nGot:\n%f\n" % (16, perimeter) diff --git a/tests/src/python/test_qgsfilterlineedit.py b/tests/src/python/test_qgsfilterlineedit.py index f530c3f6c063..6cb6ac29c967 100644 --- a/tests/src/python/test_qgsfilterlineedit.py +++ b/tests/src/python/test_qgsfilterlineedit.py @@ -74,7 +74,7 @@ def testNullValueHandling(self): # ND: I don't think this following logic is correct - should be a distinction between # the widget's representation of null and the actual value. Ie isNull() # should be false and value() should return 'null' - # in other words - if you break this test to match my desired behaviour, feel free to remove it! + # in other words - if you break this test to match my desired behavior, feel free to remove it! self.assertTrue(w.isNull()) self.assertFalse(w.value()) From 371fe1dd48c62529ce613f1fd3b9c88765eb70d8 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Wed, 11 Jan 2017 13:42:29 +0200 Subject: [PATCH 004/332] [processing] add new MultiImageSamplingRate algorithm from OTB 5.8.0 --- .../5.8.0/MultiImageSamplingRate.xml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 python/plugins/processing/algs/otb/description/5.8.0/MultiImageSamplingRate.xml diff --git a/python/plugins/processing/algs/otb/description/5.8.0/MultiImageSamplingRate.xml b/python/plugins/processing/algs/otb/description/5.8.0/MultiImageSamplingRate.xml new file mode 100644 index 000000000000..3391907bca08 --- /dev/null +++ b/python/plugins/processing/algs/otb/description/5.8.0/MultiImageSamplingRate.xml @@ -0,0 +1,89 @@ + + MultiImageSamplingRate + otbcli_MultiImageSamplingRate + Multi-image sampling rate estimation + Learning + Compute sampling rate for an input set of images. + + ParameterMultipleInput + il + Input statistics + List of statistics files for each input image. + + False + + + OutputFile + out + Output sampling rates + Output filename storing sampling rates (CSV format with class name, required samples, total samples, and rate). The given filename will be used with a suffix to indicate the corresponding input index (for instance: rates.csv will give rates_1.csv, rates_2.csv, ...). + + + ParameterSelection + strategy + Sampling strategy + + + + byclass + constant + smallest + percent + total + all + + + 2 + False + + + ParameterMultipleInput + strategy.byclass.in + Number of samples by class + Number of samples by class (CSV format with class name in 1st column and required samples in the 2nd).In the case of the custom multi-image mode, several inputs may be given for each image. + + False + + + ParameterString + strategy.constant.nb + Number of samples for all classes + Number of samples for all classes.In the case of the custom multi-image mode, several values can be given for each image. + + + False + + + ParameterString + strategy.percent.p + The percentage(s) to use + The percentage(s) to use In the case of the custom multi-image mode, several values can be given for each image. + + + False + + + ParameterString + strategy.total.v + The number of samples to generate + The number of samples to generateIn the case of the custom multi-image mode, several values can be given for each image. + + + False + + + ParameterSelection + mim + Multi-Image Mode + + + + proportional + equal + custom + + + 0 + False + + From 6be45054935eb88eef65de32b92d8463f8f718bd Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Wed, 11 Jan 2017 13:43:17 +0200 Subject: [PATCH 005/332] [processing] update OTB's white- and blacklist. Drop obsolete 3.x versions and add latest 5.8.0 --- .../algs/otb/maintenance/black_list.xml | 244 ++++----- .../algs/otb/maintenance/white_list.xml | 499 +++++++++--------- 2 files changed, 370 insertions(+), 373 deletions(-) diff --git a/python/plugins/processing/algs/otb/maintenance/black_list.xml b/python/plugins/processing/algs/otb/maintenance/black_list.xml index cec303f885d0..6bf74a294002 100644 --- a/python/plugins/processing/algs/otb/maintenance/black_list.xml +++ b/python/plugins/processing/algs/otb/maintenance/black_list.xml @@ -1,131 +1,119 @@ - - HomologousPointsExtraction - GenerateRPCSensorModel - RefineSensorModel - Quicklook - PixelValue - - - SarRadiometricCalibration - PixelValue - Quicklook - ConvertCartoToGeoPoint - ConvertSensorToGeoPoint - ObtainUTMZoneFromGeoPoint - BundleToPerfectSensor - Example - ComputePolylineFeatureFromImage - DSFuzzyModelEstimation - HomologousPointsExtraction - SFSTextureExtraction - VectorDataDSValidation - GenerateRPCSensorModel - GridBasedImageResampling - GeneratePlyFile - RefineSensorModel - MultiResolutionPyramid - HyperspectralUnmixing - OSMDownloader - VertexComponentAnalysis - Rasterization - VectorDataTransform - VectorDataReprojection - VectorDataSetField - VectorDataExtractROIApplication - Convert - DownloadSRTMTiles - DisparityMapToElevationMap - FineRegistration - StereoRectificationGridGenerator - BlockMatching - SplitImage - - - SarRadiometricCalibration - PixelValue - Quicklook - ConvertCartoToGeoPoint - ConvertSensorToGeoPoint - ObtainUTMZoneFromGeoPoint - BundleToPerfectSensor - Example - DSFuzzyModelEstimation - HomologousPointsExtraction - VectorDataDSValidation - GenerateRPCSensorModel - GridBasedImageResampling - GeneratePlyFile - RefineSensorModel - MultiResolutionPyramid - HyperspectralUnmixing - OSMDownloader - VertexComponentAnalysis - VectorDataSetField - DownloadSRTMTiles - DisparityMapToElevationMap - FineRegistration - StereoRectificationGridGenerator - BlockMatching - SplitImage - - - SarRadiometricCalibration - PixelValue - Quicklook - ConvertCartoToGeoPoint - ConvertSensorToGeoPoint - ObtainUTMZoneFromGeoPoint - BundleToPerfectSensor - Example - DSFuzzyModelEstimation - HomologousPointsExtraction - VectorDataDSValidation - GenerateRPCSensorModel - GridBasedImageResampling - GeneratePlyFile - RefineSensorModel - MultiResolutionPyramid - HyperspectralUnmixing - OSMDownloader - VertexComponentAnalysis - VectorDataSetField - DownloadSRTMTiles - DisparityMapToElevationMap - FineRegistration - StereoRectificationGridGenerator - BlockMatching - SplitImage - - - ApplicationExample - SarRadiometricCalibration - SARPolarMatrixConvert - PixelValue - Quicklook - ConvertCartoToGeoPoint - ConvertSensorToGeoPoint - ObtainUTMZoneFromGeoPoint - BundleToPerfectSensor - DSFuzzyModelEstimation - HomologousPointsExtraction - VectorDataDSValidation - GenerateRPCSensorModel - GridBasedImageResampling - GeneratePlyFile - RefineSensorModel - MultiResolutionPyramid - HyperspectralUnmixing - OSMDownloader - VertexComponentAnalysis - VectorDataSetField - DownloadSRTMTiles - DisparityMapToElevationMap - FineRegistration - StereoRectificationGridGenerator - BlockMatching - SplitImage - TestApplication - + + SarRadiometricCalibration + PixelValue + Quicklook + ConvertCartoToGeoPoint + ConvertSensorToGeoPoint + ObtainUTMZoneFromGeoPoint + BundleToPerfectSensor + Example + DSFuzzyModelEstimation + HomologousPointsExtraction + VectorDataDSValidation + GenerateRPCSensorModel + GridBasedImageResampling + GeneratePlyFile + RefineSensorModel + MultiResolutionPyramid + HyperspectralUnmixing + OSMDownloader + VertexComponentAnalysis + VectorDataSetField + DownloadSRTMTiles + DisparityMapToElevationMap + FineRegistration + StereoRectificationGridGenerator + BlockMatching + SplitImage + + + SarRadiometricCalibration + PixelValue + Quicklook + ConvertCartoToGeoPoint + ConvertSensorToGeoPoint + ObtainUTMZoneFromGeoPoint + BundleToPerfectSensor + Example + DSFuzzyModelEstimation + HomologousPointsExtraction + VectorDataDSValidation + GenerateRPCSensorModel + GridBasedImageResampling + GeneratePlyFile + RefineSensorModel + MultiResolutionPyramid + HyperspectralUnmixing + OSMDownloader + VertexComponentAnalysis + VectorDataSetField + DownloadSRTMTiles + DisparityMapToElevationMap + FineRegistration + StereoRectificationGridGenerator + BlockMatching + SplitImage + + + ApplicationExample + SarRadiometricCalibration + SARPolarMatrixConvert + PixelValue + Quicklook + ConvertCartoToGeoPoint + ConvertSensorToGeoPoint + ObtainUTMZoneFromGeoPoint + BundleToPerfectSensor + DSFuzzyModelEstimation + HomologousPointsExtraction + VectorDataDSValidation + GenerateRPCSensorModel + GridBasedImageResampling + GeneratePlyFile + RefineSensorModel + MultiResolutionPyramid + HyperspectralUnmixing + OSMDownloader + VertexComponentAnalysis + VectorDataSetField + DownloadSRTMTiles + DisparityMapToElevationMap + FineRegistration + StereoRectificationGridGenerator + BlockMatching + SplitImage + TestApplication + + + ApplicationExample + SarRadiometricCalibration + SARPolarMatrixConvert + PixelValue + Quicklook + ConvertCartoToGeoPoint + ConvertSensorToGeoPoint + ObtainUTMZoneFromGeoPoint + BundleToPerfectSensor + DSFuzzyModelEstimation + HomologousPointsExtraction + VectorDataDSValidation + GenerateRPCSensorModel + GridBasedImageResampling + GeneratePlyFile + RefineSensorModel + MultiResolutionPyramid + HyperspectralUnmixing + OSMDownloader + VertexComponentAnalysis + VectorDataSetField + DownloadSRTMTiles + DisparityMapToElevationMap + FineRegistration + StereoRectificationGridGenerator + BlockMatching + SplitImage + TestApplication + diff --git a/python/plugins/processing/algs/otb/maintenance/white_list.xml b/python/plugins/processing/algs/otb/maintenance/white_list.xml index 6835d3e966db..73eaeb0d70ea 100644 --- a/python/plugins/processing/algs/otb/maintenance/white_list.xml +++ b/python/plugins/processing/algs/otb/maintenance/white_list.xml @@ -1,248 +1,257 @@ - - BinaryMorphologicalOperation - EdgeExtraction - GrayScaleMorphologicalOperation - DimensionalityReduction - Pansharpening - ExtractROI - RigidTransformResample - Segmentation - KMeansClassification - TrainSVMImagesClassifier - ComputeConfusionMatrix - OpticalCalibration - SarRadiometricCalibration - Smoothing - - - MultivariateAlterationDetector - OpticalCalibration - StereoFramework - BinaryMorphologicalOperation - DimensionalityReduction - EdgeExtraction - GrayScaleMorphologicalOperation - LineSegmentDetection - LocalStatisticExtraction - RadiometricIndices - ConnectedComponentSegmentation - MeanShiftSmoothing - Segmentation - BandMath - ColorMapping - CompareImages - ConcatenateImages - ConcatenateVectorData - ExtractROI - KmzExport - ReadImageInfo - Rescale - Smoothing - TileFusion - Pansharpening - ClassificationMapRegularization - ComputeConfusionMatrix - ComputeImagesStatistics - FusionOfClassifications - ImageClassifier - KMeansClassification - SOMClassification - TrainImagesClassifier - ImageEnvelope - OrthoRectification - RigidTransformResample - Superimpose - ComputeModulusAndPhase - HaralickTextureExtraction - HooverCompareSegmentation - LSMSSegmentation - LSMSSmallRegionsMerging - LSMSVectorization - - - MultivariateAlterationDetector - OpticalCalibration - StereoFramework - BinaryMorphologicalOperation - DimensionalityReduction - EdgeExtraction - GrayScaleMorphologicalOperation - LineSegmentDetection - LocalStatisticExtraction - RadiometricIndices - ConnectedComponentSegmentation - MeanShiftSmoothing - Segmentation - BandMath - ColorMapping - CompareImages - ConcatenateImages - ConcatenateVectorData - ExtractROI - KmzExport - ReadImageInfo - Rescale - Smoothing - TileFusion - Pansharpening - ClassificationMapRegularization - ComputeConfusionMatrix - ComputeImagesStatistics - FusionOfClassifications - ImageClassifier - KMeansClassification - SOMClassification - TrainImagesClassifier - ImageEnvelope - OrthoRectification - RigidTransformResample - Superimpose - ComputeModulusAndPhase - HaralickTextureExtraction - HooverCompareSegmentation - LSMSSegmentation - LSMSSmallRegionsMerging - LSMSVectorization - ComputePolylineFeatureFromImage - SFSTextureExtraction - Rasterization - VectorDataTransform - VectorDataReprojection - VectorDataExtractROI - Convert - BandMathX - ComputeOGRLayersFeaturesStatistics - DEMConvert - Despeckle - OGRLayerClassifier - TrainOGRLayersClassifier - - - BandMath - BandMathX - BinaryMorphologicalOperation - ClassificationMapRegularization - CompareImages - ColorMapping - ComputeConfusionMatrix - ComputeImagesStatistics - ComputeModulusAndPhase - ComputeOGRLayersFeaturesStatistics - ComputePolylineFeatureFromImage - ConcatenateImages - ConcatenateVectorData - ConnectedComponentSegmentation - Convert - DEMConvert - Despeckle - DimensionalityReduction - ExtractROI - EdgeExtraction - FusionOfClassifications - GrayScaleMorphologicalOperation - HaralickTextureExtraction - HooverCompareSegmentation - ImageClassifier - ImageEnvelope - KMeansClassification - KmzExport - LineSegmentDetection - LSMSSegmentation - LSMSSmallRegionsMerging - LSMSVectorization - LocalStatisticExtraction - MeanShiftSmoothing - MultivariateAlterationDetector - OGRLayerClassifier - OpticalCalibration - OrthoRectification - Pansharpening - RadiometricIndices - Rasterization - ReadImageInfo - Rescale - RigidTransformResample - Segmentation - SFSTextureExtraction - Smoothing - SOMClassification - Superimpose - StereoFramework - TileFusion - TrainImagesClassifier - TrainOGRLayersClassifier - VectorDataTransform - VectorDataReprojection - VectorDataExtractROI - - - BandMath - BandMathX - BinaryMorphologicalOperation - ClassificationMapRegularization - CompareImages - ColorMapping - ComputeConfusionMatrix - ComputeImagesStatistics - ComputeModulusAndPhase - ComputeOGRLayersFeaturesStatistics - ComputePolylineFeatureFromImage - ConcatenateImages - ConcatenateVectorData - ConnectedComponentSegmentation - Convert - DEMConvert - Despeckle - DimensionalityReduction - ExtractROI - EdgeExtraction - FusionOfClassifications - GrayScaleMorphologicalOperation - HaralickTextureExtraction - HooverCompareSegmentation - ImageClassifier - ImageEnvelope - KMeansClassification - KmzExport - LineSegmentDetection - LSMSSegmentation - LSMSSmallRegionsMerging - LSMSVectorization - LocalStatisticExtraction - MeanShiftSmoothing - ManageNoData - MultivariateAlterationDetector - OGRLayerClassifier - OpticalCalibration - OrthoRectification - Pansharpening - PolygonClassStatistics - PredictRegression - RadiometricIndices - Rasterization - ReadImageInfo - Rescale - RigidTransformResample - SARCalibration - SARDecompositions - SARPolarSynth - SampleExtraction - SampleSelection - Segmentation - SFSTextureExtraction - Smoothing - SOMClassification - Superimpose - StereoFramework - TileFusion - TrainImagesClassifier - TrainOGRLayersClassifier - TrainVectorClassifier - TrainRegression - VectorDataTransform - VectorDataReprojection - VectorDataExtractROI - + + MultivariateAlterationDetector + OpticalCalibration + StereoFramework + BinaryMorphologicalOperation + DimensionalityReduction + EdgeExtraction + GrayScaleMorphologicalOperation + LineSegmentDetection + LocalStatisticExtraction + RadiometricIndices + ConnectedComponentSegmentation + MeanShiftSmoothing + Segmentation + BandMath + ColorMapping + CompareImages + ConcatenateImages + ConcatenateVectorData + ExtractROI + KmzExport + ReadImageInfo + Rescale + Smoothing + TileFusion + Pansharpening + ClassificationMapRegularization + ComputeConfusionMatrix + ComputeImagesStatistics + FusionOfClassifications + ImageClassifier + KMeansClassification + SOMClassification + TrainImagesClassifier + ImageEnvelope + OrthoRectification + RigidTransformResample + Superimpose + ComputeModulusAndPhase + HaralickTextureExtraction + HooverCompareSegmentation + LSMSSegmentation + LSMSSmallRegionsMerging + LSMSVectorization + ComputePolylineFeatureFromImage + SFSTextureExtraction + Rasterization + VectorDataTransform + VectorDataReprojection + VectorDataExtractROI + Convert + BandMathX + ComputeOGRLayersFeaturesStatistics + DEMConvert + Despeckle + OGRLayerClassifier + TrainOGRLayersClassifier + + + BandMath + BandMathX + BinaryMorphologicalOperation + ClassificationMapRegularization + CompareImages + ColorMapping + ComputeConfusionMatrix + ComputeImagesStatistics + ComputeModulusAndPhase + ComputeOGRLayersFeaturesStatistics + ComputePolylineFeatureFromImage + ConcatenateImages + ConcatenateVectorData + ConnectedComponentSegmentation + Convert + DEMConvert + Despeckle + DimensionalityReduction + ExtractROI + EdgeExtraction + FusionOfClassifications + GrayScaleMorphologicalOperation + HaralickTextureExtraction + HooverCompareSegmentation + ImageClassifier + ImageEnvelope + KMeansClassification + KmzExport + LineSegmentDetection + LSMSSegmentation + LSMSSmallRegionsMerging + LSMSVectorization + LocalStatisticExtraction + MeanShiftSmoothing + MultivariateAlterationDetector + OGRLayerClassifier + OpticalCalibration + OrthoRectification + Pansharpening + RadiometricIndices + Rasterization + ReadImageInfo + Rescale + RigidTransformResample + Segmentation + SFSTextureExtraction + Smoothing + SOMClassification + Superimpose + StereoFramework + TileFusion + TrainImagesClassifier + TrainOGRLayersClassifier + VectorDataTransform + VectorDataReprojection + VectorDataExtractROI + + + BandMath + BandMathX + BinaryMorphologicalOperation + ClassificationMapRegularization + CompareImages + ColorMapping + ComputeConfusionMatrix + ComputeImagesStatistics + ComputeModulusAndPhase + ComputeOGRLayersFeaturesStatistics + ComputePolylineFeatureFromImage + ConcatenateImages + ConcatenateVectorData + ConnectedComponentSegmentation + Convert + DEMConvert + Despeckle + DimensionalityReduction + ExtractROI + EdgeExtraction + FusionOfClassifications + GrayScaleMorphologicalOperation + HaralickTextureExtraction + HooverCompareSegmentation + ImageClassifier + ImageEnvelope + KMeansClassification + KmzExport + LineSegmentDetection + LSMSSegmentation + LSMSSmallRegionsMerging + LSMSVectorization + LocalStatisticExtraction + MeanShiftSmoothing + ManageNoData + MultivariateAlterationDetector + OGRLayerClassifier + OpticalCalibration + OrthoRectification + Pansharpening + PolygonClassStatistics + PredictRegression + RadiometricIndices + Rasterization + ReadImageInfo + Rescale + RigidTransformResample + SARCalibration + SARDecompositions + SARPolarSynth + SampleExtraction + SampleSelection + Segmentation + SFSTextureExtraction + Smoothing + SOMClassification + Superimpose + StereoFramework + TileFusion + TrainImagesClassifier + TrainOGRLayersClassifier + TrainVectorClassifier + TrainRegression + VectorDataTransform + VectorDataReprojection + VectorDataExtractROI + MultiImageSamplingRate + + + BandMath + BandMathX + BinaryMorphologicalOperation + ClassificationMapRegularization + CompareImages + ColorMapping + ComputeConfusionMatrix + ComputeImagesStatistics + ComputeModulusAndPhase + ComputeOGRLayersFeaturesStatistics + ComputePolylineFeatureFromImage + ConcatenateImages + ConcatenateVectorData + ConnectedComponentSegmentation + Convert + DEMConvert + Despeckle + DimensionalityReduction + ExtractROI + EdgeExtraction + FusionOfClassifications + GrayScaleMorphologicalOperation + HaralickTextureExtraction + HooverCompareSegmentation + ImageClassifier + ImageEnvelope + KMeansClassification + KmzExport + LineSegmentDetection + LSMSSegmentation + LSMSSmallRegionsMerging + LSMSVectorization + LocalStatisticExtraction + MeanShiftSmoothing + ManageNoData + MultivariateAlterationDetector + OGRLayerClassifier + OpticalCalibration + OrthoRectification + Pansharpening + PolygonClassStatistics + PredictRegression + RadiometricIndices + Rasterization + ReadImageInfo + Rescale + RigidTransformResample + SARCalibration + SARDecompositions + SARPolarSynth + SampleExtraction + SampleSelection + Segmentation + SFSTextureExtraction + Smoothing + SOMClassification + Superimpose + StereoFramework + TileFusion + TrainImagesClassifier + TrainOGRLayersClassifier + TrainVectorClassifier + TrainRegression + VectorDataTransform + VectorDataReprojection + VectorDataExtractROI + MultiImageSamplingRate + From 4467487e1cf1ba962015ad64a5bf49132ab9c039 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Wed, 11 Jan 2017 10:58:32 +0100 Subject: [PATCH 006/332] respect CamelCase for enums and their values --- doc/api_break.dox | 7 + .../interpolation/NormVecDecorator.sip | 14 +- .../interpolation/qgstininterpolator.sip | 4 +- scripts/chkspelling_ag.sh | 2 +- .../interpolation/CloughTocherInterpolator.cc | 46 ++--- .../interpolation/NormVecDecorator.cc | 14 +- src/analysis/interpolation/NormVecDecorator.h | 20 +- .../interpolation/qgstininterpolator.cpp | 2 +- .../interpolation/qgstininterpolator.h | 6 +- src/app/qgscustomprojectiondialog.cpp | 26 +-- src/app/qgscustomprojectiondialog.h | 2 +- src/app/qgsfieldsproperties.cpp | 84 ++++---- src/app/qgsfieldsproperties.h | 28 +-- src/app/qgspluginregistry.cpp | 2 +- src/core/geometry/qgscompoundcurve.cpp | 2 +- src/core/geometry/qgscurvepolygon.cpp | 2 +- src/core/geometry/qgsgeometrycollection.cpp | 2 +- src/core/geometry/qgsgeometryutils.h | 16 +- src/core/qgsgml.cpp | 126 ++++++------ src/core/qgsgml.h | 38 ++-- src/core/qgsgmlschema.cpp | 22 +-- src/core/qgsgmlschema.h | 18 +- src/gui/qgsprojectionselector.cpp | 98 +++++----- src/gui/qgsprojectionselector.h | 4 +- .../coordinate_capture/coordinatecapture.cpp | 2 +- .../evisdatabaseconnection.cpp | 20 +- .../evisdatabaseconnection.h | 18 +- .../evisdatabaseconnectiongui.cpp | 8 +- src/plugins/evis/evis.cpp | 2 +- .../qgsgeometrycheckerplugin.h | 2 +- src/plugins/georeferencer/qgsgeorefplugin.cpp | 2 +- src/plugins/gps_importer/qgsgpsplugin.cpp | 2 +- src/plugins/grass/qgsgrassmapcalc.cpp | 2 +- src/plugins/grass/qgsgrassnewmapset.cpp | 32 ++-- src/plugins/grass/qgsgrassnewmapset.h | 14 +- src/plugins/grass/qgsgrassplugin.cpp | 2 +- src/plugins/grass/qgsgrassselect.cpp | 30 +-- src/plugins/grass/qgsgrassselect.h | 14 +- .../offline_editing_plugin.cpp | 2 +- src/plugins/qgisplugin.h | 18 +- .../spatialquery/qgsspatialquerydialog.cpp | 50 ++--- .../spatialquery/qgsspatialquerydialog.h | 6 +- .../spatialquery/qgsspatialqueryplugin.cpp | 2 +- src/plugins/topology/topol.cpp | 2 +- src/providers/db2/qgsdb2sourceselect.cpp | 34 ++-- src/providers/db2/qgsdb2tablemodel.cpp | 80 ++++---- src/providers/db2/qgsdb2tablemodel.h | 20 +- src/providers/grass/qgsgrass.cpp | 6 +- src/providers/grass/qgsgrass.h | 8 +- .../grass/qgsgrassfeatureiterator.cpp | 40 ++-- src/providers/grass/qgsgrassprovider.cpp | 54 +++--- src/providers/grass/qgsgrassprovider.h | 20 +- src/providers/mssql/qgsmssqlsourceselect.cpp | 34 ++-- src/providers/mssql/qgsmssqltablemodel.cpp | 80 ++++---- src/providers/mssql/qgsmssqltablemodel.h | 20 +- .../oracle/ocispatial/qsql_ocispatial.cpp | 14 +- src/providers/oracle/ocispatial/wkbptr.h | 16 +- .../oracle/qgsoraclefeatureiterator.cpp | 18 +- src/providers/oracle/qgsoracleprovider.cpp | 78 ++++---- src/providers/oracle/qgsoracleprovider.h | 8 +- .../oracle/qgsoraclesourceselect.cpp | 48 ++--- src/providers/oracle/qgsoracletablemodel.cpp | 52 ++--- src/providers/oracle/qgsoracletablemodel.h | 20 +- src/providers/postgres/qgspgsourceselect.cpp | 48 ++--- src/providers/postgres/qgspgtablemodel.cpp | 56 +++--- src/providers/postgres/qgspgtablemodel.h | 24 +-- src/providers/postgres/qgspostgresconn.cpp | 50 ++--- src/providers/postgres/qgspostgresconn.h | 22 +-- .../postgres/qgspostgresfeatureiterator.cpp | 36 ++-- .../postgres/qgspostgresprovider.cpp | 180 +++++++++--------- src/providers/postgres/qgspostgresprovider.h | 2 +- .../spatialite/qgsspatialitesourceselect.h | 10 +- src/providers/wms/qgswmscapabilities.cpp | 4 +- src/providers/wms/qgswmscapabilities.h | 10 +- src/providers/wms/qgswmsprovider.cpp | 18 +- tests/src/python/acceptable_missing_doc.py | 4 +- 76 files changed, 968 insertions(+), 961 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 398a5947d515..bd72c52f8715 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -1045,6 +1045,13 @@ QgsEditorWidgetFactory {#qgis_api_break_3_0_QgsEditorWidgetFactory} - `alignmentFlag` has been removed. Use QgsFieldFormatter::representValue() instead - `createCache` has been removed. Use QgsFieldFormatter::representValue() instead + +QgsGeometryUtils {#qgis_api_break_3_0_QgsGeometryUtils} +---------------- + +- componentType enum has been renamed to ComponentType and its members were CamelCased too: VERTEX, RING and PART become Vertex, Ring and Part, respectively. + + QgsGPSConnectionRegistry {#qgis_api_break_3_0_QgsGPSConnectionRegistry} ------------------------ diff --git a/python/analysis/interpolation/NormVecDecorator.sip b/python/analysis/interpolation/NormVecDecorator.sip index 8253fb202773..c6a945f05684 100644 --- a/python/analysis/interpolation/NormVecDecorator.sip +++ b/python/analysis/interpolation/NormVecDecorator.sip @@ -5,8 +5,8 @@ class NormVecDecorator : TriDecorator %End public: - /** Enumeration for the state of a point. NORMAL means, that the point is not on a breakline, BREAKLINE means that the point is on a breakline (but not an endpoint of it) and ENDPOINT means, that it is an endpoint of a breakline*/ - enum pointState {NORMAL, BREAKLINE, ENDPOINT}; + //! Enumeration for the state of a point. Normal means, that the point is not on a BreakLine, BreakLine means that the point is on a breakline (but not an end point of it) and EndPoint means, that it is an endpoint of a breakline + enum PointState {Normal, BreakLine, EndPoint}; NormVecDecorator(); NormVecDecorator( Triangulation* tin ); virtual ~NormVecDecorator(); @@ -28,12 +28,12 @@ class NormVecDecorator : TriDecorator Vector3D* getNormal( int n ) const; /** Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', exept if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise*/ bool getTriangle( double x, double y, Point3D* p1 /Out/, Vector3D* v1 /Out/, Point3D* p2 /Out/, Vector3D* v2 /Out/, Point3D* p3 /Out/, Vector3D* v3 /Out/ ); - /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the pointStates of the triangle points (state1, state2, state3) + /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3) * @note not available in Python bindings */ - //bool getTriangle( double x, double y, Point3D* p1 /Out/, int* ptn1 /Out/, Vector3D* v1 /Out/, pointState* state1 /Out/, Point3D* p2 /Out/, int* ptn2 /Out/, Vector3D* v2 /Out/, pointState* state2 /Out/, Point3D* p3 /Out/, int* ptn3 /Out/, Vector3D* v3 /Out/, pointState* state3 /Out/); + //bool getTriangle( double x, double y, Point3D* p1 /Out/, int* ptn1 /Out/, Vector3D* v1 /Out/, PointState* state1 /Out/, Point3D* p2 /Out/, int* ptn2 /Out/, Vector3D* v2 /Out/, PointState* state2 /Out/, Point3D* p3 /Out/, int* ptn3 /Out/, Vector3D* v3 /Out/, PointState* state3 /Out/); /** Returns the state of the point with the number 'pointno'*/ - pointState getState( int pointno ) const; + PointState getState( int pointno ) const; /** Sets an interpolator*/ void setTriangleInterpolator( TriangleInterpolator* inter ); /** Swaps the edge which is closest to the point with x and y coordinates (if this is possible) and forces recalculation of the concerned normals (if alreadyestimated is true)*/ @@ -43,6 +43,6 @@ class NormVecDecorator : TriDecorator virtual bool saveAsShapefile( const QString& fileName ) const; protected: - /** Sets the state (BREAKLINE, NORMAL, ENDPOINT) of a point*/ - void setState( int pointno, pointState s ); + /** Sets the state (BreakLine, Normal, EndPoint) of a point*/ + void setState( int pointno, PointState s ); }; diff --git a/python/analysis/interpolation/qgstininterpolator.sip b/python/analysis/interpolation/qgstininterpolator.sip index 8113bdae46cd..6ed1eda799ae 100644 --- a/python/analysis/interpolation/qgstininterpolator.sip +++ b/python/analysis/interpolation/qgstininterpolator.sip @@ -5,12 +5,12 @@ class QgsTINInterpolator: QgsInterpolator %End public: //describes the type of interpolation - enum TIN_INTERPOLATION + enum TINInterpolation { Linear, CloughTocher }; - QgsTINInterpolator( const QList& inputData, TIN_INTERPOLATION interpolation = Linear, bool showProgressDialog = false ); + QgsTINInterpolator( const QList& inputData, TINInterpolation interpolation = Linear, bool showProgressDialog = false ); ~QgsTINInterpolator(); /** Calculates interpolation value for map coordinates x, y diff --git a/scripts/chkspelling_ag.sh b/scripts/chkspelling_ag.sh index f4f92036f614..e92490a29d44 100755 --- a/scripts/chkspelling_ag.sh +++ b/scripts/chkspelling_ag.sh @@ -34,7 +34,7 @@ else FILES="." fi -SPELLOK='(#spellok|)$' +SPELLOK='(#\s*spellok|)$' exec 5>&1 diff --git a/src/analysis/interpolation/CloughTocherInterpolator.cc b/src/analysis/interpolation/CloughTocherInterpolator.cc index ae930681be04..4ac5c1e566e1 100644 --- a/src/analysis/interpolation/CloughTocherInterpolator.cc +++ b/src/analysis/interpolation/CloughTocherInterpolator.cc @@ -260,7 +260,7 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th { Vector3D v1, v2, v3;//normals at the three data points int ptn1, ptn2, ptn3;//numbers of the vertex points - NormVecDecorator::pointState state1, state2, state3;//states of the vertex points (NORMAL, BREAKLINE, ENDPOINT possible) + NormVecDecorator::PointState state1, state2, state3;//states of the vertex points (Normal, BreakLine, EndPoint possible) if ( mTIN ) { @@ -309,7 +309,7 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th cp10.setY(( point1.getY() + point2.getY() + point3.getY() ) / 3 ); //set the derivatives of the points to new values if they are on a breakline - if ( state1 == NormVecDecorator::BREAKLINE ) + if ( state1 == NormVecDecorator::BreakLine ) { Vector3D target1; if ( mTIN->calcNormalForPoint( x, y, ptn1, &target1 ) ) @@ -317,12 +317,12 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th der1X = -target1.getX() / target1.getZ(); der1Y = -target1.getY() / target1.getZ(); - if ( state2 == NormVecDecorator::NORMAL ) + if ( state2 == NormVecDecorator::Normal ) { //recalculate cp1 cp1.setZ( point1.getZ() + ( cp1.getX() - point1.getX() )*der1X + ( cp1.getY() - point1.getY() )*der1Y ); } - if ( state3 == NormVecDecorator::NORMAL ) + if ( state3 == NormVecDecorator::Normal ) { //recalculate cp6 cp6.setZ( point1.getZ() + ( cp6.getX() - point1.getX() )*der1X + ( cp6.getY() - point1.getY() )*der1Y ); @@ -330,7 +330,7 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th } } - if ( state2 == NormVecDecorator::BREAKLINE ) + if ( state2 == NormVecDecorator::BreakLine ) { Vector3D target2; if ( mTIN->calcNormalForPoint( x, y, ptn2, &target2 ) ) @@ -338,12 +338,12 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th der2X = -target2.getX() / target2.getZ(); der2Y = -target2.getY() / target2.getZ(); - if ( state1 == NormVecDecorator::NORMAL ) + if ( state1 == NormVecDecorator::Normal ) { //recalculate cp2 cp2.setZ( point2.getZ() + ( cp2.getX() - point2.getX() )*der2X + ( cp2.getY() - point2.getY() )*der2Y ); } - if ( state3 == NormVecDecorator::NORMAL ) + if ( state3 == NormVecDecorator::Normal ) { //recalculate cp9 cp9.setZ( point2.getZ() + ( cp9.getX() - point2.getX() )*der2X + ( cp9.getY() - point2.getY() )*der2Y ); @@ -351,7 +351,7 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th } } - if ( state3 == NormVecDecorator::BREAKLINE ) + if ( state3 == NormVecDecorator::BreakLine ) { Vector3D target3; if ( mTIN->calcNormalForPoint( x, y, ptn3, &target3 ) ) @@ -359,12 +359,12 @@ void CloughTocherInterpolator::init( double x, double y )//version, which has th der3X = -target3.getX() / target3.getZ(); der3Y = -target3.getY() / target3.getZ(); - if ( state1 == NormVecDecorator::NORMAL ) + if ( state1 == NormVecDecorator::Normal ) { //recalculate cp14 cp14.setZ( point3.getZ() + ( cp14.getX() - point3.getX() )*der3X + ( cp14.getY() - point3.getY() )*der3Y ); } - if ( state2 == NormVecDecorator::NORMAL ) + if ( state2 == NormVecDecorator::Normal ) { //recalculate cp16 cp16.setZ( point3.getZ() + ( cp16.getX() - point3.getX() )*der3X + ( cp16.getY() - point3.getY() )*der3Y ); @@ -506,7 +506,7 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni { Vector3D v1, v2, v3;//normals at the three data points int ptn1, ptn2, ptn3;//numbers of the vertex points - NormVecDecorator::pointState state1, state2, state3;//states of the vertex points (NORMAL, BREAKLINE, ENDPOINT possible) + NormVecDecorator::PointState state1, state2, state3;//states of the vertex points (Normal, BreakLine, EndPoint possible) if ( mTIN ) { @@ -562,51 +562,51 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni Vector3D tmp( 0, 0, 0 ); //point1 - if ( state1 == NormVecDecorator::BREAKLINE ) + if ( state1 == NormVecDecorator::BreakLine ) { if ( mTIN->calcNormalForPoint( x, y, ptn1, &tmp ) ) { tmpx = -tmp.getX() / tmp.getZ(); tmpy = -tmp.getY() / tmp.getZ(); - if ( state3 == NormVecDecorator::NORMAL ) + if ( state3 == NormVecDecorator::Normal ) { cp6.setZ( point1.getZ() + (( point3.getX() - point1.getX() ) / 3 )*tmpx + (( point3.getY() - point1.getY() ) / 3 )*tmpy ); } - if ( state2 == NormVecDecorator::NORMAL ) + if ( state2 == NormVecDecorator::Normal ) { cp1.setZ( point1.getZ() + (( point2.getX() - point1.getX() ) / 3 )*tmpx + (( point2.getY() - point1.getY() ) / 3 )*tmpy ); } } } - if ( state2 == NormVecDecorator::BREAKLINE ) + if ( state2 == NormVecDecorator::Breakline ) { if ( mTIN->calcNormalForPoint( x, y, ptn2, &tmp ) ) { tmpx = -tmp.getX() / tmp.getZ(); tmpy = -tmp.getY() / tmp.getZ(); - if ( state1 == NormVecDecorator::NORMAL ) + if ( state1 == NormVecDecorator::Normal ) { cp2.setZ( point2.getZ() + (( point1.getX() - point2.getX() ) / 3 )*tmpx + (( point1.getY() - point2.getY() ) / 3 )*tmpy ); } - if ( state3 == NormVecDecorator::NORMAL ) + if ( state3 == NormVecDecorator::Normal ) { cp9.setZ( point2.getZ() + (( point3.getX() - point2.getX() ) / 3 )*tmpx + (( point3.getY() - point2.getY() ) / 3 )*tmpy ); } } } - if ( state3 == NormVecDecorator::BREAKLINE ) + if ( state3 == NormVecDecorator::Breakline ) { if ( mTIN->calcNormalForPoint( x, y, ptn3, &tmp ) ) { tmpx = -tmp.getX() / tmp.getZ(); tmpy = -tmp.getY() / tmp.getZ(); - if ( state1 == NormVecDecorator::NORMAL ) + if ( state1 == NormVecDecorator::Normal ) { cp14.setZ( point3.getZ() + (( point1.getX() - point3.getX() ) / 3 )*tmpx + (( point1.getY() - point3.getY() ) / 3 )*tmpy ); } - if ( state2 == NormVecDecorator::NORMAL ) + if ( state2 == NormVecDecorator::Normal ) { cp16.setZ( point3.getZ() + (( point2.getX() - point3.getX() ) / 3 )*tmpx + (( point2.getY() - point3.getY() ) / 3 )*tmpy ); } @@ -618,7 +618,7 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni cp3.setX( point1.getX() + ( cp10.getX() - point1.getX() ) / 3 ); cp3.setY( point1.getY() + ( cp10.getY() - point1.getY() ) / 3 ); - if ( state1 == NormVecDecorator::BREAKLINE ) + if ( state1 == NormVecDecorator::Breakline ) { MathUtils::normalFromPoints( &point1, &cp1, &cp6, &normal ); //recalculate der1X and der1Y @@ -632,7 +632,7 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni cp5.setX( point2.getX() + ( cp10.getX() - point2.getX() ) / 3 ); cp5.setY( point2.getY() + ( cp10.getY() - point2.getY() ) / 3 ); - if ( state2 == NormVecDecorator::BREAKLINE ) + if ( state2 == NormVecDecorator::Breakline ) { MathUtils::normalFromPoints( &point2, &cp9, &cp2, &normal ); //recalculate der2X and der2Y @@ -645,7 +645,7 @@ void CloughTocherInterpolator::init( double x, double y )//version which has uni cp15.setX( point3.getX() + ( cp10.getX() - point3.getX() ) / 3 ); cp15.setY( point3.getY() + ( cp10.getY() - point3.getY() ) / 3 ); - if ( state3 == NormVecDecorator::BREAKLINE ) + if ( state3 == NormVecDecorator::Breakline ) { MathUtils::normalFromPoints( &point3, &cp14, &cp16, &normal ); //recalculate der3X and der3Y diff --git a/src/analysis/interpolation/NormVecDecorator.cc b/src/analysis/interpolation/NormVecDecorator.cc index da9a6d8030ee..75bf7d1485cd 100644 --- a/src/analysis/interpolation/NormVecDecorator.cc +++ b/src/analysis/interpolation/NormVecDecorator.cc @@ -308,7 +308,7 @@ bool NormVecDecorator::getTriangle( double x, double y, Point3D* p1, Vector3D* v } } -NormVecDecorator::pointState NormVecDecorator::getState( int pointno ) const +NormVecDecorator::PointState NormVecDecorator::getState( int pointno ) const { if ( pointno >= 0 ) { @@ -322,7 +322,7 @@ NormVecDecorator::pointState NormVecDecorator::getState( int pointno ) const } -bool NormVecDecorator::getTriangle( double x, double y, Point3D* p1, int* ptn1, Vector3D* v1, pointState* state1, Point3D* p2, int* ptn2, Vector3D* v2, pointState* state2, Point3D* p3, int* ptn3, Vector3D* v3, pointState* state3 ) +bool NormVecDecorator::getTriangle( double x, double y, Point3D* p1, int* ptn1, Vector3D* v1, PointState* state1, Point3D* p2, int* ptn2, Vector3D* v2, PointState* state2, Point3D* p3, int* ptn3, Vector3D* v3, PointState* state3 ) { if ( p1 && p2 && p3 && v1 && v2 && v3 && ptn1 && ptn2 && ptn3 && state1 && state2 && state3 ) { @@ -377,7 +377,7 @@ bool NormVecDecorator::estimateFirstDerivative( int pointno ) int numberofbreaks = 0;//number of counted breaklines double weights = 0;//sum of the weights double currentweight = 0;//current weight - pointState status; + PointState status; QList* vlist = getSurroundingTriangles( pointno );//get the value list @@ -468,15 +468,15 @@ bool NormVecDecorator::estimateFirstDerivative( int pointno ) if ( numberofbreaks == 0 ) { - status = NORMAL; + status = Normal; } else if ( numberofbreaks == 1 ) { - status = ENDPOINT; + status = EndPoint; } else { - status = BREAKLINE; + status = BreakLine; } delete vlist; @@ -558,7 +558,7 @@ void NormVecDecorator::eliminateHorizontalTriangles() } } -void NormVecDecorator::setState( int pointno, pointState s ) +void NormVecDecorator::setState( int pointno, PointState s ) { if ( pointno >= 0 ) { diff --git a/src/analysis/interpolation/NormVecDecorator.h b/src/analysis/interpolation/NormVecDecorator.h index 4dd93f5ec7da..836de5bc9181 100644 --- a/src/analysis/interpolation/NormVecDecorator.h +++ b/src/analysis/interpolation/NormVecDecorator.h @@ -30,8 +30,8 @@ class QProgressDialog; class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator { public: - //! Enumeration for the state of a point. NORMAL means, that the point is not on a breakline, BREAKLINE means that the point is on a breakline (but not an endpoint of it) and ENDPOINT means, that it is an endpoint of a breakline - enum pointState {NORMAL, BREAKLINE, ENDPOINT}; + //! Enumeration for the state of a point. Normal means, that the point is not on a BreakLine, BreakLine means that the point is on a breakline (but not an end point of it) and EndPoint means, that it is an endpoint of a breakline. + enum PointState {Normal, BreakLine, EndPoint}; NormVecDecorator(); NormVecDecorator( Triangulation* tin ); virtual ~NormVecDecorator(); @@ -54,12 +54,12 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator //! Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', exept if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise bool getTriangle( double x, double y, Point3D* p1, Vector3D* v1, Point3D* p2, Vector3D* v2, Point3D* p3, Vector3D* v3 ); - /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the pointStates of the triangle points (state1, state2, state3) + /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3) * @note not available in Python bindings */ - bool getTriangle( double x, double y, Point3D* p1, int* ptn1, Vector3D* v1, pointState* state1, Point3D* p2, int* ptn2, Vector3D* v2, pointState* state2, Point3D* p3, int* ptn3, Vector3D* v3, pointState* state3 ); + bool getTriangle( double x, double y, Point3D* p1, int* ptn1, Vector3D* v1, PointState* state1, Point3D* p2, int* ptn2, Vector3D* v2, PointState* state2, Point3D* p3, int* ptn3, Vector3D* v3, PointState* state3 ); //! Returns the state of the point with the number 'pointno' - pointState getState( int pointno ) const; + PointState getState( int pointno ) const; //! Sets an interpolator void setTriangleInterpolator( TriangleInterpolator* inter ) override; //! Swaps the edge which is closest to the point with x and y coordinates (if this is possible) and forces recalculation of the concerned normals (if alreadyestimated is true) @@ -78,17 +78,17 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator //! Vector that stores the normals for the points. If 'estimateFirstDerivatives()' was called and there is a null pointer, this means, that the triangle point is on a breakline QVector* mNormVec; //! Vector who stores, it a point is not on a breakline, if it is a normal point of the breakline or if it is an endpoint of a breakline - QVector* mPointState; - //! Sets the state (BREAKLINE, NORMAL, ENDPOINT) of a point - void setState( int pointno, pointState s ); + QVector* mPointState; + //! Sets the state (BreakLine, Normal, EndPoint) of a point + void setState( int pointno, PointState s ); }; -inline NormVecDecorator::NormVecDecorator(): TriDecorator(), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) +inline NormVecDecorator::NormVecDecorator(): TriDecorator(), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) { alreadyestimated = false; } -inline NormVecDecorator::NormVecDecorator( Triangulation* tin ): TriDecorator( tin ), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) +inline NormVecDecorator::NormVecDecorator( Triangulation* tin ): TriDecorator( tin ), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) { alreadyestimated = false; } diff --git a/src/analysis/interpolation/qgstininterpolator.cpp b/src/analysis/interpolation/qgstininterpolator.cpp index 3f996d68db1e..c806964f7d78 100644 --- a/src/analysis/interpolation/qgstininterpolator.cpp +++ b/src/analysis/interpolation/qgstininterpolator.cpp @@ -29,7 +29,7 @@ #include "qgswkbptr.h" #include -QgsTINInterpolator::QgsTINInterpolator( const QList& inputData, TIN_INTERPOLATION interpolation, bool showProgressDialog ) +QgsTINInterpolator::QgsTINInterpolator( const QList& inputData, TINInterpolation interpolation, bool showProgressDialog ) : QgsInterpolator( inputData ) , mTriangulation( nullptr ) , mTriangleInterpolator( nullptr ) diff --git a/src/analysis/interpolation/qgstininterpolator.h b/src/analysis/interpolation/qgstininterpolator.h index 538a79497deb..ae21f94f7dd4 100644 --- a/src/analysis/interpolation/qgstininterpolator.h +++ b/src/analysis/interpolation/qgstininterpolator.h @@ -32,12 +32,12 @@ class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator { public: //describes the type of interpolation - enum TIN_INTERPOLATION + enum TINInterpolation { Linear, CloughTocher }; - QgsTINInterpolator( const QList& inputData, TIN_INTERPOLATION interpolation = Linear, bool showProgressDialog = false ); + QgsTINInterpolator( const QList& inputData, TINInterpolation interpolation = Linear, bool showProgressDialog = false ); ~QgsTINInterpolator(); /** Calculates interpolation value for map coordinates x, y @@ -60,7 +60,7 @@ class ANALYSIS_EXPORT QgsTINInterpolator: public QgsInterpolator //! File path to export the triangulation QString mTriangulationFilePath; //! Type of interpolation - TIN_INTERPOLATION mInterpolation; + TINInterpolation mInterpolation; //! Create dual edge triangulation void initialize(); diff --git a/src/app/qgscustomprojectiondialog.cpp b/src/app/qgscustomprojectiondialog.cpp index a105a463ea7d..2e36b8a63371 100644 --- a/src/app/qgscustomprojectiondialog.cpp +++ b/src/app/qgscustomprojectiondialog.cpp @@ -68,7 +68,7 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget *parent, Qt::Windo leNameList->setCurrentItem( leNameList->topLevelItem( 0 ) ); } - leNameList->hideColumn( QGIS_CRS_ID_COLUMN ); + leNameList->hideColumn( QgisCrsIdColumn ); } @@ -115,9 +115,9 @@ void QgsCustomProjectionDialog::populateList() existingCRSparameters[id] = crs.toProj4(); newItem = new QTreeWidgetItem( leNameList, QStringList() ); - newItem->setText( QGIS_CRS_NAME_COLUMN, name ); - newItem->setText( QGIS_CRS_ID_COLUMN, id ); - newItem->setText( QGIS_CRS_PARAMETERS_COLUMN, crs.toProj4() ); + newItem->setText( QgisCrsNameColumn, name ); + newItem->setText( QgisCrsIdColumn, id ); + newItem->setText( QgisCrsParametersColumn, crs.toProj4() ); } } else @@ -127,12 +127,12 @@ void QgsCustomProjectionDialog::populateList() sqlite3_finalize( myPreparedStatement ); sqlite3_close( myDatabase ); - leNameList->sortByColumn( QGIS_CRS_NAME_COLUMN, Qt::AscendingOrder ); + leNameList->sortByColumn( QgisCrsNameColumn, Qt::AscendingOrder ); QTreeWidgetItemIterator it( leNameList ); while ( *it ) { - QString id = ( *it )->text( QGIS_CRS_ID_COLUMN ); + QString id = ( *it )->text( QgisCrsIdColumn ); customCRSids.push_back( id ); customCRSnames.push_back( existingCRSnames[id] ); customCRSparameters.push_back( existingCRSparameters[id] ); @@ -312,9 +312,9 @@ void QgsCustomProjectionDialog::on_pbnAdd_clicked() QTreeWidgetItem* newItem = new QTreeWidgetItem( leNameList, QStringList() ); - newItem->setText( QGIS_CRS_NAME_COLUMN, name ); - newItem->setText( QGIS_CRS_ID_COLUMN, id ); - newItem->setText( QGIS_CRS_PARAMETERS_COLUMN, parameters.toProj4() ); + newItem->setText( QgisCrsNameColumn, name ); + newItem->setText( QgisCrsIdColumn, id ); + newItem->setText( QgisCrsParametersColumn, parameters.toProj4() ); customCRSnames.push_back( name ); customCRSids.push_back( id ); customCRSparameters.push_back( parameters.toProj4() ); @@ -348,14 +348,14 @@ void QgsCustomProjectionDialog::on_leNameList_currentItemChanged( QTreeWidgetIte previousIndex = leNameList->indexOfTopLevelItem( previous ); customCRSnames[previousIndex] = leName->text(); customCRSparameters[previousIndex] = teParameters->toPlainText(); - previous->setText( QGIS_CRS_NAME_COLUMN, leName->text() ); - previous->setText( QGIS_CRS_PARAMETERS_COLUMN, teParameters->toPlainText() ); + previous->setText( QgisCrsNameColumn, leName->text() ); + previous->setText( QgisCrsParametersColumn, teParameters->toPlainText() ); } if ( current ) { currentIndex = leNameList->indexOfTopLevelItem( current ); leName->setText( customCRSnames[currentIndex] ); - teParameters->setPlainText( current->text( QGIS_CRS_PARAMETERS_COLUMN ) ); + teParameters->setPlainText( current->text( QgisCrsParametersColumn ) ); } else { @@ -381,7 +381,7 @@ void QgsCustomProjectionDialog::on_pbnCopyCRS_clicked() } teParameters->setPlainText( srs.toProj4() ); customCRSparameters[leNameList->currentIndex().row()] = srs.toProj4(); - leNameList->currentItem()->setText( QGIS_CRS_PARAMETERS_COLUMN, srs.toProj4() ); + leNameList->currentItem()->setText( QgisCrsParametersColumn, srs.toProj4() ); } delete mySelector; diff --git a/src/app/qgscustomprojectiondialog.h b/src/app/qgscustomprojectiondialog.h index 45f1bcfb1153..aac3b268cba3 100644 --- a/src/app/qgscustomprojectiondialog.h +++ b/src/app/qgscustomprojectiondialog.h @@ -69,7 +69,7 @@ class APP_EXPORT QgsCustomProjectionDialog : public QDialog, private Ui::QgsCust QStringList deletedCRSs; //Columns in the tree widget - enum columns { QGIS_CRS_NAME_COLUMN, QGIS_CRS_ID_COLUMN, QGIS_CRS_PARAMETERS_COLUMN }; + enum Columns { QgisCrsNameColumn, QgisCrsIdColumn, QgisCrsParametersColumn }; }; diff --git a/src/app/qgsfieldsproperties.cpp b/src/app/qgsfieldsproperties.cpp index 659ef9626dbb..2fdbfd73a1d2 100644 --- a/src/app/qgsfieldsproperties.cpp +++ b/src/app/qgsfieldsproperties.cpp @@ -79,20 +79,20 @@ QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent mFieldsList = new DragList( mAttributesListFrame ); mAttributesListLayout->addWidget( mFieldsList ); - mFieldsList->setColumnCount( attrColCount ); + mFieldsList->setColumnCount( AttrColCount ); mFieldsList->setSelectionBehavior( QAbstractItemView::SelectRows ); mFieldsList->setDragDropMode( QAbstractItemView::DragOnly ); - mFieldsList->setHorizontalHeaderItem( attrIdCol, new QTableWidgetItem( tr( "Id" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrNameCol, new QTableWidgetItem( tr( "Name" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrTypeCol, new QTableWidgetItem( tr( "Type" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrTypeNameCol, new QTableWidgetItem( tr( "Type name" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrLengthCol, new QTableWidgetItem( tr( "Length" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrPrecCol, new QTableWidgetItem( tr( "Precision" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrCommentCol, new QTableWidgetItem( tr( "Comment" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrEditTypeCol, new QTableWidgetItem( tr( "Edit widget" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrWMSCol, new QTableWidgetItem( QStringLiteral( "WMS" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrWFSCol, new QTableWidgetItem( QStringLiteral( "WFS" ) ) ); - mFieldsList->setHorizontalHeaderItem( attrAliasCol, new QTableWidgetItem( tr( "Alias" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrIdCol, new QTableWidgetItem( tr( "Id" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrNameCol, new QTableWidgetItem( tr( "Name" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrTypeCol, new QTableWidgetItem( tr( "Type" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrTypeNameCol, new QTableWidgetItem( tr( "Type name" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrLengthCol, new QTableWidgetItem( tr( "Length" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrPrecCol, new QTableWidgetItem( tr( "Precision" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrCommentCol, new QTableWidgetItem( tr( "Comment" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrEditTypeCol, new QTableWidgetItem( tr( "Edit widget" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrWMSCol, new QTableWidgetItem( QStringLiteral( "WMS" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrWFSCol, new QTableWidgetItem( QStringLiteral( "WFS" ) ) ); + mFieldsList->setHorizontalHeaderItem( AttrAliasCol, new QTableWidgetItem( tr( "Alias" ) ) ); mFieldsList->setSortingEnabled( true ); mFieldsList->sortByColumn( 0, Qt::AscendingOrder ); @@ -296,13 +296,13 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField& field ) dataItem->setIcon( mLayer->fields().iconForField( idx ) ); break; } - mFieldsList->setItem( row, attrIdCol, dataItem ); + mFieldsList->setItem( row, AttrIdCol, dataItem ); mIndexedWidgets.insert( idx, mFieldsList->item( row, 0 ) ); - mFieldsList->setItem( row, attrNameCol, new QTableWidgetItem( field.name() ) ); - mFieldsList->setItem( row, attrTypeCol, new QTableWidgetItem( QVariant::typeToName( field.type() ) ) ); - mFieldsList->setItem( row, attrTypeNameCol, new QTableWidgetItem( field.typeName() ) ); - mFieldsList->setItem( row, attrLengthCol, new QTableWidgetItem( QString::number( field.length() ) ) ); - mFieldsList->setItem( row, attrPrecCol, new QTableWidgetItem( QString::number( field.precision() ) ) ); + mFieldsList->setItem( row, AttrNameCol, new QTableWidgetItem( field.name() ) ); + mFieldsList->setItem( row, AttrTypeCol, new QTableWidgetItem( QVariant::typeToName( field.type() ) ) ); + mFieldsList->setItem( row, AttrTypeNameCol, new QTableWidgetItem( field.typeName() ) ); + mFieldsList->setItem( row, AttrLengthCol, new QTableWidgetItem( QString::number( field.length() ) ) ); + mFieldsList->setItem( row, AttrPrecCol, new QTableWidgetItem( QString::number( field.precision() ) ) ); if ( mLayer->fields().fieldOrigin( idx ) == QgsFields::OriginExpression ) { QWidget* expressionWidget = new QWidget; @@ -314,51 +314,51 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField& field ) expressionWidget->layout()->setContentsMargins( 0, 0, 0, 0 ); expressionWidget->layout()->addWidget( editExpressionButton ); expressionWidget->layout()->addWidget( new QLabel( mLayer->expressionField( idx ) ) ); - mFieldsList->setCellWidget( row, attrCommentCol, expressionWidget ); + mFieldsList->setCellWidget( row, AttrCommentCol, expressionWidget ); } else { - mFieldsList->setItem( row, attrCommentCol, new QTableWidgetItem( field.comment() ) ); + mFieldsList->setItem( row, AttrCommentCol, new QTableWidgetItem( field.comment() ) ); } QList notEditableCols = QList() - << attrIdCol - << attrNameCol - << attrTypeCol - << attrTypeNameCol - << attrLengthCol - << attrPrecCol; + << AttrIdCol + << AttrNameCol + << AttrTypeCol + << AttrTypeNameCol + << AttrLengthCol + << AttrPrecCol; Q_FOREACH ( int i, notEditableCols ) mFieldsList->item( row, i )->setFlags( mFieldsList->item( row, i )->flags() & ~Qt::ItemIsEditable ); bool canRenameFields = mLayer->isEditable() && ( mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::RenameAttributes ) && !mLayer->readOnly(); if ( canRenameFields ) - mFieldsList->item( row, attrNameCol )->setFlags( mFieldsList->item( row, attrNameCol )->flags() | Qt::ItemIsEditable ); + mFieldsList->item( row, AttrNameCol )->setFlags( mFieldsList->item( row, AttrNameCol )->flags() | Qt::ItemIsEditable ); else - mFieldsList->item( row, attrNameCol )->setFlags( mFieldsList->item( row, attrNameCol )->flags() & ~Qt::ItemIsEditable ); + mFieldsList->item( row, AttrNameCol )->setFlags( mFieldsList->item( row, AttrNameCol )->flags() & ~Qt::ItemIsEditable ); FieldConfig cfg( mLayer, idx ); QPushButton *pb; pb = new QPushButton( QgsEditorWidgetRegistry::instance()->name( cfg.mEditorWidgetType ) ); cfg.mButton = pb; - mFieldsList->setCellWidget( row, attrEditTypeCol, pb ); + mFieldsList->setCellWidget( row, AttrEditTypeCol, pb ); connect( pb, SIGNAL( pressed() ), this, SLOT( attributeTypeDialog() ) ); setConfigForRow( row, cfg ); //set the alias for the attribute - mFieldsList->setItem( row, attrAliasCol, new QTableWidgetItem( field.alias() ) ); + mFieldsList->setItem( row, AttrAliasCol, new QTableWidgetItem( field.alias() ) ); //published WMS/WFS attributes QTableWidgetItem* wmsAttrItem = new QTableWidgetItem(); wmsAttrItem->setCheckState( mLayer->excludeAttributesWms().contains( field.name() ) ? Qt::Unchecked : Qt::Checked ); wmsAttrItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable ); - mFieldsList->setItem( row, attrWMSCol, wmsAttrItem ); + mFieldsList->setItem( row, AttrWMSCol, wmsAttrItem ); QTableWidgetItem* wfsAttrItem = new QTableWidgetItem(); wfsAttrItem->setCheckState( mLayer->excludeAttributesWfs().contains( field.name() ) ? Qt::Unchecked : Qt::Checked ); wfsAttrItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable ); - mFieldsList->setItem( row, attrWFSCol, wfsAttrItem ); + mFieldsList->setItem( row, AttrWFSCol, wfsAttrItem ); } void QgsFieldsProperties::loadRelations() @@ -784,9 +784,9 @@ void QgsFieldsProperties::updateButtons() void QgsFieldsProperties::attributesListCellChanged( int row, int column ) { - if ( column == attrAliasCol && mLayer ) + if ( column == AttrAliasCol && mLayer ) { - int idx = mFieldsList->item( row, attrIdCol )->text().toInt(); + int idx = mFieldsList->item( row, AttrIdCol )->text().toInt(); const QgsFields &fields = mLayer->fields(); @@ -808,7 +808,7 @@ void QgsFieldsProperties::attributesListCellChanged( int row, int column ) } } } - else if ( column == attrNameCol && mLayer && mLayer->isEditable() ) + else if ( column == AttrNameCol && mLayer && mLayer->isEditable() ) { QTableWidgetItem *nameItem = mFieldsList->item( row, column ); if ( !nameItem || @@ -875,9 +875,9 @@ void QgsFieldsProperties::updateFieldRenamingStatus() for ( int row = 0; row < mFieldsList->rowCount(); ++row ) { if ( canRenameFields ) - mFieldsList->item( row, attrNameCol )->setFlags( mFieldsList->item( row, attrNameCol )->flags() | Qt::ItemIsEditable ); + mFieldsList->item( row, AttrNameCol )->setFlags( mFieldsList->item( row, AttrNameCol )->flags() | Qt::ItemIsEditable ); else - mFieldsList->item( row, attrNameCol )->setFlags( mFieldsList->item( row, attrNameCol )->flags() & ~Qt::ItemIsEditable ); + mFieldsList->item( row, AttrNameCol )->setFlags( mFieldsList->item( row, AttrNameCol )->flags() & ~Qt::ItemIsEditable ); } } @@ -985,7 +985,7 @@ void QgsFieldsProperties::apply() for ( int i = 0; i < mFieldsList->rowCount(); i++ ) { - int idx = mFieldsList->item( i, attrIdCol )->text().toInt(); + int idx = mFieldsList->item( i, AttrIdCol )->text().toInt(); QString name = mLayer->fields().at( idx ).name(); FieldConfig cfg = configForRow( i ); @@ -1019,13 +1019,13 @@ void QgsFieldsProperties::apply() mLayer->removeFieldConstraint( i, QgsFieldConstraints::ConstraintExpression ); } - if ( mFieldsList->item( i, attrWMSCol )->checkState() == Qt::Unchecked ) + if ( mFieldsList->item( i, AttrWMSCol )->checkState() == Qt::Unchecked ) { - excludeAttributesWMS.insert( mFieldsList->item( i, attrNameCol )->text() ); + excludeAttributesWMS.insert( mFieldsList->item( i, AttrNameCol )->text() ); } - if ( mFieldsList->item( i, attrWFSCol )->checkState() == Qt::Unchecked ) + if ( mFieldsList->item( i, AttrWFSCol )->checkState() == Qt::Unchecked ) { - excludeAttributesWFS.insert( mFieldsList->item( i, attrNameCol )->text() ); + excludeAttributesWFS.insert( mFieldsList->item( i, AttrNameCol )->text() ); } } diff --git a/src/app/qgsfieldsproperties.h b/src/app/qgsfieldsproperties.h index 0cb075ee43cd..3c245cbb7e5b 100644 --- a/src/app/qgsfieldsproperties.h +++ b/src/app/qgsfieldsproperties.h @@ -219,23 +219,23 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope // between fieldIdx and QTableWidgetItem->row() QList mIndexedWidgets; - enum attrColumns + enum AttrColumns { - attrIdCol = 0, - attrNameCol, - attrEditTypeCol, - attrAliasCol, - attrTypeCol, - attrTypeNameCol, - attrLengthCol, - attrPrecCol, - attrCommentCol, - attrWMSCol, - attrWFSCol, - attrColCount, + AttrIdCol = 0, + AttrNameCol, + AttrEditTypeCol, + AttrAliasCol, + AttrTypeCol, + AttrTypeNameCol, + AttrLengthCol, + AttrPrecCol, + AttrCommentCol, + AttrWMSCol, + AttrWFSCol, + AttrColCount, }; - enum relationColumns + enum RelationColumns { RelNameCol = 0, RelLayerCol, diff --git a/src/app/qgspluginregistry.cpp b/src/app/qgspluginregistry.cpp index 88868b348f67..95e6591f5020 100644 --- a/src/app/qgspluginregistry.cpp +++ b/src/app/qgspluginregistry.cpp @@ -332,7 +332,7 @@ void QgsPluginRegistry::loadCppPlugin( const QString& theFullPathName ) switch ( pType() ) { - case QgisPlugin::RENDERER: + case QgisPlugin::Renderer: case QgisPlugin::UI: { // UI only -- doesn't use mapcanvas diff --git a/src/core/geometry/qgscompoundcurve.cpp b/src/core/geometry/qgscompoundcurve.cpp index 668617fb28e7..731687cc0e99 100644 --- a/src/core/geometry/qgscompoundcurve.cpp +++ b/src/core/geometry/qgscompoundcurve.cpp @@ -653,7 +653,7 @@ QList< QPair > QgsCompoundCurve::curveVertexId( QgsVertexId id double QgsCompoundCurve::closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const { - return QgsGeometryUtils::closestSegmentFromComponents( mCurves, QgsGeometryUtils::VERTEX, pt, segmentPt, vertexAfter, leftOf, epsilon ); + return QgsGeometryUtils::closestSegmentFromComponents( mCurves, QgsGeometryUtils::Vertex, pt, segmentPt, vertexAfter, leftOf, epsilon ); } bool QgsCompoundCurve::pointAt( int node, QgsPointV2& point, QgsVertexId::VertexType& type ) const diff --git a/src/core/geometry/qgscurvepolygon.cpp b/src/core/geometry/qgscurvepolygon.cpp index 0bc765143bc2..04c32e9224db 100644 --- a/src/core/geometry/qgscurvepolygon.cpp +++ b/src/core/geometry/qgscurvepolygon.cpp @@ -668,7 +668,7 @@ double QgsCurvePolygon::closestSegment( const QgsPointV2& pt, QgsPointV2& segmen QList segmentList; segmentList.append( mExteriorRing ); segmentList.append( mInteriorRings ); - return QgsGeometryUtils::closestSegmentFromComponents( segmentList, QgsGeometryUtils::RING, pt, segmentPt, vertexAfter, leftOf, epsilon ); + return QgsGeometryUtils::closestSegmentFromComponents( segmentList, QgsGeometryUtils::Ring, pt, segmentPt, vertexAfter, leftOf, epsilon ); } bool QgsCurvePolygon::nextVertex( QgsVertexId& vId, QgsPointV2& vertex ) const diff --git a/src/core/geometry/qgsgeometrycollection.cpp b/src/core/geometry/qgsgeometrycollection.cpp index 8eea134f17b7..57283bc1e56f 100644 --- a/src/core/geometry/qgsgeometrycollection.cpp +++ b/src/core/geometry/qgsgeometrycollection.cpp @@ -378,7 +378,7 @@ int QgsGeometryCollection::nCoordinates() const double QgsGeometryCollection::closestSegment( const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) const { - return QgsGeometryUtils::closestSegmentFromComponents( mGeometries, QgsGeometryUtils::PART, pt, segmentPt, vertexAfter, leftOf, epsilon ); + return QgsGeometryUtils::closestSegmentFromComponents( mGeometries, QgsGeometryUtils::Part, pt, segmentPt, vertexAfter, leftOf, epsilon ); } bool QgsGeometryCollection::nextVertex( QgsVertexId& id, QgsPointV2& vertex ) const diff --git a/src/core/geometry/qgsgeometryutils.h b/src/core/geometry/qgsgeometryutils.h index cb56c734cf16..3e132830d99d 100644 --- a/src/core/geometry/qgsgeometryutils.h +++ b/src/core/geometry/qgsgeometryutils.h @@ -244,14 +244,14 @@ class CORE_EXPORT QgsGeometryUtils */ static QStringList wktGetChildBlocks( const QString& wkt , const QString &defaultType = "" ); - enum componentType + enum ComponentType { - VERTEX, - RING, - PART + Vertex, + Ring, + Part }; - template static double closestSegmentFromComponents( T& container, componentType ctype, const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) + template static double closestSegmentFromComponents( T& container, ComponentType ctype, const QgsPointV2& pt, QgsPointV2& segmentPt, QgsVertexId& vertexAfter, bool* leftOf, double epsilon ) { double minDist = std::numeric_limits::max(); double minDistSegmentX = 0.0, minDistSegmentY = 0.0; @@ -280,16 +280,16 @@ class CORE_EXPORT QgsGeometryUtils } } - if ( ctype == VERTEX ) + if ( ctype == Vertex ) { //-1 because compoundcurve counts duplicated vertices of neighbour curves as one node vertexOffset += container.at( i )->nCoordinates() - 1; } - else if ( ctype == RING ) + else if ( ctype == Ring ) { ringOffset += 1; } - else if ( ctype == PART ) + else if ( ctype == Part ) { partOffset += 1; } diff --git a/src/core/qgsgml.cpp b/src/core/qgsgml.cpp index b6d9fa38dcb7..5982c2f87ebd 100644 --- a/src/core/qgsgml.cpp +++ b/src/core/qgsgml.cpp @@ -291,7 +291,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QString& typeName, , mCurrentWKB( nullptr, 0 ) , mBoundedByNullFound( false ) , mDimension( 0 ) - , mCoorMode( coordinate ) + , mCoorMode( Coordinate ) , mEpsg( 0 ) , mGMLNameSpaceURIPtr( nullptr ) , mAxisOrientationLogic( axisOrientationLogic ) @@ -352,7 +352,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QList& laye , mCurrentWKB( nullptr, 0 ) , mBoundedByNullFound( false ) , mDimension( 0 ) - , mCoorMode( coordinate ) + , mCoorMode( Coordinate ) , mEpsg( 0 ) , mGMLNameSpaceURIPtr( nullptr ) , mAxisOrientationLogic( axisOrientationLogic ) @@ -472,7 +472,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a const char* pszLocalName = ( pszSep ) ? pszSep + 1 : el; const int nsLen = ( pszSep ) ? ( int )( pszSep - el ) : 0; const int localNameLen = ( pszSep ) ? ( int )( elLen - nsLen ) - 1 : elLen; - ParseMode theParseMode( mParseModeStack.isEmpty() ? none : mParseModeStack.top() ); + ParseMode theParseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); // Figure out if the GML namespace is GML_NAMESPACE or GML32_NAMESPACE if ( !mGMLNameSpaceURIPtr && pszSep ) @@ -492,8 +492,8 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a const bool isGMLNS = ( nsLen == mGMLNameSpaceURI.size() && mGMLNameSpaceURIPtr && memcmp( el, mGMLNameSpaceURIPtr, nsLen ) == 0 ); bool isGeom = false; - if ( theParseMode == geometry || theParseMode == coordinate || theParseMode == posList || - theParseMode == multiPoint || theParseMode == multiLine || theParseMode == multiPolygon ) + if ( theParseMode == Geometry || theParseMode == Coordinate || theParseMode == PosList || + theParseMode == MultiPoint || theParseMode == MultiLine || theParseMode == MultiPolygon ) { mGeometryString.append( "<", 1 ); mGeometryString.append( pszLocalName, localNameLen ); @@ -511,8 +511,8 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a if ( isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) { - mParseModeStack.push( coordinate ); - mCoorMode = QgsGmlStreamingParser::coordinate; + mParseModeStack.push( Coordinate ); + mCoorMode = QgsGmlStreamingParser::Coordinate; mStringCash.clear(); mCoordinateSeparator = readAttribute( QStringLiteral( "cs" ), attr ); if ( mCoordinateSeparator.isEmpty() ) @@ -528,8 +528,8 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a else if ( isGMLNS && ( LOCALNAME_EQUALS( "pos" ) || LOCALNAME_EQUALS( "posList" ) ) ) { - mParseModeStack.push( QgsGmlStreamingParser::posList ); - mCoorMode = QgsGmlStreamingParser::posList; + mParseModeStack.push( QgsGmlStreamingParser::PosList ); + mCoorMode = QgsGmlStreamingParser::PosList; mStringCash.clear(); if ( mDimension == 0 ) { @@ -545,42 +545,42 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a else if ( localNameLen == mGeometryAttribute.size() && memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) { - mParseModeStack.push( QgsGmlStreamingParser::geometry ); + mParseModeStack.push( QgsGmlStreamingParser::Geometry ); mFoundUnhandledGeometryElement = false; mGeometryString.clear(); } //else if ( mParseModeStack.size() == 0 && elementName == mGMLNameSpaceURI + NS_SEPARATOR + "boundedBy" ) else if ( isGMLNS && LOCALNAME_EQUALS( "boundedBy" ) ) { - mParseModeStack.push( QgsGmlStreamingParser::boundingBox ); + mParseModeStack.push( QgsGmlStreamingParser::BoundingBox ); mCurrentExtent = QgsRectangle(); mBoundedByNullFound = false; } - else if ( theParseMode == boundingBox && + else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "null" ) ) { - mParseModeStack.push( QgsGmlStreamingParser::null ); + mParseModeStack.push( QgsGmlStreamingParser::Null ); mBoundedByNullFound = true; } - else if ( theParseMode == boundingBox && + else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) { isGeom = true; - mParseModeStack.push( QgsGmlStreamingParser::envelope ); + mParseModeStack.push( QgsGmlStreamingParser::Envelope ); } - else if ( theParseMode == envelope && + else if ( theParseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) { - mParseModeStack.push( QgsGmlStreamingParser::lowerCorner ); + mParseModeStack.push( QgsGmlStreamingParser::LowerCorner ); mStringCash.clear(); } - else if ( theParseMode == envelope && + else if ( theParseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) { - mParseModeStack.push( QgsGmlStreamingParser::upperCorner ); + mParseModeStack.push( QgsGmlStreamingParser::UpperCorner ); mStringCash.clear(); } - else if ( theParseMode == none && !mTypeNamePtr && + else if ( theParseMode == None && !mTypeNamePtr && LOCALNAME_EQUALS( "Tuple" ) ) { Q_ASSERT( !mCurrentFeature ); @@ -588,10 +588,10 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mCurrentFeature->setFields( mFields ); // allow name-based attribute lookups QgsAttributes attributes( mThematicAttributes.size() ); //add empty attributes mCurrentFeature->setAttributes( attributes ); - mParseModeStack.push( QgsGmlStreamingParser::tuple ); + mParseModeStack.push( QgsGmlStreamingParser::Tuple ); mCurrentFeatureId.clear(); } - else if ( theParseMode == tuple ) + else if ( theParseMode == Tuple ) { QString currentTypename( QString::fromUtf8( pszLocalName, localNameLen ) ); QMap< QString, LayerProperties >::const_iterator iter = mMapTypeNameToProperties.constFind( currentTypename ); @@ -606,7 +606,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } mGeometryAttributeBA = mGeometryAttribute.toUtf8(); mGeometryAttributePtr = mGeometryAttributeBA.constData(); - mParseModeStack.push( QgsGmlStreamingParser::featureTuple ); + mParseModeStack.push( QgsGmlStreamingParser::FeatureTuple ); QString id; if ( mGMLNameSpaceURI.isEmpty() ) { @@ -633,7 +633,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mCurrentFeatureId += id; } } - else if ( theParseMode == none && + else if ( theParseMode == None && localNameLen == mTypeName.size() && memcmp( pszLocalName, mTypeNamePtr, mTypeName.size() ) == 0 ) { Q_ASSERT( !mCurrentFeature ); @@ -641,7 +641,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a mCurrentFeature->setFields( mFields ); // allow name-based attribute lookups QgsAttributes attributes( mThematicAttributes.size() ); //add empty attributes mCurrentFeature->setAttributes( attributes ); - mParseModeStack.push( QgsGmlStreamingParser::feature ); + mParseModeStack.push( QgsGmlStreamingParser::Feature ); mCurrentFeatureId = readAttribute( QStringLiteral( "fid" ), attr ); if ( mCurrentFeatureId.isEmpty() ) { @@ -671,7 +671,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } } - else if ( theParseMode == boundingBox && isGMLNS && LOCALNAME_EQUALS( "Box" ) ) + else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "Box" ) ) { isGeom = true; } @@ -692,38 +692,38 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a else if ( isGMLNS && LOCALNAME_EQUALS( "MultiPoint" ) ) { isGeom = true; - mParseModeStack.push( QgsGmlStreamingParser::multiPoint ); + mParseModeStack.push( QgsGmlStreamingParser::MultiPoint ); //we need one nested list for intermediate WKB mCurrentWKBFragments.push_back( QList() ); } else if ( isGMLNS && ( LOCALNAME_EQUALS( "MultiLineString" ) || LOCALNAME_EQUALS( "MultiCurve" ) ) ) { isGeom = true; - mParseModeStack.push( QgsGmlStreamingParser::multiLine ); + mParseModeStack.push( QgsGmlStreamingParser::MultiLine ); //we need one nested list for intermediate WKB mCurrentWKBFragments.push_back( QList() ); } else if ( isGMLNS && ( LOCALNAME_EQUALS( "MultiPolygon" ) || LOCALNAME_EQUALS( "MultiSurface" ) ) ) { isGeom = true; - mParseModeStack.push( QgsGmlStreamingParser::multiPolygon ); + mParseModeStack.push( QgsGmlStreamingParser::MultiPolygon ); } - else if ( theParseMode == featureTuple ) + else if ( theParseMode == FeatureTuple ) { QString localName( QString::fromUtf8( pszLocalName, localNameLen ) ); if ( mThematicAttributes.contains( mCurrentTypename + '|' + localName ) ) { - mParseModeStack.push( QgsGmlStreamingParser::attributeTuple ); + mParseModeStack.push( QgsGmlStreamingParser::AttributeTuple ); mAttributeName = mCurrentTypename + '|' + localName; mStringCash.clear(); } } - else if ( theParseMode == feature ) + else if ( theParseMode == Feature ) { QString localName( QString::fromUtf8( pszLocalName, localNameLen ) ); if ( mThematicAttributes.contains( localName ) ) { - mParseModeStack.push( QgsGmlStreamingParser::attribute ); + mParseModeStack.push( QgsGmlStreamingParser::Attribute ); mAttributeName = localName; mStringCash.clear(); } @@ -831,33 +831,33 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) const char* pszLocalName = ( pszSep ) ? pszSep + 1 : el; const int nsLen = ( pszSep ) ? ( int )( pszSep - el ) : 0; const int localNameLen = ( pszSep ) ? ( int )( elLen - nsLen ) - 1 : elLen; - ParseMode theParseMode( mParseModeStack.isEmpty() ? none : mParseModeStack.top() ); + ParseMode theParseMode( mParseModeStack.isEmpty() ? None : mParseModeStack.top() ); const bool isGMLNS = ( nsLen == mGMLNameSpaceURI.size() && mGMLNameSpaceURIPtr && memcmp( el, mGMLNameSpaceURIPtr, nsLen ) == 0 ); - if ( theParseMode == coordinate && isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) + if ( theParseMode == Coordinate && isGMLNS && LOCALNAME_EQUALS( "coordinates" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == posList && isGMLNS && + else if ( theParseMode == PosList && isGMLNS && ( LOCALNAME_EQUALS( "pos" ) || LOCALNAME_EQUALS( "posList" ) ) ) { mParseModeStack.pop(); } - else if ( theParseMode == attributeTuple && + else if ( theParseMode == AttributeTuple && mCurrentTypename + '|' + QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature { mParseModeStack.pop(); setAttribute( mAttributeName, mStringCash ); } - else if ( theParseMode == attribute && QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature + else if ( theParseMode == Attribute && QString::fromUtf8( pszLocalName, localNameLen ) == mAttributeName ) //add a thematic attribute to the feature { mParseModeStack.pop(); setAttribute( mAttributeName, mStringCash ); } - else if ( theParseMode == geometry && localNameLen == mGeometryAttribute.size() && + else if ( theParseMode == Geometry && localNameLen == mGeometryAttribute.size() && memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) { mParseModeStack.pop(); @@ -881,7 +881,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mGeometryString.clear(); } - else if ( theParseMode == boundingBox && isGMLNS && LOCALNAME_EQUALS( "boundedBy" ) ) + else if ( theParseMode == BoundingBox && isGMLNS && LOCALNAME_EQUALS( "boundedBy" ) ) { //create bounding box from mStringCash if ( mCurrentExtent.isNull() && @@ -898,15 +898,15 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) mParseModeStack.pop(); } - else if ( theParseMode == null && isGMLNS && LOCALNAME_EQUALS( "null" ) ) + else if ( theParseMode == Null && isGMLNS && LOCALNAME_EQUALS( "null" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == envelope && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) + else if ( theParseMode == Envelope && isGMLNS && LOCALNAME_EQUALS( "Envelope" ) ) { mParseModeStack.pop(); } - else if ( theParseMode == lowerCorner && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) + else if ( theParseMode == LowerCorner && isGMLNS && LOCALNAME_EQUALS( "lowerCorner" ) ) { QList points; pointsFromPosListString( points, mStringCash, 2 ); @@ -917,7 +917,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mParseModeStack.pop(); } - else if ( theParseMode == upperCorner && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) + else if ( theParseMode == UpperCorner && isGMLNS && LOCALNAME_EQUALS( "upperCorner" ) ) { QList points; pointsFromPosListString( points, mStringCash, 2 ); @@ -928,14 +928,14 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } mParseModeStack.pop(); } - else if ( theParseMode == featureTuple && mParseDepth == mFeatureTupleDepth ) + else if ( theParseMode == FeatureTuple && mParseDepth == mFeatureTupleDepth ) { mParseModeStack.pop(); mFeatureTupleDepth = 0; } - else if (( theParseMode == tuple && !mTypeNamePtr && + else if (( theParseMode == Tuple && !mTypeNamePtr && LOCALNAME_EQUALS( "Tuple" ) ) || - ( theParseMode == feature && localNameLen == mTypeName.size() && + ( theParseMode == Feature && localNameLen == mTypeName.size() && memcmp( pszLocalName, mTypeNamePtr, mTypeName.size() ) == 0 ) ) { Q_ASSERT( mCurrentFeature ); @@ -972,7 +972,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) if ( pointList.isEmpty() ) return; // error - if ( theParseMode == QgsGmlStreamingParser::geometry ) + if ( theParseMode == QgsGmlStreamingParser::Geometry ) { //directly add WKB point to the feature if ( getPointWKB( mCurrentWKB, *( pointList.constBegin() ) ) != 0 ) @@ -1012,7 +1012,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) { //error } - if ( theParseMode == QgsGmlStreamingParser::geometry ) + if ( theParseMode == QgsGmlStreamingParser::Geometry ) { if ( getLineWKB( mCurrentWKB, pointList ) != 0 ) { @@ -1042,7 +1042,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } } } - else if (( theParseMode == geometry || theParseMode == multiPolygon ) && + else if (( theParseMode == Geometry || theParseMode == MultiPolygon ) && isGMLNS && LOCALNAME_EQUALS( "LinearRing" ) ) { QList pointList; @@ -1067,7 +1067,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) QgsDebugMsg( "no wkb fragments" ); } } - else if (( theParseMode == geometry || theParseMode == multiPolygon ) && isGMLNS && + else if (( theParseMode == Geometry || theParseMode == MultiPolygon ) && isGMLNS && LOCALNAME_EQUALS( "Polygon" ) ) { if ( mWkbType != QgsWkbTypes::MultiPolygon )//keep multitype in case of geometry type mix @@ -1075,26 +1075,26 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) mWkbType = QgsWkbTypes::Polygon; } - if ( theParseMode == geometry ) + if ( theParseMode == Geometry ) { createPolygonFromFragments(); } } - else if ( theParseMode == multiPoint && isGMLNS && + else if ( theParseMode == MultiPoint && isGMLNS && LOCALNAME_EQUALS( "MultiPoint" ) ) { mWkbType = QgsWkbTypes::MultiPoint; mParseModeStack.pop(); createMultiPointFromFragments(); } - else if ( theParseMode == multiLine && isGMLNS && + else if ( theParseMode == MultiLine && isGMLNS && ( LOCALNAME_EQUALS( "MultiLineString" ) || LOCALNAME_EQUALS( "MultiCurve" ) ) ) { mWkbType = QgsWkbTypes::MultiLineString; mParseModeStack.pop(); createMultiLineFromFragments(); } - else if ( theParseMode == multiPolygon && isGMLNS && + else if ( theParseMode == MultiPolygon && isGMLNS && ( LOCALNAME_EQUALS( "MultiPolygon" ) || LOCALNAME_EQUALS( "MultiSurface" ) ) ) { mWkbType = QgsWkbTypes::MultiPolygon; @@ -1134,12 +1134,12 @@ void QgsGmlStreamingParser::characters( const XML_Char* chars, int len ) } QgsGmlStreamingParser::ParseMode theParseMode = mParseModeStack.top(); - if ( theParseMode == QgsGmlStreamingParser::attribute || - theParseMode == QgsGmlStreamingParser::attributeTuple || - theParseMode == QgsGmlStreamingParser::coordinate || - theParseMode == QgsGmlStreamingParser::posList || - theParseMode == QgsGmlStreamingParser::lowerCorner || - theParseMode == QgsGmlStreamingParser::upperCorner || + if ( theParseMode == QgsGmlStreamingParser::Attribute || + theParseMode == QgsGmlStreamingParser::AttributeTuple || + theParseMode == QgsGmlStreamingParser::Coordinate || + theParseMode == QgsGmlStreamingParser::PosList || + theParseMode == QgsGmlStreamingParser::LowerCorner || + theParseMode == QgsGmlStreamingParser::UpperCorner || theParseMode == QgsGmlStreamingParser::ExceptionText ) { mStringCash.append( QString::fromUtf8( chars, len ) ); @@ -1321,11 +1321,11 @@ int QgsGmlStreamingParser::pointsFromPosListString( QList& points, con int QgsGmlStreamingParser::pointsFromString( QList& points, const QString& coordString ) const { - if ( mCoorMode == QgsGmlStreamingParser::coordinate ) + if ( mCoorMode == QgsGmlStreamingParser::Coordinate ) { return pointsFromCoordinateString( points, coordString ); } - else if ( mCoorMode == QgsGmlStreamingParser::posList ) + else if ( mCoorMode == QgsGmlStreamingParser::PosList ) { return pointsFromPosListString( points, coordString, mDimension ? mDimension : 2 ); } diff --git a/src/core/qgsgml.h b/src/core/qgsgml.h index f3be1f9c2893..9d8a57ae6f39 100644 --- a/src/core/qgsgml.h +++ b/src/core/qgsgml.h @@ -139,23 +139,23 @@ class CORE_EXPORT QgsGmlStreamingParser enum ParseMode { - none, - boundingBox, - null, - envelope, - lowerCorner, - upperCorner, - feature, // feature element containing attrs and geo (inside gml:featureMember) - attribute, - tuple, // wfs:Tuple of a join layer - featureTuple, - attributeTuple, - geometry, - coordinate, - posList, - multiPoint, - multiLine, - multiPolygon, + None, + BoundingBox, + Null, + Envelope, + LowerCorner, + UpperCorner, + Feature, // feature element containing attrs and geo (inside gml:featureMember) + Attribute, + Tuple, // wfs:Tuple of a join layer + FeatureTuple, + AttributeTuple, + Geometry, + Coordinate, + PosList, + MultiPoint, + MultiLine, + MultiPolygon, ExceptionReport, ExceptionText }; @@ -231,10 +231,10 @@ class CORE_EXPORT QgsGmlStreamingParser int totalWKBFragmentSize() const; //! Get safely (if empty) top from mode stack - ParseMode modeStackTop() { return mParseModeStack.isEmpty() ? none : mParseModeStack.top(); } + ParseMode modeStackTop() { return mParseModeStack.isEmpty() ? None : mParseModeStack.top(); } //! Safely (if empty) pop from mode stack - ParseMode modeStackPop() { return mParseModeStack.isEmpty() ? none : mParseModeStack.pop(); } + ParseMode modeStackPop() { return mParseModeStack.isEmpty() ? None : mParseModeStack.pop(); } //! Expat parser XML_Parser mParser; diff --git a/src/core/qgsgmlschema.cpp b/src/core/qgsgmlschema.cpp index d3a05296d187..bc552c74984e 100644 --- a/src/core/qgsgmlschema.cpp +++ b/src/core/qgsgmlschema.cpp @@ -377,7 +377,7 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) } else if ( localName.compare( QLatin1String( "featureMembers" ), Qt::CaseInsensitive ) == 0 ) { - mParseModeStack.push( QgsGmlSchema::featureMembers ); + mParseModeStack.push( QgsGmlSchema::FeatureMembers ); } // GML does not specify that gml:FeatureAssociationType elements should end // with 'Member' apart standard gml:featureMember, but it is quite usual to @@ -386,7 +386,7 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) else if ( localName.endsWith( QLatin1String( "member" ), Qt::CaseInsensitive ) ) { - mParseModeStack.push( QgsGmlSchema::featureMember ); + mParseModeStack.push( QgsGmlSchema::FeatureMember ); } // UMN Mapserver simple GetFeatureInfo response layer element (ends with _layer) else if ( elementName.endsWith( QLatin1String( "_layer" ) ) ) @@ -398,8 +398,8 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) // QGIS mapserver 2.2 GetFeatureInfo is using for feature member, // without any feature class distinction. else if ( elementName.endsWith( QLatin1String( "_feature" ) ) - || parseMode == QgsGmlSchema::featureMember - || parseMode == QgsGmlSchema::featureMembers + || parseMode == QgsGmlSchema::FeatureMember + || parseMode == QgsGmlSchema::FeatureMembers || localName.compare( QLatin1String( "feature" ), Qt::CaseInsensitive ) == 0 ) { QgsDebugMsg( "is feature path = " + path ); @@ -408,9 +408,9 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) mFeatureClassMap.insert( localName, QgsGmlFeatureClass( localName, path ) ); } mCurrentFeatureName = localName; - mParseModeStack.push( QgsGmlSchema::feature ); + mParseModeStack.push( QgsGmlSchema::Feature ); } - else if ( parseMode == QgsGmlSchema::attribute && ns == GML_NAMESPACE && mGeometryTypes.indexOf( localName ) >= 0 ) + else if ( parseMode == QgsGmlSchema::Attribute && ns == GML_NAMESPACE && mGeometryTypes.indexOf( localName ) >= 0 ) { // Geometry (Point,MultiPoint,...) in geometry attribute QStringList &geometryAttributes = mFeatureClassMap[mCurrentFeatureName].geometryAttributes(); @@ -420,7 +420,7 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) } mSkipLevel = mLevel + 1; // no need to parse children } - else if ( parseMode == QgsGmlSchema::feature ) + else if ( parseMode == QgsGmlSchema::Feature ) { // An element in feature should be ordinary or geometry attribute //QgsDebugMsg( "is attribute"); @@ -441,7 +441,7 @@ void QgsGmlSchema::startElement( const XML_Char* el, const XML_Char** attr ) else { mAttributeName = localName; - mParseModeStack.push( QgsGmlSchema::attribute ); + mParseModeStack.push( QgsGmlSchema::Attribute ); mStringCash.clear(); } } @@ -470,11 +470,11 @@ void QgsGmlSchema::endElement( const XML_Char* el ) QgsGmlSchema::ParseMode parseMode = modeStackTop(); - if ( parseMode == QgsGmlSchema::featureMembers ) + if ( parseMode == QgsGmlSchema::FeatureMembers ) { modeStackPop(); } - else if ( parseMode == QgsGmlSchema::attribute && localName == mAttributeName ) + else if ( parseMode == QgsGmlSchema::Attribute && localName == mAttributeName ) { // End of attribute //QgsDebugMsg("end attribute"); @@ -507,7 +507,7 @@ void QgsGmlSchema::characters( const XML_Char* chars, int len ) } //save chars in mStringCash attribute mode for value type analysis - if ( modeStackTop() == QgsGmlSchema::attribute ) + if ( modeStackTop() == QgsGmlSchema::Attribute ) { mStringCash.append( QString::fromUtf8( chars, len ) ); } diff --git a/src/core/qgsgmlschema.h b/src/core/qgsgmlschema.h index 391c3304338d..2068618715dd 100644 --- a/src/core/qgsgmlschema.h +++ b/src/core/qgsgmlschema.h @@ -105,13 +105,13 @@ class CORE_EXPORT QgsGmlSchema : public QObject enum ParseMode { - none, - boundingBox, - featureMembers, // gml:featureMembers - featureMember, // gml:featureMember - feature, // feature element containint attrs and geo (inside gml:featureMember) - attribute, - geometry + None, + BoundingBox, + FeatureMembers, // gml:featureMembers + FeatureMember, // gml:featureMember + Feature, // feature element containint attrs and geo (inside gml:featureMember) + Attribute, + Geometry }; //! XML handler methods @@ -169,10 +169,10 @@ class CORE_EXPORT QgsGmlSchema : public QObject //! Get safely (if empty) top from mode stack - ParseMode modeStackTop() { return mParseModeStack.isEmpty() ? none : mParseModeStack.top(); } + ParseMode modeStackTop() { return mParseModeStack.isEmpty() ? None : mParseModeStack.top(); } //! Safely (if empty) pop from mode stack - ParseMode modeStackPop() { return mParseModeStack.isEmpty() ? none : mParseModeStack.pop(); } + ParseMode modeStackPop() { return mParseModeStack.isEmpty() ? None : mParseModeStack.pop(); } //! Keep track about the most important nested elements //std::stack mParseModeStack; diff --git a/src/gui/qgsprojectionselector.cpp b/src/gui/qgsprojectionselector.cpp index 7f066a0d8597..33cbf9ef3f31 100644 --- a/src/gui/qgsprojectionselector.cpp +++ b/src/gui/qgsprojectionselector.cpp @@ -35,7 +35,7 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name, , mProjListDone( false ) , mUserProjListDone( false ) , mRecentProjListDone( false ) - , mSearchColumn( NONE ) + , mSearchColumn( QgsProjectionSelector::None ) , mPushProjectionToFront( false ) { Q_UNUSED( name ); @@ -50,19 +50,19 @@ QgsProjectionSelector::QgsProjectionSelector( QWidget* parent, const char *name, // Get the full path name to the sqlite3 spatial reference database. mSrsDatabaseFileName = QgsApplication::srsDbFilePath(); - lstCoordinateSystems->header()->setResizeMode( AUTHID_COLUMN, QHeaderView::Stretch ); - lstCoordinateSystems->header()->resizeSection( QGIS_CRS_ID_COLUMN, 0 ); - lstCoordinateSystems->header()->setResizeMode( QGIS_CRS_ID_COLUMN, QHeaderView::Fixed ); + lstCoordinateSystems->header()->setResizeMode( AuthidColumn, QHeaderView::Stretch ); + lstCoordinateSystems->header()->resizeSection( QgisCrsIdColumn, 0 ); + lstCoordinateSystems->header()->setResizeMode( QgisCrsIdColumn, QHeaderView::Fixed ); // Hide (internal) ID column - lstCoordinateSystems->setColumnHidden( QGIS_CRS_ID_COLUMN, true ); + lstCoordinateSystems->setColumnHidden( QgisCrsIdColumn, true ); - lstRecent->header()->setResizeMode( AUTHID_COLUMN, QHeaderView::Stretch ); - lstRecent->header()->resizeSection( QGIS_CRS_ID_COLUMN, 0 ); - lstRecent->header()->setResizeMode( QGIS_CRS_ID_COLUMN, QHeaderView::Fixed ); + lstRecent->header()->setResizeMode( AuthidColumn, QHeaderView::Stretch ); + lstRecent->header()->resizeSection( QgisCrsIdColumn, 0 ); + lstRecent->header()->setResizeMode( QgisCrsIdColumn, QHeaderView::Fixed ); // Hide (internal) ID column - lstRecent->setColumnHidden( QGIS_CRS_ID_COLUMN, true ); + lstRecent->setColumnHidden( QgisCrsIdColumn, true ); mRecentProjections = QgsCoordinateReferenceSystem::recentProjections(); } @@ -114,13 +114,13 @@ QgsProjectionSelector::~QgsProjectionSelector() void QgsProjectionSelector::resizeEvent( QResizeEvent * theEvent ) { - lstCoordinateSystems->header()->resizeSection( NAME_COLUMN, theEvent->size().width() - 240 ); - lstCoordinateSystems->header()->resizeSection( AUTHID_COLUMN, 240 ); - lstCoordinateSystems->header()->resizeSection( QGIS_CRS_ID_COLUMN, 0 ); + lstCoordinateSystems->header()->resizeSection( NameColumn, theEvent->size().width() - 240 ); + lstCoordinateSystems->header()->resizeSection( AuthidColumn, 240 ); + lstCoordinateSystems->header()->resizeSection( QgisCrsIdColumn, 0 ); - lstRecent->header()->resizeSection( NAME_COLUMN, theEvent->size().width() - 240 ); - lstRecent->header()->resizeSection( AUTHID_COLUMN, 240 ); - lstRecent->header()->resizeSection( QGIS_CRS_ID_COLUMN, 0 ); + lstRecent->header()->resizeSection( NameColumn, theEvent->size().width() - 240 ); + lstRecent->header()->resizeSection( AuthidColumn, 240 ); + lstRecent->header()->resizeSection( QgisCrsIdColumn, 0 ); } void QgsProjectionSelector::showEvent( QShowEvent * theEvent ) @@ -206,17 +206,17 @@ QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression( QSet * c void QgsProjectionSelector::setSelectedCrsName( const QString& theCRSName ) { - applySelection( NAME_COLUMN, theCRSName ); + applySelection( NameColumn, theCRSName ); } void QgsProjectionSelector::setSelectedCrsId( long theCRSID ) { - applySelection( QGIS_CRS_ID_COLUMN, QString::number( theCRSID ) ); + applySelection( QgisCrsIdColumn, QString::number( theCRSID ) ); } void QgsProjectionSelector::setSelectedAuthId( const QString& id ) { - applySelection( AUTHID_COLUMN, id ); + applySelection( AuthidColumn, id ); } void QgsProjectionSelector::applySelection( int column, QString value ) @@ -229,17 +229,17 @@ void QgsProjectionSelector::applySelection( int column, QString value ) return; } - if ( column == NONE ) + if ( column == QgsProjectionSelector::None ) { // invoked deferred selection column = mSearchColumn; value = mSearchValue; - mSearchColumn = NONE; + mSearchColumn = QgsProjectionSelector::None; mSearchValue.clear(); } - if ( column == NONE ) + if ( column == QgsProjectionSelector::None ) return; QList nodes = lstCoordinateSystems->findItems( value, Qt::MatchExactly | Qt::MatchRecursive, column ); @@ -264,14 +264,14 @@ void QgsProjectionSelector::insertRecent( long theCrsId ) if ( !mProjListDone || !mUserProjListDone ) return; - QList nodes = lstCoordinateSystems->findItems( QString::number( theCrsId ), Qt::MatchExactly | Qt::MatchRecursive, QGIS_CRS_ID_COLUMN ); + QList nodes = lstCoordinateSystems->findItems( QString::number( theCrsId ), Qt::MatchExactly | Qt::MatchRecursive, QgisCrsIdColumn ); if ( nodes.isEmpty() ) return; lstRecent->insertTopLevelItem( 0, new QTreeWidgetItem( lstRecent, QStringList() - << nodes.first()->text( NAME_COLUMN ) - << nodes.first()->text( AUTHID_COLUMN ) - << nodes.first()->text( QGIS_CRS_ID_COLUMN ) ) ); + << nodes.first()->text( NameColumn ) + << nodes.first()->text( AuthidColumn ) + << nodes.first()->text( QgisCrsIdColumn ) ) ); } //note this line just returns the projection name! @@ -279,7 +279,7 @@ QString QgsProjectionSelector::selectedName() { // return the selected wkt name from the list view QTreeWidgetItem *lvi = lstCoordinateSystems->currentItem(); - return lvi ? lvi->text( NAME_COLUMN ) : QString::null; + return lvi ? lvi->text( NameColumn ) : QString::null; } // Returns the whole proj4 string for the selected projection node @@ -292,10 +292,10 @@ QString QgsProjectionSelector::selectedProj4String() // // Get the selected node QTreeWidgetItem *item = lstCoordinateSystems->currentItem(); - if ( !item || item->text( QGIS_CRS_ID_COLUMN ).isEmpty() ) + if ( !item || item->text( QgisCrsIdColumn ).isEmpty() ) return QLatin1String( "" ); - QString srsId = item->text( QGIS_CRS_ID_COLUMN ); + QString srsId = item->text( QgisCrsIdColumn ); QgsDebugMsg( "srsId = " + srsId ); QgsDebugMsg( "USER_CRS_START_ID = " + QString::number( USER_CRS_START_ID ) ); @@ -361,7 +361,7 @@ QString QgsProjectionSelector::getSelectedExpression( const QString& expression // Get the selected node and make sure it is a srs andx // not a top-level projection node QTreeWidgetItem *lvi = lstCoordinateSystems->currentItem(); - if ( !lvi || lvi->text( QGIS_CRS_ID_COLUMN ).isEmpty() ) + if ( !lvi || lvi->text( QgisCrsIdColumn ).isEmpty() ) return QString(); // @@ -369,7 +369,7 @@ QString QgsProjectionSelector::getSelectedExpression( const QString& expression // user projection defs all have srs_id >= 100000 // QString databaseFileName; - if ( lvi->text( QGIS_CRS_ID_COLUMN ).toLong() >= USER_CRS_START_ID ) + if ( lvi->text( QgisCrsIdColumn ).toLong() >= USER_CRS_START_ID ) { databaseFileName = QgsApplication::qgisUserDbFilePath(); if ( !QFileInfo::exists( databaseFileName ) ) @@ -400,7 +400,7 @@ QString QgsProjectionSelector::getSelectedExpression( const QString& expression sqlite3_stmt *stmt; QString sql = QStringLiteral( "select %1 from tbl_srs where srs_id=%2" ) .arg( expression, - lvi->text( QGIS_CRS_ID_COLUMN ) ); + lvi->text( QgisCrsIdColumn ) ); QgsDebugMsg( QString( "Finding selected attribute using : %1" ).arg( sql ) ); rc = sqlite3_prepare( database, sql.toUtf8(), sql.toUtf8().length(), &stmt, &tail ); @@ -441,8 +441,8 @@ long QgsProjectionSelector::selectedCrsId() { QTreeWidgetItem* item = lstCoordinateSystems->currentItem(); - if ( item && !item->text( QGIS_CRS_ID_COLUMN ).isEmpty() ) - return lstCoordinateSystems->currentItem()->text( QGIS_CRS_ID_COLUMN ).toLong(); + if ( item && !item->text( QgisCrsIdColumn ).isEmpty() ) + return lstCoordinateSystems->currentItem()->text( QgisCrsIdColumn ).toLong(); else return 0; } @@ -521,8 +521,8 @@ void QgsProjectionSelector::loadUserCrsList( QSet *crsFilter ) // display the epsg (field 2) in the second column of the list view // newItem->setText( EPSG_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) ); // display the qgis srs_id (field 1) in the third column of the list view - newItem->setText( QGIS_CRS_ID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); - newItem->setText( AUTHID_COLUMN, QStringLiteral( "USER:%1" ).arg( QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ).toInt() ) ); + newItem->setText( QgisCrsIdColumn, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); + newItem->setText( AuthidColumn, QStringLiteral( "USER:%1" ).arg( QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ).toInt() ) ); } } // close the sqlite3 statement @@ -612,10 +612,10 @@ void QgsProjectionSelector::loadCrsList( QSet *crsFilter ) newItem = new QTreeWidgetItem( mGeoList, QStringList( QString::fromUtf8(( char * )sqlite3_column_text( stmt, 0 ) ) ) ); // display the authority name (field 2) in the second column of the list view - newItem->setText( AUTHID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) ); + newItem->setText( AuthidColumn, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) ); // display the qgis srs_id (field 1) in the third column of the list view - newItem->setText( QGIS_CRS_ID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); + newItem->setText( QgisCrsIdColumn, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); } else { @@ -630,7 +630,7 @@ void QgsProjectionSelector::loadCrsList( QSet *crsFilter ) } else { // Different from last one, need to search - QList nodes = lstCoordinateSystems->findItems( srsType, Qt::MatchExactly | Qt::MatchRecursive, NAME_COLUMN ); + QList nodes = lstCoordinateSystems->findItems( srsType, Qt::MatchExactly | Qt::MatchRecursive, NameColumn ); if ( nodes.isEmpty() ) { // the node doesn't exist -- create it @@ -651,9 +651,9 @@ void QgsProjectionSelector::loadCrsList( QSet *crsFilter ) // add the item, setting the projection name in the first column of the list view newItem = new QTreeWidgetItem( node, QStringList( QString::fromUtf8(( char * )sqlite3_column_text( stmt, 0 ) ) ) ); // display the authority id (field 2) in the second column of the list view - newItem->setText( AUTHID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) ); + newItem->setText( AuthidColumn, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 2 ) ) ); // display the qgis srs_id (field 1) in the third column of the list view - newItem->setText( QGIS_CRS_ID_COLUMN, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); + newItem->setText( QgisCrsIdColumn, QString::fromUtf8(( char * )sqlite3_column_text( stmt, 1 ) ) ); // expand also parent node newItem->parent()->setExpanded( true ); } @@ -696,15 +696,15 @@ void QgsProjectionSelector::on_lstCoordinateSystems_currentItemChanged( QTreeWid teProjection->setText( selectedProj4String() ); teSelected->setText( selectedName() ); - QList nodes = lstRecent->findItems( current->text( QGIS_CRS_ID_COLUMN ), Qt::MatchExactly, QGIS_CRS_ID_COLUMN ); + QList nodes = lstRecent->findItems( current->text( QgisCrsIdColumn ), Qt::MatchExactly, QgisCrsIdColumn ); if ( !nodes.isEmpty() ) { - QgsDebugMsg( QString( "found srs %1 in recent" ).arg( current->text( QGIS_CRS_ID_COLUMN ) ) ); + QgsDebugMsg( QString( "found srs %1 in recent" ).arg( current->text( QgisCrsIdColumn ) ) ); lstRecent->setCurrentItem( nodes.first() ); } else { - QgsDebugMsg( QString( "srs %1 not recent" ).arg( current->text( QGIS_CRS_ID_COLUMN ) ) ); + QgsDebugMsg( QString( "srs %1 not recent" ).arg( current->text( QgisCrsIdColumn ) ) ); lstRecent->clearSelection(); lstCoordinateSystems->setFocus( Qt::OtherFocusReason ); } @@ -749,7 +749,7 @@ void QgsProjectionSelector::on_lstRecent_currentItemChanged( QTreeWidgetItem *cu lstRecent->scrollToItem( current ); - QList nodes = lstCoordinateSystems->findItems( current->text( QGIS_CRS_ID_COLUMN ), Qt::MatchExactly | Qt::MatchRecursive, QGIS_CRS_ID_COLUMN ); + QList nodes = lstCoordinateSystems->findItems( current->text( QgisCrsIdColumn ), Qt::MatchExactly | Qt::MatchRecursive, QgisCrsIdColumn ); if ( !nodes.isEmpty() ) lstCoordinateSystems->setCurrentItem( nodes.first() ); } @@ -766,7 +766,7 @@ void QgsProjectionSelector::on_lstRecent_itemDoubleClicked( QTreeWidgetItem *cur return; } - QList nodes = lstCoordinateSystems->findItems( current->text( QGIS_CRS_ID_COLUMN ), Qt::MatchExactly | Qt::MatchRecursive, QGIS_CRS_ID_COLUMN ); + QList nodes = lstCoordinateSystems->findItems( current->text( QgisCrsIdColumn ), Qt::MatchExactly | Qt::MatchRecursive, QgisCrsIdColumn ); if ( !nodes.isEmpty() ) emit projectionDoubleClicked(); } @@ -806,8 +806,8 @@ void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTx { if (( *itr )->childCount() == 0 ) // it's an end node aka a projection { - if (( *itr )->text( NAME_COLUMN ).contains( re ) - || ( *itr )->text( AUTHID_COLUMN ).contains( re ) + if (( *itr )->text( NameColumn ).contains( re ) + || ( *itr )->text( AuthidColumn ).contains( re ) ) { ( *itr )->setHidden( false ); @@ -837,8 +837,8 @@ void QgsProjectionSelector::on_leSearch_textChanged( const QString & theFilterTx { if (( *it )->childCount() == 0 ) // it's an end node aka a projection { - if (( *it )->text( NAME_COLUMN ).contains( re ) - || ( *it )->text( AUTHID_COLUMN ).contains( re ) + if (( *it )->text( NameColumn ).contains( re ) + || ( *it )->text( AuthidColumn ).contains( re ) ) { ( *it )->setHidden( false ); diff --git a/src/gui/qgsprojectionselector.h b/src/gui/qgsprojectionselector.h index 3767e784a07d..df3de34e1111 100644 --- a/src/gui/qgsprojectionselector.h +++ b/src/gui/qgsprojectionselector.h @@ -140,7 +140,7 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti * does not scroll the list to the selection if the widget is not visible. * Therefore you will typically want to use this in a showEvent(). */ - void applySelection( int column = NONE, QString value = QString::null ); + void applySelection( int column = QgsProjectionSelector::None, QString value = QString::null ); /** * \brief gets an arbitrary sqlite3 expression from the selection @@ -182,7 +182,7 @@ class GUI_EXPORT QgsProjectionSelector : public QWidget, private Ui::QgsProjecti //! Has the Recent Projection List been populated? bool mRecentProjListDone; - enum columns { NAME_COLUMN, AUTHID_COLUMN, QGIS_CRS_ID_COLUMN, NONE }; + enum Columns { NameColumn, AuthidColumn, QgisCrsIdColumn, None }; int mSearchColumn; QString mSearchValue; diff --git a/src/plugins/coordinate_capture/coordinatecapture.cpp b/src/plugins/coordinate_capture/coordinatecapture.cpp index 1c1fcdd5e63b..b0c9f7350a74 100644 --- a/src/plugins/coordinate_capture/coordinatecapture.cpp +++ b/src/plugins/coordinate_capture/coordinatecapture.cpp @@ -52,7 +52,7 @@ static const QString sDescription = QObject::tr( "Capture mouse coordinates in d static const QString sCategory = QObject::tr( "Vector" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); static const QString sPluginIcon = QStringLiteral( ":/coordinate_capture/coordinate_capture.png" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; ////////////////////////////////////////////////////////////////////// // diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp index f2a2b60d1049..7a1ac39e4f54 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnection.cpp @@ -37,7 +37,7 @@ * @param password - The password associate with the username needed to access the database or database server * @param type - The type of database being connected to */ -eVisDatabaseConnection::eVisDatabaseConnection( const QString& hostname, int port, const QString& databasename, const QString& username, const QString& password, DATABASE_TYPE type ) +eVisDatabaseConnection::eVisDatabaseConnection( const QString& hostname, int port, const QString& databasename, const QString& username, const QString& password, DatabaseType type ) { mHostName = hostname; mPort = port; @@ -60,19 +60,19 @@ bool eVisDatabaseConnection::connect() } //Add the correct database to the list of database connections, Reuse a connection if the connection exists in the list already. - if ( MSACCESS == databaseType() && !mDatabase.contains( QStringLiteral( "odbc" ) ) ) + if ( MSAccess == databaseType() && !mDatabase.contains( QStringLiteral( "odbc" ) ) ) { mDatabase = QSqlDatabase::addDatabase( QStringLiteral( "QODBC" ), QStringLiteral( "odbc" ) ); } - else if ( MSACCESS == databaseType() ) + else if ( MSAccess == databaseType() ) { mDatabase = QSqlDatabase::database( QStringLiteral( "odbc" ) ); } - else if ( QMYSQL == databaseType() && !mDatabase.contains( QStringLiteral( "mysql" ) ) ) + else if ( QMySQL == databaseType() && !mDatabase.contains( QStringLiteral( "mysql" ) ) ) { mDatabase = QSqlDatabase::addDatabase( QStringLiteral( "QMYSQL" ), QStringLiteral( "mysql" ) ); } - else if ( QMYSQL == databaseType() ) + else if ( QMySQL == databaseType() ) { mDatabase = QSqlDatabase::database( QStringLiteral( "mysql" ) ); } @@ -92,11 +92,11 @@ bool eVisDatabaseConnection::connect() { mDatabase = QSqlDatabase::database( QStringLiteral( "postgres" ) ); } - else if ( QSQLITE == databaseType() && !mDatabase.contains( QStringLiteral( "sqlite" ) ) ) + else if ( QSqlite == databaseType() && !mDatabase.contains( QStringLiteral( "sqlite" ) ) ) { mDatabase = QSqlDatabase::addDatabase( QStringLiteral( "QSQLITE" ), QStringLiteral( "sqlite" ) ); } - else if ( QSQLITE == databaseType() ) + else if ( QSqlite == databaseType() ) { mDatabase = QSqlDatabase::database( QStringLiteral( "sqlite" ) ); } @@ -107,7 +107,7 @@ bool eVisDatabaseConnection::connect() } //Do a little extra validation of connection information - if ( mHostName.isEmpty() && ( QMYSQL == databaseType() || QPSQL == databaseType() ) ) + if ( mHostName.isEmpty() && ( QMySQL == databaseType() || QPSQL == databaseType() ) ) { setLastError( QStringLiteral( "Host name was empty" ) ); return false; @@ -127,7 +127,7 @@ bool eVisDatabaseConnection::connect() setLastError( QStringLiteral( "Database name was empty" ) ); return false; } - else if ( MSACCESS == databaseType() ) + else if ( MSAccess == databaseType() ) { mDatabase.setDatabaseName( "DRIVER={Microsoft Access Driver (*.mdb)};FIL={MS Access};DBQ=" + mDatabaseName ); } @@ -194,7 +194,7 @@ QSqlQuery* eVisDatabaseConnection::query( const QString& sqlStatement ) * @param password - The password associate with the username needed to access the database or database server * @param type - The type of database being connected to */ -void eVisDatabaseConnection::resetConnectionParameters( const QString& hostname, int port, const QString& databasename, const QString& username, const QString& password, DATABASE_TYPE type ) +void eVisDatabaseConnection::resetConnectionParameters( const QString& hostname, int port, const QString& databasename, const QString& username, const QString& password, DatabaseType type ) { mHostName = hostname; mPort = port; diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h index 1240323c6d23..1d9304015518 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h @@ -43,18 +43,18 @@ class eVisDatabaseConnection public: //! \brief Enum containting the type of database supported by this class - enum DATABASE_TYPE + enum DatabaseType { - UNDEFINED, - MSACCESS, - QMYSQL, + Undefined, + MSAccess, + QMySQL, QPSQL, QODBC, - QSQLITE + QSqlite } mDatabaseType; //! \brief Constructor - eVisDatabaseConnection( const QString&, int, const QString&, const QString&, const QString&, DATABASE_TYPE ); + eVisDatabaseConnection( const QString&, int, const QString&, const QString&, const QString&, DatabaseType ); //! \brief Public method that finalizes a connection to a databse bool connect(); @@ -63,13 +63,13 @@ class eVisDatabaseConnection QSqlQuery* query( const QString& ); //! \brief Public method for resetting the database connection parameters - equivalent to re running the constructor - void resetConnectionParameters( const QString&, int, const QString&, const QString&, const QString&, DATABASE_TYPE ); + void resetConnectionParameters( const QString&, int, const QString&, const QString&, const QString&, DatabaseType ); //! \brief Returns a list of tables in the current database QStringList tables(); //! \brief Accessor to the database type - DATABASE_TYPE databaseType() + DatabaseType databaseType() { return mDatabaseType; } @@ -87,7 +87,7 @@ class eVisDatabaseConnection } //! \brief Mutator for database type - void setDatabaseType( DATABASE_TYPE connectionType ) + void setDatabaseType( DatabaseType connectionType ) { mDatabaseType = connectionType; } diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp index aac530cde1e2..ccb183434ab9 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp @@ -247,14 +247,14 @@ void eVisDatabaseConnectionGui::on_pbtnConnect_clicked() //If no errors thus far, request a new database connection if ( !errors ) { - eVisDatabaseConnection::DATABASE_TYPE myDatabaseType; + eVisDatabaseConnection::DatabaseType myDatabaseType; if ( cboxDatabaseType->currentText() == QLatin1String( "MSAccess" ) ) { - myDatabaseType = eVisDatabaseConnection::MSACCESS; + myDatabaseType = eVisDatabaseConnection::MSAccess; } else if ( cboxDatabaseType->currentText() == QLatin1String( "MYSQL" ) ) { - myDatabaseType = eVisDatabaseConnection::QMYSQL; + myDatabaseType = eVisDatabaseConnection::QMySQL; } else if ( cboxDatabaseType->currentText() == QLatin1String( "ODBC" ) ) { @@ -266,7 +266,7 @@ void eVisDatabaseConnectionGui::on_pbtnConnect_clicked() } else { - myDatabaseType = eVisDatabaseConnection::QSQLITE; + myDatabaseType = eVisDatabaseConnection::QSqlite; } //If there is aready a database connection object, reset with the current parameters diff --git a/src/plugins/evis/evis.cpp b/src/plugins/evis/evis.cpp index c36b3f5cc9d3..c76f241d92d3 100644 --- a/src/plugins/evis/evis.cpp +++ b/src/plugins/evis/evis.cpp @@ -77,7 +77,7 @@ static const QString sName = QObject::tr( "eVis" ); static const QString sDescription = QObject::tr( "An event visualization tool - view images associated with vector features" ); static const QString sCategory = QObject::tr( "Database" ); static const QString sPluginVersion = QObject::tr( "Version 1.1.0" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sIcon = QStringLiteral( ":/evis/eVisEventBrowser.png" ); diff --git a/src/plugins/geometry_checker/qgsgeometrycheckerplugin.h b/src/plugins/geometry_checker/qgsgeometrycheckerplugin.h index 807da08ff32d..56ff7ad4016c 100644 --- a/src/plugins/geometry_checker/qgsgeometrycheckerplugin.h +++ b/src/plugins/geometry_checker/qgsgeometrycheckerplugin.h @@ -45,7 +45,7 @@ static const QString sName = QApplication::translate( "QgsGeometryCheckerPlugin" static const QString sDescription = QApplication::translate( "QgsGeometryCheckerPlugin", "Check geometries for errors" ); static const QString sCategory = QApplication::translate( "QgsGeometryCheckerPlugin", "Vector" ); static const QString sPluginVersion = QApplication::translate( "QgsGeometryCheckerPlugin", "Version 0.1" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sPluginIcon = QStringLiteral( ":/geometrychecker/icons/geometrychecker.png" ); #endif // QGS_GEOMETRY_CHECKER_PLUGIN_H diff --git a/src/plugins/georeferencer/qgsgeorefplugin.cpp b/src/plugins/georeferencer/qgsgeorefplugin.cpp index 292729bc933e..7d440ecc2d92 100644 --- a/src/plugins/georeferencer/qgsgeorefplugin.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugin.cpp @@ -63,7 +63,7 @@ static const QString sName = QObject::tr( "Georeferencer GDAL" ); static const QString sDescription = QObject::tr( "Georeferencing rasters using GDAL" ); static const QString sCategory = QObject::tr( "Raster" ); static const QString sPluginVersion = QObject::tr( "Version 3.1.9" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sPluginIcon = QStringLiteral( ":/icons/default/mGeorefRun.png" ); ////////////////////////////////////////////////////////////////////// diff --git a/src/plugins/gps_importer/qgsgpsplugin.cpp b/src/plugins/gps_importer/qgsgpsplugin.cpp index 088810a7a603..2c04f1ccf8b1 100644 --- a/src/plugins/gps_importer/qgsgpsplugin.cpp +++ b/src/plugins/gps_importer/qgsgpsplugin.cpp @@ -52,7 +52,7 @@ static const QString name_ = QObject::tr( "GPS Tools" ); static const QString description_ = QObject::tr( "Tools for loading and importing GPS data" ); static const QString category_ = QObject::tr( "Vector" ); static const QString version_ = QObject::tr( "Version 0.1" ); -static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI; +static const QgisPlugin::PluginType type_ = QgisPlugin::UI; static const QString icon_ = QStringLiteral( ":/gps_importer.svg" ); diff --git a/src/plugins/grass/qgsgrassmapcalc.cpp b/src/plugins/grass/qgsgrassmapcalc.cpp index 13c420fe0edc..53d0dfc5a1c8 100644 --- a/src/plugins/grass/qgsgrassmapcalc.cpp +++ b/src/plugins/grass/qgsgrassmapcalc.cpp @@ -1165,7 +1165,7 @@ void QgsGrassMapcalc::save() void QgsGrassMapcalc::load() { - QgsGrassSelect *sel = new QgsGrassSelect( this, QgsGrassSelect::MAPCALC ); + QgsGrassSelect *sel = new QgsGrassSelect( this, QgsGrassSelect::MapCalc ); if ( sel->exec() == QDialog::Rejected ) return; diff --git a/src/plugins/grass/qgsgrassnewmapset.cpp b/src/plugins/grass/qgsgrassnewmapset.cpp index 1bbe004de6b5..afc6e704e40c 100644 --- a/src/plugins/grass/qgsgrassnewmapset.cpp +++ b/src/plugins/grass/qgsgrassnewmapset.cpp @@ -293,20 +293,20 @@ int QgsGrassNewMapset::nextId() const int id = currentId(); switch ( id ) { - case LOCATION: + case Location: if ( mSelectLocationRadioButton->isChecked() ) { - id = MAPSET; + id = MapSet; break; } FALLTHROUGH; - case DATABASE: - case CRS: - case REGION: - case MAPSET: + case Database: + case Crs: + case Region: + case MapSet: id += 1; break; - case FINISH: + case Finish: default: id = -1; } @@ -1345,14 +1345,14 @@ void QgsGrassNewMapset::pageSelected( int index ) switch ( index ) { - case LOCATION: - if ( mPreviousPage == DATABASE ) + case Location: + if ( mPreviousPage == Database ) { setLocationPage(); } break; - case CRS: + case Crs: // Projection selector if ( !mProjectionSelector ) { @@ -1377,35 +1377,35 @@ void QgsGrassNewMapset::pageSelected( int index ) projRadioSwitched(); } } - if ( mPreviousPage == LOCATION ) + if ( mPreviousPage == Location ) { setProjectionPage(); } break; - case REGION: + case Region: if ( !mRegionsInited ) { loadRegions(); mRegionsInited = true; } - if ( mPreviousPage == CRS ) + if ( mPreviousPage == Crs ) { setRegionPage(); } break; - case MAPSET: - if ( mPreviousPage == LOCATION || mPreviousPage == REGION ) + case MapSet: + if ( mPreviousPage == Location || mPreviousPage == Region ) { setMapsets(); mapsetChanged(); } break; - case FINISH: + case Finish: setFinishPage(); break; } diff --git a/src/plugins/grass/qgsgrassnewmapset.h b/src/plugins/grass/qgsgrassnewmapset.h index ec44e04739bd..625cd5de1c8a 100644 --- a/src/plugins/grass/qgsgrassnewmapset.h +++ b/src/plugins/grass/qgsgrassnewmapset.h @@ -40,14 +40,14 @@ class QgsGrassNewMapset : public QWizard, private Ui::QgsGrassNewMapsetBase public: - enum PAGE + enum Page { - DATABASE, - LOCATION, - CRS, - REGION, - MAPSET, - FINISH + Database, + Location, + Crs, + Region, + MapSet, + Finish }; //! Constructor diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index 1953001fb1e5..1559c226cec6 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -721,7 +721,7 @@ void QgsGrassPlugin::redrawRegion() void QgsGrassPlugin::openMapset() { - QgsGrassSelect *sel = new QgsGrassSelect( qGisInterface->mainWindow(), QgsGrassSelect::MAPSET ); + QgsGrassSelect *sel = new QgsGrassSelect( qGisInterface->mainWindow(), QgsGrassSelect::MapSet ); if ( !sel->exec() ) return; diff --git a/src/plugins/grass/qgsgrassselect.cpp b/src/plugins/grass/qgsgrassselect.cpp index 0324367a4451..bf1fae500576 100644 --- a/src/plugins/grass/qgsgrassselect.cpp +++ b/src/plugins/grass/qgsgrassselect.cpp @@ -71,25 +71,25 @@ QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ) switch ( type ) { - case QgsGrassSelect::VECTOR: + case QgsGrassSelect::Vector: setWindowTitle( tr( "Select GRASS Vector Layer" ) ); break; - case QgsGrassSelect::RASTER: + case QgsGrassSelect::Raster: /* Remove layer combo box */ Layer->hide(); elayer->hide(); setWindowTitle( tr( "Select GRASS Raster Layer" ) ); break; - case QgsGrassSelect::MAPCALC: + case QgsGrassSelect::MapCalc: /* Remove layer combo box */ Layer->hide(); elayer->hide(); setWindowTitle( tr( "Select GRASS mapcalc schema" ) ); break; - case QgsGrassSelect::MAPSET: + case QgsGrassSelect::MapSet: Layer->hide(); elayer->hide(); MapName->hide(); @@ -149,7 +149,7 @@ void QgsGrassSelect::setLocations() } // if type is MAPSET check also if at least one mapset owned by user exists - if ( QgsGrassSelect::type == QgsGrassSelect::MAPSET ) + if ( QgsGrassSelect::type == QgsGrassSelect::MapSet ) { bool exists = false; @@ -252,7 +252,7 @@ void QgsGrassSelect::setMaps() int idx = 0; int sel = -1; - if ( type == VECTOR ) // vector + if ( type == Vector ) // vector { QStringList list = QgsGrass::vectors( egisdbase->text(), elocation->currentText(), emapset->currentText() ); @@ -266,7 +266,7 @@ void QgsGrassSelect::setMaps() } } - else if ( type == RASTER ) + else if ( type == Raster ) { /* add cells */ QStringList list = QgsGrass::rasters( egisdbase->text(), @@ -299,7 +299,7 @@ void QgsGrassSelect::setMaps() idx++; } } - else if ( type == MAPCALC ) + else if ( type == MapCalc ) { QDir md = QDir( ldpath + "/mapcalc/" ); md.setFilter( QDir::Files ); @@ -339,7 +339,7 @@ void QgsGrassSelect::setLayers() elayer->clear(); - if ( type != VECTOR ) + if ( type != Vector ) return; if ( emap->count() < 1 ) return; @@ -437,14 +437,14 @@ void QgsGrassSelect::accept() map = emap->currentText().trimmed(); - if ( type != QgsGrassSelect::MAPSET && map.isEmpty() ) + if ( type != QgsGrassSelect::MapSet && map.isEmpty() ) { QString msg = tr( "Select a map." ); QMessageBox::warning( 0, tr( "No map" ), msg ); return; } - if ( type == QgsGrassSelect::VECTOR ) + if ( type == QgsGrassSelect::Vector ) { if ( elayer->count() == 0 ) { @@ -456,20 +456,20 @@ void QgsGrassSelect::accept() layer = elayer->currentText().trimmed(); lastLayer = layer; } - else if ( type == QgsGrassSelect::RASTER ) + else if ( type == QgsGrassSelect::Raster ) { lastRasterMap = map; if ( map.indexOf( QLatin1String( " (GROUP)" ) ) != -1 ) { map.remove( QStringLiteral( " (GROUP)" ) ); - selectedType = QgsGrassSelect::GROUP; + selectedType = QgsGrassSelect::Group; } else { - selectedType = QgsGrassSelect::RASTER; + selectedType = QgsGrassSelect::Raster; } } - else if ( type == QgsGrassSelect::MAPCALC ) + else if ( type == QgsGrassSelect::MapCalc ) { lastMapcalc = map; } diff --git a/src/plugins/grass/qgsgrassselect.h b/src/plugins/grass/qgsgrassselect.h index fe9a8c6af107..49011e17c0ee 100644 --- a/src/plugins/grass/qgsgrassselect.h +++ b/src/plugins/grass/qgsgrassselect.h @@ -28,17 +28,17 @@ class QgsGrassSelect: public QDialog, private Ui::QgsGrassSelectBase public: //! Constructor //QgsGrassSelect(QWidget *parent = 0, int type = VECTOR ); - QgsGrassSelect( QWidget *parent, int type = VECTOR ); + QgsGrassSelect( QWidget *parent, int type = Vector ); ~QgsGrassSelect(); - enum TYPE + enum Type { - MAPSET, - VECTOR, - RASTER, - GROUP, // group of rasters, used in selectedType - MAPCALC // file in $MAPSET/mapcalc directory (used by QgsGrassMapcalc) + MapSet, + Vector, + Raster, + Group, // group of rasters, used in selectedType + MapCalc // file in $MAPSET/mapcalc directory (used by QgsGrassMapcalc) }; QString gisdbase; diff --git a/src/plugins/offline_editing/offline_editing_plugin.cpp b/src/plugins/offline_editing/offline_editing_plugin.cpp index e35346ea311e..79d2623a477f 100644 --- a/src/plugins/offline_editing/offline_editing_plugin.cpp +++ b/src/plugins/offline_editing/offline_editing_plugin.cpp @@ -32,7 +32,7 @@ static const QString sName = QObject::tr( "OfflineEditing" ); static const QString sDescription = QObject::tr( "Allow offline editing and synchronizing with database" ); static const QString sCategory = QObject::tr( "Database" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sPluginIcon = QStringLiteral( ":/offline_editing/offline_editing_copy.png" ); QgsOfflineEditingPlugin::QgsOfflineEditingPlugin( QgisInterface* theQgisInterface ) diff --git a/src/plugins/qgisplugin.h b/src/plugins/qgisplugin.h index 0f9ae01557e7..359bf9008008 100644 --- a/src/plugins/qgisplugin.h +++ b/src/plugins/qgisplugin.h @@ -55,7 +55,7 @@ class QgisPlugin //virtual QgisPluginGui *gui()=0; //! Element types that can be added to the interface #if 0 - enum ELEMENTS + enum Elements { MENU, MENU_ITEM, @@ -66,11 +66,11 @@ class QgisPlugin @todo XXX this may be a hint that there should be subclasses #endif - enum PLUGINTYPE + enum PluginType { - UI = 1, /* user interface plug-in */ - MAPLAYER, /* map layer plug-in */ - RENDERER, /*a plugin for a new renderer class*/ + UI = 1, //!< User interface plug-in + MapLayer, //!< Map layer plug-in + Renderer, //!< A plugin for a new renderer class }; @@ -81,7 +81,7 @@ class QgisPlugin QString const & description = "", QString const & category = "", QString const & version = "", - PLUGINTYPE type = MAPLAYER ) + PluginType type = MapLayer ) : mName( name ) , mDescription( description ) , mCategory( category ) @@ -140,14 +140,14 @@ class QgisPlugin } //! Plugin type, either UI or map layer - QgisPlugin::PLUGINTYPE const & type() const + QgisPlugin::PluginType const & type() const { return mType; } //! Plugin type, either UI or map layer - QgisPlugin::PLUGINTYPE & type() + QgisPlugin::PluginType & type() { return mType; } @@ -178,7 +178,7 @@ class QgisPlugin @todo Really, might be indicative that this needs to split into maplayer vs. ui plug-in vs. other kind of plug-in */ - PLUGINTYPE mType; + PluginType mType; }; // class QgisPlugin diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.cpp b/src/plugins/spatialquery/qgsspatialquerydialog.cpp index 4de03dd0338f..401366664516 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.cpp +++ b/src/plugins/spatialquery/qgsspatialquerydialog.cpp @@ -224,7 +224,7 @@ void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime teStatus->append( QLatin1String( "" ) ); ckbLogProcessing->setChecked( false ); - QVariant item = QVariant::fromValue(( int )itemsResult ); + QVariant item = QVariant::fromValue(( int )ItemsResult ); int index = cbTypeItems->findData( item ); cbTypeItems->setCurrentIndex( index ); on_cbTypeItems_currentIndexChanged( index ); @@ -236,13 +236,13 @@ void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime TypeResultFor typeResultFor = ( TypeResultFor ) cbResultFor->currentData().toInt(); switch ( typeResultFor ) { - case selectedNew: + case SelectedNew: mLayerTarget->selectByIds( mFeatureResult ); break; - case selectedAdd: + case SelectedAdd: mLayerTarget->selectByIds( mLayerTarget->selectedFeatureIds() + mFeatureResult ); break; - case selectedRemove: + case SelectedRemove: mLayerTarget->selectByIds( mLayerTarget->selectedFeatureIds() - mFeatureResult ); break; default: @@ -276,17 +276,17 @@ QgsSpatialQueryDialog::TypeVerifyCreateSubset QgsSpatialQueryDialog::verifyCreat if ( providerType == QLatin1String( "OGR" ) ) { fieldFID = QStringLiteral( "FID" ); - return verifyOk; + return VerifyOk; } // Database Postgis and Spatialite if ( providerType == QLatin1String( "POSTGRES" ) || providerType == QLatin1String( "SPATIALITE" ) ) { fieldFID = mLayerTarget->dataProvider()->fields().at( 0 ).name(); msg = tr( "Using the field \"%1\" for subset" ).arg( fieldFID ); - return verifyTry; + return VerifyTry; } msg = tr( "Sorry! Only this providers are enabled: OGR, POSTGRES and SPATIALITE." ); - return verifyImpossible; + return VerifyImpossible; } // TypeVerifyCreateSubset QgsSpatialQueryDialog::verifyCreateSubset(QString &msg, QString &fieldFID) bool QgsSpatialQueryDialog::addLayerSubset( const QString& name, const QString& subset ) @@ -498,7 +498,7 @@ void QgsSpatialQueryDialog::populateCbResulFor() cbResultFor->blockSignals( true ); cbResultFor->clear(); QVariant item; - item = QVariant::fromValue(( int )selectedNew ); + item = QVariant::fromValue(( int )SelectedNew ); cbResultFor->addItem( tr( "Create new selection" ), item ); if ( mLayerTarget->selectedFeatureCount() == 0 ) { @@ -506,10 +506,10 @@ void QgsSpatialQueryDialog::populateCbResulFor() } if ( ! ckbUsingSelectedTarget->isChecked() ) { - item = QVariant::fromValue(( int )selectedAdd ); + item = QVariant::fromValue(( int )SelectedAdd ); cbResultFor->addItem( tr( "Add to current selection" ), item ); } - item = QVariant::fromValue(( int )selectedRemove ); + item = QVariant::fromValue(( int )SelectedRemove ); cbResultFor->addItem( tr( "Remove from current selection" ), item ); cbResultFor->blockSignals( false ); } // void QgsSpatialQueryDialog::populateCbResulFor() @@ -518,11 +518,11 @@ void QgsSpatialQueryDialog::populateTypeItems() { QVariant item; cbTypeItems->blockSignals( true ); - item = QVariant::fromValue(( int )itemsResult ); + item = QVariant::fromValue(( int )ItemsResult ); cbTypeItems->addItem( tr( "Result query" ), item ); - item = QVariant::fromValue(( int )itemsInvalidTarget ); + item = QVariant::fromValue(( int )ItemsInvalidTarget ); cbTypeItems->addItem( tr( "Invalid source" ), item ); - item = QVariant::fromValue(( int )itemsInvalidReference ); + item = QVariant::fromValue(( int )ItemsInvalidReference ); cbTypeItems->addItem( tr( "Invalid reference" ), item ); cbTypeItems->blockSignals( false ); } @@ -795,13 +795,13 @@ void QgsSpatialQueryDialog::on_pbCreateLayerItems_clicked() QgsFeatureIds *fids = nullptr; switch ( typeItem ) { - case itemsResult: + case ItemsResult: fids = &mFeatureResult; break; - case itemsInvalidTarget: + case ItemsInvalidTarget: fids = &mFeatureInvalidTarget; break; - case itemsInvalidReference: + case ItemsInvalidReference: fids = &mFeatureInvalidReference; break; default: @@ -811,12 +811,12 @@ void QgsSpatialQueryDialog::on_pbCreateLayerItems_clicked() QString msg; QString fieldFID; TypeVerifyCreateSubset verify = verifyCreateSubset( msg, fieldFID ); - if ( verify == verifyImpossible ) + if ( verify == VerifyImpossible ) { QMessageBox::critical( this, title, msg, QMessageBox::Ok ); return; } - if ( verify == verifyTry ) + if ( verify == VerifyTry ) { QMessageBox::warning( this, title, msg, QMessageBox::Ok ); } @@ -837,12 +837,12 @@ void QgsSpatialQueryDialog::on_pbCreateLayerSelected_clicked() QString msg; QString fieldFID; TypeVerifyCreateSubset verify = verifyCreateSubset( msg, fieldFID ); - if ( verify == verifyImpossible ) + if ( verify == VerifyImpossible ) { QMessageBox::critical( this, title, msg, QMessageBox::Ok ); return; } - if ( verify == verifyTry ) + if ( verify == VerifyTry ) { QMessageBox::warning( this, title, msg, QMessageBox::Ok ); } @@ -900,13 +900,13 @@ void QgsSpatialQueryDialog::on_cbTypeItems_currentIndexChanged( int index ) int totalFeat = mLayerTarget->featureCount(); switch ( typeItem ) { - case itemsResult: + case ItemsResult: setItems = &mFeatureResult; break; - case itemsInvalidTarget: + case ItemsInvalidTarget: setItems = &mFeatureInvalidTarget; break; - case itemsInvalidReference: + case ItemsInvalidReference: setItems = &mFeatureInvalidReference; totalFeat = mLayerReference->featureCount(); break; @@ -965,7 +965,7 @@ void QgsSpatialQueryDialog::on_cbOperation_currentIndexChanged() void QgsSpatialQueryDialog::on_lwFeatures_currentItemChanged( QListWidgetItem * item ) { TypeItems typeItem = ( TypeItems )( cbTypeItems->currentData().toInt() ); - QgsVectorLayer *lyr = typeItem == itemsInvalidReference ? mLayerReference : mLayerTarget; + QgsVectorLayer *lyr = typeItem == ItemsInvalidReference ? mLayerReference : mLayerTarget; changeLwFeature( lyr, STRING_TO_FID( item->data( Qt::UserRole ).toString() ) ); } // void QgsSpatialQueryDialog::on_lwFeatures_currentItemChanged( QListWidgetItem * item ) @@ -988,7 +988,7 @@ void QgsSpatialQueryDialog::on_ckbZoomItem_clicked( bool checked ) { QgsFeatureId fid = STRING_TO_FID( lwFeatures->currentItem()->data( Qt::UserRole ).toString() ); TypeItems typeItem = ( TypeItems )( cbTypeItems->currentData().toInt() ); - QgsVectorLayer *lyr = typeItem == itemsInvalidReference ? mLayerReference : mLayerTarget; + QgsVectorLayer *lyr = typeItem == ItemsInvalidReference ? mLayerReference : mLayerTarget; zoomFeature( lyr, fid ); } } diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.h b/src/plugins/spatialquery/qgsspatialquerydialog.h index 7bb936ee401e..fee28f446fc9 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.h +++ b/src/plugins/spatialquery/qgsspatialquerydialog.h @@ -72,11 +72,11 @@ class QgsSpatialQueryDialog : public QDialog, private Ui::QgsSpatialQueryDialogB private: //! Enum Type of items - enum TypeItems { itemsResult, itemsInvalidTarget, itemsInvalidReference }; + enum TypeItems { ItemsResult, ItemsInvalidTarget, ItemsInvalidReference }; //! Enum Type Result for - enum TypeResultFor { selectedNew, selectedAdd, selectedRemove }; + enum TypeResultFor { SelectedNew, SelectedAdd, SelectedRemove }; //! Enum Type of verify subset - enum TypeVerifyCreateSubset { verifyOk, verifyTry, verifyImpossible }; + enum TypeVerifyCreateSubset { VerifyOk, VerifyTry, VerifyImpossible }; //! Initialize the Gui void initGui(); diff --git a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp index 86451b14d3f1..beefc822544f 100644 --- a/src/plugins/spatialquery/qgsspatialqueryplugin.cpp +++ b/src/plugins/spatialquery/qgsspatialqueryplugin.cpp @@ -43,7 +43,7 @@ static const QString name_ = QObject::tr( "Spatial Query Plugin" ); static const QString description_ = QObject::tr( "A plugin that makes spatial queries on vector layers" ); static const QString category_ = QObject::tr( "Vector" ); static const QString version_ = QObject::tr( "Version 0.1" ); -static const QgisPlugin::PLUGINTYPE type_ = QgisPlugin::UI; +static const QgisPlugin::PluginType type_ = QgisPlugin::UI; static const QString icon_ = QStringLiteral( ":/icons/spatialquery.png" ); /** diff --git a/src/plugins/topology/topol.cpp b/src/plugins/topology/topol.cpp index cfb84201f6d9..4a3705d4366c 100644 --- a/src/plugins/topology/topol.cpp +++ b/src/plugins/topology/topol.cpp @@ -34,7 +34,7 @@ static const QString sName = QObject::tr( "Topology Checker" ); static const QString sDescription = QObject::tr( "A Plugin for finding topological errors in vector layers" ); static const QString sCategory = QObject::tr( "Vector" ); static const QString sPluginVersion = QObject::tr( "Version 0.1" ); -static const QgisPlugin::PLUGINTYPE sPluginType = QgisPlugin::UI; +static const QgisPlugin::PluginType sPluginType = QgisPlugin::UI; static const QString sPluginIcon = QStringLiteral( ":/topology/mActionTopologyChecker.svg" ); ////////////////////////////////////////////////////////////////////// diff --git a/src/providers/db2/qgsdb2sourceselect.cpp b/src/providers/db2/qgsdb2sourceselect.cpp index af5b3877e531..9cf6e3d0fd0c 100644 --- a/src/providers/db2/qgsdb2sourceselect.cpp +++ b/src/providers/db2/qgsdb2sourceselect.cpp @@ -45,14 +45,14 @@ QWidget *QgsDb2SourceSelectDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const { Q_UNUSED( option ); - if ( index.column() == QgsDb2TableModel::dbtmSql ) + if ( index.column() == QgsDb2TableModel::DbtmSql ) { QLineEdit *le = new QLineEdit( parent ); le->setText( index.data( Qt::DisplayRole ).toString() ); return le; } - if ( index.column() == QgsDb2TableModel::dbtmType && index.data( Qt::UserRole + 1 ).toBool() ) + if ( index.column() == QgsDb2TableModel::DbtmType && index.data( Qt::UserRole + 1 ).toBool() ) { QComboBox *cb = new QComboBox( parent ); Q_FOREACH ( QgsWkbTypes::Type type, @@ -71,7 +71,7 @@ QWidget *QgsDb2SourceSelectDelegate::createEditor( QWidget *parent, const QStyle return cb; } - if ( index.column() == QgsDb2TableModel::dbtmPkCol ) + if ( index.column() == QgsDb2TableModel::DbtmPkCol ) { QStringList values = index.data( Qt::UserRole + 1 ).toStringList(); @@ -84,7 +84,7 @@ QWidget *QgsDb2SourceSelectDelegate::createEditor( QWidget *parent, const QStyle } } - if ( index.column() == QgsDb2TableModel::dbtmSrid ) + if ( index.column() == QgsDb2TableModel::DbtmSrid ) { QLineEdit *le = new QLineEdit( parent ); le->setValidator( new QIntValidator( -1, 999999, parent ) ); @@ -100,7 +100,7 @@ void QgsDb2SourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMod QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsDb2TableModel::dbtmType ) + if ( index.column() == QgsDb2TableModel::DbtmType ) { QgsWkbTypes::Type type = ( QgsWkbTypes::Type ) cb->currentData().toInt(); @@ -108,7 +108,7 @@ void QgsDb2SourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMod model->setData( index, type != QgsWkbTypes::Unknown ? QgsWkbTypes::displayString( type ) : tr( "Select..." ) ); model->setData( index, type, Qt::UserRole + 2 ); } - else if ( index.column() == QgsDb2TableModel::dbtmPkCol ) + else if ( index.column() == QgsDb2TableModel::DbtmPkCol ) { model->setData( index, cb->currentText() ); model->setData( index, cb->currentText(), Qt::UserRole + 2 ); @@ -355,31 +355,31 @@ void QgsDb2SourceSelect::on_mSearchColumnComboBox_currentIndexChanged( const QSt } else if ( text == tr( "Schema" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmSchema ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmSchema ); } else if ( text == tr( "Table" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmTable ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmTable ); } else if ( text == tr( "Type" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmType ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmType ); } else if ( text == tr( "Geometry column" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmGeomCol ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmGeomCol ); } else if ( text == tr( "Primary key column" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmPkCol ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmPkCol ); } else if ( text == tr( "SRID" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmSrid ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmSrid ); } else if ( text == tr( "Sql" ) ) { - mProxyModel.setFilterKeyColumn( QgsDb2TableModel::dbtmSql ); + mProxyModel.setFilterKeyColumn( QgsDb2TableModel::DbtmSql ); } } @@ -441,7 +441,7 @@ void QgsDb2SourceSelect::addTables() Q_FOREACH ( const QModelIndex& idx, mTablesTreeView->selectionModel()->selection().indexes() ) { - if ( idx.column() != QgsDb2TableModel::dbtmTable ) + if ( idx.column() != QgsDb2TableModel::DbtmTable ) continue; QString uri = mTableModel.layerURI( mProxyModel.mapToSource( idx ), mConnInfo, mUseEstimatedMetadata ); @@ -559,8 +559,8 @@ void QgsDb2SourceSelect::finishList() { QApplication::restoreOverrideCursor(); - mTablesTreeView->sortByColumn( QgsDb2TableModel::dbtmTable, Qt::AscendingOrder ); - mTablesTreeView->sortByColumn( QgsDb2TableModel::dbtmSchema, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsDb2TableModel::DbtmTable, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsDb2TableModel::DbtmSchema, Qt::AscendingOrder ); } void QgsDb2SourceSelect::columnThreadFinished() @@ -591,7 +591,7 @@ void QgsDb2SourceSelect::setSql( const QModelIndex &index ) } QModelIndex idx = mProxyModel.mapToSource( index ); - QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsDb2TableModel::dbtmTable ) )->text(); + QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsDb2TableModel::DbtmTable ) )->text(); QgsVectorLayer *vlayer = new QgsVectorLayer( mTableModel.layerURI( idx, mConnInfo, mUseEstimatedMetadata ), tableName, QStringLiteral( "DB2" ) ); diff --git a/src/providers/db2/qgsdb2tablemodel.cpp b/src/providers/db2/qgsdb2tablemodel.cpp index c2f2421dfdd0..01543236ba01 100644 --- a/src/providers/db2/qgsdb2tablemodel.cpp +++ b/src/providers/db2/qgsdb2tablemodel.cpp @@ -54,12 +54,12 @@ void QgsDb2TableModel::addTableEntry( const QgsDb2LayerProperty &layerProperty ) // is there already a root item with the given scheme Name? QStandardItem *schemaItem; - QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, DbtmSchema ); // there is already an item for this schema if ( schemaItems.size() > 0 ) { - schemaItem = schemaItems.at( dbtmSchema ); + schemaItem = schemaItems.at( DbtmSchema ); } else { @@ -160,9 +160,9 @@ void QgsDb2TableModel::setSql( const QModelIndex &index, const QString &sql ) } //find out schema name and table name - QModelIndex schemaSibling = index.sibling( index.row(), dbtmSchema ); - QModelIndex tableSibling = index.sibling( index.row(), dbtmTable ); - QModelIndex geomSibling = index.sibling( index.row(), dbtmGeomCol ); + QModelIndex schemaSibling = index.sibling( index.row(), DbtmSchema ); + QModelIndex tableSibling = index.sibling( index.row(), DbtmTable ); + QModelIndex geomSibling = index.sibling( index.row(), DbtmGeomCol ); if ( !schemaSibling.isValid() || !tableSibling.isValid() || !geomSibling.isValid() ) { @@ -173,30 +173,30 @@ void QgsDb2TableModel::setSql( const QModelIndex &index, const QString &sql ) QString tableName = itemFromIndex( tableSibling )->text(); QString geomName = itemFromIndex( geomSibling )->text(); - QList schemaItems = findItems( schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( schemaName, Qt::MatchExactly, DbtmSchema ); if ( schemaItems.size() < 1 ) { return; } - QStandardItem* schemaItem = schemaItems.at( dbtmSchema ); + QStandardItem* schemaItem = schemaItems.at( DbtmSchema ); int n = schemaItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, dbtmSchema ) ); + QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, DbtmSchema ) ); if ( !currentChildIndex.isValid() ) { continue; } - QModelIndex currentTableIndex = currentChildIndex.sibling( i, dbtmTable ); + QModelIndex currentTableIndex = currentChildIndex.sibling( i, DbtmTable ); if ( !currentTableIndex.isValid() ) { continue; } - QModelIndex currentGeomIndex = currentChildIndex.sibling( i, dbtmGeomCol ); + QModelIndex currentGeomIndex = currentChildIndex.sibling( i, DbtmGeomCol ); if ( !currentGeomIndex.isValid() ) { continue; @@ -204,7 +204,7 @@ void QgsDb2TableModel::setSql( const QModelIndex &index, const QString &sql ) if ( itemFromIndex( currentTableIndex )->text() == tableName && itemFromIndex( currentGeomIndex )->text() == geomName ) { - QModelIndex sqlIndex = currentChildIndex.sibling( i, dbtmSql ); + QModelIndex sqlIndex = currentChildIndex.sibling( i, DbtmSql ); if ( sqlIndex.isValid() ) { itemFromIndex( sqlIndex )->setText( sql ); @@ -222,7 +222,7 @@ void QgsDb2TableModel::setGeometryTypesForTable( QgsDb2LayerProperty layerProper //find schema item and table item QStandardItem* schemaItem; - QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, DbtmSchema ); if ( schemaItems.size() < 1 ) { @@ -234,7 +234,7 @@ void QgsDb2TableModel::setGeometryTypesForTable( QgsDb2LayerProperty layerProper int n = schemaItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, dbtmSchema ) ); + QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, DbtmSchema ) ); if ( !currentChildIndex.isValid() ) { continue; @@ -242,23 +242,23 @@ void QgsDb2TableModel::setGeometryTypesForTable( QgsDb2LayerProperty layerProper QList row; - row.reserve( dbtmColumns ); - for ( int j = 0; j < dbtmColumns; j++ ) + row.reserve( DbtmColumns ); + for ( int j = 0; j < DbtmColumns; j++ ) { row << itemFromIndex( currentChildIndex.sibling( i, j ) ); } - if ( row[ dbtmTable ]->text() == layerProperty.tableName && row[ dbtmGeomCol ]->text() == layerProperty.geometryColName ) + if ( row[ DbtmTable ]->text() == layerProperty.tableName && row[ DbtmGeomCol ]->text() == layerProperty.geometryColName ) { - row[ dbtmSrid ]->setText( layerProperty.srid ); + row[ DbtmSrid ]->setText( layerProperty.srid ); if ( typeList.isEmpty() ) { - row[ dbtmType ]->setText( tr( "Select..." ) ); - row[ dbtmType ]->setFlags( row[ dbtmType ]->flags() | Qt::ItemIsEditable ); + row[ DbtmType ]->setText( tr( "Select..." ) ); + row[ DbtmType ]->setFlags( row[ DbtmType ]->flags() | Qt::ItemIsEditable ); - row[ dbtmSrid ]->setText( tr( "Enter..." ) ); - row[ dbtmSrid ]->setFlags( row[ dbtmSrid ]->flags() | Qt::ItemIsEditable ); + row[ DbtmSrid ]->setText( tr( "Enter..." ) ); + row[ DbtmSrid ]->setFlags( row[ DbtmSrid ]->flags() | Qt::ItemIsEditable ); Q_FOREACH ( QStandardItem *item, row ) { @@ -270,12 +270,12 @@ void QgsDb2TableModel::setGeometryTypesForTable( QgsDb2LayerProperty layerProper // update existing row QgsWkbTypes::Type wkbType = QgsDb2TableModel::wkbTypeFromDb2( typeList.at( 0 ) ); - row[ dbtmType ]->setIcon( iconForWkbType( wkbType ) ); - row[ dbtmType ]->setText( QgsWkbTypes::displayString( wkbType ) ); - row[ dbtmType ]->setData( false, Qt::UserRole + 1 ); - row[ dbtmType ]->setData( wkbType, Qt::UserRole + 2 ); + row[ DbtmType ]->setIcon( iconForWkbType( wkbType ) ); + row[ DbtmType ]->setText( QgsWkbTypes::displayString( wkbType ) ); + row[ DbtmType ]->setData( false, Qt::UserRole + 1 ); + row[ DbtmType ]->setData( wkbType, Qt::UserRole + 2 ); - row[ dbtmSrid ]->setText( sridList.at( 0 ) ); + row[ DbtmSrid ]->setText( sridList.at( 0 ) ); Qt::ItemFlags flags = Qt::ItemIsEnabled; if ( layerProperty.pkCols.size() < 2 ) @@ -325,20 +325,20 @@ bool QgsDb2TableModel::setData( const QModelIndex &idx, const QVariant &value, i if ( !QStandardItemModel::setData( idx, value, role ) ) return false; - if ( idx.column() == dbtmType || idx.column() == dbtmSrid || idx.column() == dbtmPkCol ) + if ( idx.column() == DbtmType || idx.column() == DbtmSrid || idx.column() == DbtmPkCol ) { - QgsWkbTypes::GeometryType geomType = ( QgsWkbTypes::GeometryType ) idx.sibling( idx.row(), dbtmType ).data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::GeometryType geomType = ( QgsWkbTypes::GeometryType ) idx.sibling( idx.row(), DbtmType ).data( Qt::UserRole + 2 ).toInt(); bool ok = geomType != QgsWkbTypes::UnknownGeometry; if ( ok && geomType != QgsWkbTypes::NullGeometry ) - idx.sibling( idx.row(), dbtmSrid ).data().toInt( &ok ); + idx.sibling( idx.row(), DbtmSrid ).data().toInt( &ok ); - QStringList pkCols = idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); + QStringList pkCols = idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); if ( ok && pkCols.size() > 0 ) - ok = pkCols.contains( idx.sibling( idx.row(), dbtmPkCol ).data().toString() ); + ok = pkCols.contains( idx.sibling( idx.row(), DbtmPkCol ).data().toString() ); - for ( int i = 0; i < dbtmColumns; i++ ) + for ( int i = 0; i < DbtmColumns; i++ ) { QStandardItem *item = itemFromIndex( idx.sibling( idx.row(), i ) ); if ( ok ) @@ -356,12 +356,12 @@ QString QgsDb2TableModel::layerURI( const QModelIndex &index, const QString &con if ( !index.isValid() ) return QString::null; - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), dbtmType ) )->data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), DbtmType ) )->data( Qt::UserRole + 2 ).toInt(); if ( wkbType == QgsWkbTypes::Unknown ) // no geometry type selected return QString::null; - QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), dbtmPkCol ) ); + QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), DbtmPkCol ) ); QString pkColumnName = pkItem->data( Qt::UserRole + 2 ).toString(); if ( pkItem->data( Qt::UserRole + 1 ).toStringList().size() > 0 && @@ -369,24 +369,24 @@ QString QgsDb2TableModel::layerURI( const QModelIndex &index, const QString &con // no valid primary candidate selected return QString::null; - QString schemaName = index.sibling( index.row(), dbtmSchema ).data( Qt::DisplayRole ).toString(); - QString tableName = index.sibling( index.row(), dbtmTable ).data( Qt::DisplayRole ).toString(); + QString schemaName = index.sibling( index.row(), DbtmSchema ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), DbtmTable ).data( Qt::DisplayRole ).toString(); QString geomColumnName; QString srid; if ( wkbType != QgsWkbTypes::NoGeometry ) { - geomColumnName = index.sibling( index.row(), dbtmGeomCol ).data( Qt::DisplayRole ).toString(); + geomColumnName = index.sibling( index.row(), DbtmGeomCol ).data( Qt::DisplayRole ).toString(); - srid = index.sibling( index.row(), dbtmSrid ).data( Qt::DisplayRole ).toString(); + srid = index.sibling( index.row(), DbtmSrid ).data( Qt::DisplayRole ).toString(); bool ok; srid.toInt( &ok ); if ( !ok ) return QString::null; } - bool selectAtId = itemFromIndex( index.sibling( index.row(), dbtmSelectAtId ) )->checkState() == Qt::Checked; - QString sql = index.sibling( index.row(), dbtmSql ).data( Qt::DisplayRole ).toString(); + bool selectAtId = itemFromIndex( index.sibling( index.row(), DbtmSelectAtId ) )->checkState() == Qt::Checked; + QString sql = index.sibling( index.row(), DbtmSql ).data( Qt::DisplayRole ).toString(); QgsDataSourceUri uri( connInfo ); uri.setDataSource( schemaName, tableName, geomColumnName, sql, pkColumnName ); diff --git a/src/providers/db2/qgsdb2tablemodel.h b/src/providers/db2/qgsdb2tablemodel.h index 189b3d093b7e..95dd67f25087 100644 --- a/src/providers/db2/qgsdb2tablemodel.h +++ b/src/providers/db2/qgsdb2tablemodel.h @@ -63,17 +63,17 @@ class QgsDb2TableModel : public QStandardItemModel //! Returns the number of tables in the model int tableCount() const { return mTableCount; } - enum columns + enum Columns { - dbtmSchema = 0, - dbtmTable, - dbtmType, - dbtmGeomCol, - dbtmSrid, - dbtmPkCol, - dbtmSelectAtId, - dbtmSql, - dbtmColumns + DbtmSchema = 0, + DbtmTable, + DbtmType, + DbtmGeomCol, + DbtmSrid, + DbtmPkCol, + DbtmSelectAtId, + DbtmSql, + DbtmColumns }; bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) override; diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index 8903dff08dd9..a7df094d55cf 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -805,7 +805,7 @@ int QgsGrass::initialized = 0; bool QgsGrass::active = 0; -QgsGrass::GERROR QgsGrass::lastError = QgsGrass::OK; +QgsGrass::GError QgsGrass::lastError = QgsGrass::OK; QString QgsGrass::error_message; QString QgsGrass::mInitError; @@ -846,7 +846,7 @@ int QgsGrass::error_routine( const char *msg, int fatal ) QgsDebugMsg( "fatal -> longjmp" ); // Exceptions cannot be thrown from here if GRASS lib is not compiled with -fexceptions //throw QgsGrass::Exception( QString::fromUtf8( msg ) ); - lastError = FATAL; + lastError = Fatal; #if (GRASS_VERSION_MAJOR < 7) // longjump() is called by G_fatal_error in GRASS >= 7 @@ -855,7 +855,7 @@ int QgsGrass::error_routine( const char *msg, int fatal ) } else { - lastError = WARNING; + lastError = Warning; } return 1; diff --git a/src/providers/grass/qgsgrass.h b/src/providers/grass/qgsgrass.h index 2b27c6823df7..e6ba6e298967 100644 --- a/src/providers/grass/qgsgrass.h +++ b/src/providers/grass/qgsgrass.h @@ -247,11 +247,11 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject void removeMapsetFromSearchPath( const QString & mapset, QString& error ); //! Error codes returned by error() - enum GERROR + enum GError { OK, //!< OK. No error. - WARNING, //!< Warning, non fatal error. Should be printed by application. - FATAL //!< Fatal error + Warning, //!< Warning, non fatal error. Should be printed by application. + Fatal //!< Fatal error }; //! Reset error code (to OK). Call this before a piece of code where an error is expected @@ -680,7 +680,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject QFileSystemWatcher *mMapsetSearchPathWatcher; /* last error in GRASS libraries */ - static GERROR lastError; // static, because used in constructor + static GError lastError; // static, because used in constructor static QString error_message; // error set in init() if it failed static QString mInitError; diff --git a/src/providers/grass/qgsgrassfeatureiterator.cpp b/src/providers/grass/qgsgrassfeatureiterator.cpp index 9d8317ac9685..4fdbec70ea34 100644 --- a/src/providers/grass/qgsgrassfeatureiterator.cpp +++ b/src/providers/grass/qgsgrassfeatureiterator.cpp @@ -146,10 +146,10 @@ void QgsGrassFeatureIterator::setSelectionRect( const QgsRectangle& rect, bool u if ( !useIntersect ) { // select by bounding boxes only - if ( mSource->mLayerType == QgsGrassProvider::POINT || mSource->mLayerType == QgsGrassProvider::CENTROID || - mSource->mLayerType == QgsGrassProvider::LINE || mSource->mLayerType == QgsGrassProvider::FACE || - mSource->mLayerType == QgsGrassProvider::BOUNDARY || - mSource->mLayerType == QgsGrassProvider::TOPO_POINT || mSource->mLayerType == QgsGrassProvider::TOPO_LINE || + if ( mSource->mLayerType == QgsGrassProvider::Point || mSource->mLayerType == QgsGrassProvider::Centroid || + mSource->mLayerType == QgsGrassProvider::Line || mSource->mLayerType == QgsGrassProvider::Face || + mSource->mLayerType == QgsGrassProvider::Boundary || + mSource->mLayerType == QgsGrassProvider::TopoPoint || mSource->mLayerType == QgsGrassProvider::TopoLine || mSource->mEditing ) { QgsDebugMsg( "Vect_select_lines_by_box" ); @@ -161,11 +161,11 @@ void QgsGrassFeatureIterator::setSelectionRect( const QgsRectangle& rect, bool u QgsDebugMsg( QString( "type = %1" ).arg( type ) ); Vect_select_lines_by_box( mSource->map(), &box, type, list ); } - else if ( mSource->mLayerType == QgsGrassProvider::POLYGON ) + else if ( mSource->mLayerType == QgsGrassProvider::Polygon ) { Vect_select_areas_by_box( mSource->map(), &box, list ); } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_NODE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoNode ) { Vect_select_nodes_by_box( mSource->map(), &box, list ); } @@ -183,10 +183,10 @@ void QgsGrassFeatureIterator::setSelectionRect( const QgsRectangle& rect, bool u Vect_append_point( polygon, rect.xMinimum(), rect.yMaximum(), 0 ); Vect_append_point( polygon, rect.xMinimum(), rect.yMinimum(), 0 ); - if ( mSource->mLayerType == QgsGrassProvider::POINT || mSource->mLayerType == QgsGrassProvider::CENTROID || - mSource->mLayerType == QgsGrassProvider::LINE || mSource->mLayerType == QgsGrassProvider::FACE || - mSource->mLayerType == QgsGrassProvider::BOUNDARY || - mSource->mLayerType == QgsGrassProvider::TOPO_POINT || mSource->mLayerType == QgsGrassProvider::TOPO_LINE || + if ( mSource->mLayerType == QgsGrassProvider::Point || mSource->mLayerType == QgsGrassProvider::Centroid || + mSource->mLayerType == QgsGrassProvider::Line || mSource->mLayerType == QgsGrassProvider::Face || + mSource->mLayerType == QgsGrassProvider::Boundary || + mSource->mLayerType == QgsGrassProvider::TopoPoint || mSource->mLayerType == QgsGrassProvider::TopoLine || mSource->mEditing ) { QgsDebugMsg( "Vect_select_lines_by_polygon" ); @@ -198,11 +198,11 @@ void QgsGrassFeatureIterator::setSelectionRect( const QgsRectangle& rect, bool u QgsDebugMsg( QString( "type = %1" ).arg( type ) ); Vect_select_lines_by_polygon( mSource->map(), polygon, 0, NULL, type, list ); } - else if ( mSource->mLayerType == QgsGrassProvider::POLYGON ) + else if ( mSource->mLayerType == QgsGrassProvider::Polygon ) { Vect_select_areas_by_polygon( mSource->map(), polygon, 0, NULL, list ); } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_NODE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoNode ) { // There is no Vect_select_nodes_by_polygon but for nodes it is the same as by box Vect_select_nodes_by_box( mSource->map(), &box, list ); @@ -386,7 +386,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) } Vect_destroy_cats_struct( cats ); } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_POINT || mSource->mLayerType == QgsGrassProvider::TOPO_LINE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoPoint || mSource->mLayerType == QgsGrassProvider::TopoLine ) { if ( mNextLid > Vect_get_num_lines( mSource->map() ) ) { @@ -400,7 +400,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) } featureId = lid; } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_NODE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoNode ) { if ( mNextLid > Vect_get_num_nodes( mSource->map() ) ) { @@ -475,7 +475,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) mSource->mLayer->map()->unlockReadWrite(); return false; // No more features } - if ( type == 0 && mSource->mLayerType != QgsGrassProvider::TOPO_NODE ) + if ( type == 0 && mSource->mLayerType != QgsGrassProvider::TopoNode ) { QgsDebugMsg( "unknown type" ); close(); @@ -523,7 +523,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) if ( mSource->mLayerType == QgsGrassProvider::TOPO_POINT || mSource->mLayerType == QgsGrassProvider::TOPO_LINE ) #else /* No more topo points in GRASS 7 */ - if ( mSource->mLayerType == QgsGrassProvider::TOPO_LINE ) + if ( mSource->mLayerType == QgsGrassProvider::TopoLine ) #endif { feature.setAttribute( 1, QgsGrass::vectorTypeName( type ) ); @@ -531,13 +531,13 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) int node1, node2; Vect_get_line_nodes( mSource->map(), lid, &node1, &node2 ); feature.setAttribute( 2, node1 ); - if ( mSource->mLayerType == QgsGrassProvider::TOPO_LINE ) + if ( mSource->mLayerType == QgsGrassProvider::TopoLine ) { feature.setAttribute( 3, node2 ); } } - if ( mSource->mLayerType == QgsGrassProvider::TOPO_LINE ) + if ( mSource->mLayerType == QgsGrassProvider::TopoLine ) { if ( type == GV_BOUNDARY ) { @@ -547,7 +547,7 @@ bool QgsGrassFeatureIterator::fetchFeature( QgsFeature& feature ) feature.setAttribute( 5, right ); } } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_NODE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoNode ) { QString lines; int nlines = Vect_get_node_n_lines( mSource->map(), lid ); @@ -606,7 +606,7 @@ void QgsGrassFeatureIterator::setFeatureGeometry( QgsFeature& feature, int id, i { geometry = mSource->mLayer->map()->lineGeometry( id ); } - else if ( mSource->mLayerType == QgsGrassProvider::TOPO_NODE ) + else if ( mSource->mLayerType == QgsGrassProvider::TopoNode ) { geometry = mSource->mLayer->map()->nodeGeometry( id ); } diff --git a/src/providers/grass/qgsgrassprovider.cpp b/src/providers/grass/qgsgrassprovider.cpp index ccb7b6fb7bef..0207527a82d9 100644 --- a/src/providers/grass/qgsgrassprovider.cpp +++ b/src/providers/grass/qgsgrassprovider.cpp @@ -112,7 +112,7 @@ int QgsGrassProvider::mEditedCount = 0; QgsGrassProvider::QgsGrassProvider( const QString& uri ) : QgsVectorDataProvider( uri ) , mLayerField( -1 ) - , mLayerType( POINT ) + , mLayerType( Point ) , mGrassType( 0 ) , mQgisType( QgsWkbTypes::Unknown ) , mLayer( 0 ) @@ -163,27 +163,27 @@ QgsGrassProvider::QgsGrassProvider( const QString& uri ) */ if ( mLayerName.compare( QLatin1String( "boundary" ) ) == 0 ) // currently not used { - mLayerType = BOUNDARY; + mLayerType = Boundary; mGrassType = GV_BOUNDARY; } else if ( mLayerName.compare( QLatin1String( "centroid" ) ) == 0 ) // currently not used { - mLayerType = CENTROID; + mLayerType = Centroid; mGrassType = GV_CENTROID; } else if ( mLayerName == QLatin1String( "topo_point" ) ) { - mLayerType = TOPO_POINT; + mLayerType = TopoPoint; mGrassType = GV_POINTS; } else if ( mLayerName == QLatin1String( "topo_line" ) ) { - mLayerType = TOPO_LINE; + mLayerType = TopoLine; mGrassType = GV_LINES; } else if ( mLayerName == QLatin1String( "topo_node" ) ) { - mLayerType = TOPO_NODE; + mLayerType = TopoNode; mGrassType = 0; } else @@ -199,19 +199,19 @@ QgsGrassProvider::QgsGrassProvider( const QString& uri ) if ( mGrassType == GV_POINT ) { - mLayerType = POINT; + mLayerType = Point; } else if ( mGrassType == GV_LINES ) { - mLayerType = LINE; + mLayerType = Line; } else if ( mGrassType == GV_FACE ) { - mLayerType = FACE; + mLayerType = Face; } else if ( mGrassType == GV_AREA ) { - mLayerType = POLYGON; + mLayerType = Polygon; } else { @@ -223,7 +223,7 @@ QgsGrassProvider::QgsGrassProvider( const QString& uri ) QgsDebugMsg( QString( "mLayerField: %1" ).arg( mLayerField ) ); QgsDebugMsg( QString( "mLayerType: %1" ).arg( mLayerType ) ); - if ( mLayerType == BOUNDARY || mLayerType == CENTROID ) + if ( mLayerType == Boundary || mLayerType == Centroid ) { QgsDebugMsg( "Layer type not supported." ); return; @@ -232,19 +232,19 @@ QgsGrassProvider::QgsGrassProvider( const QString& uri ) // Set QGIS type switch ( mLayerType ) { - case POINT: - case CENTROID: - case TOPO_POINT: - case TOPO_NODE: + case Point: + case Centroid: + case TopoPoint: + case TopoNode: mQgisType = QgsWkbTypes::Point; break; - case LINE: - case BOUNDARY: - case TOPO_LINE: + case Line: + case Boundary: + case TopoLine: mQgisType = QgsWkbTypes::LineString; break; - case POLYGON: - case FACE: + case Polygon: + case Face: mQgisType = QgsWkbTypes::Polygon; break; } @@ -348,15 +348,15 @@ void QgsGrassProvider::loadMapInfo() // Getting the total number of features in the layer int cidxFieldIndex = -1; mNumberFeatures = 0; - if ( mLayerType == TOPO_POINT ) + if ( mLayerType == TopoPoint ) { mNumberFeatures = Vect_get_num_primitives( map(), GV_POINTS ); } - else if ( mLayerType == TOPO_LINE ) + else if ( mLayerType == TopoLine ) { mNumberFeatures = Vect_get_num_primitives( map(), GV_LINES ); } - else if ( mLayerType == TOPO_NODE ) + else if ( mLayerType == TopoNode ) { mNumberFeatures = Vect_get_num_nodes( map() ); } @@ -1059,19 +1059,19 @@ bool QgsGrassProvider::isTopoType() const bool QgsGrassProvider::isTopoType( int layerType ) { - return layerType == TOPO_POINT || layerType == TOPO_LINE || layerType == TOPO_NODE; + return layerType == TopoPoint || layerType == TopoLine || layerType == TopoNode; } void QgsGrassProvider::setTopoFields() { mTopoFields.append( QgsField( QStringLiteral( "id" ), QVariant::Int ) ); - if ( mLayerType == TOPO_POINT ) + if ( mLayerType == TopoPoint ) { mTopoFields.append( QgsField( QStringLiteral( "type" ), QVariant::String ) ); mTopoFields.append( QgsField( QStringLiteral( "node" ), QVariant::Int ) ); } - else if ( mLayerType == TOPO_LINE ) + else if ( mLayerType == TopoLine ) { mTopoFields.append( QgsField( QStringLiteral( "type" ), QVariant::String ) ); mTopoFields.append( QgsField( QStringLiteral( "node1" ), QVariant::Int ) ); @@ -1079,7 +1079,7 @@ void QgsGrassProvider::setTopoFields() mTopoFields.append( QgsField( QStringLiteral( "left" ), QVariant::Int ) ); mTopoFields.append( QgsField( QStringLiteral( "right" ), QVariant::Int ) ); } - else if ( mLayerType == TOPO_NODE ) + else if ( mLayerType == TopoNode ) { mTopoFields.append( QgsField( QStringLiteral( "lines" ), QVariant::String ) ); } diff --git a/src/providers/grass/qgsgrassprovider.h b/src/providers/grass/qgsgrassprovider.h index 1294e8778f0c..3f7898a65a1f 100644 --- a/src/providers/grass/qgsgrassprovider.h +++ b/src/providers/grass/qgsgrassprovider.h @@ -333,19 +333,19 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider QString description() const override; // Layer type (layerType) - enum TYPE // layer name: + enum Type // layer name: { - POINT = 1, // _point - LINE, // _line - FACE, // _face - POLYGON, // _polygon - BOUNDARY, // boundary (currently not used) - CENTROID, // centroid (currently not used) + Point = 1, //!< _point + Line, //!< _line + Face, //!< _face + Polygon, //!< _polygon + Boundary, //!< Boundary (currently not used) + Centroid, //!< Centroid (currently not used) // topology layers, may be used to display internal GRASS topology info // useful for debugging of GRASS topology and modules using topology - TOPO_POINT, // all points with topology id - TOPO_LINE, // all lines with topology id - TOPO_NODE // topology nodes + TopoPoint, //!< All points with topology id + TopoLine, //!< All lines with topology id + TopoNode //!< Topology nodes }; // Set type for next digitized feature (GV_POINT,GV_LINE, GV_BOUNDARY, GV_CENTROID, GV_AREA) diff --git a/src/providers/mssql/qgsmssqlsourceselect.cpp b/src/providers/mssql/qgsmssqlsourceselect.cpp index 72154ec5d7ec..b51c9b069db1 100644 --- a/src/providers/mssql/qgsmssqlsourceselect.cpp +++ b/src/providers/mssql/qgsmssqlsourceselect.cpp @@ -42,14 +42,14 @@ QWidget *QgsMssqlSourceSelectDelegate::createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const { Q_UNUSED( option ); - if ( index.column() == QgsMssqlTableModel::dbtmSql ) + if ( index.column() == QgsMssqlTableModel::DbtmSql ) { QLineEdit *le = new QLineEdit( parent ); le->setText( index.data( Qt::DisplayRole ).toString() ); return le; } - if ( index.column() == QgsMssqlTableModel::dbtmType && index.data( Qt::UserRole + 1 ).toBool() ) + if ( index.column() == QgsMssqlTableModel::DbtmType && index.data( Qt::UserRole + 1 ).toBool() ) { QComboBox *cb = new QComboBox( parent ); Q_FOREACH ( QgsWkbTypes::Type type, @@ -68,7 +68,7 @@ QWidget *QgsMssqlSourceSelectDelegate::createEditor( QWidget *parent, const QSty return cb; } - if ( index.column() == QgsMssqlTableModel::dbtmPkCol ) + if ( index.column() == QgsMssqlTableModel::DbtmPkCol ) { QStringList values = index.data( Qt::UserRole + 1 ).toStringList(); @@ -81,7 +81,7 @@ QWidget *QgsMssqlSourceSelectDelegate::createEditor( QWidget *parent, const QSty } } - if ( index.column() == QgsMssqlTableModel::dbtmSrid ) + if ( index.column() == QgsMssqlTableModel::DbtmSrid ) { QLineEdit *le = new QLineEdit( parent ); le->setValidator( new QIntValidator( -1, 999999, parent ) ); @@ -97,7 +97,7 @@ void QgsMssqlSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemM QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsMssqlTableModel::dbtmType ) + if ( index.column() == QgsMssqlTableModel::DbtmType ) { QgsWkbTypes::Type type = ( QgsWkbTypes::Type ) cb->currentData().toInt(); @@ -105,7 +105,7 @@ void QgsMssqlSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemM model->setData( index, type != QgsWkbTypes::Unknown ? QgsWkbTypes::displayString( type ) : tr( "Select..." ) ); model->setData( index, type, Qt::UserRole + 2 ); } - else if ( index.column() == QgsMssqlTableModel::dbtmPkCol ) + else if ( index.column() == QgsMssqlTableModel::DbtmPkCol ) { model->setData( index, cb->currentText() ); model->setData( index, cb->currentText(), Qt::UserRole + 2 ); @@ -350,31 +350,31 @@ void QgsMssqlSourceSelect::on_mSearchColumnComboBox_currentIndexChanged( const Q } else if ( text == tr( "Schema" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmSchema ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmSchema ); } else if ( text == tr( "Table" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmTable ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmTable ); } else if ( text == tr( "Type" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmType ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmType ); } else if ( text == tr( "Geometry column" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmGeomCol ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmGeomCol ); } else if ( text == tr( "Primary key column" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmPkCol ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmPkCol ); } else if ( text == tr( "SRID" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmSrid ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmSrid ); } else if ( text == tr( "Sql" ) ) { - mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::dbtmSql ); + mProxyModel.setFilterKeyColumn( QgsMssqlTableModel::DbtmSql ); } } @@ -436,7 +436,7 @@ void QgsMssqlSourceSelect::addTables() Q_FOREACH ( const QModelIndex& idx, mTablesTreeView->selectionModel()->selection().indexes() ) { - if ( idx.column() != QgsMssqlTableModel::dbtmTable ) + if ( idx.column() != QgsMssqlTableModel::DbtmTable ) continue; QString uri = mTableModel.layerURI( mProxyModel.mapToSource( idx ), mConnInfo, mUseEstimatedMetadata ); @@ -633,8 +633,8 @@ void QgsMssqlSourceSelect::finishList() { QApplication::restoreOverrideCursor(); - mTablesTreeView->sortByColumn( QgsMssqlTableModel::dbtmTable, Qt::AscendingOrder ); - mTablesTreeView->sortByColumn( QgsMssqlTableModel::dbtmSchema, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsMssqlTableModel::DbtmTable, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsMssqlTableModel::DbtmSchema, Qt::AscendingOrder ); } void QgsMssqlSourceSelect::columnThreadFinished() @@ -665,7 +665,7 @@ void QgsMssqlSourceSelect::setSql( const QModelIndex &index ) } QModelIndex idx = mProxyModel.mapToSource( index ); - QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsMssqlTableModel::dbtmTable ) )->text(); + QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsMssqlTableModel::DbtmTable ) )->text(); QgsVectorLayer *vlayer = new QgsVectorLayer( mTableModel.layerURI( idx, mConnInfo, mUseEstimatedMetadata ), tableName, QStringLiteral( "mssql" ) ); diff --git a/src/providers/mssql/qgsmssqltablemodel.cpp b/src/providers/mssql/qgsmssqltablemodel.cpp index 7e0a0e282cfb..1b0f76955b43 100644 --- a/src/providers/mssql/qgsmssqltablemodel.cpp +++ b/src/providers/mssql/qgsmssqltablemodel.cpp @@ -50,12 +50,12 @@ void QgsMssqlTableModel::addTableEntry( const QgsMssqlLayerProperty &layerProper // is there already a root item with the given scheme Name? QStandardItem *schemaItem; - QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, DbtmSchema ); // there is already an item for this schema if ( !schemaItems.isEmpty() ) { - schemaItem = schemaItems.at( dbtmSchema ); + schemaItem = schemaItems.at( DbtmSchema ); } else { @@ -156,9 +156,9 @@ void QgsMssqlTableModel::setSql( const QModelIndex &index, const QString &sql ) } //find out schema name and table name - QModelIndex schemaSibling = index.sibling( index.row(), dbtmSchema ); - QModelIndex tableSibling = index.sibling( index.row(), dbtmTable ); - QModelIndex geomSibling = index.sibling( index.row(), dbtmGeomCol ); + QModelIndex schemaSibling = index.sibling( index.row(), DbtmSchema ); + QModelIndex tableSibling = index.sibling( index.row(), DbtmTable ); + QModelIndex geomSibling = index.sibling( index.row(), DbtmGeomCol ); if ( !schemaSibling.isValid() || !tableSibling.isValid() || !geomSibling.isValid() ) { @@ -169,30 +169,30 @@ void QgsMssqlTableModel::setSql( const QModelIndex &index, const QString &sql ) QString tableName = itemFromIndex( tableSibling )->text(); QString geomName = itemFromIndex( geomSibling )->text(); - QList schemaItems = findItems( schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( schemaName, Qt::MatchExactly, DbtmSchema ); if ( schemaItems.size() < 1 ) { return; } - QStandardItem* schemaItem = schemaItems.at( dbtmSchema ); + QStandardItem* schemaItem = schemaItems.at( DbtmSchema ); int n = schemaItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, dbtmSchema ) ); + QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, DbtmSchema ) ); if ( !currentChildIndex.isValid() ) { continue; } - QModelIndex currentTableIndex = currentChildIndex.sibling( i, dbtmTable ); + QModelIndex currentTableIndex = currentChildIndex.sibling( i, DbtmTable ); if ( !currentTableIndex.isValid() ) { continue; } - QModelIndex currentGeomIndex = currentChildIndex.sibling( i, dbtmGeomCol ); + QModelIndex currentGeomIndex = currentChildIndex.sibling( i, DbtmGeomCol ); if ( !currentGeomIndex.isValid() ) { continue; @@ -200,7 +200,7 @@ void QgsMssqlTableModel::setSql( const QModelIndex &index, const QString &sql ) if ( itemFromIndex( currentTableIndex )->text() == tableName && itemFromIndex( currentGeomIndex )->text() == geomName ) { - QModelIndex sqlIndex = currentChildIndex.sibling( i, dbtmSql ); + QModelIndex sqlIndex = currentChildIndex.sibling( i, DbtmSql ); if ( sqlIndex.isValid() ) { itemFromIndex( sqlIndex )->setText( sql ); @@ -218,7 +218,7 @@ void QgsMssqlTableModel::setGeometryTypesForTable( QgsMssqlLayerProperty layerPr //find schema item and table item QStandardItem* schemaItem; - QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, DbtmSchema ); if ( schemaItems.size() < 1 ) { @@ -230,31 +230,31 @@ void QgsMssqlTableModel::setGeometryTypesForTable( QgsMssqlLayerProperty layerPr int n = schemaItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, dbtmSchema ) ); + QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, DbtmSchema ) ); if ( !currentChildIndex.isValid() ) { continue; } QList row; - row.reserve( dbtmColumns ); + row.reserve( DbtmColumns ); - for ( int j = 0; j < dbtmColumns; j++ ) + for ( int j = 0; j < DbtmColumns; j++ ) { row << itemFromIndex( currentChildIndex.sibling( i, j ) ); } - if ( row[ dbtmTable ]->text() == layerProperty.tableName && row[ dbtmGeomCol ]->text() == layerProperty.geometryColName ) + if ( row[ DbtmTable ]->text() == layerProperty.tableName && row[ DbtmGeomCol ]->text() == layerProperty.geometryColName ) { - row[ dbtmSrid ]->setText( layerProperty.srid ); + row[ DbtmSrid ]->setText( layerProperty.srid ); if ( typeList.isEmpty() ) { - row[ dbtmType ]->setText( tr( "Select..." ) ); - row[ dbtmType ]->setFlags( row[ dbtmType ]->flags() | Qt::ItemIsEditable ); + row[ DbtmType ]->setText( tr( "Select..." ) ); + row[ DbtmType ]->setFlags( row[ DbtmType ]->flags() | Qt::ItemIsEditable ); - row[ dbtmSrid ]->setText( tr( "Enter..." ) ); - row[ dbtmSrid ]->setFlags( row[ dbtmSrid ]->flags() | Qt::ItemIsEditable ); + row[ DbtmSrid ]->setText( tr( "Enter..." ) ); + row[ DbtmSrid ]->setFlags( row[ DbtmSrid ]->flags() | Qt::ItemIsEditable ); Q_FOREACH ( QStandardItem *item, row ) { @@ -266,12 +266,12 @@ void QgsMssqlTableModel::setGeometryTypesForTable( QgsMssqlLayerProperty layerPr // update existing row QgsWkbTypes::Type wkbType = QgsMssqlTableModel::wkbTypeFromMssql( typeList.at( 0 ) ); - row[ dbtmType ]->setIcon( iconForWkbType( wkbType ) ); - row[ dbtmType ]->setText( QgsWkbTypes::displayString( wkbType ) ); - row[ dbtmType ]->setData( false, Qt::UserRole + 1 ); - row[ dbtmType ]->setData( wkbType, Qt::UserRole + 2 ); + row[ DbtmType ]->setIcon( iconForWkbType( wkbType ) ); + row[ DbtmType ]->setText( QgsWkbTypes::displayString( wkbType ) ); + row[ DbtmType ]->setData( false, Qt::UserRole + 1 ); + row[ DbtmType ]->setData( wkbType, Qt::UserRole + 2 ); - row[ dbtmSrid ]->setText( sridList.at( 0 ) ); + row[ DbtmSrid ]->setText( sridList.at( 0 ) ); Qt::ItemFlags flags = Qt::ItemIsEnabled; if ( layerProperty.pkCols.size() < 2 ) @@ -321,20 +321,20 @@ bool QgsMssqlTableModel::setData( const QModelIndex &idx, const QVariant &value, if ( !QStandardItemModel::setData( idx, value, role ) ) return false; - if ( idx.column() == dbtmType || idx.column() == dbtmSrid || idx.column() == dbtmPkCol ) + if ( idx.column() == DbtmType || idx.column() == DbtmSrid || idx.column() == DbtmPkCol ) { - QgsWkbTypes::GeometryType geomType = ( QgsWkbTypes::GeometryType ) idx.sibling( idx.row(), dbtmType ).data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::GeometryType geomType = ( QgsWkbTypes::GeometryType ) idx.sibling( idx.row(), DbtmType ).data( Qt::UserRole + 2 ).toInt(); bool ok = geomType != QgsWkbTypes::UnknownGeometry; if ( ok && geomType != QgsWkbTypes::NullGeometry ) - idx.sibling( idx.row(), dbtmSrid ).data().toInt( &ok ); + idx.sibling( idx.row(), DbtmSrid ).data().toInt( &ok ); - QStringList pkCols = idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); + QStringList pkCols = idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); if ( ok && !pkCols.isEmpty() ) - ok = pkCols.contains( idx.sibling( idx.row(), dbtmPkCol ).data().toString() ); + ok = pkCols.contains( idx.sibling( idx.row(), DbtmPkCol ).data().toString() ); - for ( int i = 0; i < dbtmColumns; i++ ) + for ( int i = 0; i < DbtmColumns; i++ ) { QStandardItem *item = itemFromIndex( idx.sibling( idx.row(), i ) ); if ( ok ) @@ -352,12 +352,12 @@ QString QgsMssqlTableModel::layerURI( const QModelIndex &index, const QString &c if ( !index.isValid() ) return QString::null; - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), dbtmType ) )->data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), DbtmType ) )->data( Qt::UserRole + 2 ).toInt(); if ( wkbType == QgsWkbTypes::Unknown ) // no geometry type selected return QString::null; - QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), dbtmPkCol ) ); + QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), DbtmPkCol ) ); QString pkColumnName = pkItem->data( Qt::UserRole + 2 ).toString(); if ( !pkItem->data( Qt::UserRole + 1 ).toStringList().isEmpty() && @@ -365,24 +365,24 @@ QString QgsMssqlTableModel::layerURI( const QModelIndex &index, const QString &c // no valid primary candidate selected return QString::null; - QString schemaName = index.sibling( index.row(), dbtmSchema ).data( Qt::DisplayRole ).toString(); - QString tableName = index.sibling( index.row(), dbtmTable ).data( Qt::DisplayRole ).toString(); + QString schemaName = index.sibling( index.row(), DbtmSchema ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), DbtmTable ).data( Qt::DisplayRole ).toString(); QString geomColumnName; QString srid; if ( wkbType != QgsWkbTypes::NoGeometry ) { - geomColumnName = index.sibling( index.row(), dbtmGeomCol ).data( Qt::DisplayRole ).toString(); + geomColumnName = index.sibling( index.row(), DbtmGeomCol ).data( Qt::DisplayRole ).toString(); - srid = index.sibling( index.row(), dbtmSrid ).data( Qt::DisplayRole ).toString(); + srid = index.sibling( index.row(), DbtmSrid ).data( Qt::DisplayRole ).toString(); bool ok; srid.toInt( &ok ); if ( !ok ) return QString::null; } - bool selectAtId = itemFromIndex( index.sibling( index.row(), dbtmSelectAtId ) )->checkState() == Qt::Checked; - QString sql = index.sibling( index.row(), dbtmSql ).data( Qt::DisplayRole ).toString(); + bool selectAtId = itemFromIndex( index.sibling( index.row(), DbtmSelectAtId ) )->checkState() == Qt::Checked; + QString sql = index.sibling( index.row(), DbtmSql ).data( Qt::DisplayRole ).toString(); QgsDataSourceUri uri( connInfo ); uri.setDataSource( schemaName, tableName, geomColumnName, sql, pkColumnName ); diff --git a/src/providers/mssql/qgsmssqltablemodel.h b/src/providers/mssql/qgsmssqltablemodel.h index edfe747adcf0..0bb378c1b45d 100644 --- a/src/providers/mssql/qgsmssqltablemodel.h +++ b/src/providers/mssql/qgsmssqltablemodel.h @@ -58,17 +58,17 @@ class QgsMssqlTableModel : public QStandardItemModel //! Returns the number of tables in the model int tableCount() const { return mTableCount; } - enum columns + enum Columns { - dbtmSchema = 0, - dbtmTable, - dbtmType, - dbtmGeomCol, - dbtmSrid, - dbtmPkCol, - dbtmSelectAtId, - dbtmSql, - dbtmColumns + DbtmSchema = 0, + DbtmTable, + DbtmType, + DbtmGeomCol, + DbtmSrid, + DbtmPkCol, + DbtmSelectAtId, + DbtmSql, + DbtmColumns }; bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) override; diff --git a/src/providers/oracle/ocispatial/qsql_ocispatial.cpp b/src/providers/oracle/ocispatial/qsql_ocispatial.cpp index a62271957ad3..b0ccdcbdc6f9 100644 --- a/src/providers/oracle/ocispatial/qsql_ocispatial.cpp +++ b/src/providers/oracle/ocispatial/qsql_ocispatial.cpp @@ -565,7 +565,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError OCI_VERIFY_E( err, OCINumberFromInt( err, &g.gtype, sizeof( int ), OCI_NUMBER_SIGNED, &geometryObj->gtype ) ); OCI_VERIFY_E( err, OCINumberFromInt( err, &g.srid, sizeof( int ), OCI_NUMBER_SIGNED, &geometryObj->srid ) ); - if ( SDO_GTYPE_TT( g.gtype ) == gtPoint ) + if ( SDO_GTYPE_TT( g.gtype ) == GtPoint ) { geometryInd->point._atomic = OCI_IND_NOTNULL; geometryInd->point.x = OCI_IND_NOTNULL; @@ -2396,13 +2396,13 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index ) Q_ASSERT( nElems % 3 == 0 ); Q_ASSERT( nOrds % nDims == 0 ); - if ( iType == gtUnknown ) + if ( iType == GtUnknown ) { qWarning() << "unknown geometry"; return false; } - if ( iType == gtPoint && nElems == 0 ) + if ( iType == GtPoint && nElems == 0 ) { Q_ASSERT( nOrds == 0 ); @@ -2511,7 +2511,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index ) return false; } - if ( iType == gtPoint || iType == gtMultiPoint ) + if ( iType == GtPoint || iType == GtMultiPoint ) { int nPoints = 0; @@ -2529,7 +2529,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index ) } Q_ASSERT( nPoints % nDims == 0 ); - Q_ASSERT( iType == gtMultiPoint || nPoints == nDims ); + Q_ASSERT( iType == GtMultiPoint || nPoints == nDims ); int wkbSize = 0; @@ -2586,7 +2586,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index ) return true; } - if ( iType == gtLine || iType == gtMultiLine ) + if ( iType == GtLine || iType == GtMultiLine ) { Q_ASSERT( nOrds % nDims == 0 ); @@ -2658,7 +2658,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index ) return true; } - if ( iType == gtPolygon || iType == gtMultiPolygon ) + if ( iType == GtPolygon || iType == GtMultiPolygon ) { int nPolygons = 0; int nPoints = 0; diff --git a/src/providers/oracle/ocispatial/wkbptr.h b/src/providers/oracle/ocispatial/wkbptr.h index c5d87b5ae4e5..3300d97dc18b 100644 --- a/src/providers/oracle/ocispatial/wkbptr.h +++ b/src/providers/oracle/ocispatial/wkbptr.h @@ -38,14 +38,14 @@ const int SDO_ARRAY_SIZE = 1024; enum SDO_GTYPE_TT { - gtUnknown = 0, - gtPoint = 1, - gtLine = 2, - gtPolygon = 3, - gtCollection = 4, - gtMultiPoint = 5, - gtMultiLine = 6, - gtMultiPolygon = 7, + GtUnknown = 0, + GtPoint = 1, + GtLine = 2, + GtPolygon = 3, + GtCollection = 4, + GtMultiPoint = 5, + GtMultiLine = 6, + GtMultiPolygon = 7, }; diff --git a/src/providers/oracle/qgsoraclefeatureiterator.cpp b/src/providers/oracle/qgsoraclefeatureiterator.cpp index 894bfbd0fb61..3e41ec3323de 100644 --- a/src/providers/oracle/qgsoraclefeatureiterator.cpp +++ b/src/providers/oracle/qgsoraclefeatureiterator.cpp @@ -318,19 +318,19 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature ) switch ( mSource->mPrimaryKeyType ) { - case pktInt: + case PktInt: // get 64bit integer from result fid = mQry.value( col++ ).toLongLong(); if ( mAttributeList.contains( mSource->mPrimaryKeyAttrs[0] ) ) feature.setAttribute( mSource->mPrimaryKeyAttrs[0], fid ); break; - case pktRowId: - case pktFidMap: + case PktRowId: + case PktFidMap: { QList primaryKeyVals; - if ( mSource->mPrimaryKeyType == pktFidMap ) + if ( mSource->mPrimaryKeyType == PktFidMap ) { Q_FOREACH ( int idx, mSource->mPrimaryKeyAttrs ) { @@ -356,7 +356,7 @@ bool QgsOracleFeatureIterator::fetchFeature( QgsFeature& feature ) } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: cannot get feature with unknown primary key" ); return false; } @@ -439,17 +439,17 @@ bool QgsOracleFeatureIterator::openQuery( QString whereClause, bool showLog ) switch ( mSource->mPrimaryKeyType ) { - case pktRowId: + case PktRowId: query += delim + QgsOracleProvider::quotedIdentifier( "ROWID" ); delim = ","; break; - case pktInt: + case PktInt: query += delim + QgsOracleProvider::quotedIdentifier( mSource->mFields.at( mSource->mPrimaryKeyAttrs[0] ).name() ); delim = ","; break; - case pktFidMap: + case PktFidMap: Q_FOREACH ( int idx, mSource->mPrimaryKeyAttrs ) { query += delim + mConnection->fieldExpression( mSource->mFields.at( idx ) ); @@ -457,7 +457,7 @@ bool QgsOracleFeatureIterator::openQuery( QString whereClause, bool showLog ) } break; - case pktUnknown: + case PktUnknown: QgsDebugMsg( "Cannot query without primary key." ); return false; break; diff --git a/src/providers/oracle/qgsoracleprovider.cpp b/src/providers/oracle/qgsoracleprovider.cpp index 1be8f29244a7..c709cbf38bce 100644 --- a/src/providers/oracle/qgsoracleprovider.cpp +++ b/src/providers/oracle/qgsoracleprovider.cpp @@ -45,7 +45,7 @@ QgsOracleProvider::QgsOracleProvider( QString const & uri ) : QgsVectorDataProvider( uri ) , mValid( false ) , mIsQuery( false ) - , mPrimaryKeyType( pktUnknown ) + , mPrimaryKeyType( PktUnknown ) , mFeaturesCounted( -1 ) , mDetectedGeomType( QgsWkbTypes::Unknown ) , mRequestedGeomType( QgsWkbTypes::Unknown ) @@ -167,14 +167,14 @@ QgsOracleProvider::QgsOracleProvider( QString const & uri ) QString key; switch ( mPrimaryKeyType ) { - case pktRowId: + case PktRowId: key = "ROWID"; break; - case pktInt: - case pktFidMap: + case PktInt: + case PktFidMap: { - Q_ASSERT( mPrimaryKeyType != pktInt || mPrimaryKeyAttrs.size() == 1 ); + Q_ASSERT( mPrimaryKeyType != PktInt || mPrimaryKeyAttrs.size() == 1 ); QString delim; Q_FOREACH ( int idx, mPrimaryKeyAttrs ) @@ -185,7 +185,7 @@ QgsOracleProvider::QgsOracleProvider( QString const & uri ) } } break; - case pktUnknown: + case PktUnknown: mValid = false; break; } @@ -357,8 +357,8 @@ QString QgsOracleProvider::pkParamWhereClause() const switch ( mPrimaryKeyType ) { - case pktInt: - case pktFidMap: + case PktInt: + case PktFidMap: { Q_ASSERT( mPrimaryKeyAttrs.size() >= 1 ); @@ -374,11 +374,11 @@ QString QgsOracleProvider::pkParamWhereClause() const } break; - case pktRowId: + case PktRowId: return "ROWID=?"; break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: Primary key unknown" ); whereClause = "NULL IS NOT NULL"; break; @@ -399,13 +399,13 @@ void QgsOracleProvider::appendPkParams( QgsFeatureId fid, QSqlQuery &qry ) const { switch ( mPrimaryKeyType ) { - case pktInt: + case PktInt: QgsDebugMsgLevel( QString( "addBindValue pk %1" ).arg( FID_TO_STRING( fid ) ), 4 ); qry.addBindValue( FID_TO_STRING( fid ) ); break; - case pktRowId: - case pktFidMap: + case PktRowId: + case PktFidMap: { QVariant pkValsVariant = mShared->lookupKey( fid ); if ( !pkValsVariant.isNull() ) @@ -429,7 +429,7 @@ void QgsOracleProvider::appendPkParams( QgsFeatureId fid, QSqlQuery &qry ) const } break; - case pktUnknown: + case PktUnknown: QgsDebugMsg( "Unknown key type" ); break; } @@ -442,20 +442,20 @@ QString QgsOracleUtils::whereClause( QgsFeatureId featureId, const QgsFields& fi switch ( primaryKeyType ) { - case pktInt: + case PktInt: Q_ASSERT( primaryKeyAttrs.size() == 1 ); whereClause = QString( "%1=%2" ).arg( QgsOracleConn::quotedIdentifier( fields.at( primaryKeyAttrs[0] ).name() ) ).arg( featureId ); break; - case pktRowId: - case pktFidMap: + case PktRowId: + case PktFidMap: { QVariant pkValsVariant = sharedData->lookupKey( featureId ); if ( !pkValsVariant.isNull() ) { QList pkVals = pkValsVariant.toList(); - if ( primaryKeyType == pktFidMap ) + if ( primaryKeyType == PktFidMap ) { Q_ASSERT( pkVals.size() == primaryKeyAttrs.size() ); @@ -482,7 +482,7 @@ QString QgsOracleUtils::whereClause( QgsFeatureId featureId, const QgsFields& fi } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: Primary key unknown" ); whereClause = "NULL IS NOT NULL"; break; @@ -951,7 +951,7 @@ bool QgsOracleProvider::determinePrimaryKey() if ( mPrimaryKeyAttrs.size() > 0 ) { - mPrimaryKeyType = ( mPrimaryKeyAttrs.size() == 1 && isInt ) ? pktInt : pktFidMap; + mPrimaryKeyType = ( mPrimaryKeyAttrs.size() == 1 && isInt ) ? PktInt : PktFidMap; } else if ( !exec( qry, QString( "SELECT 1 FROM all_tables WHERE owner=%1 AND table_name=%2" ).arg( quotedValue( mOwnerName ) ).arg( quotedValue( mTableName ) ) ) ) { @@ -962,12 +962,12 @@ bool QgsOracleProvider::determinePrimaryKey() else if ( qry.next() ) { // is table - mPrimaryKeyType = pktRowId; + mPrimaryKeyType = PktRowId; } else { QString primaryKey = mUri.keyColumn(); - mPrimaryKeyType = pktUnknown; + mPrimaryKeyType = PktUnknown; if ( !primaryKey.isEmpty() ) { @@ -979,7 +979,7 @@ bool QgsOracleProvider::determinePrimaryKey() if ( mUseEstimatedMetadata || uniqueData( mQuery, primaryKey ) ) { - mPrimaryKeyType = ( fld.type() == QVariant::Int || fld.type() == QVariant::LongLong || ( fld.type() == QVariant::Double && fld.precision() == 0 ) ) ? pktInt : pktFidMap; + mPrimaryKeyType = ( fld.type() == QVariant::Int || fld.type() == QVariant::LongLong || ( fld.type() == QVariant::Double && fld.precision() == 0 ) ) ? PktInt : PktFidMap; mPrimaryKeyAttrs << idx; } else @@ -1011,20 +1011,20 @@ bool QgsOracleProvider::determinePrimaryKey() { if ( mUseEstimatedMetadata || uniqueData( mQuery, primaryKey ) ) { - mPrimaryKeyType = pktInt; + mPrimaryKeyType = PktInt; mPrimaryKeyAttrs << idx; } } else { QgsMessageLog::logMessage( tr( "No key field for query given." ), tr( "Oracle" ) ); - mPrimaryKeyType = pktUnknown; + mPrimaryKeyType = PktUnknown; } } qry.finish(); - mValid = mPrimaryKeyType != pktUnknown; + mValid = mPrimaryKeyType != PktUnknown; Q_FOREACH ( int fieldIdx, mPrimaryKeyAttrs ) { @@ -1268,7 +1268,7 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) delim = ","; } - if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap ) + if ( mPrimaryKeyType == PktInt || mPrimaryKeyType == PktFidMap ) { QString keys, kdelim = ""; @@ -1408,12 +1408,12 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) if ( !ins.exec() ) throw OracleException( tr( "Could not insert feature %1" ).arg( features->id() ), ins ); - if ( mPrimaryKeyType == pktRowId ) + if ( mPrimaryKeyType == PktRowId ) { features->setId( mShared->lookupFid( QList() << QVariant( ins.lastInsertId() ) ) ); QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); } - else if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap ) + else if ( mPrimaryKeyType == PktInt || mPrimaryKeyType == PktFidMap ) { getfid.addBindValue( QVariant( ins.lastInsertId() ) ); if ( !getfid.exec() || !getfid.next() ) @@ -1440,13 +1440,13 @@ bool QgsOracleProvider::addFeatures( QgsFeatureList &flist ) } // update feature ids - if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap ) + if ( mPrimaryKeyType == PktInt || mPrimaryKeyType == PktFidMap ) { for ( QgsFeatureList::iterator features = flist.begin(); features != flist.end(); ++features ) { QgsAttributes attributevec = features->attributes(); - if ( mPrimaryKeyType == pktInt ) + if ( mPrimaryKeyType == PktInt ) { features->setId( STRING_TO_FID( attributevec[ mPrimaryKeyAttrs[0] ] ) ); } @@ -1864,7 +1864,7 @@ bool QgsOracleProvider::changeAttributeValues( const QgsChangedAttributesMap &at qry.finish(); // update feature id map if key was changed - if ( pkChanged && mPrimaryKeyType == pktFidMap ) + if ( pkChanged && mPrimaryKeyType == PktFidMap ) { QVariant v = mShared->removeFid( fid ); @@ -1933,7 +1933,7 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry& geom, QSqlQuery &qry case QgsWkbTypes::Point: g.srid = mSrid; - g.gtype = SDO_GTYPE( dim, gtPoint ); + g.gtype = SDO_GTYPE( dim, GtPoint ); g.x = *ptr.dPtr++; g.y = *ptr.dPtr++; g.z = dim == 3 ? *ptr.dPtr++ : 0.0; @@ -1949,11 +1949,11 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry& geom, QSqlQuery &qry case QgsWkbTypes::LineString: case QgsWkbTypes::MultiLineString: { - g.gtype = SDO_GTYPE( dim, gtLine ); + g.gtype = SDO_GTYPE( dim, GtLine ); int nLines = 1; if ( type == QgsWkbTypes::MultiLineString25D || type == QgsWkbTypes::MultiLineString ) { - g.gtype = SDO_GTYPE( dim, gtMultiLine ); + g.gtype = SDO_GTYPE( dim, GtMultiLine ); nLines = *ptr.iPtr++; ptr.ucPtr++; // Skip endianness of first linestring ptr.iPtr++; // Skip type of first linestring @@ -1988,11 +1988,11 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry& geom, QSqlQuery &qry case QgsWkbTypes::Polygon: case QgsWkbTypes::MultiPolygon: { - g.gtype = SDO_GTYPE( dim, gtPolygon ); + g.gtype = SDO_GTYPE( dim, GtPolygon ); int nPolygons = 1; if ( type == QgsWkbTypes::MultiPolygon25D || type == QgsWkbTypes::MultiPolygon ) { - g.gtype = SDO_GTYPE( dim, gtMultiPolygon ); + g.gtype = SDO_GTYPE( dim, GtMultiPolygon ); nPolygons = *ptr.iPtr++; ptr.ucPtr++; // Skip endianness of first polygon @@ -2029,7 +2029,7 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry& geom, QSqlQuery &qry case QgsWkbTypes::MultiPoint: { - g.gtype = SDO_GTYPE( dim, gtMultiPoint ); + g.gtype = SDO_GTYPE( dim, GtMultiPoint ); int n = *ptr.iPtr++; g.eleminfo << 1 << 1 << n; @@ -2202,7 +2202,7 @@ bool QgsOracleProvider::setSubsetString( const QString& theSQL, bool updateFeatu } qry.finish(); - if ( mPrimaryKeyType == pktInt && !mUseEstimatedMetadata && !uniqueData( mQuery, mAttributeFields.at( mPrimaryKeyAttrs[0] ).name() ) ) + if ( mPrimaryKeyType == PktInt && !mUseEstimatedMetadata && !uniqueData( mQuery, mAttributeFields.at( mPrimaryKeyAttrs[0] ).name() ) ) { mSqlWhereClause = prevWhere; return false; diff --git a/src/providers/oracle/qgsoracleprovider.h b/src/providers/oracle/qgsoracleprovider.h index f767049fcae4..6be727b1b93a 100644 --- a/src/providers/oracle/qgsoracleprovider.h +++ b/src/providers/oracle/qgsoracleprovider.h @@ -39,10 +39,10 @@ class QgsOracleSharedData; enum QgsOraclePrimaryKeyType { - pktUnknown, - pktInt, - pktRowId, - pktFidMap + PktUnknown, + PktInt, + PktRowId, + PktFidMap }; /** diff --git a/src/providers/oracle/qgsoraclesourceselect.cpp b/src/providers/oracle/qgsoraclesourceselect.cpp index 27b90538938b..43c9a471721b 100644 --- a/src/providers/oracle/qgsoraclesourceselect.cpp +++ b/src/providers/oracle/qgsoraclesourceselect.cpp @@ -43,16 +43,16 @@ QWidget *QgsOracleSourceSelectDelegate::createEditor( QWidget *parent, const QSt { Q_UNUSED( option ); - QString tableName = index.sibling( index.row(), QgsOracleTableModel::dbtmTable ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), QgsOracleTableModel::DbtmTable ).data( Qt::DisplayRole ).toString(); if ( tableName.isEmpty() ) return 0; - if ( index.column() == QgsOracleTableModel::dbtmSql ) + if ( index.column() == QgsOracleTableModel::DbtmSql ) { return new QLineEdit( parent ); } - if ( index.column() == QgsOracleTableModel::dbtmType && index.data( Qt::UserRole + 1 ).toBool() ) + if ( index.column() == QgsOracleTableModel::DbtmType && index.data( Qt::UserRole + 1 ).toBool() ) { QComboBox *cb = new QComboBox( parent ); Q_FOREACH ( QgsWkbTypes::Type type, @@ -70,7 +70,7 @@ QWidget *QgsOracleSourceSelectDelegate::createEditor( QWidget *parent, const QSt return cb; } - if ( index.column() == QgsOracleTableModel::dbtmPkCol ) + if ( index.column() == QgsOracleTableModel::DbtmPkCol ) { bool isView = index.data( Qt::UserRole + 1 ).toBool(); if ( !isView ) @@ -79,7 +79,7 @@ QWidget *QgsOracleSourceSelectDelegate::createEditor( QWidget *parent, const QSt QStringList values = index.data( Qt::UserRole + 2 ).toStringList(); if ( values.size() == 0 ) { - QString ownerName = index.sibling( index.row(), QgsOracleTableModel::dbtmOwner ).data( Qt::DisplayRole ).toString(); + QString ownerName = index.sibling( index.row(), QgsOracleTableModel::DbtmOwner ).data( Qt::DisplayRole ).toString(); if ( conn() ) values = conn()->pkCandidates( ownerName, tableName ); } @@ -95,7 +95,7 @@ QWidget *QgsOracleSourceSelectDelegate::createEditor( QWidget *parent, const QSt } } - if ( index.column() == QgsOracleTableModel::dbtmSrid ) + if ( index.column() == QgsOracleTableModel::DbtmSrid ) { QLineEdit *le = new QLineEdit( parent ); le->setValidator( new QIntValidator( -1, 999999, parent ) ); @@ -112,10 +112,10 @@ void QgsOracleSourceSelectDelegate::setEditorData( QWidget *editor, const QModel QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsOracleTableModel::dbtmType ) + if ( index.column() == QgsOracleTableModel::DbtmType ) cb->setCurrentIndex( cb->findData( index.data( Qt::UserRole + 2 ).toInt() ) ); - if ( index.column() == QgsOracleTableModel::dbtmPkCol && index.data( Qt::UserRole + 2 ).toBool() ) + if ( index.column() == QgsOracleTableModel::DbtmPkCol && index.data( Qt::UserRole + 2 ).toBool() ) cb->setCurrentIndex( cb->findText( value ) ); } @@ -124,7 +124,7 @@ void QgsOracleSourceSelectDelegate::setEditorData( QWidget *editor, const QModel { bool ok; value.toInt( &ok ); - if ( index.column() == QgsOracleTableModel::dbtmSrid && !ok ) + if ( index.column() == QgsOracleTableModel::DbtmSrid && !ok ) value = ""; le->setText( value ); @@ -136,7 +136,7 @@ void QgsOracleSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItem QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsOracleTableModel::dbtmType ) + if ( index.column() == QgsOracleTableModel::DbtmType ) { QgsWkbTypes::Type type = ( QgsWkbTypes::Type ) cb->currentData().toInt(); @@ -144,7 +144,7 @@ void QgsOracleSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItem model->setData( index, type != QgsWkbTypes::Unknown ? QgsOracleConn::displayStringForWkbType( type ) : tr( "Select..." ) ); model->setData( index, type, Qt::UserRole + 2 ); } - else if ( index.column() == QgsOracleTableModel::dbtmPkCol ) + else if ( index.column() == QgsOracleTableModel::DbtmPkCol ) { QString value( cb->currentText() ); model->setData( index, value.isEmpty() ? tr( "Select..." ) : value ); @@ -157,7 +157,7 @@ void QgsOracleSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItem { QString value( le->text() ); - if ( index.column() == QgsOracleTableModel::dbtmSrid && value.isEmpty() ) + if ( index.column() == QgsOracleTableModel::DbtmSrid && value.isEmpty() ) { value = tr( "Enter..." ); } @@ -396,31 +396,31 @@ void QgsOracleSourceSelect::on_mSearchColumnComboBox_currentIndexChanged( const } else if ( text == tr( "Owner" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmOwner ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmOwner ); } else if ( text == tr( "Table" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmTable ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmTable ); } else if ( text == tr( "Type" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmType ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmType ); } else if ( text == tr( "Geometry column" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmGeomCol ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmGeomCol ); } else if ( text == tr( "Primary key column" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmPkCol ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmPkCol ); } else if ( text == tr( "SRID" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmSrid ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmSrid ); } else if ( text == tr( "Sql" ) ) { - mProxyModel.setFilterKeyColumn( QgsOracleTableModel::dbtmSql ); + mProxyModel.setFilterKeyColumn( QgsOracleTableModel::DbtmSql ); } } @@ -477,7 +477,7 @@ void QgsOracleSourceSelect::addTables() Q_FOREACH ( QModelIndex idx, mTablesTreeView->selectionModel()->selection().indexes() ) { - if ( idx.column() != QgsOracleTableModel::dbtmTable ) + if ( idx.column() != QgsOracleTableModel::DbtmTable ) continue; QString uri = mTableModel.layerURI( mProxyModel.mapToSource( idx ), mConnInfo ); @@ -543,12 +543,12 @@ void QgsOracleSourceSelect::finishList() QApplication::restoreOverrideCursor(); #if 0 - for ( int i = 0; i < QgsOracleTableModel::dbtmColumns; i++ ) + for ( int i = 0; i < QgsOracleTableModel::DbtmColumns; i++ ) mTablesTreeView->resizeColumnToContents( i ); #endif - mTablesTreeView->sortByColumn( QgsOracleTableModel::dbtmTable, Qt::AscendingOrder ); - mTablesTreeView->sortByColumn( QgsOracleTableModel::dbtmOwner, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsOracleTableModel::DbtmTable, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsOracleTableModel::DbtmOwner, Qt::AscendingOrder ); } static QgsOracleTableCache::CacheFlags _currentFlags( QString connName, bool useEstimatedMetadata, bool allowGeometrylessTables ) @@ -597,7 +597,7 @@ void QgsOracleSourceSelect::setSql( const QModelIndex &index ) } QModelIndex idx = mProxyModel.mapToSource( index ); - QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsOracleTableModel::dbtmTable ) )->text(); + QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsOracleTableModel::DbtmTable ) )->text(); QString uri = mTableModel.layerURI( idx, mConnInfo ); if ( uri.isNull() ) diff --git a/src/providers/oracle/qgsoracletablemodel.cpp b/src/providers/oracle/qgsoracletablemodel.cpp index 18ec48c0de2c..babe0bad0b9b 100644 --- a/src/providers/oracle/qgsoracletablemodel.cpp +++ b/src/providers/oracle/qgsoracletablemodel.cpp @@ -141,12 +141,12 @@ void QgsOracleTableModel::addTableEntry( const QgsOracleLayerProperty &layerProp if ( !ownerItem ) { - QList ownerItems = findItems( layerProperty.ownerName, Qt::MatchExactly, dbtmOwner ); + QList ownerItems = findItems( layerProperty.ownerName, Qt::MatchExactly, DbtmOwner ); // there is already an item for this schema if ( ownerItems.size() > 0 ) { - ownerItem = ownerItems.at( dbtmOwner ); + ownerItem = ownerItems.at( DbtmOwner ); } else { @@ -171,9 +171,9 @@ void QgsOracleTableModel::setSql( const QModelIndex &index, const QString &sql ) } //find out schema name and table name - QModelIndex ownerSibling = index.sibling( index.row(), dbtmOwner ); - QModelIndex tableSibling = index.sibling( index.row(), dbtmTable ); - QModelIndex geomSibling = index.sibling( index.row(), dbtmGeomCol ); + QModelIndex ownerSibling = index.sibling( index.row(), DbtmOwner ); + QModelIndex tableSibling = index.sibling( index.row(), DbtmTable ); + QModelIndex geomSibling = index.sibling( index.row(), DbtmGeomCol ); if ( !ownerSibling.isValid() || !tableSibling.isValid() || !geomSibling.isValid() ) { @@ -184,30 +184,30 @@ void QgsOracleTableModel::setSql( const QModelIndex &index, const QString &sql ) QString tableName = itemFromIndex( tableSibling )->text(); QString geomName = itemFromIndex( geomSibling )->text(); - QList ownerItems = findItems( ownerName, Qt::MatchExactly, dbtmOwner ); + QList ownerItems = findItems( ownerName, Qt::MatchExactly, DbtmOwner ); if ( ownerItems.size() < 1 ) { return; } - QStandardItem* ownerItem = ownerItems.at( dbtmOwner ); + QStandardItem* ownerItem = ownerItems.at( DbtmOwner ); int n = ownerItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( ownerItem->child( i, dbtmOwner ) ); + QModelIndex currentChildIndex = indexFromItem( ownerItem->child( i, DbtmOwner ) ); if ( !currentChildIndex.isValid() ) { continue; } - QModelIndex currentTableIndex = currentChildIndex.sibling( i, dbtmTable ); + QModelIndex currentTableIndex = currentChildIndex.sibling( i, DbtmTable ); if ( !currentTableIndex.isValid() ) { continue; } - QModelIndex currentGeomIndex = currentChildIndex.sibling( i, dbtmGeomCol ); + QModelIndex currentGeomIndex = currentChildIndex.sibling( i, DbtmGeomCol ); if ( !currentGeomIndex.isValid() ) { continue; @@ -215,7 +215,7 @@ void QgsOracleTableModel::setSql( const QModelIndex &index, const QString &sql ) if ( itemFromIndex( currentTableIndex )->text() == tableName && itemFromIndex( currentGeomIndex )->text() == geomName ) { - QModelIndex sqlIndex = currentChildIndex.sibling( i, dbtmSql ); + QModelIndex sqlIndex = currentChildIndex.sibling( i, DbtmSql ); if ( sqlIndex.isValid() ) { itemFromIndex( sqlIndex )->setText( sql ); @@ -253,9 +253,9 @@ bool QgsOracleTableModel::setData( const QModelIndex &idx, const QVariant &value if ( !QStandardItemModel::setData( idx, value, role ) ) return false; - if ( idx.column() == dbtmType || idx.column() == dbtmSrid || idx.column() == dbtmPkCol ) + if ( idx.column() == DbtmType || idx.column() == DbtmSrid || idx.column() == DbtmPkCol ) { - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) idx.sibling( idx.row(), dbtmType ).data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) idx.sibling( idx.row(), DbtmType ).data( Qt::UserRole + 2 ).toInt(); QString tip; if ( wkbType == QgsWkbTypes::Unknown ) @@ -265,19 +265,19 @@ bool QgsOracleTableModel::setData( const QModelIndex &idx, const QVariant &value else if ( wkbType != QgsWkbTypes::NoGeometry ) { bool ok; - int srid = idx.sibling( idx.row(), dbtmSrid ).data().toInt( &ok ); + int srid = idx.sibling( idx.row(), DbtmSrid ).data().toInt( &ok ); if ( !ok || srid == 0 ) tip = tr( "Enter a SRID" ); } - if ( tip.isEmpty() && idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 1 ).toBool() ) + if ( tip.isEmpty() && idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 1 ).toBool() ) { - if ( !idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 2 ).toBool() ) + if ( !idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 2 ).toBool() ) tip = tr( "Select a primary key" ); } - for ( int i = 0; i < dbtmColumns; i++ ) + for ( int i = 0; i < DbtmColumns; i++ ) { QStandardItem *item = itemFromIndex( idx.sibling( idx.row(), i ) ); if ( tip.isEmpty() ) @@ -288,7 +288,7 @@ bool QgsOracleTableModel::setData( const QModelIndex &idx, const QVariant &value else { item->setFlags( item->flags() & ~Qt::ItemIsSelectable ); - if ( i == dbtmOwner || i == dbtmTable || i == dbtmGeomCol ) + if ( i == DbtmOwner || i == DbtmTable || i == DbtmGeomCol ) { item->setFlags( item->flags() & ~Qt::ItemIsEnabled ); item->setToolTip( tip ); @@ -308,7 +308,7 @@ QString QgsOracleTableModel::layerURI( const QModelIndex &index, const QgsDataSo return QString::null; } - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), dbtmType ) )->data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), DbtmType ) )->data( Qt::UserRole + 2 ).toInt(); if ( wkbType == QgsWkbTypes::Unknown ) { QgsDebugMsg( "unknown geometry type" ); @@ -316,7 +316,7 @@ QString QgsOracleTableModel::layerURI( const QModelIndex &index, const QgsDataSo return QString::null; } - QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), dbtmPkCol ) ); + QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), DbtmPkCol ) ); QString pkColumnName = pkItem->data( Qt::DisplayRole ).toString(); bool isView = pkItem->data( Qt::UserRole + 1 ).toBool(); bool isSet = pkItem->data( Qt::UserRole + 2 ).toBool(); @@ -328,16 +328,16 @@ QString QgsOracleTableModel::layerURI( const QModelIndex &index, const QgsDataSo return QString::null; } - QString ownerName = index.sibling( index.row(), dbtmOwner ).data( Qt::DisplayRole ).toString(); - QString tableName = index.sibling( index.row(), dbtmTable ).data( Qt::DisplayRole ).toString(); + QString ownerName = index.sibling( index.row(), DbtmOwner ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), DbtmTable ).data( Qt::DisplayRole ).toString(); QString geomColumnName; QString srid; if ( wkbType != QgsWkbTypes::NoGeometry ) { - geomColumnName = index.sibling( index.row(), dbtmGeomCol ).data( Qt::DisplayRole ).toString(); + geomColumnName = index.sibling( index.row(), DbtmGeomCol ).data( Qt::DisplayRole ).toString(); - srid = index.sibling( index.row(), dbtmSrid ).data( Qt::DisplayRole ).toString(); + srid = index.sibling( index.row(), DbtmSrid ).data( Qt::DisplayRole ).toString(); bool ok; srid.toInt( &ok ); if ( !ok ) @@ -347,8 +347,8 @@ QString QgsOracleTableModel::layerURI( const QModelIndex &index, const QgsDataSo } } - bool selectAtId = itemFromIndex( index.sibling( index.row(), dbtmSelectAtId ) )->checkState() == Qt::Checked; - QString sql = index.sibling( index.row(), dbtmSql ).data( Qt::DisplayRole ).toString(); + bool selectAtId = itemFromIndex( index.sibling( index.row(), DbtmSelectAtId ) )->checkState() == Qt::Checked; + QString sql = index.sibling( index.row(), DbtmSql ).data( Qt::DisplayRole ).toString(); QgsDataSourceUri uri( connInfo ); uri.setDataSource( ownerName, tableName, geomColumnName, sql, pkColumnName ); diff --git a/src/providers/oracle/qgsoracletablemodel.h b/src/providers/oracle/qgsoracletablemodel.h index 1ace38890aa4..049e4c6a2775 100644 --- a/src/providers/oracle/qgsoracletablemodel.h +++ b/src/providers/oracle/qgsoracletablemodel.h @@ -42,17 +42,17 @@ class QgsOracleTableModel : public QStandardItemModel //! Returns the number of tables in the model int tableCount() const { return mTableCount; } - enum columns + enum Columns { - dbtmOwner = 0, - dbtmTable, - dbtmType, - dbtmGeomCol, - dbtmSrid, - dbtmPkCol, - dbtmSelectAtId, - dbtmSql, - dbtmColumns + DbtmOwner = 0, + DbtmTable, + DbtmType, + DbtmGeomCol, + DbtmSrid, + DbtmPkCol, + DbtmSelectAtId, + DbtmSql, + DbtmColumns }; bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ); diff --git a/src/providers/postgres/qgspgsourceselect.cpp b/src/providers/postgres/qgspgsourceselect.cpp index c858a979a340..00c0737aea49 100644 --- a/src/providers/postgres/qgspgsourceselect.cpp +++ b/src/providers/postgres/qgspgsourceselect.cpp @@ -43,16 +43,16 @@ QWidget *QgsPgSourceSelectDelegate::createEditor( QWidget *parent, const QStyleO { Q_UNUSED( option ); - QString tableName = index.sibling( index.row(), QgsPgTableModel::dbtmTable ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), QgsPgTableModel::DbtmTable ).data( Qt::DisplayRole ).toString(); if ( tableName.isEmpty() ) return nullptr; - if ( index.column() == QgsPgTableModel::dbtmSql ) + if ( index.column() == QgsPgTableModel::DbtmSql ) { return new QLineEdit( parent ); } - if ( index.column() == QgsPgTableModel::dbtmType && index.data( Qt::UserRole + 1 ).toBool() ) + if ( index.column() == QgsPgTableModel::DbtmType && index.data( Qt::UserRole + 1 ).toBool() ) { QComboBox *cb = new QComboBox( parent ); Q_FOREACH ( QgsWkbTypes::Type type, @@ -70,7 +70,7 @@ QWidget *QgsPgSourceSelectDelegate::createEditor( QWidget *parent, const QStyleO return cb; } - if ( index.column() == QgsPgTableModel::dbtmPkCol ) + if ( index.column() == QgsPgTableModel::DbtmPkCol ) { QStringList values = index.data( Qt::UserRole + 1 ).toStringList(); @@ -97,7 +97,7 @@ QWidget *QgsPgSourceSelectDelegate::createEditor( QWidget *parent, const QStyleO } } - if ( index.column() == QgsPgTableModel::dbtmSrid ) + if ( index.column() == QgsPgTableModel::DbtmSrid ) { QLineEdit *le = new QLineEdit( parent ); le->setValidator( new QIntValidator( -1, 999999, parent ) ); @@ -114,10 +114,10 @@ void QgsPgSourceSelectDelegate::setEditorData( QWidget *editor, const QModelInde QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsPgTableModel::dbtmType ) + if ( index.column() == QgsPgTableModel::DbtmType ) cb->setCurrentIndex( cb->findData( index.data( Qt::UserRole + 2 ).toInt() ) ); - if ( index.column() == QgsPgTableModel::dbtmPkCol && !index.data( Qt::UserRole + 2 ).toStringList().isEmpty() ) + if ( index.column() == QgsPgTableModel::DbtmPkCol && !index.data( Qt::UserRole + 2 ).toStringList().isEmpty() ) { QStringList cols = index.data( Qt::UserRole + 2 ).toStringList(); @@ -143,7 +143,7 @@ void QgsPgSourceSelectDelegate::setEditorData( QWidget *editor, const QModelInde { bool ok; value.toInt( &ok ); - if ( index.column() == QgsPgTableModel::dbtmSrid && !ok ) + if ( index.column() == QgsPgTableModel::DbtmSrid && !ok ) value = QLatin1String( "" ); le->setText( value ); @@ -155,7 +155,7 @@ void QgsPgSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMode QComboBox *cb = qobject_cast( editor ); if ( cb ) { - if ( index.column() == QgsPgTableModel::dbtmType ) + if ( index.column() == QgsPgTableModel::DbtmType ) { QgsWkbTypes::Type type = ( QgsWkbTypes::Type ) cb->currentData().toInt(); @@ -163,7 +163,7 @@ void QgsPgSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMode model->setData( index, type != QgsWkbTypes::Unknown ? QgsPostgresConn::displayStringForWkbType( type ) : tr( "Select..." ) ); model->setData( index, type, Qt::UserRole + 2 ); } - else if ( index.column() == QgsPgTableModel::dbtmPkCol ) + else if ( index.column() == QgsPgTableModel::DbtmPkCol ) { QStandardItemModel *cbm = qobject_cast( cb->model() ); QStringList cols; @@ -184,7 +184,7 @@ void QgsPgSourceSelectDelegate::setModelData( QWidget *editor, QAbstractItemMode { QString value( le->text() ); - if ( index.column() == QgsPgTableModel::dbtmSrid && value.isEmpty() ) + if ( index.column() == QgsPgTableModel::DbtmSrid && value.isEmpty() ) { value = tr( "Enter..." ); } @@ -408,35 +408,35 @@ void QgsPgSourceSelect::on_mSearchColumnComboBox_currentIndexChanged( const QStr } else if ( text == tr( "Schema" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmSchema ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmSchema ); } else if ( text == tr( "Table" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmTable ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmTable ); } else if ( text == tr( "Comment" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmComment ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmComment ); } else if ( text == tr( "Type" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmType ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmType ); } else if ( text == tr( "Geometry column" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmGeomCol ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmGeomCol ); } else if ( text == tr( "Feature id" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmPkCol ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmPkCol ); } else if ( text == tr( "SRID" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmSrid ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmSrid ); } else if ( text == tr( "Sql" ) ) { - mProxyModel.setFilterKeyColumn( QgsPgTableModel::dbtmSql ); + mProxyModel.setFilterKeyColumn( QgsPgTableModel::DbtmSql ); } } @@ -492,7 +492,7 @@ void QgsPgSourceSelect::addTables() Q_FOREACH ( const QModelIndex& idx, mTablesTreeView->selectionModel()->selection().indexes() ) { - if ( idx.column() != QgsPgTableModel::dbtmTable ) + if ( idx.column() != QgsPgTableModel::DbtmTable ) continue; QString uri = mTableModel.layerURI( mProxyModel.mapToSource( idx ), connectionInfo( false ), mUseEstimatedMetadata ); @@ -559,12 +559,12 @@ void QgsPgSourceSelect::finishList() QApplication::restoreOverrideCursor(); #if 0 - for ( int i = 0; i < QgsPgTableModel::dbtmColumns; i++ ) + for ( int i = 0; i < QgsPgTableModel::DbtmColumns; i++ ) mTablesTreeView->resizeColumnToContents( i ); #endif - mTablesTreeView->sortByColumn( QgsPgTableModel::dbtmTable, Qt::AscendingOrder ); - mTablesTreeView->sortByColumn( QgsPgTableModel::dbtmSchema, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsPgTableModel::DbtmTable, Qt::AscendingOrder ); + mTablesTreeView->sortByColumn( QgsPgTableModel::DbtmSchema, Qt::AscendingOrder ); } void QgsPgSourceSelect::columnThreadFinished() @@ -600,7 +600,7 @@ void QgsPgSourceSelect::setSql( const QModelIndex &index ) } QModelIndex idx = mProxyModel.mapToSource( index ); - QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsPgTableModel::dbtmTable ) )->text(); + QString tableName = mTableModel.itemFromIndex( idx.sibling( idx.row(), QgsPgTableModel::DbtmTable ) )->text(); QString uri = mTableModel.layerURI( idx, connectionInfo( false ), mUseEstimatedMetadata ); if ( uri.isNull() ) diff --git a/src/providers/postgres/qgspgtablemodel.cpp b/src/providers/postgres/qgspgtablemodel.cpp index 13d836a4f9d9..1a19d364ca8e 100644 --- a/src/providers/postgres/qgspgtablemodel.cpp +++ b/src/providers/postgres/qgspgtablemodel.cpp @@ -150,12 +150,12 @@ void QgsPgTableModel::addTableEntry( const QgsPostgresLayerProperty& layerProper if ( !schemaItem ) { - QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( layerProperty.schemaName, Qt::MatchExactly, DbtmSchema ); // there is already an item for this schema if ( !schemaItems.isEmpty() ) { - schemaItem = schemaItems.at( dbtmSchema ); + schemaItem = schemaItems.at( DbtmSchema ); } else { @@ -180,9 +180,9 @@ void QgsPgTableModel::setSql( const QModelIndex &index, const QString &sql ) } //find out schema name and table name - QModelIndex schemaSibling = index.sibling( index.row(), dbtmSchema ); - QModelIndex tableSibling = index.sibling( index.row(), dbtmTable ); - QModelIndex geomSibling = index.sibling( index.row(), dbtmGeomCol ); + QModelIndex schemaSibling = index.sibling( index.row(), DbtmSchema ); + QModelIndex tableSibling = index.sibling( index.row(), DbtmTable ); + QModelIndex geomSibling = index.sibling( index.row(), DbtmGeomCol ); if ( !schemaSibling.isValid() || !tableSibling.isValid() || !geomSibling.isValid() ) { @@ -193,30 +193,30 @@ void QgsPgTableModel::setSql( const QModelIndex &index, const QString &sql ) QString tableName = itemFromIndex( tableSibling )->text(); QString geomName = itemFromIndex( geomSibling )->text(); - QList schemaItems = findItems( schemaName, Qt::MatchExactly, dbtmSchema ); + QList schemaItems = findItems( schemaName, Qt::MatchExactly, DbtmSchema ); if ( schemaItems.size() < 1 ) { return; } - QStandardItem* schemaItem = schemaItems.at( dbtmSchema ); + QStandardItem* schemaItem = schemaItems.at( DbtmSchema ); int n = schemaItem->rowCount(); for ( int i = 0; i < n; i++ ) { - QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, dbtmSchema ) ); + QModelIndex currentChildIndex = indexFromItem( schemaItem->child( i, DbtmSchema ) ); if ( !currentChildIndex.isValid() ) { continue; } - QModelIndex currentTableIndex = currentChildIndex.sibling( i, dbtmTable ); + QModelIndex currentTableIndex = currentChildIndex.sibling( i, DbtmTable ); if ( !currentTableIndex.isValid() ) { continue; } - QModelIndex currentGeomIndex = currentChildIndex.sibling( i, dbtmGeomCol ); + QModelIndex currentGeomIndex = currentChildIndex.sibling( i, DbtmGeomCol ); if ( !currentGeomIndex.isValid() ) { continue; @@ -224,7 +224,7 @@ void QgsPgTableModel::setSql( const QModelIndex &index, const QString &sql ) if ( itemFromIndex( currentTableIndex )->text() == tableName && itemFromIndex( currentGeomIndex )->text() == geomName ) { - QModelIndex sqlIndex = currentChildIndex.sibling( i, dbtmSql ); + QModelIndex sqlIndex = currentChildIndex.sibling( i, DbtmSql ); if ( sqlIndex.isValid() ) { itemFromIndex( sqlIndex )->setText( sql ); @@ -256,9 +256,9 @@ bool QgsPgTableModel::setData( const QModelIndex &idx, const QVariant &value, in if ( !QStandardItemModel::setData( idx, value, role ) ) return false; - if ( idx.column() == dbtmType || idx.column() == dbtmSrid || idx.column() == dbtmPkCol ) + if ( idx.column() == DbtmType || idx.column() == DbtmSrid || idx.column() == DbtmPkCol ) { - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) idx.sibling( idx.row(), dbtmType ).data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) idx.sibling( idx.row(), DbtmType ).data( Qt::UserRole + 2 ).toInt(); QString tip; if ( wkbType == QgsWkbTypes::Unknown ) @@ -268,27 +268,27 @@ bool QgsPgTableModel::setData( const QModelIndex &idx, const QVariant &value, in else if ( wkbType != QgsWkbTypes::NoGeometry ) { bool ok; - int srid = idx.sibling( idx.row(), dbtmSrid ).data().toInt( &ok ); + int srid = idx.sibling( idx.row(), DbtmSrid ).data().toInt( &ok ); if ( !ok || srid == INT_MIN ) tip = tr( "Enter a SRID into the '%1' column" ).arg( tr( "SRID" ) ); } - QStringList pkCols = idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); + QStringList pkCols = idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 1 ).toStringList(); if ( tip.isEmpty() && !pkCols.isEmpty() ) { - QSet s0( idx.sibling( idx.row(), dbtmPkCol ).data( Qt::UserRole + 2 ).toStringList().toSet() ); + QSet s0( idx.sibling( idx.row(), DbtmPkCol ).data( Qt::UserRole + 2 ).toStringList().toSet() ); QSet s1( pkCols.toSet() ); if ( s0.intersect( s1 ).isEmpty() ) tip = tr( "Select columns in the '%1' column that uniquely identify features of this layer" ).arg( tr( "Feature id" ) ); } - for ( int i = 0; i < dbtmColumns; i++ ) + for ( int i = 0; i < DbtmColumns; i++ ) { QStandardItem *item = itemFromIndex( idx.sibling( idx.row(), i ) ); if ( tip.isEmpty() ) { - if ( i == dbtmSchema ) + if ( i == DbtmSchema ) { item->setData( QVariant(), Qt::DecorationRole ); } @@ -300,10 +300,10 @@ bool QgsPgTableModel::setData( const QModelIndex &idx, const QVariant &value, in { item->setFlags( item->flags() & ~Qt::ItemIsSelectable ); - if ( i == dbtmSchema ) + if ( i == DbtmSchema ) item->setData( QgsApplication::getThemeIcon( QStringLiteral( "/mIconWarning.svg" ) ), Qt::DecorationRole ); - if ( i == dbtmSchema || i == dbtmTable || i == dbtmGeomCol ) + if ( i == DbtmSchema || i == DbtmTable || i == DbtmGeomCol ) { item->setFlags( item->flags() ); item->setToolTip( tip ); @@ -323,7 +323,7 @@ QString QgsPgTableModel::layerURI( const QModelIndex &index, const QString& conn return QString::null; } - QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), dbtmType ) )->data( Qt::UserRole + 2 ).toInt(); + QgsWkbTypes::Type wkbType = ( QgsWkbTypes::Type ) itemFromIndex( index.sibling( index.row(), DbtmType ) )->data( Qt::UserRole + 2 ).toInt(); if ( wkbType == QgsWkbTypes::Unknown ) { QgsDebugMsg( "unknown geometry type" ); @@ -331,7 +331,7 @@ QString QgsPgTableModel::layerURI( const QModelIndex &index, const QString& conn return QString::null; } - QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), dbtmPkCol ) ); + QStandardItem *pkItem = itemFromIndex( index.sibling( index.row(), DbtmPkCol ) ); QSet s0( pkItem->data( Qt::UserRole + 1 ).toStringList().toSet() ); QSet s1( pkItem->data( Qt::UserRole + 2 ).toStringList().toSet() ); if ( !s0.isEmpty() && s0.intersect( s1 ).isEmpty() ) @@ -341,16 +341,16 @@ QString QgsPgTableModel::layerURI( const QModelIndex &index, const QString& conn return QString::null; } - QString schemaName = index.sibling( index.row(), dbtmSchema ).data( Qt::DisplayRole ).toString(); - QString tableName = index.sibling( index.row(), dbtmTable ).data( Qt::DisplayRole ).toString(); + QString schemaName = index.sibling( index.row(), DbtmSchema ).data( Qt::DisplayRole ).toString(); + QString tableName = index.sibling( index.row(), DbtmTable ).data( Qt::DisplayRole ).toString(); QString geomColumnName; QString srid; if ( wkbType != QgsWkbTypes::NoGeometry ) { - geomColumnName = index.sibling( index.row(), dbtmGeomCol ).data( Qt::DisplayRole ).toString(); + geomColumnName = index.sibling( index.row(), DbtmGeomCol ).data( Qt::DisplayRole ).toString(); - srid = index.sibling( index.row(), dbtmSrid ).data( Qt::DisplayRole ).toString(); + srid = index.sibling( index.row(), DbtmSrid ).data( Qt::DisplayRole ).toString(); bool ok; srid.toInt( &ok ); if ( !ok ) @@ -360,8 +360,8 @@ QString QgsPgTableModel::layerURI( const QModelIndex &index, const QString& conn } } - bool selectAtId = itemFromIndex( index.sibling( index.row(), dbtmSelectAtId ) )->checkState() == Qt::Checked; - QString sql = index.sibling( index.row(), dbtmSql ).data( Qt::DisplayRole ).toString(); + bool selectAtId = itemFromIndex( index.sibling( index.row(), DbtmSelectAtId ) )->checkState() == Qt::Checked; + QString sql = index.sibling( index.row(), DbtmSql ).data( Qt::DisplayRole ).toString(); QgsDataSourceUri uri( connInfo ); diff --git a/src/providers/postgres/qgspgtablemodel.h b/src/providers/postgres/qgspgtablemodel.h index 11f9bbc9a070..07bafa1a49e6 100644 --- a/src/providers/postgres/qgspgtablemodel.h +++ b/src/providers/postgres/qgspgtablemodel.h @@ -42,19 +42,19 @@ class QgsPgTableModel : public QStandardItemModel //! Returns the number of tables in the model int tableCount() const { return mTableCount; } - enum columns + enum Columns { - dbtmSchema = 0, - dbtmTable, - dbtmComment, - dbtmGeomCol, - dbtmGeomType, // Data type (geometry, geography, topogeometry, ...) - dbtmType, // Spatial type (point, line, polygon, ...) - dbtmSrid, - dbtmPkCol, - dbtmSelectAtId, - dbtmSql, - dbtmColumns + DbtmSchema = 0, + DbtmTable, + DbtmComment, + DbtmGeomCol, + DbtmGeomType, // Data type (geometry, geography, topogeometry, ...) + DbtmType, // Spatial type (point, line, polygon, ...) + DbtmSrid, + DbtmPkCol, + DbtmSelectAtId, + DbtmSql, + DbtmColumns }; bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) override; diff --git a/src/providers/postgres/qgspostgresconn.cpp b/src/providers/postgres/qgspostgresconn.cpp index aed292b29274..4942eb04bf07 100644 --- a/src/providers/postgres/qgspostgresconn.cpp +++ b/src/providers/postgres/qgspostgresconn.cpp @@ -391,12 +391,12 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP mLayersSupported.clear(); - for ( int i = sctGeometry; i <= sctPcPatch; ++i ) + for ( int i = SctGeometry; i <= SctPcPatch; ++i ) { QString sql, tableName, schemaName, columnName, typeName, sridName, gtableName, dimName; - QgsPostgresGeometryColumnType columnType = sctGeometry; + QgsPostgresGeometryColumnType columnType = SctGeometry; - if ( i == sctGeometry ) + if ( i == SctGeometry ) { tableName = QStringLiteral( "l.f_table_name" ); schemaName = QStringLiteral( "l.f_table_schema" ); @@ -405,9 +405,9 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP sridName = QStringLiteral( "l.srid" ); dimName = QStringLiteral( "l.coord_dimension" ); gtableName = QStringLiteral( "geometry_columns" ); - columnType = sctGeometry; + columnType = SctGeometry; } - else if ( i == sctGeography ) + else if ( i == SctGeography ) { tableName = QStringLiteral( "l.f_table_name" ); schemaName = QStringLiteral( "l.f_table_schema" ); @@ -416,9 +416,9 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP sridName = QStringLiteral( "l.srid" ); dimName = QStringLiteral( "2" ); gtableName = QStringLiteral( "geography_columns" ); - columnType = sctGeography; + columnType = SctGeography; } - else if ( i == sctTopoGeometry ) + else if ( i == SctTopoGeometry ) { if ( !hasTopology() ) continue; @@ -435,9 +435,9 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP sridName = QStringLiteral( "(SELECT srid FROM topology.topology t WHERE l.topology_id=t.id)" ); dimName = QStringLiteral( "2" ); gtableName = QStringLiteral( "topology.layer" ); - columnType = sctTopoGeometry; + columnType = SctTopoGeometry; } - else if ( i == sctPcPatch ) + else if ( i == SctPcPatch ) { if ( !hasPointcloud() ) continue; @@ -449,7 +449,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP sridName = QStringLiteral( "l.srid" ); dimName = QStringLiteral( "2" ); gtableName = QStringLiteral( "pointcloud_columns" ); - columnType = sctPcPatch; + columnType = SctPcPatch; } else { @@ -581,17 +581,17 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP // skip columns of which we already derived information from the metadata tables if ( nColumns > 0 ) { - if ( foundInTables & ( 1 << sctGeometry ) ) + if ( foundInTables & ( 1 << SctGeometry ) ) { sql += QLatin1String( " AND (n.nspname,c.relname,a.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geometry_column FROM geometry_columns)" ); } - if ( foundInTables & ( 1 << sctGeography ) ) + if ( foundInTables & ( 1 << SctGeography ) ) { sql += QLatin1String( " AND (n.nspname,c.relname,a.attname) NOT IN (SELECT f_table_schema,f_table_name,f_geography_column FROM geography_columns)" ); } - if ( foundInTables & ( 1 << sctPcPatch ) ) + if ( foundInTables & ( 1 << SctPcPatch ) ) { sql += QLatin1String( " AND (n.nspname,c.relname,a.attname) NOT IN (SELECT \"schema\",\"table\",\"column\" FROM pointcloud_columns)" ); } @@ -636,19 +636,19 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP layerProperty.tableComment = comment; if ( coltype == QLatin1String( "geometry" ) ) { - layerProperty.geometryColType = sctGeometry; + layerProperty.geometryColType = SctGeometry; } else if ( coltype == QLatin1String( "geography" ) ) { - layerProperty.geometryColType = sctGeography; + layerProperty.geometryColType = SctGeography; } else if ( coltype == QLatin1String( "topogeometry" ) ) { - layerProperty.geometryColType = sctTopoGeometry; + layerProperty.geometryColType = SctTopoGeometry; } else if ( coltype == QLatin1String( "pcpatch" ) ) { - layerProperty.geometryColType = sctPcPatch; + layerProperty.geometryColType = SctPcPatch; } else { @@ -718,7 +718,7 @@ bool QgsPostgresConn::getTableInfo( bool searchGeometryColumnsOnly, bool searchP layerProperty.schemaName = schema; layerProperty.tableName = table; layerProperty.geometryColName = QString::null; - layerProperty.geometryColType = sctNone; + layerProperty.geometryColType = SctNone; layerProperty.relKind = relkind; layerProperty.isView = isView; layerProperty.tableComment = comment; @@ -1428,8 +1428,8 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert QString query = QStringLiteral( "SELECT DISTINCT " ); - bool castToGeometry = layerProperty.geometryColType == sctGeography || - layerProperty.geometryColType == sctPcPatch; + bool castToGeometry = layerProperty.geometryColType == SctGeography || + layerProperty.geometryColType == SctPcPatch; QgsWkbTypes::Type type = layerProperty.types.value( 0, QgsWkbTypes::Unknown ); if ( type == QgsWkbTypes::Unknown ) @@ -1657,15 +1657,15 @@ QString QgsPostgresConn::displayStringForGeomType( QgsPostgresGeometryColumnType { switch ( type ) { - case sctNone: + case SctNone: return tr( "None" ); - case sctGeometry: + case SctGeometry: return tr( "Geometry" ); - case sctGeography: + case SctGeography: return tr( "Geography" ); - case sctTopoGeometry: + case SctTopoGeometry: return tr( "TopoGeometry" ); - case sctPcPatch: + case SctPcPatch: return tr( "PcPatch" ); } diff --git a/src/providers/postgres/qgspostgresconn.h b/src/providers/postgres/qgspostgresconn.h index 933f78e3b6a3..af05fb04fe49 100644 --- a/src/providers/postgres/qgspostgresconn.h +++ b/src/providers/postgres/qgspostgresconn.h @@ -38,21 +38,21 @@ class QgsField; //! Spatial column types enum QgsPostgresGeometryColumnType { - sctNone, - sctGeometry, - sctGeography, - sctTopoGeometry, - sctPcPatch + SctNone, + SctGeometry, + SctGeography, + SctTopoGeometry, + SctPcPatch }; enum QgsPostgresPrimaryKeyType { - pktUnknown, - pktInt, - pktUint64, - pktTid, - pktOid, - pktFidMap + PktUnknown, + PktInt, + PktUint64, + PktTid, + PktOid, + PktFidMap }; //! Schema properties structure diff --git a/src/providers/postgres/qgspostgresfeatureiterator.cpp b/src/providers/postgres/qgspostgresfeatureiterator.cpp index 67f6330559e2..d0012dd30cb2 100644 --- a/src/providers/postgres/qgspostgresfeatureiterator.cpp +++ b/src/providers/postgres/qgspostgresfeatureiterator.cpp @@ -381,7 +381,7 @@ bool QgsPostgresFeatureIterator::close() QString QgsPostgresFeatureIterator::whereClauseRect() { QgsRectangle rect = mRequest.filterRect(); - if ( mSource->mSpatialColType == sctGeography ) + if ( mSource->mSpatialColType == SctGeography ) { rect = QgsRectangle( -180.0, -90.0, 180.0, 90.0 ).intersect( &rect ); } @@ -409,8 +409,8 @@ QString QgsPostgresFeatureIterator::whereClauseRect() mSource->mRequestedSrid.isEmpty() ? mSource->mDetectedSrid : mSource->mRequestedSrid ); } - bool castToGeometry = mSource->mSpatialColType == sctGeography || - mSource->mSpatialColType == sctPcPatch; + bool castToGeometry = mSource->mSpatialColType == SctGeography || + mSource->mSpatialColType == SctPcPatch; QString whereClause = QStringLiteral( "%1%2 && %3" ) .arg( QgsPostgresConn::quotedIdentifier( mSource->mGeometryColumn ), @@ -467,8 +467,8 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause, long { QString geom = QgsPostgresConn::quotedIdentifier( mSource->mGeometryColumn ); - if ( mSource->mSpatialColType == sctGeography || - mSource->mSpatialColType == sctPcPatch ) + if ( mSource->mSpatialColType == SctGeography || + mSource->mSpatialColType == SctPcPatch ) geom += QLatin1String( "::geometry" ); if ( mSource->mForce2d ) @@ -567,23 +567,23 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause, long switch ( mSource->mPrimaryKeyType ) { - case pktOid: + case PktOid: query += delim + "oid"; delim = ','; break; - case pktTid: + case PktTid: query += delim + "ctid"; delim = ','; break; - case pktInt: - case pktUint64: + case PktInt: + case PktUint64: query += delim + QgsPostgresConn::quotedIdentifier( mSource->mFields.at( mSource->mPrimaryKeyAttrs.at( 0 ) ).name() ); delim = ','; break; - case pktFidMap: + case PktFidMap: Q_FOREACH ( int idx, mSource->mPrimaryKeyAttrs ) { query += delim + mConn->fieldExpression( mSource->mFields.at( idx ) ); @@ -591,7 +591,7 @@ bool QgsPostgresFeatureIterator::declareCursor( const QString& whereClause, long } break; - case pktUnknown: + case PktUnknown: QgsDebugMsg( "Cannot declare cursor without primary key." ); return false; } @@ -707,19 +707,19 @@ bool QgsPostgresFeatureIterator::getFeature( QgsPostgresResult &queryResult, int switch ( mSource->mPrimaryKeyType ) { - case pktOid: - case pktTid: + case PktOid: + case PktTid: fid = mConn->getBinaryInt( queryResult, row, col++ ); break; - case pktInt: - case pktUint64: + case PktInt: + case PktUint64: fid = mConn->getBinaryInt( queryResult, row, col++ ); if ( !subsetOfAttributes || fetchAttributes.contains( mSource->mPrimaryKeyAttrs.at( 0 ) ) ) { feature.setAttribute( mSource->mPrimaryKeyAttrs[0], fid ); } - if ( mSource->mPrimaryKeyType == pktInt ) + if ( mSource->mPrimaryKeyType == PktInt ) { // NOTE: this needs be done _after_ the setAttribute call // above as we want the attribute value to be 1:1 with @@ -728,7 +728,7 @@ bool QgsPostgresFeatureIterator::getFeature( QgsPostgresResult &queryResult, int } break; - case pktFidMap: + case PktFidMap: { QVariantList primaryKeyVals; @@ -750,7 +750,7 @@ bool QgsPostgresFeatureIterator::getFeature( QgsPostgresResult &queryResult, int } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: cannot get feature with unknown primary key" ); return false; } diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp index d6d3286e7977..6888719b8c49 100644 --- a/src/providers/postgres/qgspostgresprovider.cpp +++ b/src/providers/postgres/qgspostgresprovider.cpp @@ -69,13 +69,13 @@ QgsPostgresProvider::pkType( const QgsField& f ) const // (in which case we could use pktUint64) // we'll have to use a Map type. // See http://hub.qgis.org/issues/14262 - return pktFidMap; // pktUint64 + return PktFidMap; // pktUint64 case QVariant::Int: - return pktInt; + return PktInt; default: - return pktFidMap; + return PktFidMap; } } @@ -84,8 +84,8 @@ QgsPostgresProvider::pkType( const QgsField& f ) const QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) : QgsVectorDataProvider( uri ) , mValid( false ) - , mPrimaryKeyType( pktUnknown ) - , mSpatialColType( sctNone ) + , mPrimaryKeyType( PktUnknown ) + , mSpatialColType( SctNone ) , mDetectedGeomType( QgsWkbTypes::Unknown ) , mForce2d( false ) , mRequestedGeomType( QgsWkbTypes::Unknown ) @@ -170,7 +170,7 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) // NOTE: mValid would be true after true return from // getGeometryDetails, see http://hub.qgis.org/issues/13781 - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { if ( !getTopoLayerInfo() ) // gets topology name and layer id { @@ -232,19 +232,19 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) QString key; switch ( mPrimaryKeyType ) { - case pktOid: + case PktOid: key = QStringLiteral( "oid" ); break; - case pktTid: + case PktTid: key = QStringLiteral( "tid" ); break; - case pktInt: - case pktUint64: + case PktInt: + case PktUint64: Q_ASSERT( mPrimaryKeyAttrs.size() == 1 ); Q_ASSERT( mPrimaryKeyAttrs[0] >= 0 && mPrimaryKeyAttrs[0] < mAttributeFields.count() ); key = mAttributeFields.at( mPrimaryKeyAttrs.at( 0 ) ).name(); break; - case pktFidMap: + case PktFidMap: { QString delim; Q_FOREACH ( int idx, mPrimaryKeyAttrs ) @@ -254,7 +254,7 @@ QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) } } break; - case pktUnknown: + case PktUnknown: QgsMessageLog::logMessage( tr( "PostgreSQL layer has unknown primary key type." ), tr( "PostGIS" ) ); mValid = false; break; @@ -367,21 +367,21 @@ QString QgsPostgresProvider::pkParamWhereClause( int offset, const char *alias ) switch ( mPrimaryKeyType ) { - case pktTid: + case PktTid: whereClause = QStringLiteral( "%2ctid=$%1" ).arg( offset ).arg( aliased ); break; - case pktOid: + case PktOid: whereClause = QStringLiteral( "%2oid=$%1" ).arg( offset ).arg( aliased ); break; - case pktInt: - case pktUint64: + case PktInt: + case PktUint64: Q_ASSERT( mPrimaryKeyAttrs.size() == 1 ); whereClause = QStringLiteral( "%3%1=$%2" ).arg( quotedIdentifier( field( mPrimaryKeyAttrs[0] ).name() ) ).arg( offset ).arg( aliased ); break; - case pktFidMap: + case PktFidMap: { QString delim = QLatin1String( "" ); for ( int i = 0; i < mPrimaryKeyAttrs.size(); i++ ) @@ -395,7 +395,7 @@ QString QgsPostgresProvider::pkParamWhereClause( int offset, const char *alias ) } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: Primary key unknown" ); whereClause = QStringLiteral( "NULL" ); break; @@ -416,20 +416,20 @@ void QgsPostgresProvider::appendPkParams( QgsFeatureId featureId, QStringList &p { switch ( mPrimaryKeyType ) { - case pktOid: - case pktUint64: + case PktOid: + case PktUint64: params << QString::number( featureId ); break; - case pktInt: + case PktInt: params << QString::number( FID2PKINT( featureId ) ); break; - case pktTid: + case PktTid: params << QStringLiteral( "'(%1,%2)'" ).arg( FID_TO_NUMBER( featureId ) >> 16 ).arg( FID_TO_NUMBER( featureId ) & 0xffff ); break; - case pktFidMap: + case PktFidMap: { QVariantList pkVals = mShared->lookupKey( featureId ); if ( !pkVals.isEmpty() ) @@ -454,7 +454,7 @@ void QgsPostgresProvider::appendPkParams( QgsFeatureId featureId, QStringList &p } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: Primary key unknown" ); break; } @@ -473,27 +473,27 @@ QString QgsPostgresUtils::whereClause( QgsFeatureId featureId, const QgsFields& switch ( pkType ) { - case pktTid: + case PktTid: whereClause = QStringLiteral( "ctid='(%1,%2)'" ) .arg( FID_TO_NUMBER( featureId ) >> 16 ) .arg( FID_TO_NUMBER( featureId ) & 0xffff ); break; - case pktOid: + case PktOid: whereClause = QStringLiteral( "oid=%1" ).arg( featureId ); break; - case pktInt: + case PktInt: Q_ASSERT( pkAttrs.size() == 1 ); whereClause = QStringLiteral( "%1=%2" ).arg( QgsPostgresConn::quotedIdentifier( fields.at( pkAttrs[0] ).name() ) ).arg( FID2PKINT( featureId ) ); break; - case pktUint64: + case PktUint64: Q_ASSERT( pkAttrs.size() == 1 ); whereClause = QStringLiteral( "%1=%2" ).arg( QgsPostgresConn::quotedIdentifier( fields.at( pkAttrs[0] ).name() ) ).arg( featureId ); break; - case pktFidMap: + case PktFidMap: { QVariantList pkVals = sharedData->lookupKey( featureId ); if ( !pkVals.isEmpty() ) @@ -523,7 +523,7 @@ QString QgsPostgresUtils::whereClause( QgsFeatureId featureId, const QgsFields& } break; - case pktUnknown: + case PktUnknown: Q_ASSERT( !"FAILURE: Primary key unknown" ); whereClause = QStringLiteral( "NULL" ); break; @@ -536,9 +536,9 @@ QString QgsPostgresUtils::whereClause( const QgsFeatureIds& featureIds, const Qg { switch ( pkType ) { - case pktOid: - case pktInt: - case pktUint64: + case PktOid: + case PktInt: + case PktUint64: { QString expr; @@ -546,11 +546,11 @@ QString QgsPostgresUtils::whereClause( const QgsFeatureIds& featureIds, const Qg if ( !featureIds.isEmpty() ) { QString delim; - expr = QStringLiteral( "%1 IN (" ).arg(( pkType == pktOid ? QStringLiteral( "oid" ) : QgsPostgresConn::quotedIdentifier( fields.at( pkAttrs[0] ).name() ) ) ); + expr = QStringLiteral( "%1 IN (" ).arg(( pkType == PktOid ? QStringLiteral( "oid" ) : QgsPostgresConn::quotedIdentifier( fields.at( pkAttrs[0] ).name() ) ) ); Q_FOREACH ( const QgsFeatureId featureId, featureIds ) { - expr += delim + FID_TO_STRING( pkType == pktOid ? featureId : pkType == pktUint64 ? featureId : FID2PKINT( featureId ) ); + expr += delim + FID_TO_STRING( pkType == PktOid ? featureId : pkType == PktUint64 ? featureId : FID2PKINT( featureId ) ); delim = ','; } expr += ')'; @@ -558,9 +558,9 @@ QString QgsPostgresUtils::whereClause( const QgsFeatureIds& featureIds, const Qg return expr; } - case pktFidMap: - case pktTid: - case pktUnknown: + case PktFidMap: + case PktTid: + case PktUnknown: { //complex primary key, need to build up where string QStringList whereClauses; @@ -600,14 +600,14 @@ QString QgsPostgresProvider::filterWhereClause() const where += delim + QStringLiteral( "%1(%2%3)=%4" ) .arg( connectionRO()->majorVersion() < 2 ? "srid" : "st_srid", quotedIdentifier( mGeometryColumn ), - mSpatialColType == sctGeography ? "::geography" : "", + mSpatialColType == SctGeography ? "::geography" : "", mRequestedSrid ); delim = QStringLiteral( " AND " ); } if ( mRequestedGeomType != QgsWkbTypes::Unknown && mRequestedGeomType != mDetectedGeomType ) { - where += delim + QgsPostgresConn::postgisTypeFilter( mGeometryColumn, ( QgsWkbTypes::Type )mRequestedGeomType, mSpatialColType == sctGeography ); + where += delim + QgsPostgresConn::postgisTypeFilter( mGeometryColumn, ( QgsWkbTypes::Type )mRequestedGeomType, mSpatialColType == SctGeography ); delim = QStringLiteral( " AND " ); } @@ -1228,7 +1228,7 @@ bool QgsPostgresProvider::hasSufficientPermsAndCapabilities() if (( mEnabledCapabilities & QgsVectorDataProvider::ChangeGeometries ) && ( mEnabledCapabilities & QgsVectorDataProvider::ChangeAttributeValues ) && - mSpatialColType != sctTopoGeometry ) + mSpatialColType != SctTopoGeometry ) { mEnabledCapabilities |= QgsVectorDataProvider::ChangeFeatures; } @@ -1292,7 +1292,7 @@ bool QgsPostgresProvider::determinePrimaryKey() // Could warn the user here that performance will suffer if // oid isn't indexed (and that they may want to add a // primary key to the table) - mPrimaryKeyType = pktOid; + mPrimaryKeyType = PktOid; } else { @@ -1301,7 +1301,7 @@ bool QgsPostgresProvider::determinePrimaryKey() res = connectionRO()->PQexec( sql ); if ( res.PQntuples() == 1 ) { - mPrimaryKeyType = pktTid; + mPrimaryKeyType = PktTid; QgsMessageLog::logMessage( tr( "Primary key is ctid - changing of existing features disabled (%1; %2)" ).arg( mGeometryColumn, mQuery ) ); mEnabledCapabilities &= ~( QgsVectorDataProvider::DeleteFeatures | QgsVectorDataProvider::ChangeAttributeValues | QgsVectorDataProvider::ChangeGeometries | QgsVectorDataProvider::ChangeFeatures ); @@ -1335,7 +1335,7 @@ bool QgsPostgresProvider::determinePrimaryKey() QString primaryKey; QString delim = QLatin1String( "" ); - mPrimaryKeyType = pktFidMap; // map by default, will downgrade if needed + mPrimaryKeyType = PktFidMap; // map by default, will downgrade if needed for ( int i = 0; i < res.PQntuples(); i++ ) { QString name = res.PQgetvalue( i, 0 ); @@ -1356,8 +1356,8 @@ bool QgsPostgresProvider::determinePrimaryKey() } QgsField fld = mAttributeFields.at( idx ); - // Always use pktFidMap for multi-field keys - mPrimaryKeyType = i ? pktFidMap : pkType( fld ); + // Always use PktFidMap for multi-field keys + mPrimaryKeyType = i ? PktFidMap : pkType( fld ); mPrimaryKeyAttrs << idx; } @@ -1365,7 +1365,7 @@ bool QgsPostgresProvider::determinePrimaryKey() if (( mightBeNull || isParentTable ) && !mUseEstimatedMetadata && !uniqueData( primaryKey ) ) { QgsMessageLog::logMessage( tr( "Ignoring key candidate because of NULL values or inheritance" ), tr( "PostGIS" ) ); - mPrimaryKeyType = pktUnknown; + mPrimaryKeyType = PktUnknown; mPrimaryKeyAttrs.clear(); } } @@ -1384,7 +1384,7 @@ bool QgsPostgresProvider::determinePrimaryKey() mAttributeFields[ fieldIdx ].setConstraints( constraints ); } - mValid = mPrimaryKeyType != pktUnknown; + mValid = mPrimaryKeyType != PktUnknown; return mValid; } @@ -1444,7 +1444,7 @@ QStringList QgsPostgresProvider::parseUriKey( const QString& key ) void QgsPostgresProvider::determinePrimaryKeyFromUriKeyColumn() { QString primaryKey = mUri.keyColumn(); - mPrimaryKeyType = pktUnknown; + mPrimaryKeyType = PktUnknown; if ( !primaryKey.isEmpty() ) { @@ -1475,7 +1475,7 @@ void QgsPostgresProvider::determinePrimaryKeyFromUriKeyColumn() { if ( mUseEstimatedMetadata || uniqueData( primaryKey ) ) { - mPrimaryKeyType = pktFidMap; // Map by default + mPrimaryKeyType = PktFidMap; // Map by default if ( mPrimaryKeyAttrs.size() == 1 ) { QgsField fld = mAttributeFields.at( 0 ); @@ -1890,12 +1890,12 @@ QString QgsPostgresProvider::geomParam( int offset ) const bool forceMulti = false; - if ( mSpatialColType != sctTopoGeometry ) + if ( mSpatialColType != SctTopoGeometry ) { forceMulti = QgsWkbTypes::isMultiType( wkbType() ); } - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { geometry += QStringLiteral( "toTopoGeom(" ); } @@ -1916,7 +1916,7 @@ QString QgsPostgresProvider::geomParam( int offset ) const geometry += ')'; } - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { geometry += QStringLiteral( ",%1,%2)" ) .arg( quotedValue( mTopoLayerInfo.topologyName ) ) @@ -1965,7 +1965,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) delim = ','; } - if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap || mPrimaryKeyType == pktUint64 ) + if ( mPrimaryKeyType == PktInt || mPrimaryKeyType == PktFidMap || mPrimaryKeyType == PktUint64 ) { Q_FOREACH ( int idx, mPrimaryKeyAttrs ) { @@ -2075,7 +2075,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) insert += values + ')'; - if ( mPrimaryKeyType == pktFidMap || mPrimaryKeyType == pktInt || mPrimaryKeyType == pktUint64 ) + if ( mPrimaryKeyType == PktFidMap || mPrimaryKeyType == PktInt || mPrimaryKeyType == PktUint64 ) { insert += QLatin1String( " RETURNING " ); @@ -2144,7 +2144,7 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) else if ( result.PQresultStatus() != PGRES_COMMAND_OK ) throw PGException( result ); - if ( mPrimaryKeyType == pktOid ) + if ( mPrimaryKeyType == PktOid ) { features->setId( result.PQoidValue() ); QgsDebugMsgLevel( QString( "new fid=%1" ).arg( features->id() ), 4 ); @@ -2152,17 +2152,17 @@ bool QgsPostgresProvider::addFeatures( QgsFeatureList &flist ) } // update feature ids - if ( mPrimaryKeyType == pktInt || mPrimaryKeyType == pktFidMap || mPrimaryKeyType == pktUint64 ) + if ( mPrimaryKeyType == PktInt || mPrimaryKeyType == PktFidMap || mPrimaryKeyType == PktUint64 ) { for ( QgsFeatureList::iterator features = flist.begin(); features != flist.end(); ++features ) { QgsAttributes attrs = features->attributes(); - if ( mPrimaryKeyType == pktUint64 ) + if ( mPrimaryKeyType == PktUint64 ) { features->setId( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ); } - else if ( mPrimaryKeyType == pktInt ) + else if ( mPrimaryKeyType == PktInt ) { features->setId( PKINT2FID( STRING_TO_FID( attrs.at( mPrimaryKeyAttrs.at( 0 ) ) ) ) ); } @@ -2236,7 +2236,7 @@ bool QgsPostgresProvider::deleteFeatures( const QgsFeatureIds & id ) returnvalue &= conn->commit(); - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { // NOTE: in presence of multiple TopoGeometry objects // for the same table or when deleting a Geometry @@ -2293,7 +2293,7 @@ bool QgsPostgresProvider::truncate() if ( returnvalue ) { - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { // NOTE: in presence of multiple TopoGeometry objects // for the same table or when deleting a Geometry @@ -2584,7 +2584,7 @@ bool QgsPostgresProvider::changeAttributeValues( const QgsChangedAttributesMap & throw PGException( result ); // update feature id map if key was changed - if ( pkChanged && mPrimaryKeyType == pktFidMap ) + if ( pkChanged && mPrimaryKeyType == PktFidMap ) { QVariantList k = mShared->removeFid( fid ); @@ -2662,7 +2662,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m QString update; QgsPostgresResult result; - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { // We will create a new TopoGeometry object with the new shape. // Later, we'll replace the old TopoGeometry with the new one, @@ -2733,7 +2733,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m // Save the id of the current topogeometry long old_tg_id = -1; - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { QStringList params; appendPkParams( iter.key(), params ); @@ -2757,7 +2757,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m if ( result.PQresultStatus() != PGRES_COMMAND_OK && result.PQresultStatus() != PGRES_TUPLES_OK ) throw PGException( result ); - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { long new_tg_id = result.PQgetvalue( 0, 0 ).toLong(); // new topogeo_id @@ -2796,7 +2796,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m } // for each feature conn->PQexecNR( QStringLiteral( "DEALLOCATE updatefeatures" ) ); - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { connectionRO()->PQexecNR( QStringLiteral( "DEALLOCATE getid" ) ); conn->PQexecNR( QStringLiteral( "DEALLOCATE replacetopogeom" ) ); @@ -2809,7 +2809,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m pushError( tr( "PostGIS error while changing geometry values: %1" ).arg( e.errorMessage() ) ); conn->rollback(); conn->PQexecNR( QStringLiteral( "DEALLOCATE updatefeatures" ) ); - if ( mSpatialColType == sctTopoGeometry ) + if ( mSpatialColType == SctTopoGeometry ) { connectionRO()->PQexecNR( QStringLiteral( "DEALLOCATE getid" ) ); conn->PQexecNR( QStringLiteral( "DEALLOCATE replacetopogeom" ) ); @@ -2827,7 +2827,7 @@ bool QgsPostgresProvider::changeGeometryValues( const QgsGeometryMap &geometry_m bool QgsPostgresProvider::changeFeatures( const QgsChangedAttributesMap &attr_map, const QgsGeometryMap &geometry_map ) { - Q_ASSERT( mSpatialColType != sctTopoGeometry ); + Q_ASSERT( mSpatialColType != SctTopoGeometry ); bool returnvalue = true; @@ -2933,7 +2933,7 @@ bool QgsPostgresProvider::changeFeatures( const QgsChangedAttributesMap &attr_ma } // update feature id map if key was changed - if ( pkChanged && mPrimaryKeyType == pktFidMap ) + if ( pkChanged && mPrimaryKeyType == PktFidMap ) { QVariantList k = mShared->removeFid( fid ); @@ -3005,7 +3005,7 @@ bool QgsPostgresProvider::setSubsetString( const QString& theSQL, bool updateFea #if 0 // FIXME - if ( mPrimaryKeyType == pktInt && !uniqueData( primaryKeyAttr ) ) + if ( mPrimaryKeyType == PktInt && !uniqueData( primaryKeyAttr ) ) { sqlWhereClause = prevWhere; return false; @@ -3070,7 +3070,7 @@ QgsRectangle QgsPostgresProvider::extent() const if ( mGeometryColumn.isNull() ) return QgsRectangle(); - if ( mSpatialColType == sctGeography ) + if ( mSpatialColType == SctGeography ) return QgsRectangle( -180.0, -90.0, 180.0, 90.0 ); if ( mLayerExtent.isEmpty() ) @@ -3137,7 +3137,7 @@ QgsRectangle QgsPostgresProvider::extent() const sql = QStringLiteral( "SELECT %1(%2%3) FROM %4%5" ) .arg( connectionRO()->majorVersion() < 2 ? "extent" : "st_extent", quotedIdentifier( mGeometryColumn ), - mSpatialColType == sctPcPatch ? "::geometry" : "", + mSpatialColType == SctPcPatch ? "::geometry" : "", mQuery, filterWhereClause() ); @@ -3226,15 +3226,15 @@ bool QgsPostgresProvider::getGeometryDetails() geomCol = result.PQgetvalue( 0, 0 ); geomColType = result.PQgetvalue( 0, 1 ); if ( geomColType == QLatin1String( "geometry" ) ) - mSpatialColType = sctGeometry; + mSpatialColType = SctGeometry; else if ( geomColType == QLatin1String( "geography" ) ) - mSpatialColType = sctGeography; + mSpatialColType = SctGeography; else if ( geomColType == QLatin1String( "topogeometry" ) ) - mSpatialColType = sctTopoGeometry; + mSpatialColType = SctTopoGeometry; else if ( geomColType == QLatin1String( "pcpatch" ) ) - mSpatialColType = sctPcPatch; + mSpatialColType = SctPcPatch; else - mSpatialColType = sctNone; + mSpatialColType = SctNone; } else { @@ -3280,7 +3280,7 @@ bool QgsPostgresProvider::getGeometryDetails() detectedType += QLatin1String( "ZM" ); detectedSrid = result.PQgetvalue( 0, 1 ); - mSpatialColType = sctGeometry; + mSpatialColType = SctGeometry; } else { @@ -3303,7 +3303,7 @@ bool QgsPostgresProvider::getGeometryDetails() { detectedType = result.PQgetvalue( 0, 0 ); detectedSrid = result.PQgetvalue( 0, 1 ); - mSpatialColType = sctGeography; + mSpatialColType = SctGeography; } else { @@ -3334,7 +3334,7 @@ bool QgsPostgresProvider::getGeometryDetails() { detectedType = result.PQgetvalue( 0, 0 ); detectedSrid = result.PQgetvalue( 0, 1 ); - mSpatialColType = sctTopoGeometry; + mSpatialColType = SctTopoGeometry; } else { @@ -3358,7 +3358,7 @@ bool QgsPostgresProvider::getGeometryDetails() { detectedType = result.PQgetvalue( 0, 0 ); detectedSrid = result.PQgetvalue( 0, 1 ); - mSpatialColType = sctPcPatch; + mSpatialColType = SctPcPatch; } else { @@ -3366,7 +3366,7 @@ bool QgsPostgresProvider::getGeometryDetails() } } - if ( mSpatialColType == sctNone ) + if ( mSpatialColType == SctNone ) { sql = QString( "SELECT t.typname FROM " "pg_attribute a, pg_class c, pg_namespace n, pg_type t " @@ -3383,13 +3383,13 @@ bool QgsPostgresProvider::getGeometryDetails() { geomColType = result.PQgetvalue( 0, 0 ); if ( geomColType == QLatin1String( "geometry" ) ) - mSpatialColType = sctGeometry; + mSpatialColType = SctGeometry; else if ( geomColType == QLatin1String( "geography" ) ) - mSpatialColType = sctGeography; + mSpatialColType = SctGeography; else if ( geomColType == QLatin1String( "topogeometry" ) ) - mSpatialColType = sctTopoGeometry; + mSpatialColType = SctTopoGeometry; else if ( geomColType == QLatin1String( "pcpatch" ) ) - mSpatialColType = sctPcPatch; + mSpatialColType = SctPcPatch; } else { @@ -3412,13 +3412,13 @@ bool QgsPostgresProvider::getGeometryDetails() detectedType = result.PQgetvalue( 0, 1 ); detectedSrid = result.PQgetvalue( 0, 2 ); if ( geomColType == QLatin1String( "geometry" ) ) - mSpatialColType = sctGeometry; + mSpatialColType = SctGeometry; else if ( geomColType == QLatin1String( "geography" ) ) - mSpatialColType = sctGeography; + mSpatialColType = SctGeography; else if ( geomColType == QLatin1String( "topogeometry" ) ) - mSpatialColType = sctTopoGeometry; + mSpatialColType = SctTopoGeometry; else if ( geomColType == QLatin1String( "pcpatch" ) ) - mSpatialColType = sctPcPatch; + mSpatialColType = SctPcPatch; else { detectedType = mRequestedGeomType == QgsWkbTypes::Unknown ? QLatin1String( "" ) : QgsPostgresConn::postgisWkbTypeName( mRequestedGeomType ); diff --git a/src/providers/postgres/qgspostgresprovider.h b/src/providers/postgres/qgspostgresprovider.h index 961e288bbc84..bd1ed93aa32f 100644 --- a/src/providers/postgres/qgspostgresprovider.h +++ b/src/providers/postgres/qgspostgresprovider.h @@ -262,7 +262,7 @@ class QgsPostgresProvider : public QgsVectorDataProvider * @return the PrimaryKeyType * * @note that this only makes sense for single-field primary keys, - * whereas multi-field keys always need the pktFidMap + * whereas multi-field keys always need the PktFidMap * primary key type. */ QgsPostgresPrimaryKeyType pkType( const QgsField& fld ) const; diff --git a/src/providers/spatialite/qgsspatialitesourceselect.h b/src/providers/spatialite/qgsspatialitesourceselect.h index 43be40c1671f..5dc4f1643b20 100644 --- a/src/providers/spatialite/qgsspatialitesourceselect.h +++ b/src/providers/spatialite/qgsspatialitesourceselect.h @@ -98,12 +98,12 @@ class QgsSpatiaLiteSourceSelect: public QDialog, private Ui::QgsDbSourceSelectBa void addDatabaseLayers( QStringList const & paths, QString const & providerKey ); private: - enum columns + enum Columns { - dbssType = 0, - dbssDetail, - dbssSql, - dbssColumns, + DbssType = 0, + DbssDetail, + DbssSql, + DbssColumns, }; typedef QPair< QString, QString > geomPair; diff --git a/src/providers/wms/qgswmscapabilities.cpp b/src/providers/wms/qgswmscapabilities.cpp index 2433b0128cc5..cff426a3c42e 100644 --- a/src/providers/wms/qgswmscapabilities.cpp +++ b/src/providers/wms/qgswmscapabilities.cpp @@ -61,7 +61,7 @@ bool QgsWmsSettings::parseUri( const QString& uriString ) mIgnoreGetMapUrl = false; mIgnoreGetFeatureInfoUrl = false; mSmoothPixmapTransform = true; - mDpiMode = dpiNone; // does not matter what we set here + mDpiMode = DpiNone; // does not matter what we set here mActiveSubLayers = QStringList( QStringLiteral( "xyz" ) ); // just a placeholder to have one sub-layer mActiveSubStyles = QStringList( QStringLiteral( "xyz" ) ); // just a placeholder to have one sub-style mActiveSubLayerVisibility.clear(); @@ -85,7 +85,7 @@ bool QgsWmsSettings::parseUri( const QString& uriString ) mParserSettings.invertAxisOrientation = uri.hasParam( QStringLiteral( "InvertAxisOrientation" ) ); // must be before parsing! mSmoothPixmapTransform = uri.hasParam( QStringLiteral( "SmoothPixmapTransform" ) ); - mDpiMode = uri.hasParam( QStringLiteral( "dpiMode" ) ) ? static_cast< QgsWmsDpiMode >( uri.param( QStringLiteral( "dpiMode" ) ).toInt() ) : dpiAll; + mDpiMode = uri.hasParam( QStringLiteral( "dpiMode" ) ) ? static_cast< QgsWmsDpiMode >( uri.param( QStringLiteral( "dpiMode" ) ).toInt() ) : DpiAll; mAuth.mUserName = uri.param( QStringLiteral( "username" ) ); QgsDebugMsg( "set username to " + mAuth.mUserName ); diff --git a/src/providers/wms/qgswmscapabilities.h b/src/providers/wms/qgswmscapabilities.h index 5194ff3aa184..7b36575b5aeb 100644 --- a/src/providers/wms/qgswmscapabilities.h +++ b/src/providers/wms/qgswmscapabilities.h @@ -467,11 +467,11 @@ enum QgsWmsTileAttribute enum QgsWmsDpiMode { - dpiNone = 0, - dpiQGIS = 1, - dpiUMN = 2, - dpiGeoServer = 4, - dpiAll = dpiQGIS | dpiUMN | dpiGeoServer, + DpiNone = 0, + DpiQGIS = 1, + DpiUMN = 2, + DpiGeoServer = 4, + DpiAll = DpiQGIS | DpiUMN | DpiGeoServer, }; diff --git a/src/providers/wms/qgswmsprovider.cpp b/src/providers/wms/qgswmsprovider.cpp index bf6d7e4b7dd8..cab98beeffe5 100644 --- a/src/providers/wms/qgswmsprovider.cpp +++ b/src/providers/wms/qgswmsprovider.cpp @@ -956,11 +956,11 @@ QUrl QgsWmsProvider::createRequestUrlWMS( const QgsRectangle& viewExtent, int pi if ( mDpi != -1 ) { - if ( mSettings.mDpiMode & dpiQGIS ) + if ( mSettings.mDpiMode & DpiQGIS ) setQueryItem( url, QStringLiteral( "DPI" ), QString::number( mDpi ) ); - if ( mSettings.mDpiMode & dpiUMN ) + if ( mSettings.mDpiMode & DpiUMN ) setQueryItem( url, QStringLiteral( "MAP_RESOLUTION" ), QString::number( mDpi ) ); - if ( mSettings.mDpiMode & dpiGeoServer ) + if ( mSettings.mDpiMode & DpiGeoServer ) setQueryItem( url, QStringLiteral( "FORMAT_OPTIONS" ), QStringLiteral( "dpi:%1" ).arg( mDpi ) ); } @@ -1001,11 +1001,11 @@ void QgsWmsProvider::createTileRequestsWMSC( const QgsWmtsTileMatrix* tm, const if ( mDpi != -1 ) { - if ( mSettings.mDpiMode & dpiQGIS ) + if ( mSettings.mDpiMode & DpiQGIS ) setQueryItem( url, QStringLiteral( "DPI" ), QString::number( mDpi ) ); - if ( mSettings.mDpiMode & dpiUMN ) + if ( mSettings.mDpiMode & DpiUMN ) setQueryItem( url, QStringLiteral( "MAP_RESOLUTION" ), QString::number( mDpi ) ); - if ( mSettings.mDpiMode & dpiGeoServer ) + if ( mSettings.mDpiMode & DpiGeoServer ) setQueryItem( url, QStringLiteral( "FORMAT_OPTIONS" ), QStringLiteral( "dpi:%1" ).arg( mDpi ) ); } @@ -3328,14 +3328,14 @@ QUrl QgsWmsProvider::getLegendGraphicFullURL( double scale, const QgsRectangle& QgsDebugMsg( QString( "defaultLegendGraphicResolution: %1" ).arg( defaultLegendGraphicResolution ) ); if ( defaultLegendGraphicResolution ) { - if ( mSettings.mDpiMode & dpiQGIS ) + if ( mSettings.mDpiMode & DpiQGIS ) setQueryItem( url, QStringLiteral( "DPI" ), QString::number( defaultLegendGraphicResolution ) ); - if ( mSettings.mDpiMode & dpiUMN ) + if ( mSettings.mDpiMode & DpiUMN ) { setQueryItem( url, QStringLiteral( "MAP_RESOLUTION" ), QString::number( defaultLegendGraphicResolution ) ); setQueryItem( url, QStringLiteral( "SCALE" ), QString::number( scale, 'f' ) ); } - if ( mSettings.mDpiMode & dpiGeoServer ) + if ( mSettings.mDpiMode & DpiGeoServer ) { setQueryItem( url, QStringLiteral( "FORMAT_OPTIONS" ), QStringLiteral( "dpi:%1" ).arg( defaultLegendGraphicResolution ) ); setQueryItem( url, QStringLiteral( "SCALE" ), QString::number( scale, 'f' ) ); diff --git a/tests/src/python/acceptable_missing_doc.py b/tests/src/python/acceptable_missing_doc.py index 78a413b0296d..54395d4b19cc 100644 --- a/tests/src/python/acceptable_missing_doc.py +++ b/tests/src/python/acceptable_missing_doc.py @@ -192,7 +192,7 @@ "QgsComposerGroupItem": ["QgsComposerGroupItem(const QString &text)"], "QgsGraphDirector": ["buildProgress(int, int) const ", "buildMessage(const QString &) const ", "addProperter(QgsArcProperter *prop)"], "QgsScaleComboBox": ["QgsScaleComboBox(QWidget *parent=nullptr)", "updateScales(const QStringList &scales=QStringList())"], - "QgsLabelingEngine": ["processProvider(QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p)", "Flag"], #spellok + "QgsLabelingEngine": ["processProvider(QgsAbstractLabelProvider *provider, QgsRenderContext &context, pal::Pal &p)", "Flag"], # spellok "QgsSymbolSelectorDialog": ["moveLayerByOffset(int offset)", "QgsSymbolSelectorDialog(QgsSymbol *symbol, QgsStyle *style, const QgsVectorLayer *vl, QWidget *parent=nullptr, bool embedded=false)", "lockLayer()", "moveLayerUp()", "updateUi()", "addLayer()", "moveLayerDown()", "layerChanged()", "loadSymbol()", "setWidget(QWidget *widget)", "updateLayerPreview()", "symbolModified()", "updateLockButton()", "removeLayer()", "currentLayer()", "updatePreview()"], "QgsCacheIndexFeatureId": ["QgsCacheIndexFeatureId(QgsVectorLayerCache *)"], "QgsSymbolLayerWidget": ["registerDataDefinedButton(QgsDataDefinedButton *button, const QString &propertyName, QgsDataDefinedButton::DataType type, const QString &description)", "setSymbolLayer(QgsSymbolLayer *layer)=0", "updateDataDefinedProperty()", "QgsSymbolLayerWidget(QWidget *parent, const QgsVectorLayer *vl=nullptr)", "symbolLayer()=0"], @@ -684,7 +684,7 @@ "QgsGeometryCache": ["cachedGeometries()", "cachedGeometriesRect()", "setCachedGeometriesRect(const QgsRectangle &extent)"], "QgsAuthCertInfo": ["QgsAuthCertInfo(const QSslCertificate &cert, bool manageCertTrust=false, QWidget *parent=nullptr, const QList< QSslCertificate > &connectionCAs=QList< QSslCertificate >())", "trustCacheRebuilt()"], "QgsExpressionBuilderWidget": ["loadRecent(const QString &key)", "QgsExpressionBuilderWidget(QWidget *parent)", "isExpressionValid()", "saveToRecent(const QString &key)", "loadFieldNames(const QgsFields &fields)", "showEvent(QShowEvent *e)"], - "QgsTINInterpolator": ["setExportTriangulationToFile(bool e)", "TIN_INTERPOLATION", "setTriangulationFilePath(const QString &filepath)", "QgsTINInterpolator(const QList< LayerData > &inputData, TIN_INTERPOLATION interpolation=Linear, bool showProgressDialog=false)"], + "QgsTINInterpolator": ["setExportTriangulationToFile(bool e)", "TINInterpolation", "setTriangulationFilePath(const QString &filepath)", "QgsTINInterpolator(const QList< LayerData > &inputData, TINInterpolation interpolation=Linear, bool showProgressDialog=false)"], "QgsMapLayerProxyModel": ["Filter", "exceptedLayerList()", "filters() const "], "QgsCompoundCurve": ["QgsCompoundCurve(const QgsCompoundCurve &curve)"], "QgisPlugin": ["QgisPlugin(QString const &name=\"\", QString const &description=\"\", QString const &category=\"\", QString const &version=\"\", PLUGINTYPE const &type=MAPLAYER)", "name()"], From 80d0d05b18410c3cee830916a984daa4b20eb260 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Wed, 11 Jan 2017 15:12:30 +0200 Subject: [PATCH 007/332] [FEATURE][processing] remove TauDEM provider from core Processing TauDEM is quite specific set of tools and it requires installation of some additional tools. So we decide to turn it into separate provider, reducing core codebase size and maintenance efforts. Tagged as feature to not forget mention in changelog and documentation --- images/images.qrc | 1 - images/themes/default/providerTaudem.svg | 129 ----------------- python/plugins/processing/algs/CMakeLists.txt | 1 - .../processing/algs/taudem/CMakeLists.txt | 5 - .../processing/algs/taudem/TauDEMAlgorithm.py | 134 ------------------ .../algs/taudem/TauDEMAlgorithmProvider.py | 125 ---------------- .../processing/algs/taudem/TauDEMUtils.py | 111 --------------- .../processing/algs/taudem/__init__.py | 0 .../algs/taudem/description/aread8.txt | 8 -- .../algs/taudem/description/areadinf.txt | 8 -- .../algs/taudem/description/d8flowdir.txt | 6 - .../description/d8flowpathextremeup.txt | 9 -- .../algs/taudem/description/d8hdisttostrm.txt | 7 - .../algs/taudem/description/dinfavalanche.txt | 11 -- .../taudem/description/dinfconclimaccum.txt | 12 -- .../taudem/description/dinfdecayaccum.txt | 9 -- .../algs/taudem/description/dinfflowdir.txt | 6 - .../algs/taudem/description/dinfrevaccum.txt | 7 - .../taudem/description/dinfupdependence.txt | 6 - .../algs/taudem/description/gagewatershed.txt | 6 - .../taudem/description/gagewatershed2.txt | 7 - .../taudem/description/moveoutletstostrm.txt | 8 -- .../algs/taudem/description/pitremove.txt | 7 - .../taudem/description/selectgtthreshold.txt | 6 - .../taudem/description/slopearearatio.txt | 6 - .../algs/taudem/description/slopeavedown.txt | 7 - .../algs/taudem/description/streamnet.txt | 14 -- .../algs/taudem/description/threshold.txt | 7 - .../algs/taudem/description/twi.txt | 6 - .../processing/algs/taudem/dinfdistdown.py | 131 ----------------- .../processing/algs/taudem/dinfdistup.py | 128 ----------------- .../algs/taudem/dinftranslimaccum.py | 121 ---------------- .../algs/taudem/dinftranslimaccum2.py | 129 ----------------- .../processing/algs/taudem/dropanalysis.py | 128 ----------------- .../plugins/processing/algs/taudem/gridnet.py | 121 ---------------- .../processing/algs/taudem/lengtharea.py | 101 ------------- .../processing/algs/taudem/peukerdouglas.py | 97 ------------- .../processing/algs/taudem/slopearea.py | 99 ------------- python/plugins/processing/core/Processing.py | 1 - .../processing/tests/AlgorithmsTestBase.py | 1 - 40 files changed, 1726 deletions(-) delete mode 100644 images/themes/default/providerTaudem.svg delete mode 100644 python/plugins/processing/algs/taudem/CMakeLists.txt delete mode 100644 python/plugins/processing/algs/taudem/TauDEMAlgorithm.py delete mode 100644 python/plugins/processing/algs/taudem/TauDEMAlgorithmProvider.py delete mode 100644 python/plugins/processing/algs/taudem/TauDEMUtils.py delete mode 100644 python/plugins/processing/algs/taudem/__init__.py delete mode 100644 python/plugins/processing/algs/taudem/description/aread8.txt delete mode 100644 python/plugins/processing/algs/taudem/description/areadinf.txt delete mode 100644 python/plugins/processing/algs/taudem/description/d8flowdir.txt delete mode 100644 python/plugins/processing/algs/taudem/description/d8flowpathextremeup.txt delete mode 100644 python/plugins/processing/algs/taudem/description/d8hdisttostrm.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfavalanche.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfconclimaccum.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfdecayaccum.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfflowdir.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfrevaccum.txt delete mode 100644 python/plugins/processing/algs/taudem/description/dinfupdependence.txt delete mode 100644 python/plugins/processing/algs/taudem/description/gagewatershed.txt delete mode 100644 python/plugins/processing/algs/taudem/description/gagewatershed2.txt delete mode 100644 python/plugins/processing/algs/taudem/description/moveoutletstostrm.txt delete mode 100644 python/plugins/processing/algs/taudem/description/pitremove.txt delete mode 100644 python/plugins/processing/algs/taudem/description/selectgtthreshold.txt delete mode 100644 python/plugins/processing/algs/taudem/description/slopearearatio.txt delete mode 100644 python/plugins/processing/algs/taudem/description/slopeavedown.txt delete mode 100644 python/plugins/processing/algs/taudem/description/streamnet.txt delete mode 100644 python/plugins/processing/algs/taudem/description/threshold.txt delete mode 100644 python/plugins/processing/algs/taudem/description/twi.txt delete mode 100644 python/plugins/processing/algs/taudem/dinfdistdown.py delete mode 100644 python/plugins/processing/algs/taudem/dinfdistup.py delete mode 100644 python/plugins/processing/algs/taudem/dinftranslimaccum.py delete mode 100644 python/plugins/processing/algs/taudem/dinftranslimaccum2.py delete mode 100644 python/plugins/processing/algs/taudem/dropanalysis.py delete mode 100644 python/plugins/processing/algs/taudem/gridnet.py delete mode 100644 python/plugins/processing/algs/taudem/lengtharea.py delete mode 100644 python/plugins/processing/algs/taudem/peukerdouglas.py delete mode 100644 python/plugins/processing/algs/taudem/slopearea.py diff --git a/images/images.qrc b/images/images.qrc index 256fa0a858c1..1e6575f17f9f 100644 --- a/images/images.qrc +++ b/images/images.qrc @@ -554,7 +554,6 @@ themes/default/providerGrass.svg themes/default/providerQgis.svg themes/default/providerR.svg - themes/default/providerTaudem.svg themes/default/processingModel.svg themes/default/processingScript.svg themes/default/processingAlgorithm.svg diff --git a/images/themes/default/providerTaudem.svg b/images/themes/default/providerTaudem.svg deleted file mode 100644 index d97f7cfeb06a..000000000000 --- a/images/themes/default/providerTaudem.svg +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/python/plugins/processing/algs/CMakeLists.txt b/python/plugins/processing/algs/CMakeLists.txt index 937bbc54afec..f27b362151b8 100644 --- a/python/plugins/processing/algs/CMakeLists.txt +++ b/python/plugins/processing/algs/CMakeLists.txt @@ -5,7 +5,6 @@ ADD_SUBDIRECTORY(gdal) ADD_SUBDIRECTORY(grass7) ADD_SUBDIRECTORY(saga) ADD_SUBDIRECTORY(otb) -ADD_SUBDIRECTORY(taudem) ADD_SUBDIRECTORY(lidar) ADD_SUBDIRECTORY(qgis) ADD_SUBDIRECTORY(r) diff --git a/python/plugins/processing/algs/taudem/CMakeLists.txt b/python/plugins/processing/algs/taudem/CMakeLists.txt deleted file mode 100644 index 0c90bc66a5db..000000000000 --- a/python/plugins/processing/algs/taudem/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -FILE(GLOB PY_FILES *.py) -FILE(GLOB SINGLE_DESCR_FILES description/*.txt) - -PLUGIN_INSTALL(processing algs/taudem ${PY_FILES}) -PLUGIN_INSTALL(processing algs/taudem/description/ ${SINGLE_DESCR_FILES}) diff --git a/python/plugins/processing/algs/taudem/TauDEMAlgorithm.py b/python/plugins/processing/algs/taudem/TauDEMAlgorithm.py deleted file mode 100644 index 7d915293787e..000000000000 --- a/python/plugins/processing/algs/taudem/TauDEMAlgorithm.py +++ /dev/null @@ -1,134 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - TauDEMAlgorithm.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os -import codecs - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingLog import ProcessingLog -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterVector -from processing.core.parameters import ParameterBoolean -from processing.core.parameters import ParameterString -from processing.core.parameters import ParameterNumber -from processing.core.parameters import getParameterFromString -from processing.core.outputs import getOutputFromString - -from .TauDEMUtils import TauDEMUtils - -pluginPath = os.path.normpath(os.path.join( - os.path.split(os.path.dirname(__file__))[0], os.pardir)) - - -class TauDEMAlgorithm(GeoAlgorithm): - - def __init__(self, descriptionfile): - GeoAlgorithm.__init__(self) - self.descriptionFile = descriptionfile - self.defineCharacteristicsFromFile() - self._icon = None - - def getCopy(self): - newone = TauDEMAlgorithm(self.descriptionFile) - newone.provider = self.provider - return newone - - def getIcon(self): - if self._icon is None: - self._icon = QgsApplication.getThemeIcon("/providerTaudem.svg") - return self._icon - - def defineCharacteristicsFromFile(self): - with codecs.open(self.descriptionFile, encoding='utf-8') as f: - line = f.readline().strip('\n').strip() - self.name = line - self.i18n_name = self.tr(line) - line = f.readline().strip('\n').strip() - self.cmdName = line - line = f.readline().strip('\n').strip() - self.group = line - self.i18n_group = self.tr(line) - - line = f.readline().strip('\n').strip() - while line != '': - try: - line = line.strip('\n').strip() - if line.startswith('Parameter'): - param = getParameterFromString(line) - self.addParameter(param) - else: - self.addOutput(getOutputFromString(line)) - line = f.readline().strip('\n').strip() - except Exception as e: - ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, - self.tr('Could not load TauDEM algorithm: {}\n{}'.format(self.descriptionFile, line))) - raise e - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = int(ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES)) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - - for param in self.parameters: - if param.value is None or param.value == '': - continue - if isinstance(param, ParameterNumber): - commands.append(param.name) - commands.append(str(param.value)) - if isinstance(param, (ParameterRaster, ParameterVector)): - commands.append(param.name) - commands.append(param.value) - elif isinstance(param, ParameterBoolean): - if not param.value: - commands.append(param.name) - elif isinstance(param, ParameterString): - commands.append(param.name) - commands.append(str(param.value)) - - for out in self.outputs: - commands.append(out.name) - commands.append(out.value) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/TauDEMAlgorithmProvider.py b/python/plugins/processing/algs/taudem/TauDEMAlgorithmProvider.py deleted file mode 100644 index b56b31a28254..000000000000 --- a/python/plugins/processing/algs/taudem/TauDEMAlgorithmProvider.py +++ /dev/null @@ -1,125 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - TauDEMAlgorithmProvider.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.AlgorithmProvider import AlgorithmProvider -from processing.core.ProcessingConfig import ProcessingConfig, Setting -from processing.core.ProcessingLog import ProcessingLog - -from .TauDEMAlgorithm import TauDEMAlgorithm -from .TauDEMUtils import TauDEMUtils - -from .peukerdouglas import PeukerDouglas -from .slopearea import SlopeArea -from .lengtharea import LengthArea -from .dropanalysis import DropAnalysis -from .dinfdistdown import DinfDistDown -from .dinfdistup import DinfDistUp -from .gridnet import GridNet -from .dinftranslimaccum import DinfTransLimAccum -from .dinftranslimaccum2 import DinfTransLimAccum2 - -pluginPath = os.path.normpath(os.path.join( - os.path.split(os.path.dirname(__file__))[0], os.pardir)) - - -class TauDEMAlgorithmProvider(AlgorithmProvider): - - def __init__(self): - super().__init__() - self.activate = False - - def name(self): - return self.tr('TauDEM (hydrologic analysis)') - - def id(self): - return 'taudem' - - def icon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def svgIconPath(self): - return QgsApplication.iconPath("providerTaudem.svg") - - def initializeSettings(self): - AlgorithmProvider.initializeSettings(self) - - ProcessingConfig.addSetting(Setting(self.name(), - TauDEMUtils.TAUDEM_FOLDER, - self.tr('TauDEM command line tools folder'), - TauDEMUtils.taudemPath(), valuetype=Setting.FOLDER)) - ProcessingConfig.addSetting(Setting(self.name(), - TauDEMUtils.MPIEXEC_FOLDER, - self.tr('MPICH2/OpenMPI bin directory'), - TauDEMUtils.mpiexecPath(), valuetype=Setting.FOLDER)) - ProcessingConfig.addSetting(Setting(self.name(), - TauDEMUtils.MPI_PROCESSES, - self.tr('Number of MPI parallel processes to use'), 2)) - - def unload(self): - AlgorithmProvider.unload(self) - - ProcessingConfig.removeSetting(TauDEMUtils.TAUDEM_FOLDER) - ProcessingConfig.removeSetting(TauDEMUtils.MPIEXEC_FOLDER) - ProcessingConfig.removeSetting(TauDEMUtils.MPI_PROCESSES) - - def _loadAlgorithms(self): - self.algs = [] - folder = TauDEMUtils.taudemDescriptionPath() - - for descriptionFile in os.listdir(folder): - if descriptionFile.endswith('txt'): - descriptionFile = os.path.join(folder, descriptionFile) - self._algFromDescription(descriptionFile) - - self.algs.append(PeukerDouglas()) - self.algs.append(SlopeArea()) - self.algs.append(LengthArea()) - self.algs.append(DropAnalysis()) - self.algs.append(DinfDistDown()) - self.algs.append(DinfDistUp()) - self.algs.append(GridNet()) - self.algs.append(DinfTransLimAccum()) - self.algs.append(DinfTransLimAccum2()) - - def _algFromDescription(self, descriptionFile, multifile=False): - try: - alg = TauDEMAlgorithm(descriptionFile) - if alg.name.strip() != '': - self.algs.append(alg) - else: - ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, - self.tr('Could not open TauDEM algorithm: {}'.format(descriptionFile))) - except Exception as e: - ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, - self.tr('Could not open TauDEM algorithm {}:\n{}'.format(descriptionFile, str(e)))) diff --git a/python/plugins/processing/algs/taudem/TauDEMUtils.py b/python/plugins/processing/algs/taudem/TauDEMUtils.py deleted file mode 100644 index 1002353d45e4..000000000000 --- a/python/plugins/processing/algs/taudem/TauDEMUtils.py +++ /dev/null @@ -1,111 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - TauDEMUtils.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from builtins import object - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os -import subprocess - -from qgis.PyQt.QtCore import QCoreApplication -from qgis.core import QgsApplication - -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.ProcessingLog import ProcessingLog -from processing.tools.system import isMac - - -class TauDEMUtils(object): - - TAUDEM_FOLDER = 'TAUDEM_FOLDER' - TAUDEM_MULTIFILE_FOLDER = 'TAUDEM_MULTIFILE_FOLDER' - TAUDEM_USE_SINGLEFILE = 'TAUDEM_USE_SINGLEFILE' - TAUDEM_USE_MULTIFILE = 'TAUDEM_USE_MULTIFILE' - MPIEXEC_FOLDER = 'MPIEXEC_FOLDER' - MPI_PROCESSES = 'MPI_PROCESSES' - - @staticmethod - def taudemPath(): - folder = ProcessingConfig.getSetting(TauDEMUtils.TAUDEM_FOLDER) - if folder is None: - folder = '' - - if isMac(): - testfolder = os.path.join(QgsApplication.prefixPath(), 'bin') - if os.path.exists(os.path.join(testfolder, 'pitremove')): - folder = testfolder - else: - testfolder = '/usr/local/bin' - if os.path.exists(os.path.join(testfolder, 'pitremove')): - folder = testfolder - return folder - - @staticmethod - def mpiexecPath(): - folder = ProcessingConfig.getSetting(TauDEMUtils.MPIEXEC_FOLDER) - if folder is None: - folder = '' - - if isMac(): - testfolder = os.path.join(QgsApplication.prefixPath(), 'bin') - if os.path.exists(os.path.join(testfolder, 'mpiexec')): - folder = testfolder - else: - testfolder = '/usr/local/bin' - if os.path.exists(os.path.join(testfolder, 'mpiexec')): - folder = testfolder - return folder - - @staticmethod - def taudemDescriptionPath(): - return os.path.normpath( - os.path.join(os.path.dirname(__file__), 'description')) - - @staticmethod - def executeTauDEM(command, feedback): - loglines = [] - loglines.append(TauDEMUtils.tr('TauDEM execution console output')) - command = escapeAndJoin(command) - fused_command = ''.join(['"%s" ' % c for c in command]) - feedback.pushInfo(TauDEMUtils.tr('TauDEM command:')) - feedback.pushCommandInfo(fused_command.replace('" "', ' ').strip('"')) - proc = subprocess.Popen( - fused_command, - shell=True, - stdout=subprocess.PIPE, - stdin=subprocess.DEVNULL, - stderr=subprocess.STDOUT, - universal_newlines=True, - ).stdout - for line in iter(proc.readline, ''): - feedback.pushConsoleInfo(line) - loglines.append(line) - ProcessingLog.addToLog(ProcessingLog.LOG_INFO, loglines) - - @staticmethod - def tr(string, context=''): - if context == '': - context = 'TauDEMUtils' - return QCoreApplication.translate(context, string) diff --git a/python/plugins/processing/algs/taudem/__init__.py b/python/plugins/processing/algs/taudem/__init__.py deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/python/plugins/processing/algs/taudem/description/aread8.txt b/python/plugins/processing/algs/taudem/description/aread8.txt deleted file mode 100644 index 63b42bf90e21..000000000000 --- a/python/plugins/processing/algs/taudem/description/aread8.txt +++ /dev/null @@ -1,8 +0,0 @@ -D8 Contributing Area -aread8 -Basic Grid Analysis tools -ParameterRaster|-p|D8 Flow Direction Grid|False -ParameterVector|-o|Outlets Shapefile|0|True -ParameterRaster|-wg|Weight Grid|True -ParameterBoolean|-nc|Check for edge contamination|True -OutputRaster|-ad8|D8 Contributing Area Grid diff --git a/python/plugins/processing/algs/taudem/description/areadinf.txt b/python/plugins/processing/algs/taudem/description/areadinf.txt deleted file mode 100644 index 92e211d28ed9..000000000000 --- a/python/plugins/processing/algs/taudem/description/areadinf.txt +++ /dev/null @@ -1,8 +0,0 @@ -D-Infinity Contributing Area -areadinf -Basic Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterVector|-o|Outlets Shapefile|0|True -ParameterRaster|-wg|Weight Grid|True -ParameterBoolean|-nc|Check for edge contamination|True -OutputRaster|-sca|D-Infinity Specific Catchment Area Grid diff --git a/python/plugins/processing/algs/taudem/description/d8flowdir.txt b/python/plugins/processing/algs/taudem/description/d8flowdir.txt deleted file mode 100644 index e7386c4db799..000000000000 --- a/python/plugins/processing/algs/taudem/description/d8flowdir.txt +++ /dev/null @@ -1,6 +0,0 @@ -D8 Flow Directions -d8flowdir -Basic Grid Analysis tools -ParameterRaster|-fel|Pit Filled Elevation Grid|False -OutputRaster|-p|D8 Flow Direction Grid -OutputRaster|-sd8|D8 Slope Grid diff --git a/python/plugins/processing/algs/taudem/description/d8flowpathextremeup.txt b/python/plugins/processing/algs/taudem/description/d8flowpathextremeup.txt deleted file mode 100644 index 34ef50bcde51..000000000000 --- a/python/plugins/processing/algs/taudem/description/d8flowpathextremeup.txt +++ /dev/null @@ -1,9 +0,0 @@ -D8 Extreme Upslope Value -d8flowpathextremeup -Stream Network Analysis tools -ParameterRaster|-p|D8 Flow Directions Grid|False -ParameterRaster|-sa|Upslope Values Grid|False -ParameterVector|-o|Outlets Shapefile|0|True -ParameterBoolean|-nc|Check for edge contamination|True -ParameterBoolean|-min|Use max upslope value|True -OutputRaster|-ssa|Extereme Upslope Values Grid diff --git a/python/plugins/processing/algs/taudem/description/d8hdisttostrm.txt b/python/plugins/processing/algs/taudem/description/d8hdisttostrm.txt deleted file mode 100644 index abd30c3d7cd2..000000000000 --- a/python/plugins/processing/algs/taudem/description/d8hdisttostrm.txt +++ /dev/null @@ -1,7 +0,0 @@ -D8 Distance To Streams -d8hdisttostrm -Specialized Grid Analysis tools -ParameterRaster|-p|D8 Flow Direction Grid|False -ParameterRaster|-src|Stream Raster Grid|False -ParameterNumber|-thresh|Threshold|1|500|50 -OutputRaster|-dist|Output Distance to Streams diff --git a/python/plugins/processing/algs/taudem/description/dinfavalanche.txt b/python/plugins/processing/algs/taudem/description/dinfavalanche.txt deleted file mode 100644 index bbf6b7088951..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfavalanche.txt +++ /dev/null @@ -1,11 +0,0 @@ -D-Infinity Avalanche Runout -dinfavalanche -Specialized Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterRaster|-fel|Pit Filled Elevation Grid|False -ParameterRaster|-ass|Avalanche Source Site Grid|False -ParameterNumber|-thresh|Proportion Threshold|0.00001|10.0|0.2 -ParameterNumber|-alpha|Alpha Angle Threshold|0|360|18 -ParameterBoolean|-direct|Measure distance along flow path|True -OutputRaster|-rz|Runout Zone Grid -OutputRaster|-dfs|Path Distance Grid diff --git a/python/plugins/processing/algs/taudem/description/dinfconclimaccum.txt b/python/plugins/processing/algs/taudem/description/dinfconclimaccum.txt deleted file mode 100644 index 6806b62c976d..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfconclimaccum.txt +++ /dev/null @@ -1,12 +0,0 @@ -D-Infinity Concentration Limited Accumulation -dinfconclimaccum -Specialized Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterRaster|-dg|Disturbance Indicator Grid|False -ParameterRaster|-dm|Decay Multiplier Grid|False -ParameterRaster|-q|Effective Runoff Weight Grid|False -ParameterVector|-o|Outlets shapefile|0|True -ParameterNumber|-csol|Concentration Threshold|1.0|100.0|1.0 -ParameterBoolean|-nc|Check for edge contamination|True -OutputRaster|-ctpt|Concentration Grid -OutputRaster|-q|Overland Flow Specific Discharge Grid diff --git a/python/plugins/processing/algs/taudem/description/dinfdecayaccum.txt b/python/plugins/processing/algs/taudem/description/dinfdecayaccum.txt deleted file mode 100644 index 18bc0b47e89e..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfdecayaccum.txt +++ /dev/null @@ -1,9 +0,0 @@ -D-Infinity Decaying Accumulation -dinfdecayaccum -Specialized Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterRaster|-dm|Decay Multiplier Grid|False -ParameterRaster|-wg|Weight Grid|True -ParameterVector|-o|Outlets Shapefile|0|True -ParameterBoolean|-nc|Check for edge contamination|True -OutputRaster|-dsca|Decayed Specific Catchment Area Grid diff --git a/python/plugins/processing/algs/taudem/description/dinfflowdir.txt b/python/plugins/processing/algs/taudem/description/dinfflowdir.txt deleted file mode 100644 index 77126d3f138c..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfflowdir.txt +++ /dev/null @@ -1,6 +0,0 @@ -D-Infinity Flow Directions -dinfflowdir -Basic Grid Analysis tools -ParameterRaster|-fel|Pit Filled Elevation Grid|False -OutputRaster|-ang|D-Infinity Flow Directions Grid -OutputRaster|-slp|D-Infinity Slope Grid diff --git a/python/plugins/processing/algs/taudem/description/dinfrevaccum.txt b/python/plugins/processing/algs/taudem/description/dinfrevaccum.txt deleted file mode 100644 index ac8620cf56f7..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfrevaccum.txt +++ /dev/null @@ -1,7 +0,0 @@ -D-Infinity Reverse Accumulation -dinfrevaccum -Specialized Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterRaster|-wg|Weight Grid|False -OutputRaster|-racc|Reverse Accumulation Grid -OutputRaster|-dmax|Maximum Downslope Grid diff --git a/python/plugins/processing/algs/taudem/description/dinfupdependence.txt b/python/plugins/processing/algs/taudem/description/dinfupdependence.txt deleted file mode 100644 index 45378d17d73c..000000000000 --- a/python/plugins/processing/algs/taudem/description/dinfupdependence.txt +++ /dev/null @@ -1,6 +0,0 @@ -D-Infinity Upslope Dependence -dinfupdependence -Specialized Grid Analysis tools -ParameterRaster|-ang|D-Infinity Flow Direction Grid|False -ParameterRaster|-dg|Destination Grid|False -OutputRaster|-dep|Output Upslope Dependence Grid diff --git a/python/plugins/processing/algs/taudem/description/gagewatershed.txt b/python/plugins/processing/algs/taudem/description/gagewatershed.txt deleted file mode 100644 index cc9e3d90186e..000000000000 --- a/python/plugins/processing/algs/taudem/description/gagewatershed.txt +++ /dev/null @@ -1,6 +0,0 @@ -Gage Watershed -gagewatershed -Stream Network Analysis tools -ParameterRaster|-p|D8 Flow Directions Grid|False -ParameterVector|-o|Gages Shapefile|0|False -OutputRaster|-gw|Gage Watershed Grid diff --git a/python/plugins/processing/algs/taudem/description/gagewatershed2.txt b/python/plugins/processing/algs/taudem/description/gagewatershed2.txt deleted file mode 100644 index 224f1371d325..000000000000 --- a/python/plugins/processing/algs/taudem/description/gagewatershed2.txt +++ /dev/null @@ -1,7 +0,0 @@ -Gage Watershed - 2 -gagewatershed -Stream Network Analysis tools -ParameterRaster|-p|D8 Flow Directions Grid|False -ParameterVector|-o|Gages Shapefile|0|False -OutputRaster|-gw|Gage Watershed Grid -OutputFile|-id|Downstream Identifiers File diff --git a/python/plugins/processing/algs/taudem/description/moveoutletstostrm.txt b/python/plugins/processing/algs/taudem/description/moveoutletstostrm.txt deleted file mode 100644 index fe61898c06e6..000000000000 --- a/python/plugins/processing/algs/taudem/description/moveoutletstostrm.txt +++ /dev/null @@ -1,8 +0,0 @@ -Move Outlets To Streams -moveoutletstostrm -Stream Network Analysis tools -ParameterRaster|-p|D8 Flow Direction Grid|False -ParameterRaster|-src|Stream Raster Grid|False -ParameterVector|-o|Outlets Shapefile|0|False -ParameterNumber|-md|Maximum Number of Grid Cells to traverse|1|500|50 -OutputVector|-om|Output Outlet Shapefile diff --git a/python/plugins/processing/algs/taudem/description/pitremove.txt b/python/plugins/processing/algs/taudem/description/pitremove.txt deleted file mode 100644 index b072ab4a66ab..000000000000 --- a/python/plugins/processing/algs/taudem/description/pitremove.txt +++ /dev/null @@ -1,7 +0,0 @@ -Pit Remove -pitremove -Basic Grid Analysis tools -ParameterRaster|-z|Elevation Grid|False -ParameterRaster|-depmask|Depresion mask grid|True -ParameterBoolean|-4way|Fill considering only 4 way neighbours|False -OutputRaster|-fel|Pit Removed Elevation Grid diff --git a/python/plugins/processing/algs/taudem/description/selectgtthreshold.txt b/python/plugins/processing/algs/taudem/description/selectgtthreshold.txt deleted file mode 100644 index e3a307feab7f..000000000000 --- a/python/plugins/processing/algs/taudem/description/selectgtthreshold.txt +++ /dev/null @@ -1,6 +0,0 @@ -Select GT Threshold -selectgtthreshold -Basic Grid Analysis tools -ParameterRaster|-z|Elevation Grid|False -ParameterNumber|-thresh|Threshold|0.0|999999.999999|0.0 -OutputRaster|-t|Output Grid diff --git a/python/plugins/processing/algs/taudem/description/slopearearatio.txt b/python/plugins/processing/algs/taudem/description/slopearearatio.txt deleted file mode 100644 index c718ac7828cf..000000000000 --- a/python/plugins/processing/algs/taudem/description/slopearearatio.txt +++ /dev/null @@ -1,6 +0,0 @@ -Slope Over Area Ratio -slopearearatio -Specialized Grid Analysis tools -ParameterRaster|-slp|Slope Grid|False -ParameterRaster|-sca|Specific Catchment Area Grid|False -OutputRaster|-sar|Slope Divided By Area Ratio Grid diff --git a/python/plugins/processing/algs/taudem/description/slopeavedown.txt b/python/plugins/processing/algs/taudem/description/slopeavedown.txt deleted file mode 100644 index db8c10aac08c..000000000000 --- a/python/plugins/processing/algs/taudem/description/slopeavedown.txt +++ /dev/null @@ -1,7 +0,0 @@ -Slope Average Down -slopeavedown -Specialized Grid Analysis tools -ParameterRaster|-p|D8 Flow Direction Grid|False -ParameterRaster|-fel|Pit Filled Elevation Grid|False -ParameterNumber|-dn|Downslope Distance|1|500|50 -OutputRaster|-slpd|Slope Average Down Grid diff --git a/python/plugins/processing/algs/taudem/description/streamnet.txt b/python/plugins/processing/algs/taudem/description/streamnet.txt deleted file mode 100644 index d75dbc8578da..000000000000 --- a/python/plugins/processing/algs/taudem/description/streamnet.txt +++ /dev/null @@ -1,14 +0,0 @@ -Stream Reach and Watershed -streamnet -Stream Network Analysis tools -ParameterRaster|-fel|Pit Filled Elevation Grid|False -ParameterRaster|-p|D8 Flow Direction Grid|False -ParameterRaster|-ad8|D8 Drainage Area|False -ParameterRaster|-src|Stream Raster Grid|False -ParameterVector|-o|Outlets Shapefile as Network Nodes|0|True -ParameterBoolean|-sw|Delineate Single Watershed|False -OutputRaster|-ord|Stream Order Grid -OutputRaster|-w|Watershed Grid -OutputVector|-net|Stream Reach Shapefile -OutputFile|-tree|Network Connectivity Tree -OutputFile|-coord|Network Coordinates diff --git a/python/plugins/processing/algs/taudem/description/threshold.txt b/python/plugins/processing/algs/taudem/description/threshold.txt deleted file mode 100644 index f4b22f18ef8a..000000000000 --- a/python/plugins/processing/algs/taudem/description/threshold.txt +++ /dev/null @@ -1,7 +0,0 @@ -Stream Definition By Threshold -threshold -Stream Network Analysis tools -ParameterRaster|-ssa|Accumulated Stream Source Grid|False -ParameterNumber|-thresh|Threshold|1|None|100 -ParameterRaster|-mask|Mask Grid|True -OutputRaster|-src|Stream Raster Grid diff --git a/python/plugins/processing/algs/taudem/description/twi.txt b/python/plugins/processing/algs/taudem/description/twi.txt deleted file mode 100644 index e4f10d7de31b..000000000000 --- a/python/plugins/processing/algs/taudem/description/twi.txt +++ /dev/null @@ -1,6 +0,0 @@ -Topographic Wetness Index -twi -Stream Network Analysis tools -ParameterRaster|-sca|D-Infinity Specific Catchment Area Grid|False -ParameterRaster|-slp|D-Infinity Slope Grid|False -OutputRaster|-twi|Topographic Wetness Index Grid diff --git a/python/plugins/processing/algs/taudem/dinfdistdown.py b/python/plugins/processing/algs/taudem/dinfdistdown.py deleted file mode 100644 index 920c9919b9cc..000000000000 --- a/python/plugins/processing/algs/taudem/dinfdistdown.py +++ /dev/null @@ -1,131 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - dinfdistdown.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterBoolean -from processing.core.parameters import ParameterSelection -from processing.core.outputs import OutputRaster - -from .TauDEMUtils import TauDEMUtils - - -class DinfDistDown(GeoAlgorithm): - - DINF_FLOW_DIR_GRID = 'DINF_FLOW_DIR_GRID' - PIT_FILLED_GRID = 'PIT_FILLED_GRID' - STREAM_GRID = 'STREAM_GRID' - WEIGHT_PATH_GRID = 'WEIGHT_PATH_GRID' - STAT_METHOD = 'STAT_METHOD' - DIST_METHOD = 'DIST_METHOD' - EDGE_CONTAM = 'EDGE_CONTAM' - - DIST_DOWN_GRID = 'DIST_DOWN_GRID' - - STATISTICS = ['Minimum', 'Maximum', 'Average'] - STAT_DICT = {0: 'min', 1: 'max', 2: 'ave'} - - DISTANCE = ['Pythagoras', 'Horizontal', 'Vertical', 'Surface'] - DIST_DICT = { - 0: 'p', - 1: 'h', - 2: 'v', - 3: 's', - } - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('D-Infinity Distance Down') - self.cmdName = 'dinfdistdown' - self.group, self.i18n_group = self.trAlgorithm('Specialized Grid Analysis tools') - - self.addParameter(ParameterRaster(self.DINF_FLOW_DIR_GRID, - self.tr('D-Infinity Flow Direction Grid'), False)) - self.addParameter(ParameterRaster(self.PIT_FILLED_GRID, - self.tr('Pit Filled Elevation Grid'), False)) - self.addParameter(ParameterRaster(self.STREAM_GRID, - self.tr('Stream Raster Grid'), False)) - self.addParameter(ParameterRaster(self.WEIGHT_PATH_GRID, - self.tr('Weight Path Grid'), True)) - self.addParameter(ParameterSelection(self.STAT_METHOD, - self.tr('Statistical Method'), self.STATISTICS, 2)) - self.addParameter(ParameterSelection(self.DIST_METHOD, - self.tr('Distance Method'), self.DISTANCE, 1)) - self.addParameter(ParameterBoolean(self.EDGE_CONTAM, - self.tr('Check for edge contamination'), True)) - - self.addOutput(OutputRaster(self.DIST_DOWN_GRID, - self.tr('D-Infinity Drop to Stream Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-ang') - commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID)) - commands.append('-fel') - commands.append(self.getParameterValue(self.PIT_FILLED_GRID)) - commands.append('-src') - commands.append(self.getParameterValue(self.STREAM_GRID)) - wg = self.getParameterValue(self.WEIGHT_PATH_GRID) - if wg is not None: - commands.append('-wg') - commands.append(self.getParameterValue(self.WEIGHT_PATH_GRID)) - commands.append('-m') - commands.append(str(self.STAT_DICT[self.getParameterValue( - self.STAT_METHOD)])) - commands.append(str(self.DIST_DICT[self.getParameterValue( - self.DIST_METHOD)])) - if not self.getParameterValue(self.EDGE_CONTAM): - commands.append('-nc') - commands.append('-dd') - commands.append(self.getOutputValue(self.DIST_DOWN_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/dinfdistup.py b/python/plugins/processing/algs/taudem/dinfdistup.py deleted file mode 100644 index 6894613fc650..000000000000 --- a/python/plugins/processing/algs/taudem/dinfdistup.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - dinfdistup.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterNumber -from processing.core.parameters import ParameterBoolean -from processing.core.parameters import ParameterSelection -from processing.core.outputs import OutputRaster - -from .TauDEMUtils import TauDEMUtils - - -class DinfDistUp(GeoAlgorithm): - - DINF_FLOW_DIR_GRID = 'DINF_FLOW_DIR_GRID' - PIT_FILLED_GRID = 'PIT_FILLED_GRID' - SLOPE_GRID = 'SLOPE_GRID' - THRESHOLD = 'THRESHOLD' - STAT_METHOD = 'STAT_METHOD' - DIST_METHOD = 'DIST_METHOD' - EDGE_CONTAM = 'EDGE_CONTAM' - - DIST_UP_GRID = 'DIST_UP_GRID' - - STATISTICS = ['Minimum', 'Maximum', 'Average'] - STAT_DICT = {0: 'min', 1: 'max', 2: 'ave'} - - DISTANCE = ['Pythagoras', 'Horizontal', 'Vertical', 'Surface'] - DIST_DICT = { - 0: 'p', - 1: 'h', - 2: 'v', - 3: 's', - } - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('D-Infinity Distance Up') - self.cmdName = 'dinfdistup' - self.group, self.i18n_group = self.trAlgorithm('Specialized Grid Analysis tools') - - self.addParameter(ParameterRaster(self.DINF_FLOW_DIR_GRID, - self.tr('D-Infinity Flow Direction Grid'), False)) - self.addParameter(ParameterRaster(self.PIT_FILLED_GRID, - self.tr('Pit Filled Elevation Grid'), False)) - self.addParameter(ParameterRaster(self.SLOPE_GRID, - self.tr('Slope Grid'), False)) - self.addParameter(ParameterSelection(self.STAT_METHOD, - self.tr('Statistical Method'), self.STATISTICS, 2)) - self.addParameter(ParameterSelection(self.DIST_METHOD, - self.tr('Distance Method'), self.DISTANCE, 1)) - self.addParameter(ParameterNumber(self.THRESHOLD, - self.tr('Proportion Threshold'), 0, None, 0.5)) - self.addParameter(ParameterBoolean(self.EDGE_CONTAM, - self.tr('Check for edge contamination'), True)) - - self.addOutput(OutputRaster(self.DIST_UP_GRID, - self.tr('D-Infinity Distance Up'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-ang') - commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID)) - commands.append('-fel') - commands.append(self.getParameterValue(self.PIT_FILLED_GRID)) - commands.append('-m') - commands.append(str(self.STAT_DICT[self.getParameterValue( - self.STAT_METHOD)])) - commands.append(str(self.DIST_DICT[self.getParameterValue( - self.DIST_METHOD)])) - commands.append('-thresh') - commands.append(str(self.getParameterValue(self.THRESHOLD))) - if not self.getParameterValue(self.EDGE_CONTAM): - commands.append('-nc') - commands.append('-du') - commands.append(self.getOutputValue(self.DIST_UP_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/dinftranslimaccum.py b/python/plugins/processing/algs/taudem/dinftranslimaccum.py deleted file mode 100644 index a1243e632abd..000000000000 --- a/python/plugins/processing/algs/taudem/dinftranslimaccum.py +++ /dev/null @@ -1,121 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - dinftranslimaccum.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterVector -from processing.core.parameters import ParameterBoolean -from processing.core.outputs import OutputRaster - -from processing.tools import dataobjects - -from .TauDEMUtils import TauDEMUtils - - -class DinfTransLimAccum(GeoAlgorithm): - - DINF_FLOW_DIR_GRID = 'DINF_FLOW_DIR_GRID' - SUPPLY_GRID = 'SUPPLY_GRID' - CAPACITY_GRID = 'CAPACITY_GRID' - IN_CONCENTR_GRID = 'IN_CONCENTR_GRID' - OUTLETS_SHAPE = 'OUTLETS_SHAPE' - EDGE_CONTAM = 'EDGE_CONTAM' - - TRANSP_LIM_ACCUM_GRID = 'TRANSP_LIM_ACCUM_GRID' - DEPOSITION_GRID = 'DEPOSITION_GRID' - OUT_CONCENTR_GRID = 'OUT_CONCENTR_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('D-Infinity Transport Limited Accumulation') - self.cmdName = 'dinftranslimaccum' - self.group, self.i18n_group = self.trAlgorithm('Specialized Grid Analysis tools') - - self.addParameter(ParameterRaster(self.DINF_FLOW_DIR_GRID, - self.tr('D-Infinity Flow Direction Grid'), False)) - self.addParameter(ParameterRaster(self.SUPPLY_GRID, - self.tr('Supply Grid'), False)) - self.addParameter(ParameterRaster(self.CAPACITY_GRID, - self.tr('Transport Capacity Grid'), False)) - self.addParameter(ParameterVector(self.OUTLETS_SHAPE, - self.tr('Outlets Shapefile'), - [dataobjects.TYPE_VECTOR_POINT], True)) - self.addParameter(ParameterBoolean(self.EDGE_CONTAM, - self.tr('Check for edge contamination'), True)) - - self.addOutput(OutputRaster(self.TRANSP_LIM_ACCUM_GRID, - self.tr('Transport Limited Accumulation Grid'))) - self.addOutput(OutputRaster(self.DEPOSITION_GRID, - self.tr('Deposition Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-ang') - commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID)) - commands.append('-tsup') - commands.append(self.getParameterValue(self.SUPPLY_GRID)) - commands.append('-tc') - commands.append(self.getParameterValue(self.CAPACITY_GRID)) - param = self.getParameterValue(self.OUTLETS_SHAPE) - if param is not None: - commands.append('-o') - commands.append(param) - if not self.getParameterValue(self.EDGE_CONTAM): - commands.append('-nc') - - commands.append('-tla') - commands.append(self.getOutputValue(self.TRANSP_LIM_ACCUM_GRID)) - commands.append('-tdep') - commands.append(self.getOutputValue(self.DEPOSITION_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/dinftranslimaccum2.py b/python/plugins/processing/algs/taudem/dinftranslimaccum2.py deleted file mode 100644 index 0af14d9a14d9..000000000000 --- a/python/plugins/processing/algs/taudem/dinftranslimaccum2.py +++ /dev/null @@ -1,129 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - dinftranslimaccum2.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterVector -from processing.core.parameters import ParameterBoolean -from processing.core.outputs import OutputRaster - -from processing.tools import dataobjects - -from .TauDEMUtils import TauDEMUtils - - -class DinfTransLimAccum2(GeoAlgorithm): - - DINF_FLOW_DIR_GRID = 'DINF_FLOW_DIR_GRID' - SUPPLY_GRID = 'SUPPLY_GRID' - CAPACITY_GRID = 'CAPACITY_GRID' - IN_CONCENTR_GRID = 'IN_CONCENTR_GRID' - OUTLETS_SHAPE = 'OUTLETS_SHAPE' - EDGE_CONTAM = 'EDGE_CONTAM' - - TRANSP_LIM_ACCUM_GRID = 'TRANSP_LIM_ACCUM_GRID' - DEPOSITION_GRID = 'DEPOSITION_GRID' - OUT_CONCENTR_GRID = 'OUT_CONCENTR_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('D-Infinity Transport Limited Accumulation - 2') - self.cmdName = 'dinftranslimaccum' - self.group, self.i18n_group = self.trAlgorithm('Specialized Grid Analysis tools') - - self.addParameter(ParameterRaster(self.DINF_FLOW_DIR_GRID, - self.tr('D-Infinity Flow Direction Grid'), False)) - self.addParameter(ParameterRaster(self.SUPPLY_GRID, - self.tr('Supply Grid'), False)) - self.addParameter(ParameterRaster(self.CAPACITY_GRID, - self.tr('Transport Capacity Grid'), False)) - self.addParameter(ParameterRaster(self.IN_CONCENTR_GRID, - self.tr('Input Concentration Grid'), False)) - self.addParameter(ParameterVector(self.OUTLETS_SHAPE, - self.tr('Outlets Shapefile'), - [dataobjects.TYPE_VECTOR_POINT], True)) - self.addParameter(ParameterBoolean(self.EDGE_CONTAM, - self.tr('Check for edge contamination'), True)) - - self.addOutput(OutputRaster(self.TRANSP_LIM_ACCUM_GRID, - self.tr('Transport Limited Accumulation Grid'))) - self.addOutput(OutputRaster(self.DEPOSITION_GRID, - self.tr('Deposition Grid'))) - self.addOutput(OutputRaster(self.OUT_CONCENTR_GRID, - self.tr('Output Concentration Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-ang') - commands.append(self.getParameterValue(self.DINF_FLOW_DIR_GRID)) - commands.append('-tsup') - commands.append(self.getParameterValue(self.SUPPLY_GRID)) - commands.append('-tc') - commands.append(self.getParameterValue(self.CAPACITY_GRID)) - commands.append('-cs') - commands.append(self.getParameterValue(self.IN_CONCENTR_GRID)) - param = self.getParameterValue(self.OUTLETS_SHAPE) - if param is not None: - commands.append('-o') - commands.append(param) - if not self.getParameterValue(self.EDGE_CONTAM): - commands.append('-nc') - - commands.append('-tla') - commands.append(self.getOutputValue(self.TRANSP_LIM_ACCUM_GRID)) - commands.append('-tdep') - commands.append(self.getOutputValue(self.DEPOSITION_GRID)) - commands.append('-ctpt') - commands.append(self.getOutputValue(self.OUT_CONCENTR_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/dropanalysis.py b/python/plugins/processing/algs/taudem/dropanalysis.py deleted file mode 100644 index e8f6f89fb65a..000000000000 --- a/python/plugins/processing/algs/taudem/dropanalysis.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - dropanalysis.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterVector -from processing.core.parameters import ParameterNumber -from processing.core.parameters import ParameterBoolean -from processing.core.parameters import ParameterSelection -from processing.core.outputs import OutputFile -from processing.tools import dataobjects - -from .TauDEMUtils import TauDEMUtils - - -class DropAnalysis(GeoAlgorithm): - - PIT_FILLED_GRID = 'PIT_FILLED_GRID' - D8_CONTRIB_AREA_GRID = 'D8_CONTRIB_AREA_GRID' - D8_FLOW_DIR_GRID = 'D8_FLOW_DIR_GRID' - ACCUM_STREAM_SOURCE_GRID = 'ACCUM_STREAM_SOURCE_GRID' - OUTLETS_SHAPE = 'OUTLETS_SHAPE' - MIN_THRESHOLD = 'MIN_THRESHOLD' - MAX_THRESHOLD = 'MAX_THRESHOLD' - THRESHOLD_NUM = 'THRESHOLD_NUM' - STEP_TYPE = 'STEP_TYPE' - - DROP_ANALYSIS_FILE = 'DROP_ANALYSIS_FILE' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('Stream Drop Analysis') - self.cmdName = 'dropanalysis' - self.group, self.i18n_group = self.trAlgorithm('Stream Network Analysis tools') - - self.addParameter(ParameterRaster(self.D8_CONTRIB_AREA_GRID, - self.tr('D8 Contributing Area Grid'), False)) - self.addParameter(ParameterRaster(self.D8_FLOW_DIR_GRID, - self.tr('D8 Flow Direction Grid'), False)) - self.addParameter(ParameterRaster(self.PIT_FILLED_GRID, - self.tr('Pit Filled Elevation Grid'), False)) - self.addParameter(ParameterRaster(self.ACCUM_STREAM_SOURCE_GRID, - self.tr('Accumulated Stream Source Grid'), False)) - self.addParameter(ParameterVector(self.OUTLETS_SHAPE, - self.tr('Outlets Shapefile'), - [dataobjects.TYPE_VECTOR_POINT], False)) - self.addParameter(ParameterNumber(self.MIN_THRESHOLD, - self.tr('Minimum Threshold'), 0, None, 5)) - self.addParameter(ParameterNumber(self.MAX_THRESHOLD, - self.tr('Maximum Threshold'), 0, None, 500)) - self.addParameter(ParameterNumber(self.THRESHOLD_NUM, - self.tr('Number of Threshold Values'), 0, None, 10)) - self.addParameter(ParameterBoolean(self.STEP_TYPE, - self.tr('Use logarithmic spacing for threshold values'), True)) - self.addOutput(OutputFile(self.DROP_ANALYSIS_FILE, - self.tr('D-Infinity Drop to Stream Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-ad8') - commands.append(self.getParameterValue(self.D8_CONTRIB_AREA_GRID)) - commands.append('-p') - commands.append(self.getParameterValue(self.D8_FLOW_DIR_GRID)) - commands.append('-fel') - commands.append(self.getParameterValue(self.PIT_FILLED_GRID)) - commands.append('-ssa') - commands.append(self.getParameterValue(self.ACCUM_STREAM_SOURCE_GRID)) - commands.append('-o') - commands.append(self.getParameterValue(self.OUTLETS_SHAPE)) - commands.append('-par') - commands.append(str(self.getParameterValue(self.MIN_THRESHOLD))) - commands.append(str(self.getParameterValue(self.MAX_THRESHOLD))) - commands.append(str(self.getParameterValue(self.THRESHOLD_NUM))) - commands.append(str(self.getParameterValue(self.STEP_TYPE))) - commands.append('-drp') - commands.append(self.getOutputValue(self.DROP_ANALYSIS_FILE)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/gridnet.py b/python/plugins/processing/algs/taudem/gridnet.py deleted file mode 100644 index 5dace39c35ff..000000000000 --- a/python/plugins/processing/algs/taudem/gridnet.py +++ /dev/null @@ -1,121 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - gridnet.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterVector -from processing.core.parameters import ParameterNumber -from processing.core.outputs import OutputRaster - -from processing.tools import dataobjects - -from .TauDEMUtils import TauDEMUtils - - -class GridNet(GeoAlgorithm): - - D8_FLOW_DIR_GRID = 'D8_FLOW_DIR_GRID' - OUTLETS_SHAPE = 'OUTLETS_SHAPE' - MASK_GRID = 'MASK_GRID' - THRESHOLD = 'THRESHOLD' - - LONGEST_LEN_GRID = 'LONGEST_LEN_GRID' - TOTAL_LEN_GRID = 'TOTAL_LEN_GRID' - STRAHLER_GRID = 'STRAHLER_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('Grid Network') - self.cmdName = 'gridnet' - self.group, self.i18n_group = self.trAlgorithm('Basic Grid Analysis tools') - - self.addParameter(ParameterRaster(self.D8_FLOW_DIR_GRID, - self.tr('D8 Flow Direction Grid'), False)) - self.addParameter(ParameterVector(self.OUTLETS_SHAPE, - self.tr('Outlets Shapefile'), - [dataobjects.TYPE_VECTOR_POINT], True)) - self.addParameter(ParameterRaster(self.MASK_GRID, - self.tr('Mask Grid'), True)) - self.addParameter(ParameterNumber(self.THRESHOLD, - self.tr('Mask Threshold'), 0, None, 100)) - - self.addOutput(OutputRaster(self.LONGEST_LEN_GRID, - self.tr('Longest Upslope Length Grid'))) - self.addOutput(OutputRaster(self.TOTAL_LEN_GRID, - self.tr('Total Upslope Length Grid'))) - self.addOutput(OutputRaster(self.STRAHLER_GRID, - self.tr('Strahler Network Order Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-p') - commands.append(self.getParameterValue(self.D8_FLOW_DIR_GRID)) - param = self.getParameterValue(self.OUTLETS_SHAPE) - if param is not None: - commands.append('-o') - commands.append(param) - param = self.getParameterValue(self.MASK_GRID) - if param is not None: - commands.append('-mask') - commands.append(param) - commands.append('-thresh') - commands.append(self.getParameterValue(self.THRESHOLD)) - - commands.append('-plen') - commands.append(self.getOutputValue(self.LONGEST_LEN_GRID)) - commands.append('-tlen') - commands.append(self.getOutputValue(self.TOTAL_LEN_GRID)) - commands.append('-gord') - commands.append(self.getOutputValue(self.STRAHLER_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/lengtharea.py b/python/plugins/processing/algs/taudem/lengtharea.py deleted file mode 100644 index 52e12844ba1f..000000000000 --- a/python/plugins/processing/algs/taudem/lengtharea.py +++ /dev/null @@ -1,101 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - lengtharea.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.PyQt.QtGui import QIcon - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterNumber -from processing.core.outputs import OutputRaster - -from .TauDEMUtils import TauDEMUtils - - -class LengthArea(GeoAlgorithm): - - LENGTH_GRID = 'LENGTH_GRID' - CONTRIB_AREA_GRID = 'CONTRIB_AREA_GRID' - THRESHOLD = 'THRESHOLD' - EXPONENT = 'EXPONENT' - - STREAM_SOURCE_GRID = 'STREAM_SOURCE_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('Length Area Stream Source') - self.cmdName = 'lengtharea' - self.group, self.i18n_group = self.trAlgorithm('Stream Network Analysis tools') - - self.addParameter(ParameterRaster(self.LENGTH_GRID, - self.tr('Length Grid'), False)) - self.addParameter(ParameterRaster(self.CONTRIB_AREA_GRID, - self.tr('Contributing Area Grid'), False)) - self.addParameter(ParameterNumber(self.THRESHOLD, - self.tr('Threshold'), 0, None, 0.03)) - self.addParameter(ParameterNumber(self.EXPONENT, - self.tr('Exponent'), 0, None, 1.3)) - - self.addOutput(OutputRaster(self.STREAM_SOURCE_GRID, - self.tr('Stream Source Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-plen') - commands.append(self.getParameterValue(self.LENGTH_GRID)) - commands.append('-ad8') - commands.append(self.getParameterValue(self.CONTRIB_AREA_GRID)) - commands.append('-par') - commands.append(str(self.getParameterValue(self.THRESHOLD))) - commands.append(str(self.getParameterValue(self.EXPONENT))) - commands.append('-ss') - commands.append(self.getOutputValue(self.STREAM_SOURCE_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/peukerdouglas.py b/python/plugins/processing/algs/taudem/peukerdouglas.py deleted file mode 100644 index 1db86f4890b7..000000000000 --- a/python/plugins/processing/algs/taudem/peukerdouglas.py +++ /dev/null @@ -1,97 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - peukerdouglas.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterNumber -from processing.core.outputs import OutputRaster - -from .TauDEMUtils import TauDEMUtils - - -class PeukerDouglas(GeoAlgorithm): - - ELEVATION_GRID = 'ELEVATION_GRID' - CENTER_WEIGHT = 'CENTER_WEIGHT' - SIDE_WEIGHT = 'SIDE_WEIGHT' - DIAGONAL_WEIGHT = 'DIAGONAL_WEIGHT' - - STREAM_SOURCE_GRID = 'STREAM_SOURCE_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('Peuker Douglas') - self.cmdName = 'peukerdouglas' - self.group, self.i18n_group = self.trAlgorithm('Stream Network Analysis tools') - - self.addParameter(ParameterRaster(self.ELEVATION_GRID, - self.tr('Elevation Grid'), False)) - self.addParameter(ParameterNumber(self.CENTER_WEIGHT, - self.tr('Center Smoothing Weight'), 0, None, 0.4)) - self.addParameter(ParameterNumber(self.SIDE_WEIGHT, - self.tr('Side Smoothing Weight'), 0, None, 0.1)) - self.addParameter(ParameterNumber(self.DIAGONAL_WEIGHT, - self.tr('Diagonal Smoothing Weight'), 0, None, 0.05)) - - self.addOutput(OutputRaster(self.STREAM_SOURCE_GRID, - self.tr('Stream Source Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-fel') - commands.append(self.getParameterValue(self.ELEVATION_GRID)) - commands.append('-par') - commands.append(str(self.getParameterValue(self.CENTER_WEIGHT))) - commands.append(str(self.getParameterValue(self.SIDE_WEIGHT))) - commands.append(str(self.getParameterValue(self.DIAGONAL_WEIGHT))) - commands.append('-ss') - commands.append(self.getOutputValue(self.STREAM_SOURCE_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/algs/taudem/slopearea.py b/python/plugins/processing/algs/taudem/slopearea.py deleted file mode 100644 index 9361ebdda440..000000000000 --- a/python/plugins/processing/algs/taudem/slopearea.py +++ /dev/null @@ -1,99 +0,0 @@ -# -*- coding: utf-8 -*- - -""" -*************************************************************************** - slopearea.py - --------------------- - Date : October 2012 - Copyright : (C) 2012 by Alexander Bruy - Email : alexander dot bruy at gmail dot com -*************************************************************************** -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -*************************************************************************** -""" -from future import standard_library -standard_library.install_aliases() -from builtins import str - -__author__ = 'Alexander Bruy' -__date__ = 'October 2012' -__copyright__ = '(C) 2012, Alexander Bruy' - -# This will get replaced with a git SHA1 when you do a git archive - -__revision__ = '$Format:%H$' - -import os - -from qgis.core import QgsApplication - -from processing.core.GeoAlgorithm import GeoAlgorithm -from processing.core.ProcessingConfig import ProcessingConfig -from processing.core.GeoAlgorithmExecutionException import \ - GeoAlgorithmExecutionException - -from processing.core.parameters import ParameterRaster -from processing.core.parameters import ParameterNumber -from processing.core.outputs import OutputRaster - -from .TauDEMUtils import TauDEMUtils - - -class SlopeArea(GeoAlgorithm): - - SLOPE_GRID = 'SLOPE_GRID' - AREA_GRID = 'AREA_GRID' - SLOPE_EXPONENT = 'SLOPE_EXPONENT' - AREA_EXPONENT = 'AREA_EXPONENT' - - SLOPE_AREA_GRID = 'SLOPE_AREA_GRID' - - def getIcon(self): - return QgsApplication.getThemeIcon("/providerTaudem.svg") - - def defineCharacteristics(self): - self.name, self.i18n_name = self.trAlgorithm('Slope Area Combination') - self.cmdName = 'slopearea' - self.group, self.i18n_group = self.trAlgorithm('Stream Network Analysis tools') - - self.addParameter(ParameterRaster(self.SLOPE_GRID, - self.tr('Slope Grid'), False)) - self.addParameter(ParameterRaster(self.AREA_GRID, - self.tr('Contributing Area Grid'), False)) - self.addParameter(ParameterNumber(self.SLOPE_EXPONENT, - self.tr('Slope Exponent'), 0, None, 2)) - self.addParameter(ParameterNumber(self.AREA_EXPONENT, - self.tr('Area Exponent'), 0, None, 1)) - - self.addOutput(OutputRaster(self.SLOPE_AREA_GRID, - self.tr('Slope Area Grid'))) - - def processAlgorithm(self, feedback): - commands = [] - commands.append(os.path.join(TauDEMUtils.mpiexecPath(), 'mpiexec')) - - processNum = ProcessingConfig.getSetting(TauDEMUtils.MPI_PROCESSES) - if processNum <= 0: - raise GeoAlgorithmExecutionException( - self.tr('Wrong number of MPI processes used. Please set ' - 'correct number before running TauDEM algorithms.')) - - commands.append('-n') - commands.append(str(processNum)) - commands.append(os.path.join(TauDEMUtils.taudemPath(), self.cmdName)) - commands.append('-slp') - commands.append(self.getParameterValue(self.SLOPE_GRID)) - commands.append('-sca') - commands.append(self.getParameterValue(self.AREA_GRID)) - commands.append('-par') - commands.append(str(self.getParameterValue(self.SLOPE_EXPONENT))) - commands.append(str(self.getParameterValue(self.AREA_EXPONENT))) - commands.append('-sa') - commands.append(self.getOutputValue(self.SLOPE_AREA_GRID)) - - TauDEMUtils.executeTauDEM(commands, feedback) diff --git a/python/plugins/processing/core/Processing.py b/python/plugins/processing/core/Processing.py index 15d07e8b608a..830bc49304ae 100644 --- a/python/plugins/processing/core/Processing.py +++ b/python/plugins/processing/core/Processing.py @@ -63,7 +63,6 @@ from processing.algs.r.RAlgorithmProvider import RAlgorithmProvider from processing.algs.saga.SagaAlgorithmProvider import SagaAlgorithmProvider from processing.script.ScriptAlgorithmProvider import ScriptAlgorithmProvider -from processing.algs.taudem.TauDEMAlgorithmProvider import TauDEMAlgorithmProvider from processing.preconfigured.PreconfiguredAlgorithmProvider import PreconfiguredAlgorithmProvider diff --git a/python/plugins/processing/tests/AlgorithmsTestBase.py b/python/plugins/processing/tests/AlgorithmsTestBase.py index d573cdd71ef0..df796e5f43d9 100644 --- a/python/plugins/processing/tests/AlgorithmsTestBase.py +++ b/python/plugins/processing/tests/AlgorithmsTestBase.py @@ -54,7 +54,6 @@ from processing.algs.r.RAlgorithmProvider import RAlgorithmProvider from processing.algs.saga.SagaAlgorithmProvider import SagaAlgorithmProvider from processing.script.ScriptAlgorithmProvider import ScriptAlgorithmProvider -from processing.algs.taudem.TauDEMAlgorithmProvider import TauDEMAlgorithmProvider from processing.preconfigured.PreconfiguredAlgorithmProvider import PreconfiguredAlgorithmProvider From 6214d4d4462c4e608a93b713f3fe9d81e12e907b Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Wed, 11 Jan 2017 19:23:08 +0200 Subject: [PATCH 008/332] [processing] fix wrong parameter definition (fix #16063) --- python/plugins/processing/algs/gdal/gdal2tiles.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/plugins/processing/algs/gdal/gdal2tiles.py b/python/plugins/processing/algs/gdal/gdal2tiles.py index edd4c658c8ed..b997fd1bcc10 100644 --- a/python/plugins/processing/algs/gdal/gdal2tiles.py +++ b/python/plugins/processing/algs/gdal/gdal2tiles.py @@ -74,10 +74,10 @@ def defineCharacteristics(self): params = [] params.append(ParameterSelection(self.PROFILE, self.tr('Tile cutting profile'), - self.PROFILES, 0, False, True)) + self.PROFILES, 0, False, optional=True)) params.append(ParameterSelection(self.RESAMPLING, self.tr('Resampling method'), - self.RESAMPLINGS, 0, False, True)) + self.RESAMPLINGS, 0, False, optional=True)) params.append(ParameterCrs(self.S_SRS, self.tr('The spatial reference system used for the source input data'), None, True)) @@ -101,7 +101,7 @@ def defineCharacteristics(self): None, False, True)) params.append(ParameterSelection(self.WEBVIEWER, self.tr('Web viewer to generate'), - self.WEBVIEWERS, 0, False, True)) + self.WEBVIEWERS, 0, False, optional=True)) params.append(ParameterString(self.TITLE, self.tr('Title of the map'), None, False, True)) From dbefbfeff0ab6795c956030e450914b299024ba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tudor=20B=C4=83r=C4=83scu?= Date: Wed, 11 Jan 2017 11:14:48 +0200 Subject: [PATCH 009/332] show field alias when presenting constraint msg Before, when a field didn't passed the defined constraints it showed a message in the form of "field name: Constraint defined message". Now, if if a field alias is defined, the message is in the form of "field alias: Constraint defined message" See #15455 --- src/gui/qgsattributeform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/qgsattributeform.cpp b/src/gui/qgsattributeform.cpp index ec659ed0f913..46415847f2ed 100644 --- a/src/gui/qgsattributeform.cpp +++ b/src/gui/qgsattributeform.cpp @@ -818,7 +818,7 @@ bool QgsAttributeForm::currentFormValidConstraints( QStringList &invalidFields, { if ( ! eww->isValidConstraint() ) { - invalidFields.append( eww->field().name() ); + invalidFields.append( eww->field().displayName() ); descriptions.append( eww->constraintFailureReason() ); From 3705ff18cef3ee26b60b4b9a18df8bfb68720d37 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Jan 2017 11:19:48 +1000 Subject: [PATCH 010/332] Nicer creation of static QMaps c++11/Qt5 allow us to clean up the creation and initialization of static QMaps and avoid the need for initialization functions --- src/core/geometry/qgswkbtypes.cpp | 159 +++++++++++------------ src/core/geometry/qgswkbtypes.h | 3 +- src/core/qgsexpression.h | 3 - src/core/qgsogcutils.cpp | 74 +++++------ src/core/qgssqliteexpressioncompiler.cpp | 32 ++--- 5 files changed, 120 insertions(+), 151 deletions(-) diff --git a/src/core/geometry/qgswkbtypes.cpp b/src/core/geometry/qgswkbtypes.cpp index eec5dc43f0bc..b8bdb307d616 100644 --- a/src/core/geometry/qgswkbtypes.cpp +++ b/src/core/geometry/qgswkbtypes.cpp @@ -23,19 +23,85 @@ * See details in QEP #17 ****************************************************************************/ -QMap* QgsWkbTypes::entries() +const QMap QgsWkbTypes::sEntries { - static QMap entries = registerTypes(); - return &entries; -} + //register the known wkb types + { Unknown, wkbEntry( QStringLiteral( "Unknown" ), false, Unknown, Unknown, Unknown, UnknownGeometry, false, false ) }, + { NoGeometry, wkbEntry( QStringLiteral( "NoGeometry" ), false, NoGeometry, NoGeometry, NoGeometry, NullGeometry, false, false ) }, + //point + { Point, wkbEntry( QStringLiteral( "Point" ), false, MultiPoint, Point, Point, PointGeometry, false, false ) }, + { PointZ, wkbEntry( QStringLiteral( "PointZ" ), false, MultiPointZ, PointZ, Point, PointGeometry, true, false ) }, + { PointM, wkbEntry( QStringLiteral( "PointM" ), false, MultiPointM, PointM, Point, PointGeometry, false, true ) }, + { PointZM, wkbEntry( QStringLiteral( "PointZM" ), false, MultiPointZM, PointZM, Point, PointGeometry, true, true ) }, + { Point25D, wkbEntry( QStringLiteral( "Point25D" ), false, MultiPoint25D, Point25D, Point, PointGeometry, true, false ) }, + //linestring + { LineString, wkbEntry( QStringLiteral( "LineString" ), false, MultiLineString, LineString, LineString, LineGeometry, false, false ) }, + { LineStringZ, wkbEntry( QStringLiteral( "LineStringZ" ), false, MultiLineStringZ, LineStringZ, LineString, LineGeometry, true, false ) }, + { LineStringM, wkbEntry( QStringLiteral( "LineStringM" ), false, MultiLineStringM, LineStringM, LineString, LineGeometry, false, true ) }, + { LineStringZM, wkbEntry( QStringLiteral( "LineStringZM" ), false, MultiLineStringZM, LineStringZM, LineString, LineGeometry, true, true ) }, + { LineString25D, wkbEntry( QStringLiteral( "LineString25D" ), false, MultiLineString25D, LineString25D, LineString, LineGeometry, true, false ) }, + //circularstring + { CircularString, wkbEntry( QStringLiteral( "CircularString" ), false, MultiCurve, CircularString, CircularString, LineGeometry, false, false ) }, + { CircularStringZ, wkbEntry( QStringLiteral( "CircularStringZ" ), false, MultiCurveZ, CircularStringZ, CircularString, LineGeometry, true, false ) }, + { CircularStringM, wkbEntry( QStringLiteral( "CircularStringM" ), false, MultiCurveM, CircularStringM, CircularString, LineGeometry, false, true ) }, + { CircularStringZM, wkbEntry( QStringLiteral( "CircularStringZM" ), false, MultiCurveZM, CircularStringZM, CircularString, LineGeometry, true, true ) }, + //compoundcurve + { CompoundCurve, wkbEntry( QStringLiteral( "CompoundCurve" ), false, MultiCurve, CompoundCurve, CompoundCurve, LineGeometry, false, false ) }, + { CompoundCurveZ, wkbEntry( QStringLiteral( "CompoundCurveZ" ), false, MultiCurveZ, CompoundCurveZ, CompoundCurve, LineGeometry, true, false ) }, + { CompoundCurveM, wkbEntry( QStringLiteral( "CompoundCurveM" ), false, MultiCurveM, CompoundCurveM, CompoundCurve, LineGeometry, false, true ) }, + { CompoundCurveZM, wkbEntry( QStringLiteral( "CompoundCurveZM" ), false, MultiCurveZM, CompoundCurveZM, CompoundCurve, LineGeometry, true, true ) }, + //polygon + { Polygon, wkbEntry( QStringLiteral( "Polygon" ), false, MultiPolygon, Polygon, Polygon, PolygonGeometry, false, false ) }, + { PolygonZ, wkbEntry( QStringLiteral( "PolygonZ" ), false, MultiPolygonZ, PolygonZ, Polygon, PolygonGeometry, true, false ) }, + { PolygonM, wkbEntry( QStringLiteral( "PolygonM" ), false, MultiPolygonM, PolygonM, Polygon, PolygonGeometry, false, true ) }, + { PolygonZM, wkbEntry( QStringLiteral( "PolygonZM" ), false, MultiPolygonZM, PolygonZM, Polygon, PolygonGeometry, true, true ) }, + { Polygon25D, wkbEntry( QStringLiteral( "Polygon25D" ), false, MultiPolygon25D, Polygon25D, Polygon, PolygonGeometry, true, false ) }, + //curvepolygon + { CurvePolygon, wkbEntry( QStringLiteral( "CurvePolygon" ), false, MultiSurface, CurvePolygon, CurvePolygon, PolygonGeometry, false, false ) }, + { CurvePolygonZ, wkbEntry( QStringLiteral( "CurvePolygonZ" ), false, MultiSurfaceZ, CurvePolygonZ, CurvePolygon, PolygonGeometry, true, false ) }, + { CurvePolygonM, wkbEntry( QStringLiteral( "CurvePolygonM" ), false, MultiSurfaceM, CurvePolygonM, CurvePolygon, PolygonGeometry, false, true ) }, + { CurvePolygonZM, wkbEntry( QStringLiteral( "CurvePolygonZM" ), false, MultiSurfaceZM, CurvePolygonZM, CurvePolygon, PolygonGeometry, true, true ) }, + //multipoint + { MultiPoint, wkbEntry( QStringLiteral( "MultiPoint" ), true, MultiPoint, Point, MultiPoint, PointGeometry, false, false ) }, + { MultiPointZ, wkbEntry( QStringLiteral( "MultiPointZ" ), true, MultiPointZ, PointZ, MultiPoint, PointGeometry, true, false ) }, + { MultiPointM, wkbEntry( QStringLiteral( "MultiPointM" ), true, MultiPointM, PointM, MultiPoint, PointGeometry, false, true ) }, + { MultiPointZM, wkbEntry( QStringLiteral( "MultiPointZM" ), true, MultiPointZM, PointZM, MultiPoint, PointGeometry, true, true ) }, + { MultiPoint25D, wkbEntry( QStringLiteral( "MultiPoint25D" ), true, MultiPoint25D, Point25D, MultiPoint, PointGeometry, true, false ) }, + //multiline + { MultiLineString, wkbEntry( QStringLiteral( "MultiLineString" ), true, MultiLineString, LineString, MultiLineString, LineGeometry, false, false ) }, + { MultiLineStringZ, wkbEntry( QStringLiteral( "MultiLineStringZ" ), true, MultiLineStringZ, LineStringZ, MultiLineString, LineGeometry, true, false ) }, + { MultiLineStringM, wkbEntry( QStringLiteral( "MultiLineStringM" ), true, MultiLineStringM, LineStringM, MultiLineString, LineGeometry, false, true ) }, + { MultiLineStringZM, wkbEntry( QStringLiteral( "MultiLineStringZM" ), true, MultiLineStringZM, LineStringZM, MultiLineString, LineGeometry, true, true ) }, + { MultiLineString25D, wkbEntry( QStringLiteral( "MultiLineString25D" ), true, MultiLineString25D, LineString25D, MultiLineString, LineGeometry, true, false ) }, + //multicurve + { MultiCurve, wkbEntry( QStringLiteral( "MultiCurve" ), true, MultiCurve, CompoundCurve, MultiCurve, LineGeometry, false, false ) }, + { MultiCurveZ, wkbEntry( QStringLiteral( "MultiCurveZ" ), true, MultiCurveZ, CompoundCurveZ, MultiCurve, LineGeometry, true, false ) }, + { MultiCurveM, wkbEntry( QStringLiteral( "MultiCurveM" ), true, MultiCurveM, CompoundCurveM, MultiCurve, LineGeometry, false, true ) }, + { MultiCurveZM, wkbEntry( QStringLiteral( "MultiCurveZM" ), true, MultiCurveZM, CompoundCurveZM, MultiCurve, LineGeometry, true, true ) }, + //multipolygon + { MultiPolygon, wkbEntry( QStringLiteral( "MultiPolygon" ), true, MultiPolygon, Polygon, MultiPolygon, PolygonGeometry, false, false ) }, + { MultiPolygonZ, wkbEntry( QStringLiteral( "MultiPolygonZ" ), true, MultiPolygonZ, PolygonZ, MultiPolygon, PolygonGeometry, true, false ) }, + { MultiPolygonM, wkbEntry( QStringLiteral( "MultiPolygonM" ), true, MultiPolygonM, PolygonM, MultiPolygon, PolygonGeometry, false, true ) }, + { MultiPolygonZM, wkbEntry( QStringLiteral( "MultiPolygonZM" ), true, MultiPolygonZM, PolygonZM, MultiPolygon, PolygonGeometry, true, true ) }, + { MultiPolygon25D, wkbEntry( QStringLiteral( "MultiPolygon25D" ), true, MultiPolygon25D, Polygon25D, MultiPolygon, PolygonGeometry, true, false ) }, + //multisurface + { MultiSurface, wkbEntry( QStringLiteral( "MultiSurface" ), true, MultiSurface, CurvePolygon, MultiSurface, PolygonGeometry, false, false ) }, + { MultiSurfaceZ, wkbEntry( QStringLiteral( "MultiSurfaceZ" ), true, MultiSurfaceZ, CurvePolygonZ, MultiSurface, PolygonGeometry, true, false ) }, + { MultiSurfaceM, wkbEntry( QStringLiteral( "MultiSurfaceM" ), true, MultiSurfaceM, CurvePolygonM, MultiSurface, PolygonGeometry, false, true ) }, + { MultiSurfaceZM, wkbEntry( QStringLiteral( "MultiSurfaceZM" ), true, MultiSurfaceZM, CurvePolygonZM, MultiSurface, PolygonGeometry, true, true ) }, + //geometrycollection + { GeometryCollection, wkbEntry( QStringLiteral( "GeometryCollection" ), true, GeometryCollection, Unknown, GeometryCollection, UnknownGeometry, false, false ) }, + { GeometryCollectionZ, wkbEntry( QStringLiteral( "GeometryCollectionZ" ), true, GeometryCollectionZ, Unknown, GeometryCollection, UnknownGeometry, true, false ) }, + { GeometryCollectionM, wkbEntry( QStringLiteral( "GeometryCollectionM" ), true, GeometryCollectionM, Unknown, GeometryCollection, UnknownGeometry, false, true ) }, + { GeometryCollectionZM, wkbEntry( QStringLiteral( "GeometryCollectionZM" ), true, GeometryCollectionZM, Unknown, GeometryCollection, UnknownGeometry, true, true ) }, +}; QgsWkbTypes::Type QgsWkbTypes::parseType( const QString &wktStr ) { QString typestr = wktStr.left( wktStr.indexOf( '(' ) ).simplified().remove( ' ' ); - QMap* knownTypes = entries(); - QMap::const_iterator it = knownTypes->constBegin(); - for ( ; it != knownTypes->constEnd(); ++it ) + QMap::const_iterator it = sEntries.constBegin(); + for ( ; it != sEntries.constEnd(); ++it ) { if ( it.value().mName.compare( typestr, Qt::CaseInsensitive ) == 0 ) { @@ -47,8 +113,8 @@ QgsWkbTypes::Type QgsWkbTypes::parseType( const QString &wktStr ) QString QgsWkbTypes::displayString( Type type ) { - QMap< Type, wkbEntry >::const_iterator it = entries()->constFind( type ); - if ( it == entries()->constEnd() ) + QMap< Type, wkbEntry >::const_iterator it = sEntries.constFind( type ); + if ( it == sEntries.constEnd() ) { return QString::null; } @@ -82,78 +148,3 @@ QString QgsWkbTypes::geometryDisplayString( QgsWkbTypes::GeometryType type ) * full unit tests. * See details in QEP #17 ****************************************************************************/ - -QMap QgsWkbTypes::registerTypes() -{ - QMap entries; - //register the known wkb types - entries.insert( Unknown, wkbEntry( QStringLiteral( "Unknown" ), false, Unknown, Unknown, Unknown, UnknownGeometry, false, false ) ); - entries.insert( NoGeometry, wkbEntry( QStringLiteral( "NoGeometry" ), false, NoGeometry, NoGeometry, NoGeometry, NullGeometry, false, false ) ); - //point - entries.insert( Point, wkbEntry( QStringLiteral( "Point" ), false, MultiPoint, Point, Point, PointGeometry, false, false ) ); - entries.insert( PointZ, wkbEntry( QStringLiteral( "PointZ" ), false, MultiPointZ, PointZ, Point, PointGeometry, true, false ) ); - entries.insert( PointM, wkbEntry( QStringLiteral( "PointM" ), false, MultiPointM, PointM, Point, PointGeometry, false, true ) ); - entries.insert( PointZM, wkbEntry( QStringLiteral( "PointZM" ), false, MultiPointZM, PointZM, Point, PointGeometry, true, true ) ); - entries.insert( Point25D, wkbEntry( QStringLiteral( "Point25D" ), false, MultiPoint25D, Point25D, Point, PointGeometry, true, false ) ); - //linestring - entries.insert( LineString, wkbEntry( QStringLiteral( "LineString" ), false, MultiLineString, LineString, LineString, LineGeometry, false, false ) ); - entries.insert( LineStringZ, wkbEntry( QStringLiteral( "LineStringZ" ), false, MultiLineStringZ, LineStringZ, LineString, LineGeometry, true, false ) ); - entries.insert( LineStringM, wkbEntry( QStringLiteral( "LineStringM" ), false, MultiLineStringM, LineStringM, LineString, LineGeometry, false, true ) ); - entries.insert( LineStringZM, wkbEntry( QStringLiteral( "LineStringZM" ), false, MultiLineStringZM, LineStringZM, LineString, LineGeometry, true, true ) ); - entries.insert( LineString25D, wkbEntry( QStringLiteral( "LineString25D" ), false, MultiLineString25D, LineString25D, LineString, LineGeometry, true, false ) ); - //circularstring - entries.insert( CircularString, wkbEntry( QStringLiteral( "CircularString" ), false, MultiCurve, CircularString, CircularString, LineGeometry, false, false ) ); - entries.insert( CircularStringZ, wkbEntry( QStringLiteral( "CircularStringZ" ), false, MultiCurveZ, CircularStringZ, CircularString, LineGeometry, true, false ) ); - entries.insert( CircularStringM, wkbEntry( QStringLiteral( "CircularStringM" ), false, MultiCurveM, CircularStringM, CircularString, LineGeometry, false, true ) ); - entries.insert( CircularStringZM, wkbEntry( QStringLiteral( "CircularStringZM" ), false, MultiCurveZM, CircularStringZM, CircularString, LineGeometry, true, true ) ); - //compoundcurve - entries.insert( CompoundCurve, wkbEntry( QStringLiteral( "CompoundCurve" ), false, MultiCurve, CompoundCurve, CompoundCurve, LineGeometry, false, false ) ); - entries.insert( CompoundCurveZ, wkbEntry( QStringLiteral( "CompoundCurveZ" ), false, MultiCurveZ, CompoundCurveZ, CompoundCurve, LineGeometry, true, false ) ); - entries.insert( CompoundCurveM, wkbEntry( QStringLiteral( "CompoundCurveM" ), false, MultiCurveM, CompoundCurveM, CompoundCurve, LineGeometry, false, true ) ); - entries.insert( CompoundCurveZM, wkbEntry( QStringLiteral( "CompoundCurveZM" ), false, MultiCurveZM, CompoundCurveZM, CompoundCurve, LineGeometry, true, true ) ); - //polygon - entries.insert( Polygon, wkbEntry( QStringLiteral( "Polygon" ), false, MultiPolygon, Polygon, Polygon, PolygonGeometry, false, false ) ); - entries.insert( PolygonZ, wkbEntry( QStringLiteral( "PolygonZ" ), false, MultiPolygonZ, PolygonZ, Polygon, PolygonGeometry, true, false ) ); - entries.insert( PolygonM, wkbEntry( QStringLiteral( "PolygonM" ), false, MultiPolygonM, PolygonM, Polygon, PolygonGeometry, false, true ) ); - entries.insert( PolygonZM, wkbEntry( QStringLiteral( "PolygonZM" ), false, MultiPolygonZM, PolygonZM, Polygon, PolygonGeometry, true, true ) ); - entries.insert( Polygon25D, wkbEntry( QStringLiteral( "Polygon25D" ), false, MultiPolygon25D, Polygon25D, Polygon, PolygonGeometry, true, false ) ); - //curvepolygon - entries.insert( CurvePolygon, wkbEntry( QStringLiteral( "CurvePolygon" ), false, MultiSurface, CurvePolygon, CurvePolygon, PolygonGeometry, false, false ) ); - entries.insert( CurvePolygonZ, wkbEntry( QStringLiteral( "CurvePolygonZ" ), false, MultiSurfaceZ, CurvePolygonZ, CurvePolygon, PolygonGeometry, true, false ) ); - entries.insert( CurvePolygonM, wkbEntry( QStringLiteral( "CurvePolygonM" ), false, MultiSurfaceM, CurvePolygonM, CurvePolygon, PolygonGeometry, false, true ) ); - entries.insert( CurvePolygonZM, wkbEntry( QStringLiteral( "CurvePolygonZM" ), false, MultiSurfaceZM, CurvePolygonZM, CurvePolygon, PolygonGeometry, true, true ) ); - //multipoint - entries.insert( MultiPoint, wkbEntry( QStringLiteral( "MultiPoint" ), true, MultiPoint, Point, MultiPoint, PointGeometry, false, false ) ); - entries.insert( MultiPointZ, wkbEntry( QStringLiteral( "MultiPointZ" ), true, MultiPointZ, PointZ, MultiPoint, PointGeometry, true, false ) ); - entries.insert( MultiPointM, wkbEntry( QStringLiteral( "MultiPointM" ), true, MultiPointM, PointM, MultiPoint, PointGeometry, false, true ) ); - entries.insert( MultiPointZM, wkbEntry( QStringLiteral( "MultiPointZM" ), true, MultiPointZM, PointZM, MultiPoint, PointGeometry, true, true ) ); - entries.insert( MultiPoint25D, wkbEntry( QStringLiteral( "MultiPoint25D" ), true, MultiPoint25D, Point25D, MultiPoint, PointGeometry, true, false ) ); - //multiline - entries.insert( MultiLineString, wkbEntry( QStringLiteral( "MultiLineString" ), true, MultiLineString, LineString, MultiLineString, LineGeometry, false, false ) ); - entries.insert( MultiLineStringZ, wkbEntry( QStringLiteral( "MultiLineStringZ" ), true, MultiLineStringZ, LineStringZ, MultiLineString, LineGeometry, true, false ) ); - entries.insert( MultiLineStringM, wkbEntry( QStringLiteral( "MultiLineStringM" ), true, MultiLineStringM, LineStringM, MultiLineString, LineGeometry, false, true ) ); - entries.insert( MultiLineStringZM, wkbEntry( QStringLiteral( "MultiLineStringZM" ), true, MultiLineStringZM, LineStringZM, MultiLineString, LineGeometry, true, true ) ); - entries.insert( MultiLineString25D, wkbEntry( QStringLiteral( "MultiLineString25D" ), true, MultiLineString25D, LineString25D, MultiLineString, LineGeometry, true, false ) ); - //multicurve - entries.insert( MultiCurve, wkbEntry( QStringLiteral( "MultiCurve" ), true, MultiCurve, CompoundCurve, MultiCurve, LineGeometry, false, false ) ); - entries.insert( MultiCurveZ, wkbEntry( QStringLiteral( "MultiCurveZ" ), true, MultiCurveZ, CompoundCurveZ, MultiCurve, LineGeometry, true, false ) ); - entries.insert( MultiCurveM, wkbEntry( QStringLiteral( "MultiCurveM" ), true, MultiCurveM, CompoundCurveM, MultiCurve, LineGeometry, false, true ) ); - entries.insert( MultiCurveZM, wkbEntry( QStringLiteral( "MultiCurveZM" ), true, MultiCurveZM, CompoundCurveZM, MultiCurve, LineGeometry, true, true ) ); - //multipolygon - entries.insert( MultiPolygon, wkbEntry( QStringLiteral( "MultiPolygon" ), true, MultiPolygon, Polygon, MultiPolygon, PolygonGeometry, false, false ) ); - entries.insert( MultiPolygonZ, wkbEntry( QStringLiteral( "MultiPolygonZ" ), true, MultiPolygonZ, PolygonZ, MultiPolygon, PolygonGeometry, true, false ) ); - entries.insert( MultiPolygonM, wkbEntry( QStringLiteral( "MultiPolygonM" ), true, MultiPolygonM, PolygonM, MultiPolygon, PolygonGeometry, false, true ) ); - entries.insert( MultiPolygonZM, wkbEntry( QStringLiteral( "MultiPolygonZM" ), true, MultiPolygonZM, PolygonZM, MultiPolygon, PolygonGeometry, true, true ) ); - entries.insert( MultiPolygon25D, wkbEntry( QStringLiteral( "MultiPolygon25D" ), true, MultiPolygon25D, Polygon25D, MultiPolygon, PolygonGeometry, true, false ) ); - //multisurface - entries.insert( MultiSurface, wkbEntry( QStringLiteral( "MultiSurface" ), true, MultiSurface, CurvePolygon, MultiSurface, PolygonGeometry, false, false ) ); - entries.insert( MultiSurfaceZ, wkbEntry( QStringLiteral( "MultiSurfaceZ" ), true, MultiSurfaceZ, CurvePolygonZ, MultiSurface, PolygonGeometry, true, false ) ); - entries.insert( MultiSurfaceM, wkbEntry( QStringLiteral( "MultiSurfaceM" ), true, MultiSurfaceM, CurvePolygonM, MultiSurface, PolygonGeometry, false, true ) ); - entries.insert( MultiSurfaceZM, wkbEntry( QStringLiteral( "MultiSurfaceZM" ), true, MultiSurfaceZM, CurvePolygonZM, MultiSurface, PolygonGeometry, true, true ) ); - //geometrycollection - entries.insert( GeometryCollection, wkbEntry( QStringLiteral( "GeometryCollection" ), true, GeometryCollection, Unknown, GeometryCollection, UnknownGeometry, false, false ) ); - entries.insert( GeometryCollectionZ, wkbEntry( QStringLiteral( "GeometryCollectionZ" ), true, GeometryCollectionZ, Unknown, GeometryCollection, UnknownGeometry, true, false ) ); - entries.insert( GeometryCollectionM, wkbEntry( QStringLiteral( "GeometryCollectionM" ), true, GeometryCollectionM, Unknown, GeometryCollection, UnknownGeometry, false, true ) ); - entries.insert( GeometryCollectionZM, wkbEntry( QStringLiteral( "GeometryCollectionZM" ), true, GeometryCollectionZM, Unknown, GeometryCollection, UnknownGeometry, true, true ) ); - return entries; -} diff --git a/src/core/geometry/qgswkbtypes.h b/src/core/geometry/qgswkbtypes.h index fb349f2a99fe..45ae71cf2a7d 100644 --- a/src/core/geometry/qgswkbtypes.h +++ b/src/core/geometry/qgswkbtypes.h @@ -926,8 +926,7 @@ class CORE_EXPORT QgsWkbTypes bool mHasM; }; - static QMap registerTypes(); - static QMap* entries(); + static const QMap sEntries; }; #endif // QGSWKBTYPES_H diff --git a/src/core/qgsexpression.h b/src/core/qgsexpression.h index a90c44d6589d..5335e433d442 100644 --- a/src/core/qgsexpression.h +++ b/src/core/qgsexpression.h @@ -1261,9 +1261,6 @@ class CORE_EXPORT QgsExpression protected: void initGeomCalculator(); - static QMap gmSpecialColumns; - static QMap gmSpecialColumnGroups; - struct HelpArg { HelpArg( const QString& arg, const QString& desc, bool descOnly = false, bool syntaxOnly = false, diff --git a/src/core/qgsogcutils.cpp b/src/core/qgsogcutils.cpp index 26b2f7688e39..22ae5c8c2a84 100644 --- a/src/core/qgsogcutils.cpp +++ b/src/core/qgsogcutils.cpp @@ -1635,35 +1635,30 @@ QgsExpression* QgsOgcUtils::expressionFromOgcFilter( const QDomElement& element } -static const QMap& binaryOperatorsTagNamesMap() -{ - static QMap binOps; - if ( binOps.isEmpty() ) - { - // logical - binOps.insert( QStringLiteral( "Or" ), QgsExpression::boOr ); - binOps.insert( QStringLiteral( "And" ), QgsExpression::boAnd ); - // comparison - binOps.insert( QStringLiteral( "PropertyIsEqualTo" ), QgsExpression::boEQ ); - binOps.insert( QStringLiteral( "PropertyIsNotEqualTo" ), QgsExpression::boNE ); - binOps.insert( QStringLiteral( "PropertyIsLessThanOrEqualTo" ), QgsExpression::boLE ); - binOps.insert( QStringLiteral( "PropertyIsGreaterThanOrEqualTo" ), QgsExpression::boGE ); - binOps.insert( QStringLiteral( "PropertyIsLessThan" ), QgsExpression::boLT ); - binOps.insert( QStringLiteral( "PropertyIsGreaterThan" ), QgsExpression::boGT ); - binOps.insert( QStringLiteral( "PropertyIsLike" ), QgsExpression::boLike ); - // arithmetics - binOps.insert( QStringLiteral( "Add" ), QgsExpression::boPlus ); - binOps.insert( QStringLiteral( "Sub" ), QgsExpression::boMinus ); - binOps.insert( QStringLiteral( "Mul" ), QgsExpression::boMul ); - binOps.insert( QStringLiteral( "Div" ), QgsExpression::boDiv ); - } - return binOps; -} +static const QMap sBinaryOperatorsTagNamesMap +{ + // logical + { QStringLiteral( "Or" ), QgsExpression::boOr }, + { QStringLiteral( "And" ), QgsExpression::boAnd }, + // comparison + { QStringLiteral( "PropertyIsEqualTo" ), QgsExpression::boEQ }, + { QStringLiteral( "PropertyIsNotEqualTo" ), QgsExpression::boNE }, + { QStringLiteral( "PropertyIsLessThanOrEqualTo" ), QgsExpression::boLE }, + { QStringLiteral( "PropertyIsGreaterThanOrEqualTo" ), QgsExpression::boGE }, + { QStringLiteral( "PropertyIsLessThan" ), QgsExpression::boLT }, + { QStringLiteral( "PropertyIsGreaterThan" ), QgsExpression::boGT }, + { QStringLiteral( "PropertyIsLike" ), QgsExpression::boLike }, + // arithmetics + { QStringLiteral( "Add" ), QgsExpression::boPlus }, + { QStringLiteral( "Sub" ), QgsExpression::boMinus }, + { QStringLiteral( "Mul" ), QgsExpression::boMul }, + { QStringLiteral( "Div" ), QgsExpression::boDiv }, +}; static int binaryOperatorFromTagName( const QString& tagName ) { - return binaryOperatorsTagNamesMap().value( tagName, -1 ); + return sBinaryOperatorsTagNamesMap.value( tagName, -1 ); } static QString binaryOperatorToTagName( QgsExpression::BinaryOperator op ) @@ -1672,7 +1667,7 @@ static QString binaryOperatorToTagName( QgsExpression::BinaryOperator op ) { return QStringLiteral( "PropertyIsLike" ); } - return binaryOperatorsTagNamesMap().key( op, QString() ); + return sBinaryOperatorsTagNamesMap.key( op, QString() ); } static bool isBinaryOperator( const QString& tagName ) @@ -2439,30 +2434,25 @@ QDomElement QgsOgcUtilsExprToFilter::expressionInOperatorToOgcFilter( const QgsE return orElem; } -static QMap binarySpatialOpsMap() +static const QMap sBinarySpatialOpsMap { - static QMap binSpatialOps; - if ( binSpatialOps.isEmpty() ) - { - binSpatialOps.insert( QStringLiteral( "disjoint" ), QStringLiteral( "Disjoint" ) ); - binSpatialOps.insert( QStringLiteral( "intersects" ), QStringLiteral( "Intersects" ) ); - binSpatialOps.insert( QStringLiteral( "touches" ), QStringLiteral( "Touches" ) ); - binSpatialOps.insert( QStringLiteral( "crosses" ), QStringLiteral( "Crosses" ) ); - binSpatialOps.insert( QStringLiteral( "contains" ), QStringLiteral( "Contains" ) ); - binSpatialOps.insert( QStringLiteral( "overlaps" ), QStringLiteral( "Overlaps" ) ); - binSpatialOps.insert( QStringLiteral( "within" ), QStringLiteral( "Within" ) ); - } - return binSpatialOps; -} + { QStringLiteral( "disjoint" ), QStringLiteral( "Disjoint" ) }, + { QStringLiteral( "intersects" ), QStringLiteral( "Intersects" )}, + { QStringLiteral( "touches" ), QStringLiteral( "Touches" ) }, + { QStringLiteral( "crosses" ), QStringLiteral( "Crosses" ) }, + { QStringLiteral( "contains" ), QStringLiteral( "Contains" ) }, + { QStringLiteral( "overlaps" ), QStringLiteral( "Overlaps" ) }, + { QStringLiteral( "within" ), QStringLiteral( "Within" ) } +}; static bool isBinarySpatialOperator( const QString& fnName ) { - return binarySpatialOpsMap().contains( fnName ); + return sBinarySpatialOpsMap.contains( fnName ); } static QString tagNameForSpatialOperator( const QString& fnName ) { - return binarySpatialOpsMap().value( fnName ); + return sBinarySpatialOpsMap.value( fnName ); } static bool isGeometryColumn( const QgsExpression::Node* node ) diff --git a/src/core/qgssqliteexpressioncompiler.cpp b/src/core/qgssqliteexpressioncompiler.cpp index 803532385cde..3d2f6f3d338d 100644 --- a/src/core/qgssqliteexpressioncompiler.cpp +++ b/src/core/qgssqliteexpressioncompiler.cpp @@ -84,28 +84,20 @@ QString QgsSQLiteExpressionCompiler::quotedValue( const QVariant& value, bool& o } } -static const QMap& functionNamesSqlFunctionsMap() -{ - static QMap fnNames; - if ( fnNames.isEmpty() ) - { - fnNames = - { - { "abs", "abs" }, - { "char", "char" }, - { "coalesce", "coalesce" }, - { "lower", "lower" }, - { "round", "round" }, - { "trim", "trim" }, - { "upper", "upper" }, - }; - } - return fnNames; -} - QString QgsSQLiteExpressionCompiler::sqlFunctionFromFunctionName( const QString& fnName ) const { - return functionNamesSqlFunctionsMap().value( fnName, QString() ); + static const QMap sFnNames + { + { "abs", "abs" }, + { "char", "char" }, + { "coalesce", "coalesce" }, + { "lower", "lower" }, + { "round", "round" }, + { "trim", "trim" }, + { "upper", "upper" }, + }; + + return sFnNames.value( fnName, QString() ); } QString QgsSQLiteExpressionCompiler::castToReal( const QString& value ) const From b7706b358fc164aa1d5d5c716ba02be799bd688a Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Jan 2017 14:00:27 +1000 Subject: [PATCH 011/332] Rename some static variables for consistency Ensure non-const statics have "s" prefix and const statics are in all caps --- .../qgsgraduatedsymbolrenderer.sip | 4 +- .../interpolation/DualEdgeTriangulation.cc | 4 +- .../interpolation/DualEdgeTriangulation.h | 2 +- src/app/qgsdecorationnortharrow.cpp | 20 ++- src/app/qgsdecorationnortharrow.h | 1 - src/core/auth/qgsauthconfig.cpp | 2 +- src/core/auth/qgsauthconfig.h | 2 +- src/core/dxf/qgsdxfexport.cpp | 24 ++-- src/core/dxf/qgsdxfexport.h | 4 +- .../layertree/qgslayertreemodellegendnode.cpp | 6 +- .../layertree/qgslayertreemodellegendnode.h | 2 +- src/core/qgsapplication.cpp | 6 +- src/core/qgsconnectionpool.h | 2 +- src/core/qgscoordinatereferencesystem.cpp | 6 +- src/core/qgsmaprendererjob.cpp | 6 +- src/core/qgsmapsettings.cpp | 4 +- src/core/qgsrenderchecker.cpp | 4 +- src/core/qgsscalecalculator.cpp | 8 +- src/core/qgsvectorlayerundocommand.cpp | 8 +- .../qgsgraduatedsymbolrenderer.cpp | 4 +- .../symbology-ng/qgsgraduatedsymbolrenderer.h | 4 +- .../qgspainteffectpropertieswidget.cpp | 6 +- .../qgsrendererrasterpropertieswidget.cpp | 6 +- .../symbology-ng/qgslayerpropertieswidget.cpp | 6 +- .../qgsrendererpropertiesdialog.cpp | 6 +- src/plugins/georeferencer/qgsimagewarper.cpp | 8 +- src/plugins/georeferencer/qgsimagewarper.h | 2 +- src/plugins/grass/qgsgrassnewmapset.cpp | 10 +- src/plugins/grass/qgsgrassnewmapset.h | 2 +- src/plugins/grass/qgsgrassselect.cpp | 6 +- src/plugins/grass/qgsgrassselect.h | 2 +- .../spatialquery/qgsspatialquerydialog.cpp | 14 +- src/providers/gdal/qgsgdalprovider.cpp | 14 +- src/providers/gpx/qgsgpxprovider.cpp | 4 +- src/providers/gpx/qgsgpxprovider.h | 2 +- src/providers/grass/qgsgrass.cpp | 38 ++--- src/providers/grass/qgsgrass.h | 10 +- src/providers/grass/qgsgrassprovider.cpp | 8 +- src/providers/grass/qgsgrassprovider.h | 2 +- .../qgspostgresexpressioncompiler.cpp | 132 ++++++++---------- src/providers/wfs/qgswfsprovider.cpp | 6 +- src/providers/wfs/qgswfsshareddata.cpp | 6 +- src/providers/wfs/qgswfsutils.cpp | 18 +-- src/providers/wfs/qgswfsutils.h | 4 +- 44 files changed, 212 insertions(+), 223 deletions(-) diff --git a/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip b/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip index 93c1c88fb364..6015562b2157 100644 --- a/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip +++ b/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip @@ -76,8 +76,8 @@ class QgsRendererRangeLabelFormat void setFromDomElement( QDomElement &element ); void saveToDomElement( QDomElement &element ); - static int MaxPrecision; - static int MinPrecision; + static const int MaxPrecision; + static const int MinPrecision; }; diff --git a/src/analysis/interpolation/DualEdgeTriangulation.cc b/src/analysis/interpolation/DualEdgeTriangulation.cc index e3274acac575..5c5a56d6fb47 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.cc +++ b/src/analysis/interpolation/DualEdgeTriangulation.cc @@ -487,7 +487,7 @@ int DualEdgeTriangulation::baseEdgeOfTriangle( Point3D* point ) while ( true ) { - if ( runs > nBaseOfRuns )//prevents endless loops + if ( runs > sNumBaseOfRuns )//prevents endless loops { // QgsDebugMsg("warning, probable endless loop detected"); return -100; @@ -2606,7 +2606,7 @@ bool DualEdgeTriangulation::pointInside( double x, double y ) while ( true ) { - if ( runs > nBaseOfRuns )//prevents endless loops + if ( runs > sNumBaseOfRuns )//prevents endless loops { QgsDebugMsg( QString( "warning, instability detected: Point coordinates: %1//%2" ).arg( x ).arg( y ) ); return false; diff --git a/src/analysis/interpolation/DualEdgeTriangulation.h b/src/analysis/interpolation/DualEdgeTriangulation.h index c5f5466510a9..5ef41fd88cd0 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.h +++ b/src/analysis/interpolation/DualEdgeTriangulation.h @@ -140,7 +140,7 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation //! Threshold for the leftOfTest to handle numerical instabilities //const static double leftOfTresh=0.00001; //! Security to prevent endless loops in 'baseEdgeOfTriangle'. It there are more iteration then this number, the point will not be inserted - const static int nBaseOfRuns = 300000; + const static int sNumBaseOfRuns = 300000; //! Returns the number of an edge which points to the point with number 'point' or -1 if there is an error int baseEdgeOfPoint( int point ); //! Returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occurred (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong diff --git a/src/app/qgsdecorationnortharrow.cpp b/src/app/qgsdecorationnortharrow.cpp index 755762c963b8..84367ddee067 100644 --- a/src/app/qgsdecorationnortharrow.cpp +++ b/src/app/qgsdecorationnortharrow.cpp @@ -42,8 +42,6 @@ email : tim@linfiniti.com #include #include - -const double QgsDecorationNorthArrow::PI = 3.14159265358979323846; // const double QgsNorthArrowPlugin::DEG2RAD = 0.0174532925199433; const double QgsDecorationNorthArrow::TOL = 1e-8; @@ -124,7 +122,7 @@ void QgsDecorationNorthArrow::render( QPainter * theQPainter ) if ( mAutomatic ) calculateNorthDirection(); - double myRadiansDouble = mRotationInt * PI / 180.0; + double myRadiansDouble = mRotationInt * M_PI / 180.0; int xShift = static_cast(( ( centerXDouble * cos( myRadiansDouble ) ) + ( centerYDouble * sin( myRadiansDouble ) ) @@ -266,8 +264,8 @@ bool QgsDecorationNorthArrow::calculateNorthDirection() double angle = 0.0; // convert to radians for the equations below - p1.multiply( PI / 180.0 ); - p2.multiply( PI / 180.0 ); + p1.multiply( M_PI / 180.0 ); + p2.multiply( M_PI / 180.0 ); double y = sin( p2.x() - p1.x() ) * cos( p2.y() ); double x = cos( p1.y() ) * sin( p2.y() ) - @@ -282,25 +280,25 @@ bool QgsDecorationNorthArrow::calculateNorthDirection() if ( x > 0.0 && ( y / x ) > TOL ) angle = atan( y / x ); else if ( x < 0.0 && ( y / x ) < -TOL ) - angle = PI - atan( -y / x ); + angle = M_PI - atan( -y / x ); else - angle = 0.5 * PI; + angle = 0.5 * M_PI; } else if ( y < 0.0 ) { if ( x > 0.0 && ( y / x ) < -TOL ) angle = -atan( -y / x ); else if ( x < 0.0 && ( y / x ) > TOL ) - angle = atan( y / x ) - PI; + angle = atan( y / x ) - M_PI; else - angle = 1.5 * PI; + angle = 1.5 * M_PI; } else { if ( x > TOL ) angle = 0.0; else if ( x < -TOL ) - angle = PI; + angle = M_PI; else { angle = 0.0; // p1 = p2 @@ -309,7 +307,7 @@ bool QgsDecorationNorthArrow::calculateNorthDirection() } // And set the angle of the north arrow. Perhaps do something // different if goodDirn = false. - mRotationInt = qRound( fmod( 360.0 - angle * 180.0 / PI, 360.0 ) ); + mRotationInt = qRound( fmod( 360.0 - angle * 180.0 / M_PI, 360.0 ) ); } else { diff --git a/src/app/qgsdecorationnortharrow.h b/src/app/qgsdecorationnortharrow.h index 5e520fe1751e..a9971f428cd3 100644 --- a/src/app/qgsdecorationnortharrow.h +++ b/src/app/qgsdecorationnortharrow.h @@ -57,7 +57,6 @@ class APP_EXPORT QgsDecorationNorthArrow: public QgsDecorationItem private: - static const double PI; // static const double DEG2RAD; static const double TOL; diff --git a/src/core/auth/qgsauthconfig.cpp b/src/core/auth/qgsauthconfig.cpp index b3ab2272db00..c35df90e790e 100644 --- a/src/core/auth/qgsauthconfig.cpp +++ b/src/core/auth/qgsauthconfig.cpp @@ -32,7 +32,7 @@ const QString QgsAuthMethodConfig::mConfigSep = QStringLiteral( "|||" ); const QString QgsAuthMethodConfig::mConfigKeySep = QStringLiteral( ":::" ); const QString QgsAuthMethodConfig::mConfigListSep = QStringLiteral( "```" ); -const int QgsAuthMethodConfig::mConfigVersion = 1; +const int QgsAuthMethodConfig::sConfigVersion = 1; // get uniqueConfigId only on save QgsAuthMethodConfig::QgsAuthMethodConfig( const QString& method, int version ) diff --git a/src/core/auth/qgsauthconfig.h b/src/core/auth/qgsauthconfig.h index f98abada01d2..927b4a9ff47a 100644 --- a/src/core/auth/qgsauthconfig.h +++ b/src/core/auth/qgsauthconfig.h @@ -172,7 +172,7 @@ class CORE_EXPORT QgsAuthMethodConfig static const QString mConfigKeySep; static const QString mConfigListSep; - static const int mConfigVersion; + static const int sConfigVersion; }; typedef QHash QgsAuthMethodConfigsMap; diff --git a/src/core/dxf/qgsdxfexport.cpp b/src/core/dxf/qgsdxfexport.cpp index 68b0de1a5b91..497d223ab6fe 100644 --- a/src/core/dxf/qgsdxfexport.cpp +++ b/src/core/dxf/qgsdxfexport.cpp @@ -56,7 +56,7 @@ #define DXF_HANDPLOTSTYLE 0xf // dxf color palette -int QgsDxfExport::mDxfColors[][3] = +int QgsDxfExport::sDxfColors[][3] = { { 255, 255, 255 }, { 255, 0, 0 }, @@ -316,7 +316,7 @@ int QgsDxfExport::mDxfColors[][3] = { 255, 255, 255 }, }; -const char *QgsDxfExport::mDxfEncodings[][2] = +const char *QgsDxfExport::sDxfEncodings[][2] = { { "ASCII", "" }, { "8859_1", "ISO-8859-1" }, @@ -432,7 +432,7 @@ void QgsDxfExport::writeGroup( const QColor& color, int exactMatchCode, int rgbC int minDistAt = -1; int minDist = INT_MAX; - for ( int i = 1; i < static_cast< int >( sizeof( mDxfColors ) / sizeof( *mDxfColors ) ) && minDist > 0; ++i ) + for ( int i = 1; i < static_cast< int >( sizeof( sDxfColors ) / sizeof( *sDxfColors ) ) && minDist > 0; ++i ) { int dist = color_distance( color.rgba(), i ); if ( dist >= minDist ) @@ -3873,7 +3873,7 @@ int QgsDxfExport::closestColorMatch( QRgb pixel ) { int idx = 0; int current_distance = INT_MAX; - for ( int i = 1; i < static_cast< int >( sizeof( mDxfColors ) / sizeof( *mDxfColors ) ); ++i ) + for ( int i = 1; i < static_cast< int >( sizeof( sDxfColors ) / sizeof( *sDxfColors ) ); ++i ) { int dist = color_distance( pixel, i ); if ( dist < current_distance ) @@ -3894,9 +3894,9 @@ int QgsDxfExport::color_distance( QRgb p1, int index ) return 0; } - double redDiff = qRed( p1 ) - mDxfColors[index][0]; - double greenDiff = qGreen( p1 ) - mDxfColors[index][1]; - double blueDiff = qBlue( p1 ) - mDxfColors[index][2]; + double redDiff = qRed( p1 ) - sDxfColors[index][0]; + double greenDiff = qGreen( p1 ) - sDxfColors[index][1]; + double blueDiff = qBlue( p1 ) - sDxfColors[index][2]; #if 0 QgsDebugMsg( QString( "color_distance( r:%1 g:%2 b:%3 <=> i:%4 r:%5 g:%6 b:%7 ) => %8" ) .arg( qRed( p1 ) ).arg( qGreen( p1 ) ).arg( qBlue( p1 ) ) @@ -4211,13 +4211,13 @@ QString QgsDxfExport::dxfEncoding( const QString &name ) continue; int i; - for ( i = 0; i < static_cast< int >( sizeof( mDxfEncodings ) / sizeof( *mDxfEncodings ) ) && name != mDxfEncodings[i][1]; ++i ) + for ( i = 0; i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) && name != sDxfEncodings[i][1]; ++i ) ; - if ( i == static_cast< int >( sizeof( mDxfEncodings ) / sizeof( *mDxfEncodings ) ) ) + if ( i == static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) ) continue; - return mDxfEncodings[i][0]; + return sDxfEncodings[i][0]; } return QString::null; @@ -4229,10 +4229,10 @@ QStringList QgsDxfExport::encodings() Q_FOREACH ( QByteArray codec, QTextCodec::availableCodecs() ) { int i; - for ( i = 0; i < static_cast< int >( sizeof( mDxfEncodings ) / sizeof( *mDxfEncodings ) ) && strcmp( codec.data(), mDxfEncodings[i][1] ) != 0; ++i ) + for ( i = 0; i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) && strcmp( codec.data(), sDxfEncodings[i][1] ) != 0; ++i ) ; - if ( i < static_cast< int >( sizeof( mDxfEncodings ) / sizeof( *mDxfEncodings ) ) ) + if ( i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) ) encodings << codec.data(); } return encodings; diff --git a/src/core/dxf/qgsdxfexport.h b/src/core/dxf/qgsdxfexport.h index db94b4f125a3..c760d907779e 100644 --- a/src/core/dxf/qgsdxfexport.h +++ b/src/core/dxf/qgsdxfexport.h @@ -340,8 +340,8 @@ class CORE_EXPORT QgsDxfExport QTextStream mTextStream; - static int mDxfColors[][3]; - static const char *mDxfEncodings[][2]; + static int sDxfColors[][3]; + static const char *sDxfEncodings[][2]; int mSymbolLayerCounter; //internal counter int mNextHandleId; diff --git a/src/core/layertree/qgslayertreemodellegendnode.cpp b/src/core/layertree/qgslayertreemodellegendnode.cpp index b1b52a60e60d..7e746e644956 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.cpp +++ b/src/core/layertree/qgslayertreemodellegendnode.cpp @@ -176,7 +176,7 @@ QSize QgsSymbolLegendNode::minimumIconSize( QgsRenderContext* context ) const } if ( mItem.level() != 0 && !( model() && model()->testFlag( QgsLayerTreeModel::ShowLegendAsTree ) ) ) - minSz.setWidth( mItem.level() * indentSize + minSz.width() ); + minSz.setWidth( mItem.level() * sIndentSize + minSz.width() ); return minSz; } @@ -279,10 +279,10 @@ QVariant QgsSymbolLegendNode::data( int role ) const else { // ident the symbol icon to make it look like a tree structure - QPixmap pix2( pix.width() + mItem.level() * indentSize, pix.height() ); + QPixmap pix2( pix.width() + mItem.level() * sIndentSize, pix.height() ); pix2.fill( Qt::transparent ); QPainter p( &pix2 ); - p.drawPixmap( mItem.level() * indentSize, 0, pix ); + p.drawPixmap( mItem.level() * sIndentSize, 0, pix ); p.end(); mPixmap = pix2; } diff --git a/src/core/layertree/qgslayertreemodellegendnode.h b/src/core/layertree/qgslayertreemodellegendnode.h index 3827e0bac876..0128525a5328 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.h +++ b/src/core/layertree/qgslayertreemodellegendnode.h @@ -225,7 +225,7 @@ class CORE_EXPORT QgsSymbolLegendNode : public QgsLayerTreeModelLegendNode QSize mIconSize; // ident the symbol icon to make it look like a tree structure - static const int indentSize = 20; + static const int sIndentSize = 20; // return a temporary context or null if legendMapViewData are not valid QgsRenderContext * createTemporaryRenderContext() const; diff --git a/src/core/qgsapplication.cpp b/src/core/qgsapplication.cpp index ea9311f4923b..3fd902dc1d73 100644 --- a/src/core/qgsapplication.cpp +++ b/src/core/qgsapplication.cpp @@ -426,10 +426,10 @@ QString QgsApplication::prefixPath() { if ( ABISYM( mRunningFromBuildDir ) ) { - static bool once = true; - if ( once ) + static bool sOnce = true; + if ( sOnce ) qWarning( "!!! prefix path was requested, but it is not valid - we do not run from installed path !!!" ); - once = false; + sOnce = false; } return ABISYM( mPrefixPath ); diff --git a/src/core/qgsconnectionpool.h b/src/core/qgsconnectionpool.h index cecb8934eb45..09fb14efa9d7 100644 --- a/src/core/qgsconnectionpool.h +++ b/src/core/qgsconnectionpool.h @@ -55,7 +55,7 @@ class QgsConnectionPoolGroup { public: - static const int maxConcurrentConnections; + static const int sMaxConcurrentConnections; struct Item { diff --git a/src/core/qgscoordinatereferencesystem.cpp b/src/core/qgscoordinatereferencesystem.cpp index 90f30f92ec6e..e0610defcdaf 100644 --- a/src/core/qgscoordinatereferencesystem.cpp +++ b/src/core/qgscoordinatereferencesystem.cpp @@ -1121,10 +1121,10 @@ void QgsCoordinateReferenceSystem::setMapUnits() // do better than that ... (but perhaps ogr should be enhanced to // do this instead?). - static const double feetToMeter = 0.3048; - static const double smallNum = 1e-3; + static const double FEET_TO_METER = 0.3048; + static const double SMALL_NUM = 1e-3; - if ( qAbs( toMeter - feetToMeter ) < smallNum ) + if ( qAbs( toMeter - FEET_TO_METER ) < SMALL_NUM ) unit = QStringLiteral( "Foot" ); QgsDebugMsg( "Projection has linear units of " + unit ); diff --git a/src/core/qgsmaprendererjob.cpp b/src/core/qgsmaprendererjob.cpp index 1de20db82a17..7e1c509c2162 100644 --- a/src/core/qgsmaprendererjob.cpp +++ b/src/core/qgsmaprendererjob.cpp @@ -79,7 +79,7 @@ bool QgsMapRendererJob::reprojectToLayerExtent( const QgsMapLayer *ml, const Qgs // geographic coordinates (usually +/- 180 degrees, // and is assumed to be so here), and draw each // extent separately. - static const double splitCoord = 180.0; + static const double SPLIT_COORD = 180.0; if ( ml->crs().isGeographic() ) { @@ -132,8 +132,8 @@ bool QgsMapRendererJob::reprojectToLayerExtent( const QgsMapLayer *ml, const Qgs // so let's use (-180,180). This hopefully does not add too much overhead. It is // more straightforward than rendering with two separate extents and more consistent // for rendering, labeling and caching as everything is rendered just in one go - extent.setXMinimum( -splitCoord ); - extent.setXMaximum( splitCoord ); + extent.setXMinimum( -SPLIT_COORD ); + extent.setXMaximum( SPLIT_COORD ); } } diff --git a/src/core/qgsmapsettings.cpp b/src/core/qgsmapsettings.cpp index add7ef68881a..dca926fb2fab 100644 --- a/src/core/qgsmapsettings.cpp +++ b/src/core/qgsmapsettings.cpp @@ -150,8 +150,8 @@ void QgsMapSettings::updateDerived() double xRange = extent.width() / xMean; double yRange = extent.height() / yMean; - static const double minProportion = 1e-12; - if ( xRange < minProportion || yRange < minProportion ) + static const double MIN_PROPORTION = 1e-12; + if ( xRange < MIN_PROPORTION || yRange < MIN_PROPORTION ) { mValid = false; return; diff --git a/src/core/qgsrenderchecker.cpp b/src/core/qgsrenderchecker.cpp index 3d7be3b3779d..08215a3b7952 100644 --- a/src/core/qgsrenderchecker.cpp +++ b/src/core/qgsrenderchecker.cpp @@ -28,7 +28,7 @@ #include #include -static int renderCounter = 0; +static int sRenderCounter = 0; QgsRenderChecker::QgsRenderChecker() : mReport( QLatin1String( "" ) ) @@ -357,7 +357,7 @@ bool QgsRenderChecker::compareImages( const QString& theTestName, mRenderedImageFile, mExpectedImageFile ) .arg( imgWidth ).arg( imgHeight ) - .arg( renderCounter++ ); + .arg( sRenderCounter++ ); QString prefix; if ( !mControlPathPrefix.isNull() ) diff --git a/src/core/qgsscalecalculator.cpp b/src/core/qgsscalecalculator.cpp index a1bc726806b7..d8a9ace6ef2c 100644 --- a/src/core/qgsscalecalculator.cpp +++ b/src/core/qgsscalecalculator.cpp @@ -118,12 +118,12 @@ double QgsScaleCalculator::calculateGeographicDistance( const QgsRectangle &mapE const static double rads = ( 4.0 * atan( 1.0 ) ) / 180.0; double a = pow( cos( lat * rads ), 2 ); double c = 2.0 * atan2( sqrt( a ), sqrt( 1.0 - a ) ); - const static double ra = 6378000; // [m] + const static double RA = 6378000; // [m] // The eccentricity. This comes from sqrt(1.0 - rb*rb/(ra*ra)) with rb set // to 6357000 m. - const static double e = 0.0810820288; - double radius = ra * ( 1.0 - e * e ) / - pow( 1.0 - e * e * sin( lat * rads ) * sin( lat * rads ), 1.5 ); + const static double E = 0.0810820288; + double radius = RA * ( 1.0 - E * E ) / + pow( 1.0 - E * E * sin( lat * rads ) * sin( lat * rads ), 1.5 ); double meters = ( mapExtent.xMaximum() - mapExtent.xMinimum() ) / 180.0 * radius * c; QgsDebugMsg( "Distance across map extent (m): " + QString::number( meters ) ); diff --git a/src/core/qgsvectorlayerundocommand.cpp b/src/core/qgsvectorlayerundocommand.cpp index 91d00f228d91..c0c2b3fd6551 100644 --- a/src/core/qgsvectorlayerundocommand.cpp +++ b/src/core/qgsvectorlayerundocommand.cpp @@ -28,17 +28,17 @@ QgsVectorLayerUndoCommandAddFeature::QgsVectorLayerUndoCommandAddFeature( QgsVectorLayerEditBuffer* buffer, QgsFeature& f ) : QgsVectorLayerUndoCommand( buffer ) { - static int addedIdLowWaterMark = -1; + static int sAddedIdLowWaterMark = -1; //assign a temporary id to the feature (use negative numbers) - addedIdLowWaterMark--; + sAddedIdLowWaterMark--; - QgsDebugMsgLevel( "Assigned feature id " + QString::number( addedIdLowWaterMark ), 4 ); + QgsDebugMsgLevel( "Assigned feature id " + QString::number( sAddedIdLowWaterMark ), 4 ); // Force a feature ID (to keep other functions in QGIS happy, // providers will use their own new feature ID when we commit the new feature) // and add to the known added features. - f.setId( addedIdLowWaterMark ); + f.setId( sAddedIdLowWaterMark ); mFeature = f; } diff --git a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp index bbf3b41782da..040b64499f19 100644 --- a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp +++ b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp @@ -176,8 +176,8 @@ void QgsRendererRange::toSld( QDomDocument &doc, QDomElement &element, QgsString /////////// -int QgsRendererRangeLabelFormat::MaxPrecision = 15; -int QgsRendererRangeLabelFormat::MinPrecision = -6; +const int QgsRendererRangeLabelFormat::MaxPrecision = 15; +const int QgsRendererRangeLabelFormat::MinPrecision = -6; QgsRendererRangeLabelFormat::QgsRendererRangeLabelFormat() : mFormat( QStringLiteral( " %1 - %2 " ) ) diff --git a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h index 6fe5f6a18890..10819689352b 100644 --- a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h +++ b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h @@ -107,8 +107,8 @@ class CORE_EXPORT QgsRendererRangeLabelFormat void setFromDomElement( QDomElement &element ); void saveToDomElement( QDomElement &element ); - static int MaxPrecision; - static int MinPrecision; + static const int MaxPrecision; + static const int MinPrecision; protected: QString mFormat; diff --git a/src/gui/effects/qgspainteffectpropertieswidget.cpp b/src/gui/effects/qgspainteffectpropertieswidget.cpp index ccfc1837d109..c8addebf58e3 100644 --- a/src/gui/effects/qgspainteffectpropertieswidget.cpp +++ b/src/gui/effects/qgspainteffectpropertieswidget.cpp @@ -49,8 +49,8 @@ static bool _initWidgetFunction( const QString& name, QgsPaintEffectWidgetFunc f static void _initWidgetFunctions() { - static bool initialized = false; - if ( initialized ) + static bool sInitialized = false; + if ( sInitialized ) return; _initWidgetFunction( QStringLiteral( "blur" ), QgsBlurWidget::create ); @@ -62,7 +62,7 @@ static void _initWidgetFunctions() _initWidgetFunction( QStringLiteral( "transform" ), QgsTransformWidget::create ); _initWidgetFunction( QStringLiteral( "color" ), QgsColorEffectWidget::create ); - initialized = true; + sInitialized = true; } diff --git a/src/gui/raster/qgsrendererrasterpropertieswidget.cpp b/src/gui/raster/qgsrendererrasterpropertieswidget.cpp index 5a50e7a858de..4fd6d62d57c2 100644 --- a/src/gui/raster/qgsrendererrasterpropertieswidget.cpp +++ b/src/gui/raster/qgsrendererrasterpropertieswidget.cpp @@ -37,8 +37,8 @@ static void _initRendererWidgetFunctions() { - static bool initialized = false; - if ( initialized ) + static bool sInitialized = false; + if ( sInitialized ) return; QgsApplication::rasterRendererRegistry()->insertWidgetFunction( QStringLiteral( "paletted" ), QgsPalettedRendererWidget::create ); @@ -47,7 +47,7 @@ static void _initRendererWidgetFunctions() QgsApplication::rasterRendererRegistry()->insertWidgetFunction( QStringLiteral( "singlebandgray" ), QgsSingleBandGrayRendererWidget::create ); QgsApplication::rasterRendererRegistry()->insertWidgetFunction( QStringLiteral( "hillshade" ), QgsHillshadeRendererWidget::create ); - initialized = true; + sInitialized = true; } diff --git a/src/gui/symbology-ng/qgslayerpropertieswidget.cpp b/src/gui/symbology-ng/qgslayerpropertieswidget.cpp index a7ada965f0ee..3c12e908c137 100644 --- a/src/gui/symbology-ng/qgslayerpropertieswidget.cpp +++ b/src/gui/symbology-ng/qgslayerpropertieswidget.cpp @@ -60,8 +60,8 @@ static bool _initWidgetFunction( const QString& name, QgsSymbolLayerWidgetFunc f static void _initWidgetFunctions() { - static bool initialized = false; - if ( initialized ) + static bool sInitialized = false; + if ( sInitialized ) return; _initWidgetFunction( QStringLiteral( "SimpleLine" ), QgsSimpleLineSymbolLayerWidget::create ); @@ -86,7 +86,7 @@ static void _initWidgetFunctions() _initWidgetFunction( QStringLiteral( "GeometryGenerator" ), QgsGeometryGeneratorSymbolLayerWidget::create ); - initialized = true; + sInitialized = true; } diff --git a/src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp b/src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp index 8695bc1e1cc2..5ed2c73490b3 100644 --- a/src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp +++ b/src/gui/symbology-ng/qgsrendererpropertiesdialog.cpp @@ -65,8 +65,8 @@ static bool _initRenderer( const QString& name, QgsRendererWidgetFunc f, const Q static void _initRendererWidgetFunctions() { - static bool initialized = false; - if ( initialized ) + static bool sInitialized = false; + if ( sInitialized ) return; _initRenderer( QStringLiteral( "singleSymbol" ), QgsSingleSymbolRendererWidget::create, QStringLiteral( "rendererSingleSymbol.svg" ) ); @@ -79,7 +79,7 @@ static void _initRendererWidgetFunctions() _initRenderer( QStringLiteral( "heatmapRenderer" ), QgsHeatmapRendererWidget::create, QStringLiteral( "rendererHeatmapSymbol.svg" ) ); _initRenderer( QStringLiteral( "25dRenderer" ), Qgs25DRendererWidget::create, QStringLiteral( "renderer25dSymbol.svg" ) ); _initRenderer( QStringLiteral( "nullSymbol" ), QgsNullSymbolRendererWidget::create, QStringLiteral( "rendererNullSymbol.svg" ) ); - initialized = true; + sInitialized = true; } QgsRendererPropertiesDialog::QgsRendererPropertiesDialog( QgsVectorLayer* layer, QgsStyle* style, bool embedded, QWidget* parent ) diff --git a/src/plugins/georeferencer/qgsimagewarper.cpp b/src/plugins/georeferencer/qgsimagewarper.cpp index 2274e56d3eb4..0c92c7b345e9 100644 --- a/src/plugins/georeferencer/qgsimagewarper.cpp +++ b/src/plugins/georeferencer/qgsimagewarper.cpp @@ -29,7 +29,7 @@ #include "qgsgeoreftransform.h" #include "qgslogger.h" -bool QgsImageWarper::mWarpCanceled = false; +bool QgsImageWarper::sWarpCanceled = false; QgsImageWarper::QgsImageWarper( QWidget *theParent ) : mParent( theParent ) @@ -252,7 +252,7 @@ int QgsImageWarper::warpFile( const QString& input, GDALClose( hSrcDS ); GDALClose( hDstDS ); - return mWarpCanceled ? -1 : eErr == CE_None ? 1 : 0; + return sWarpCanceled ? -1 : eErr == CE_None ? 1 : 0; } @@ -338,11 +338,11 @@ int CPL_STDCALL QgsImageWarper::updateWarpProgress( double dfComplete, const cha // TODO: call QEventLoop manually to make "cancel" button more responsive if ( progress->wasCanceled() ) { - mWarpCanceled = true; + sWarpCanceled = true; return false; } - mWarpCanceled = false; + sWarpCanceled = false; return true; } diff --git a/src/plugins/georeferencer/qgsimagewarper.h b/src/plugins/georeferencer/qgsimagewarper.h index 9083df25527f..2d87db72174f 100644 --- a/src/plugins/georeferencer/qgsimagewarper.h +++ b/src/plugins/georeferencer/qgsimagewarper.h @@ -95,7 +95,7 @@ class QgsImageWarper //! \brief GDAL progress callback, used to display warping progress via a QProgressDialog static int CPL_STDCALL updateWarpProgress( double dfComplete, const char *pszMessage, void *pProgressArg ); - static bool mWarpCanceled; + static bool sWarpCanceled; GDALResampleAlg toGDALResampleAlg( const ResamplingMethod method ) const; }; diff --git a/src/plugins/grass/qgsgrassnewmapset.cpp b/src/plugins/grass/qgsgrassnewmapset.cpp index afc6e704e40c..78f68b87c3f0 100644 --- a/src/plugins/grass/qgsgrassnewmapset.cpp +++ b/src/plugins/grass/qgsgrassnewmapset.cpp @@ -60,7 +60,7 @@ QString temp3( GRASS_VERSION_MINOR ); QString temp4( GRASS_VERSION_RELEASE ); #endif -bool QgsGrassNewMapset::mRunning = false; +bool QgsGrassNewMapset::sRunning = false; QgsGrassNewMapset::QgsGrassNewMapset( QgisInterface *iface, QgsGrassPlugin *plugin, QWidget * parent, @@ -75,7 +75,7 @@ QgsGrassNewMapset::QgsGrassNewMapset( QgisInterface *iface, setWizardStyle( QWizard::ClassicStyle ); #endif - mRunning = true; + sRunning = true; mIface = iface; mProjectionSelector = 0; mPreviousPage = -1; @@ -130,7 +130,7 @@ QgsGrassNewMapset::~QgsGrassNewMapset() { QSettings settings; settings.setValue( QStringLiteral( "/Windows/QgsGrassNewMapset/geometry" ), saveGeometry() ); - mRunning = false; + sRunning = false; } /*************************** DATABASE *******************************/ void QgsGrassNewMapset::browseDatabase() @@ -1414,14 +1414,14 @@ void QgsGrassNewMapset::pageSelected( int index ) bool QgsGrassNewMapset::isRunning( void ) { - return mRunning; + return sRunning; } void QgsGrassNewMapset::close( void ) { hide(); - mRunning = false; + sRunning = false; deleteLater(); } diff --git a/src/plugins/grass/qgsgrassnewmapset.h b/src/plugins/grass/qgsgrassnewmapset.h index 625cd5de1c8a..94510fab00ae 100644 --- a/src/plugins/grass/qgsgrassnewmapset.h +++ b/src/plugins/grass/qgsgrassnewmapset.h @@ -197,7 +197,7 @@ class QgsGrassNewMapset : public QWizard, private Ui::QgsGrassNewMapsetBase QgsGrassPlugin *mPlugin; //! Editing is already running - static bool mRunning; + static bool sRunning; //! Projection selector QgsProjectionSelector *mProjectionSelector; diff --git a/src/plugins/grass/qgsgrassselect.cpp b/src/plugins/grass/qgsgrassselect.cpp index bf1fae500576..f94642ef995d 100644 --- a/src/plugins/grass/qgsgrassselect.cpp +++ b/src/plugins/grass/qgsgrassselect.cpp @@ -45,7 +45,7 @@ QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ) connect( buttonBox, SIGNAL( accepted() ), this, SLOT( accept() ) ); connect( buttonBox, SIGNAL( rejected() ), this, SLOT( reject() ) ); - if ( first ) + if ( sFirst ) { if ( QgsGrass::activeMode() ) { @@ -65,7 +65,7 @@ QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ) } lastMapset = settings.value( QStringLiteral( "/GRASS/lastMapset" ) ).toString(); } - first = false; + sFirst = false; } QgsGrassSelect::type = type; @@ -108,7 +108,7 @@ QgsGrassSelect::~QgsGrassSelect() { } -bool QgsGrassSelect::first = true; +bool QgsGrassSelect::sFirst = true; QString QgsGrassSelect::lastGisdbase; QString QgsGrassSelect::lastLocation; QString QgsGrassSelect::lastMapset; diff --git a/src/plugins/grass/qgsgrassselect.h b/src/plugins/grass/qgsgrassselect.h index 49011e17c0ee..768e2e95cff2 100644 --- a/src/plugins/grass/qgsgrassselect.h +++ b/src/plugins/grass/qgsgrassselect.h @@ -72,7 +72,7 @@ class QgsGrassSelect: public QDialog, private Ui::QgsGrassSelectBase private: int type; // map type (mapset element) - static bool first; // called first time + static bool sFirst; // called first time static QString lastGisdbase; // Last selected values static QString lastLocation; static QString lastMapset; diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.cpp b/src/plugins/spatialquery/qgsspatialquerydialog.cpp index 401366664516..249081de3dc5 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.cpp +++ b/src/plugins/spatialquery/qgsspatialquerydialog.cpp @@ -197,10 +197,10 @@ void QgsSpatialQueryDialog::runQuery() void QgsSpatialQueryDialog::showResultQuery( QDateTime *datetimeStart, QDateTime *datetimeEnd ) { - static int countQuery = 0; + static int sCountQuery = 0; // Report processing - countQuery++; - QString msg = tr( "%1)Query" ).arg( countQuery ); + sCountQuery++; + QString msg = tr( "%1)Query" ).arg( sCountQuery ); teStatus->append( msg ); msg = tr( "Begin at %L1" ).arg( datetimeStart->toString() ); teStatus->append( msg ); @@ -659,15 +659,15 @@ void QgsSpatialQueryDialog::changeLwFeature( QgsVectorLayer* lyr, QgsFeatureId f void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid ) { static QgsVectorLayer* lyrCheck = nullptr; - static bool hasMsg = false; + static bool sHasMsg = false; if ( ! lyrCheck || lyrCheck != lyr ) { lyrCheck = lyr; - hasMsg = true; + sHasMsg = true; } else { - hasMsg = false; + sHasMsg = false; } QgsFeature feat; @@ -684,7 +684,7 @@ void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid ) QgsCoordinateReferenceSystem srcMapcanvas = mIface->mapCanvas()->mapSettings().destinationCrs(); if ( ! srsSource.isValid() ) { - if ( hasMsg ) + if ( sHasMsg ) { QString crsMapcanvas = srcMapcanvas.authid(); bool isFly = mIface->mapCanvas()->mapSettings().hasCrsTransformEnabled(); diff --git a/src/providers/gdal/qgsgdalprovider.cpp b/src/providers/gdal/qgsgdalprovider.cpp index 35ec0389bb73..b7f7d4eca2ca 100644 --- a/src/providers/gdal/qgsgdalprovider.cpp +++ b/src/providers/gdal/qgsgdalprovider.cpp @@ -70,25 +70,25 @@ int CPL_STDCALL progressCallback( double dfComplete, const char * pszMessage, void * pProgressArg ) { - static double dfLastComplete = -1.0; + static double sDfLastComplete = -1.0; QgsGdalProgress *prog = static_cast( pProgressArg ); QgsGdalProvider *mypProvider = prog->provider; - if ( dfLastComplete > dfComplete ) + if ( sDfLastComplete > dfComplete ) { - if ( dfLastComplete >= 1.0 ) - dfLastComplete = -1.0; + if ( sDfLastComplete >= 1.0 ) + sDfLastComplete = -1.0; else - dfLastComplete = dfComplete; + sDfLastComplete = dfComplete; } - if ( floor( dfLastComplete*10 ) != floor( dfComplete*10 ) ) + if ( floor( sDfLastComplete*10 ) != floor( dfComplete*10 ) ) { mypProvider->emitProgress( prog->type, dfComplete * 100, QString( pszMessage ) ); mypProvider->emitProgressUpdate( dfComplete * 100 ); } - dfLastComplete = dfComplete; + sDfLastComplete = dfComplete; return true; } diff --git a/src/providers/gpx/qgsgpxprovider.cpp b/src/providers/gpx/qgsgpxprovider.cpp index af8a3e5f0fd2..813a9bc6e591 100644 --- a/src/providers/gpx/qgsgpxprovider.cpp +++ b/src/providers/gpx/qgsgpxprovider.cpp @@ -60,7 +60,7 @@ QgsGPXProvider::DataType QgsGPXProvider::attrUsed[] = QgsGPXProvider::AllType, QgsGPXProvider::AllType }; -const int QgsGPXProvider::attrCount = sizeof( QgsGPXProvider::attr ) / sizeof( const char* ); +const int QgsGPXProvider::sAttrCount = sizeof( QgsGPXProvider::attr ) / sizeof( const char* ); const QString GPX_KEY = QStringLiteral( "gpx" ); @@ -88,7 +88,7 @@ QgsGPXProvider::QgsGPXProvider( const QString& uri ) ( typeStr == QLatin1String( "route" ) ? RouteType : TrackType ) ); // set up the attributes and the geometry type depending on the feature type - for ( int i = 0; i < attrCount; ++i ) + for ( int i = 0; i < sAttrCount; ++i ) { if ( attrUsed[i] & mFeatureType ) { diff --git a/src/providers/gpx/qgsgpxprovider.h b/src/providers/gpx/qgsgpxprovider.h index 4797d54cef44..43b36d2fec12 100644 --- a/src/providers/gpx/qgsgpxprovider.h +++ b/src/providers/gpx/qgsgpxprovider.h @@ -110,7 +110,7 @@ class QgsGPXProvider : public QgsVectorDataProvider static const char* attr[]; static QVariant::Type attrType[]; static DataType attrUsed[]; - static const int attrCount; + static const int sAttrCount; bool mValid; diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index a7df094d55cf..43de531bbcce 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -321,12 +321,12 @@ bool QgsGrass::init( void ) // G_set_error_routine() once called from plugin // is not valid in provider -> call it always - if ( mNonInitializable ) + if ( sNonInitializable ) { return false; } - if ( initialized ) + if ( sInitialized ) { return true; } @@ -337,7 +337,7 @@ bool QgsGrass::init( void ) lock(); QgsDebugMsg( "do init" ); - active = false; + sActive = false; // Is it active mode ? if ( getenv( "GISRC" ) ) { @@ -347,7 +347,7 @@ bool QgsGrass::init( void ) defaultGisdbase = G_gisdbase(); defaultLocation = G_location(); defaultMapset = G_mapset(); - active = true; + sActive = true; } G_CATCH( QgsGrass::Exception &e ) { @@ -368,7 +368,7 @@ bool QgsGrass::init( void ) { mInitError = tr( "Problem in GRASS initialization, GRASS provider and plugin will not work : %1" ).arg( e.what() ); QgsDebugMsg( mInitError ); - mNonInitializable = true; + sNonInitializable = true; unlock(); return false; } @@ -390,7 +390,7 @@ bool QgsGrass::init( void ) // where to look for things. if ( !isValidGrassBaseDir( gisbase() ) ) { - mNonInitializable = true; + sNonInitializable = true; mInitError = tr( "GRASS was not found in '%1' (GISBASE), provider and plugin will not work." ).arg( gisbase() ); QgsDebugMsg( mInitError ); #if 0 @@ -483,13 +483,13 @@ bool QgsGrass::init( void ) putEnv( QStringLiteral( "GRASS_PAGER" ), pager ); } } - initialized = 1; + sInitialized = 1; } unlock(); // after unlock because it is using setMapset() which calls init() - if ( active ) + if ( sActive ) { QgsGrass::instance()->loadMapsetSearchPath(); // must be after G_no_gisinit() QgsGrass::instance()->setMapsetSearchPathWatcher(); @@ -550,7 +550,7 @@ void QgsGrass::unlock() bool QgsGrass::activeMode() { - return active; + return sActive; } QString QgsGrass::getDefaultGisdbase() @@ -570,7 +570,7 @@ QgsGrassObject QgsGrass::getDefaultLocationObject() QString QgsGrass::getDefaultLocationPath() { - if ( !active ) + if ( !sActive ) { return QString(); } @@ -800,10 +800,10 @@ void QgsGrass::onSearchPathFileChanged( const QString & path ) jmp_buf QgsGrass::jumper; -bool QgsGrass::mNonInitializable = false; -int QgsGrass::initialized = 0; +bool QgsGrass::sNonInitializable = false; +int QgsGrass::sInitialized = 0; -bool QgsGrass::active = 0; +bool QgsGrass::sActive = 0; QgsGrass::GError QgsGrass::lastError = QgsGrass::OK; @@ -821,7 +821,7 @@ QString QgsGrass::mTmp; QMutex QgsGrass::sMutex; -bool QgsGrass::mMute = false; +bool QgsGrass::sMute = false; int QgsGrass::error_routine( char *msg, int fatal ) { @@ -1056,7 +1056,7 @@ QString QgsGrass::openMapset( const QString& gisdbase, defaultLocation = location; defaultMapset = mapset; - active = true; + sActive = true; QgsGrass::instance()->loadMapsetSearchPath(); QgsGrass::instance()->setMapsetSearchPathWatcher(); @@ -1109,7 +1109,7 @@ QString QgsGrass::closeMapset() defaultGisdbase = QLatin1String( "" ); defaultLocation = QLatin1String( "" ); defaultMapset = QLatin1String( "" ); - active = 0; + sActive = 0; // Delete temporary dir @@ -2818,8 +2818,8 @@ void QgsGrass::setGisbase( bool custom, const QString &customDir ) if ( custom != previousCustom || ( custom && customDir != previousCustomDir ) ) { - mNonInitializable = false; - initialized = false; + sNonInitializable = false; + sInitialized = false; mInitError.clear(); if ( !QgsGrass::init() ) { @@ -2913,7 +2913,7 @@ void QgsGrass::openOptions() void QgsGrass::warning( const QString &message ) { - if ( !mMute ) + if ( !sMute ) { QMessageBox::warning( 0, QObject::tr( "Warning" ), message ); } diff --git a/src/providers/grass/qgsgrass.h b/src/providers/grass/qgsgrass.h index e6ba6e298967..209c70895ceb 100644 --- a/src/providers/grass/qgsgrass.h +++ b/src/providers/grass/qgsgrass.h @@ -605,7 +605,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject /** Set mute mode, if set, warning() does not open dialog but prints only * debug message and sets the error which returns errorMessage() */ - static void setMute() { mMute = true; } + static void setMute() { sMute = true; } /** Allocate struct Map_info. Call to this function may result in G_fatal_error * and must be surrounded by G_TRY/G_CATCH. */ @@ -667,9 +667,9 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject void newLayer( QString uri, QString name ); private: - static bool mNonInitializable; - static int initialized; // Set to 1 after initialization - static bool active; // is active mode + static bool sNonInitializable; + static int sInitialized; // Set to 1 after initialization + static bool sActive; // is active mode static QStringList mGrassModulesPaths; static QString defaultGisdbase; static QString defaultLocation; @@ -701,7 +701,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject // Mutex for common locking when calling GRASS functions which are mostly non thread safe static QMutex sMutex; // Mute mode, do not show warning dialogs. - static bool mMute; + static bool sMute; }; #endif // QGSGRASS_H diff --git a/src/providers/grass/qgsgrassprovider.cpp b/src/providers/grass/qgsgrassprovider.cpp index 0207527a82d9..2ddca8e8c5aa 100644 --- a/src/providers/grass/qgsgrassprovider.cpp +++ b/src/providers/grass/qgsgrassprovider.cpp @@ -107,7 +107,7 @@ Vect_delete_line_function_type *Vect_delete_line_function_pointer = ( Vect_delet static QString GRASS_KEY = QStringLiteral( "grass" ); int QgsGrassProvider::LAST_TYPE = -9999; -int QgsGrassProvider::mEditedCount = 0; +int QgsGrassProvider::sEditedCount = 0; QgsGrassProvider::QgsGrassProvider( const QString& uri ) : QgsVectorDataProvider( uri ) @@ -299,7 +299,7 @@ QgsVectorDataProvider::Capabilities QgsGrassProvider::capabilities() const // Because of bug in GRASS https://trac.osgeo.org/grass/ticket/2775 it is not possible // close db drivers in random order on Unix and probably Mac -> disable editing if another layer is edited #ifndef Q_OS_WIN - if ( mEditedCount > 0 && !mEditBuffer ) + if ( sEditedCount > 0 && !mEditBuffer ) { return 0; } @@ -650,7 +650,7 @@ bool QgsGrassProvider::closeEdit( bool newMap, QgsVectorLayer *vectorLayer ) } connect( mLayer->map(), SIGNAL( dataChanged() ), SLOT( onDataChanged() ) ); emit fullExtentCalculated(); - mEditedCount--; + sEditedCount--; return true; } return false; @@ -1134,7 +1134,7 @@ void QgsGrassProvider::startEditing( QgsVectorLayer *vectorLayer ) formConfig.setReadOnly( mLayer->fields().size() - 1, true ); vectorLayer->setEditFormConfig( formConfig ); - mEditedCount++; + sEditedCount++; QgsDebugMsg( "edit started" ); } diff --git a/src/providers/grass/qgsgrassprovider.h b/src/providers/grass/qgsgrassprovider.h index 3f7898a65a1f..f4c85438b00d 100644 --- a/src/providers/grass/qgsgrassprovider.h +++ b/src/providers/grass/qgsgrassprovider.h @@ -452,7 +452,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider int mLastType; // number of currently being edited providers - static int mEditedCount; + static int sEditedCount; friend class QgsGrassFeatureSource; friend class QgsGrassFeatureIterator; diff --git a/src/providers/postgres/qgspostgresexpressioncompiler.cpp b/src/providers/postgres/qgspostgresexpressioncompiler.cpp index d4ffa4a27d12..83641381d96f 100644 --- a/src/providers/postgres/qgspostgresexpressioncompiler.cpp +++ b/src/providers/postgres/qgspostgresexpressioncompiler.cpp @@ -38,84 +38,76 @@ QString QgsPostgresExpressionCompiler::quotedValue( const QVariant& value, bool& return QgsPostgresConn::quotedValue( value ); } -static const QMap& functionNamesSqlFunctionsMap() +static const QMap sFunctionNamesSqlFunctionsMap { - static QMap fnNames; - if ( fnNames.isEmpty() ) - { - fnNames = - { - { "sqrt", "sqrt" }, - { "radians", "radians" }, - { "degrees", "degrees" }, - { "abs", "abs" }, - { "cos", "cos" }, - { "sin", "sin" }, - { "tan", "tan" }, - { "acos", "acos" }, - { "asin", "asin" }, - { "atan", "atan" }, - { "atan2", "atan2" }, - { "exp", "exp" }, - { "ln", "ln" }, - { "log", "log" }, - { "log10", "log" }, - { "round", "round" }, - { "floor", "floor" }, - { "ceil", "ceil" }, - { "pi", "pi" }, - // geometry functions - //{ "azimuth", "ST_Azimuth" }, - { "x", "ST_X" }, - { "y", "ST_Y" }, - //{ "z", "ST_Z" }, - //{ "m", "ST_M" }, - { "x_min", "ST_XMin" }, - { "y_min", "ST_YMin" }, - { "x_max", "ST_XMax" }, - { "y_max", "ST_YMax" }, - { "area", "ST_Area" }, - { "perimeter", "ST_Perimeter" }, - { "relate", "ST_Relate" }, - { "disjoint", "ST_Disjoint" }, - { "intersects", "ST_Intersects" }, - //{ "touches", "ST_Touches" }, - { "crosses", "ST_Crosses" }, - { "contains", "ST_Contains" }, - { "overlaps", "ST_Overlaps" }, - { "within", "ST_Within" }, - { "translate", "ST_Translate" }, - { "buffer", "ST_Buffer" }, - { "centroid", "ST_Centroid" }, - { "point_on_surface", "ST_PointOnSurface" }, + { "sqrt", "sqrt" }, + { "radians", "radians" }, + { "degrees", "degrees" }, + { "abs", "abs" }, + { "cos", "cos" }, + { "sin", "sin" }, + { "tan", "tan" }, + { "acos", "acos" }, + { "asin", "asin" }, + { "atan", "atan" }, + { "atan2", "atan2" }, + { "exp", "exp" }, + { "ln", "ln" }, + { "log", "log" }, + { "log10", "log" }, + { "round", "round" }, + { "floor", "floor" }, + { "ceil", "ceil" }, + { "pi", "pi" }, + // geometry functions + //{ "azimuth", "ST_Azimuth" }, + { "x", "ST_X" }, + { "y", "ST_Y" }, + //{ "z", "ST_Z" }, + //{ "m", "ST_M" }, + { "x_min", "ST_XMin" }, + { "y_min", "ST_YMin" }, + { "x_max", "ST_XMax" }, + { "y_max", "ST_YMax" }, + { "area", "ST_Area" }, + { "perimeter", "ST_Perimeter" }, + { "relate", "ST_Relate" }, + { "disjoint", "ST_Disjoint" }, + { "intersects", "ST_Intersects" }, + //{ "touches", "ST_Touches" }, + { "crosses", "ST_Crosses" }, + { "contains", "ST_Contains" }, + { "overlaps", "ST_Overlaps" }, + { "within", "ST_Within" }, + { "translate", "ST_Translate" }, + { "buffer", "ST_Buffer" }, + { "centroid", "ST_Centroid" }, + { "point_on_surface", "ST_PointOnSurface" }, #if 0 - { "reverse", "ST_Reverse" }, - { "is_closed", "ST_IsClosed" }, - { "convex_hull", "ST_ConvexHull" }, - { "difference", "ST_Difference" }, + { "reverse", "ST_Reverse" }, + { "is_closed", "ST_IsClosed" }, + { "convex_hull", "ST_ConvexHull" }, + { "difference", "ST_Difference" }, #endif - { "distance", "ST_Distance" }, + { "distance", "ST_Distance" }, #if 0 - { "intersection", "ST_Intersection" }, - { "sym_difference", "ST_SymDifference" }, - { "combine", "ST_Union" }, - { "union", "ST_Union" }, + { "intersection", "ST_Intersection" }, + { "sym_difference", "ST_SymDifference" }, + { "combine", "ST_Union" }, + { "union", "ST_Union" }, #endif - { "geom_from_wkt", "ST_GeomFromText" }, - { "geom_from_gml", "ST_GeomFromGML" }, - { "char", "chr" }, - { "coalesce", "coalesce" }, - { "lower", "lower" }, - { "trim", "trim" }, - { "upper", "upper" }, - }; - } - return fnNames; -} + { "geom_from_wkt", "ST_GeomFromText" }, + { "geom_from_gml", "ST_GeomFromGML" }, + { "char", "chr" }, + { "coalesce", "coalesce" }, + { "lower", "lower" }, + { "trim", "trim" }, + { "upper", "upper" }, +}; QString QgsPostgresExpressionCompiler::sqlFunctionFromFunctionName( const QString& fnName ) const { - return functionNamesSqlFunctionsMap().value( fnName, QString() ); + return sFunctionNamesSqlFunctionsMap.value( fnName, QString() ); } QStringList QgsPostgresExpressionCompiler::sqlArgumentsFromFunctionName( const QString& fnName, const QStringList& fnArgs ) const diff --git a/src/providers/wfs/qgswfsprovider.cpp b/src/providers/wfs/qgswfsprovider.cpp index ca01170d13c0..83f9289a60cc 100644 --- a/src/providers/wfs/qgswfsprovider.cpp +++ b/src/providers/wfs/qgswfsprovider.cpp @@ -1652,11 +1652,11 @@ QGISEXTERN bool isProvider() // This function should normally be called just once, but better check // so as to avoid doing twice the initial cleanup of the temporary cache // (which should normally be empty, unless QGIS was killed) - static bool firstTime = true; - if ( firstTime ) + static bool sFirstTime = true; + if ( sFirstTime ) { QgsWFSUtils::init(); - firstTime = false; + sFirstTime = false; } return true; diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp index dfaf202f4e5a..3d47ddab8c6f 100644 --- a/src/providers/wfs/qgswfsshareddata.cpp +++ b/src/providers/wfs/qgswfsshareddata.cpp @@ -214,9 +214,9 @@ bool QgsWFSSharedData::createCache() { Q_ASSERT( mCacheDbname.isEmpty() ); - static int tmpCounter = 0; - ++tmpCounter; - mCacheDbname = QDir( QgsWFSUtils::acquireCacheDirectory() ).filePath( QStringLiteral( "wfs_cache_%1.sqlite" ).arg( tmpCounter ) ); + static int sTmpCounter = 0; + ++sTmpCounter; + mCacheDbname = QDir( QgsWFSUtils::acquireCacheDirectory() ).filePath( QStringLiteral( "wfs_cache_%1.sqlite" ).arg( sTmpCounter ) ); QgsFields cacheFields; Q_FOREACH ( const QgsField& field, mFields ) diff --git a/src/providers/wfs/qgswfsutils.cpp b/src/providers/wfs/qgswfsutils.cpp index bf2067aa16d5..54b0c978811c 100644 --- a/src/providers/wfs/qgswfsutils.cpp +++ b/src/providers/wfs/qgswfsutils.cpp @@ -31,8 +31,8 @@ QMutex QgsWFSUtils::gmMutex; QThread* QgsWFSUtils::gmThread = nullptr; -bool QgsWFSUtils::gmKeepAliveWorks = false; -int QgsWFSUtils::gmCounter = 0; +bool QgsWFSUtils::sKeepAliveWorks = false; +int QgsWFSUtils::sCounter = 0; QString QgsWFSUtils::getBaseCacheDirectory( bool createIfNotExisting ) { @@ -64,12 +64,12 @@ QString QgsWFSUtils::getCacheDirectory( bool createIfNotExisting ) QgsDebugMsg( QString( "Creating our cache dir %1/%2" ).arg( baseDirectory, processPath ) ); QDir( baseDirectory ).mkpath( processPath ); } - if ( gmCounter == 0 && gmKeepAliveWorks ) + if ( sCounter == 0 && sKeepAliveWorks ) { gmThread = new QgsWFSUtilsKeepAlive(); gmThread->start(); } - gmCounter ++; + sCounter ++; } return QDir( baseDirectory ).filePath( processPath ); } @@ -82,8 +82,8 @@ QString QgsWFSUtils::acquireCacheDirectory() void QgsWFSUtils::releaseCacheDirectory() { QMutexLocker locker( &gmMutex ); - gmCounter --; - if ( gmCounter == 0 ) + sCounter --; + if ( sCounter == 0 ) { if ( gmThread ) { @@ -204,10 +204,10 @@ QSharedMemory* QgsWFSUtils::createAndAttachSHM() void QgsWFSUtils::init() { QSharedMemory* sharedMemory = createAndAttachSHM(); - gmKeepAliveWorks = sharedMemory != nullptr; + sKeepAliveWorks = sharedMemory != nullptr; delete sharedMemory; - if ( gmKeepAliveWorks ) + if ( sKeepAliveWorks ) { QgsDebugMsg( QString( "Keep-alive mechanism works" ) ); } @@ -234,7 +234,7 @@ void QgsWFSUtils::init() { canDelete = true; } - else if ( gmKeepAliveWorks ) + else if ( sKeepAliveWorks ) { canDelete = true; QSharedMemory otherSharedMemory( QStringLiteral( "qgis_wfs_pid_%1" ).arg( pid ) ); diff --git a/src/providers/wfs/qgswfsutils.h b/src/providers/wfs/qgswfsutils.h index fad73be0e440..f71035a98b6e 100644 --- a/src/providers/wfs/qgswfsutils.h +++ b/src/providers/wfs/qgswfsutils.h @@ -51,8 +51,8 @@ class QgsWFSUtils private: static QMutex gmMutex; static QThread* gmThread; - static bool gmKeepAliveWorks; - static int gmCounter; + static bool sKeepAliveWorks; + static int sCounter; //! Return the name of temporary directory. static QString getCacheDirectory( bool createIfNotExisting ); From 55f6b11225af8f993acd30d8769d49231aacd24f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Jan 2017 15:44:18 +1000 Subject: [PATCH 012/332] [composer] Fix expressions inserted into HTML item source are lost on refresh --- src/app/composer/qgscomposerhtmlwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/composer/qgscomposerhtmlwidget.cpp b/src/app/composer/qgscomposerhtmlwidget.cpp index 2c058d9ea0c2..16bc39974ba2 100644 --- a/src/app/composer/qgscomposerhtmlwidget.cpp +++ b/src/app/composer/qgscomposerhtmlwidget.cpp @@ -377,6 +377,7 @@ void QgsComposerHtmlWidget::on_mInsertExpressionButton_clicked() { mHtmlEditor->insertAt( "[%" + expression + "%]", line, index ); } + mHtml->setHtml( mHtmlEditor->text() ); composition->endMultiFrameCommand(); blockSignals( false ); } From a13ef7bdc1210fdad6e7827ba2ccba8fd363423c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Jan 2017 16:09:40 +1000 Subject: [PATCH 013/332] Use feature from expression context in expression builder preview instead of always getting first feature from the layer This means that e.g. expression builder previews in composer atlas will use the current atlas preview feature Also remove an unnecessary restriction that blocks the preview if a layer has no features --- src/gui/qgsexpressionbuilderwidget.cpp | 32 ++++++++------------------ src/gui/qgsexpressionbuilderwidget.h | 1 - 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/gui/qgsexpressionbuilderwidget.cpp b/src/gui/qgsexpressionbuilderwidget.cpp index 08a992f810b5..e950949323d2 100644 --- a/src/gui/qgsexpressionbuilderwidget.cpp +++ b/src/gui/qgsexpressionbuilderwidget.cpp @@ -543,33 +543,19 @@ void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged() // Only set calculator if we have layer, else use default. exp.setGeomCalculator( &mDa ); - if ( !mFeature.isValid() ) + if ( !mExpressionContext.feature().isValid() ) { - mLayer->getFeatures().nextFeature( mFeature ); - } - - if ( mFeature.isValid() ) - { - mExpressionContext.setFeature( mFeature ); - QVariant value = exp.evaluate( &mExpressionContext ); - if ( !exp.hasEvalError() ) - lblPreview->setText( QgsExpression::formatPreviewString( value ) ); - } - else - { - // The feature is invalid because we don't have one but that doesn't mean user can't - // build a expression string. They just get no preview. - lblPreview->setText( QLatin1String( "" ) ); + // no feature passed yet, try to get from layer + QgsFeature f; + mLayer->getFeatures().nextFeature( f ); + mExpressionContext.setFeature( f ); } } - else + + QVariant value = exp.evaluate( &mExpressionContext ); + if ( !exp.hasEvalError() ) { - // No layer defined - QVariant value = exp.evaluate( &mExpressionContext ); - if ( !exp.hasEvalError() ) - { - lblPreview->setText( QgsExpression::formatPreviewString( value ) ); - } + lblPreview->setText( QgsExpression::formatPreviewString( value ) ); } if ( exp.hasParserError() || exp.hasEvalError() ) diff --git a/src/gui/qgsexpressionbuilderwidget.h b/src/gui/qgsexpressionbuilderwidget.h index 86b5fc299770..f434c9d480e9 100644 --- a/src/gui/qgsexpressionbuilderwidget.h +++ b/src/gui/qgsexpressionbuilderwidget.h @@ -307,7 +307,6 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp QSortFilterProxyModel *mProxyValues; QgsExpressionItemSearchProxy *mProxyModel; QMap mExpressionGroups; - QgsFeature mFeature; QgsExpressionHighlighter* highlighter; bool mExpressionValid; QgsDistanceArea mDa; From b823874f8e2b5d15e5f2e0bedc2e267b4c46987c Mon Sep 17 00:00:00 2001 From: rldhont Date: Wed, 11 Jan 2017 12:24:28 +0100 Subject: [PATCH 014/332] [BUGFIX][Server] Add short names in restricted layer list The restricted layer list contains layer names and layer ids if layer ids are used as service layer name. This code adds layer short name to the restricted layer list if layer ids are not used as service layer name. --- src/server/qgsserverprojectparser.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/server/qgsserverprojectparser.cpp b/src/server/qgsserverprojectparser.cpp index 050639940639..41b793160194 100644 --- a/src/server/qgsserverprojectparser.cpp +++ b/src/server/qgsserverprojectparser.cpp @@ -1189,6 +1189,27 @@ QSet QgsServerProjectParser::findRestrictedLayers() const } } } + // Add short name in restricted layers + else + { + QDomNodeList layerNodeList = mXMLDoc->elementsByTagName( "maplayer" ); + for ( int i = 0; i < layerNodeList.size(); ++i ) + { + QDomElement layerElem = layerNodeList.at( i ).toElement(); + // get name + QString lName = layerName( layerElem ); + if ( restrictedLayerSet.contains( lName ) ) + { + // get short name + lName = layerShortName( layerElem ); + if ( !lName.isEmpty() ) + { + // add short name + restrictedLayerSet.insert( lName ); + } + } + } + } return restrictedLayerSet; } From 03eaad5bfd6b5b47ad20be0e573bd7d0c18ab05b Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 12 Jan 2017 12:51:08 +0200 Subject: [PATCH 015/332] [processing] fix handling of the "selection" type settings --- .../processing/core/ProcessingConfig.py | 83 ++++++++++++------- python/plugins/processing/tests/ToolsTest.py | 23 +++++ 2 files changed, 76 insertions(+), 30 deletions(-) diff --git a/python/plugins/processing/core/ProcessingConfig.py b/python/plugins/processing/core/ProcessingConfig.py index de6c442bc04d..9a375fdd3199 100644 --- a/python/plugins/processing/core/ProcessingConfig.py +++ b/python/plugins/processing/core/ProcessingConfig.py @@ -31,10 +31,9 @@ from qgis.PyQt.QtCore import QCoreApplication, QSettings, QObject, pyqtSignal from qgis.PyQt.QtGui import QIcon -from qgis.core import (NULL, - QgsApplication) +from qgis.core import NULL, QgsApplication from processing.tools.system import defaultOutputFolder -import processing.tools.dataobjects +from processing.tools import dataobjects class SettingsWatcher(QObject): @@ -87,14 +86,6 @@ def initialize(): ProcessingConfig.tr('General'), ProcessingConfig.USE_SELECTED, ProcessingConfig.tr('Use only selected features'), True)) - invalidFeaturesOptions = [ProcessingConfig.tr('Do not filter (better performance'), - ProcessingConfig.tr('Ignore features with invalid geometries'), - ProcessingConfig.tr('Stop algorithm execution when a geometry is invalid')] - ProcessingConfig.addSetting(Setting( - ProcessingConfig.tr('General'), - ProcessingConfig.FILTER_INVALID_GEOMETRIES, - ProcessingConfig.tr('Invalid features filtering'), invalidFeaturesOptions[2], - valuetype=Setting.SELECTION, options=invalidFeaturesOptions)) ProcessingConfig.addSetting(Setting( ProcessingConfig.tr('General'), ProcessingConfig.USE_FILENAME_AS_LAYER_NAME, @@ -163,18 +154,35 @@ def initialize(): ProcessingConfig.MODELS_SCRIPTS_REPO, ProcessingConfig.tr('Scripts and models repository'), 'https://raw.githubusercontent.com/qgis/QGIS-Processing/master')) - extensions = processing.tools.dataobjects.getSupportedOutputVectorLayerExtensions() + + invalidFeaturesOptions = [ProcessingConfig.tr('Do not filter (better performance'), + ProcessingConfig.tr('Ignore features with invalid geometries'), + ProcessingConfig.tr('Stop algorithm execution when a geometry is invalid')] + ProcessingConfig.addSetting(Setting( + ProcessingConfig.tr('General'), + ProcessingConfig.FILTER_INVALID_GEOMETRIES, + ProcessingConfig.tr('Invalid features filtering'), + invalidFeaturesOptions[2], + valuetype=Setting.SELECTION, + options=invalidFeaturesOptions)) + + extensions = dataobjects.getSupportedOutputVectorLayerExtensions() ProcessingConfig.addSetting(Setting( ProcessingConfig.tr('General'), ProcessingConfig.DEFAULT_OUTPUT_VECTOR_LAYER_EXT, - ProcessingConfig.tr('Default output vector layer extension'), extensions[0], - valuetype=Setting.SELECTION, options=extensions)) - extensions = processing.tools.dataobjects.getSupportedOutputRasterLayerExtensions() + ProcessingConfig.tr('Default output vector layer extension'), + extensions[0], + valuetype=Setting.SELECTION, + options=extensions)) + + extensions = dataobjects.getSupportedOutputRasterLayerExtensions() ProcessingConfig.addSetting(Setting( ProcessingConfig.tr('General'), ProcessingConfig.DEFAULT_OUTPUT_RASTER_LAYER_EXT, - ProcessingConfig.tr('Default output raster layer extension'), extensions[0], - valuetype=Setting.SELECTION, options=extensions)) + ProcessingConfig.tr('Default output raster layer extension'), + extensions[0], + valuetype=Setting.SELECTION, + options=extensions)) @staticmethod def setGroupIcon(group, icon): @@ -224,14 +232,20 @@ def getSetting(name): v = None except: pass - return v + if ProcessingConfig.settings[name].valuetype == Setting.SELECTION: + return ProcessingConfig.settings[name].options.index(v) + else: + return v else: return None @staticmethod def setSettingValue(name, value): if name in list(ProcessingConfig.settings.keys()): - ProcessingConfig.settings[name].setValue(value) + if ProcessingConfig.settings[name].valuetype == Setting.SELECTION: + ProcessingConfig.settings[name].setValue(ProcessingConfig.settings[name].options[value]) + else: + ProcessingConfig.settings[name].setValue(value) ProcessingConfig.settings[name].save() @staticmethod @@ -261,34 +275,36 @@ def __init__(self, group, name, description, default, hidden=False, valuetype=No self.description = description self.default = default self.hidden = hidden - if valuetype is None: - if isinstance(default, int): - valuetype = self.INT - elif isinstance(default, float): - valuetype = self.FLOAT self.valuetype = valuetype self.options = options + + if self.valuetype is None: + if isinstance(default, int): + self.valuetype = self.INT + elif isinstance(default, float): + self.valuetype = self.FLOAT + if validator is None: - if valuetype == self.FLOAT: + if self.valuetype == self.FLOAT: def checkFloat(v): try: float(v) except ValueError: raise ValueError(self.tr('Wrong parameter value:\n%s') % str(v)) validator = checkFloat - elif valuetype == self.INT: + elif self.valuetype == self.INT: def checkInt(v): try: int(v) except ValueError: raise ValueError(self.tr('Wrong parameter value:\n%s') % str(v)) validator = checkInt - elif valuetype in [self.FILE, self.FOLDER]: + elif self.valuetype in [self.FILE, self.FOLDER]: def checkFileOrFolder(v): if v and not os.path.exists(v): raise ValueError(self.tr('Specified path does not exist:\n%s') % str(v)) validator = checkFileOrFolder - elif valuetype == self.MULTIPLE_FOLDERS: + elif self.valuetype == self.MULTIPLE_FOLDERS: def checkMultipleFolders(v): folders = v.split(';') for f in folders: @@ -310,10 +326,17 @@ def read(self, qsettings=QSettings()): if value is not None: if isinstance(self.value, bool): value = str(value).lower() == str(True).lower() - self.value = value + + if self.valuetype == self.SELECTION: + self.value = self.options[int(value)] + else: + self.value = value def save(self, qsettings=QSettings()): - qsettings.setValue(self.qname, self.value) + if self.valuetype == self.SELECTION: + qsettings.setValue(self.qname, self.options.index(self.value)) + else: + qsettings.setValue(self.qname, self.value) def __str__(self): return self.name + '=' + str(self.value) diff --git a/python/plugins/processing/tests/ToolsTest.py b/python/plugins/processing/tests/ToolsTest.py index cdf089378b58..4b2c2f1da94f 100644 --- a/python/plugins/processing/tests/ToolsTest.py +++ b/python/plugins/processing/tests/ToolsTest.py @@ -59,6 +59,10 @@ def testFeatures(self): test_data = points() test_layer = QgsVectorLayer(test_data, 'test', 'ogr') + # disable check for geometry validity + prevInvalidGeoms = ProcessingConfig.getSetting(ProcessingConfig.FILTER_INVALID_GEOMETRIES) + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, 0) + # test with all features features = vector.features(test_layer) self.assertEqual(len(features), 9) @@ -101,9 +105,22 @@ def testFeatures(self): ProcessingConfig.setSettingValue(ProcessingConfig.USE_SELECTED, previous_value) + # test exception is raised when filtering invalid geoms + #ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, 2) + #test_layer_invalid_geoms = QgsVectorLayer(invalid_geometries(), 'test', 'ogr') + #with self.assertRaises(GeoAlgorithmExecutionException): + # features = vector.features(test_layer_invalid_geoms) + # feats = [f for f in features] + + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, prevInvalidGeoms) + def testValues(self): ProcessingConfig.initialize() + # disable check for geometry validity + prevInvalidGeoms = ProcessingConfig.getSetting(ProcessingConfig.FILTER_INVALID_GEOMETRIES) + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, 0) + test_data = points() test_layer = QgsVectorLayer(test_data, 'test', 'ogr') @@ -138,10 +155,15 @@ def testValues(self): self.assertEqual(set(res[1]), set([5, 7, 3])) ProcessingConfig.setSettingValue(ProcessingConfig.USE_SELECTED, previous_value) + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, prevInvalidGeoms) def testUniqueValues(self): ProcessingConfig.initialize() + # disable check for geometry validity + prevInvalidGeoms = ProcessingConfig.getSetting(ProcessingConfig.FILTER_INVALID_GEOMETRIES) + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, 0) + test_data = points() test_layer = QgsVectorLayer(test_data, 'test', 'ogr') @@ -164,6 +186,7 @@ def testUniqueValues(self): self.assertEqual(set(v), set([5, 7, 3])) ProcessingConfig.setSettingValue(ProcessingConfig.USE_SELECTED, previous_value) + ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, prevInvalidGeoms) def testOgrLayerNameExtraction(self): outdir = tempfile.mkdtemp() From 75a7637838b131c003f8b5719e1a3f90b3d0c366 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 12 Jan 2017 12:54:13 +0200 Subject: [PATCH 016/332] [processing] fix typo in method name --- python/plugins/processing/gui/Postprocessing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/plugins/processing/gui/Postprocessing.py b/python/plugins/processing/gui/Postprocessing.py index bc2d1bef7355..29d80a88f694 100644 --- a/python/plugins/processing/gui/Postprocessing.py +++ b/python/plugins/processing/gui/Postprocessing.py @@ -87,7 +87,7 @@ def handleAlgorithmResults(alg, feedback=None, showResults=True): msg = "The following layers were not correctly generated.
      " msg += "".join(["
    • %s
    • " % lay for lay in wrongLayers]) + "
    " msg += "You can check the log messages to find more information about the execution of the algorithm" - feedback.reportRrror(msg) + feedback.reportError(msg) if showResults and htmlResults and not wrongLayers: dlg = ResultsDialog() From b6632b0731fd4ad85af8b8196f698ae697f336c0 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 12 Jan 2017 14:49:26 +0200 Subject: [PATCH 017/332] [processing] workaround for fixing broken build --- python/plugins/processing/core/ProcessingConfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/plugins/processing/core/ProcessingConfig.py b/python/plugins/processing/core/ProcessingConfig.py index 9a375fdd3199..d4927b7ffe40 100644 --- a/python/plugins/processing/core/ProcessingConfig.py +++ b/python/plugins/processing/core/ProcessingConfig.py @@ -33,7 +33,7 @@ from qgis.PyQt.QtGui import QIcon from qgis.core import NULL, QgsApplication from processing.tools.system import defaultOutputFolder -from processing.tools import dataobjects +import processing.tools.dataobjects class SettingsWatcher(QObject): @@ -166,7 +166,7 @@ def initialize(): valuetype=Setting.SELECTION, options=invalidFeaturesOptions)) - extensions = dataobjects.getSupportedOutputVectorLayerExtensions() + extensions = processing.tools.dataobjects.getSupportedOutputVectorLayerExtensions() ProcessingConfig.addSetting(Setting( ProcessingConfig.tr('General'), ProcessingConfig.DEFAULT_OUTPUT_VECTOR_LAYER_EXT, @@ -175,7 +175,7 @@ def initialize(): valuetype=Setting.SELECTION, options=extensions)) - extensions = dataobjects.getSupportedOutputRasterLayerExtensions() + extensions = processing.tools.dataobjects.getSupportedOutputRasterLayerExtensions() ProcessingConfig.addSetting(Setting( ProcessingConfig.tr('General'), ProcessingConfig.DEFAULT_OUTPUT_RASTER_LAYER_EXT, From cce07020ff473b72763ee3e86b2e4e3affa1f059 Mon Sep 17 00:00:00 2001 From: Matthias Kuhn Date: Thu, 12 Jan 2017 15:01:38 +0100 Subject: [PATCH 018/332] Fix attribute table shows columns twice If they have been defined with different capitalization --- src/core/qgsattributetableconfig.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/qgsattributetableconfig.cpp b/src/core/qgsattributetableconfig.cpp index e44583534dc3..54fb341b665e 100644 --- a/src/core/qgsattributetableconfig.cpp +++ b/src/core/qgsattributetableconfig.cpp @@ -65,7 +65,7 @@ void QgsAttributeTableConfig::update( const QgsFields& fields ) const ColumnConfig& column = mColumns.at( i ); if ( column.type == Field ) { - if ( fields.lookupField( column.name ) == -1 ) + if ( fields.indexOf( column.name ) == -1 ) { mColumns.remove( i ); } From c9a8e5be61cd954c2a6a59d60c328978b7921a18 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Thu, 12 Jan 2017 20:18:55 +0200 Subject: [PATCH 019/332] fix settings group capitalization --- src/gui/qgsexpressionbuilderwidget.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/qgsexpressionbuilderwidget.cpp b/src/gui/qgsexpressionbuilderwidget.cpp index e950949323d2..73993c31fdf3 100644 --- a/src/gui/qgsexpressionbuilderwidget.cpp +++ b/src/gui/qgsexpressionbuilderwidget.cpp @@ -80,9 +80,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent ) txtSearchEditValues->setPlaceholderText( tr( "Search" ) ); QSettings settings; - splitter->restoreState( settings.value( QStringLiteral( "/windows/QgsExpressionBuilderWidget/splitter" ) ).toByteArray() ); - editorSplit->restoreState( settings.value( QStringLiteral( "/windows/QgsExpressionBuilderWidget/editorsplitter" ) ).toByteArray() ); - functionsplit->restoreState( settings.value( QStringLiteral( "/windows/QgsExpressionBuilderWidget/functionsplitter" ) ).toByteArray() ); + splitter->restoreState( settings.value( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/splitter" ) ).toByteArray() ); + editorSplit->restoreState( settings.value( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/editorsplitter" ) ).toByteArray() ); + functionsplit->restoreState( settings.value( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/functionsplitter" ) ).toByteArray() ); txtExpressionString->setFoldingVisible( false ); @@ -111,9 +111,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent ) QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget() { QSettings settings; - settings.setValue( QStringLiteral( "/windows/QgsExpressionBuilderWidget/splitter" ), splitter->saveState() ); - settings.setValue( QStringLiteral( "/windows/QgsExpressionBuilderWidget/editorsplitter" ), editorSplit->saveState() ); - settings.setValue( QStringLiteral( "/windows/QgsExpressionBuilderWidget/functionsplitter" ), functionsplit->saveState() ); + settings.setValue( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/splitter" ), splitter->saveState() ); + settings.setValue( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/editorsplitter" ), editorSplit->saveState() ); + settings.setValue( QStringLiteral( "/Windows/QgsExpressionBuilderWidget/functionsplitter" ), functionsplit->saveState() ); delete mModel; delete mProxyModel; From c484742eb75a3efc5b33aec1f958817ee9711462 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Thu, 12 Jan 2017 19:34:03 +0100 Subject: [PATCH 020/332] [server] Fix wrong debug output name and added HTTP_AUTHORIZATION --- src/server/qgsserver.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/server/qgsserver.cpp b/src/server/qgsserver.cpp index f77af1f2a8bc..091c3e819bba 100644 --- a/src/server/qgsserver.cpp +++ b/src/server/qgsserver.cpp @@ -158,18 +158,18 @@ void QgsServer::printRequestParameters( const QMap< QString, QString>& parameter */ void QgsServer::printRequestInfos() { - QgsMessageLog::logMessage( QStringLiteral( "********************new request***************" ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); + QgsMessageLog::logMessage( QStringLiteral( "******************** New request ***************" ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); if ( getenv( "REMOTE_ADDR" ) ) { - QgsMessageLog::logMessage( "remote ip: " + QString( getenv( "REMOTE_ADDR" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); + QgsMessageLog::logMessage( "REMOTE_ADDR: " + QString( getenv( "REMOTE_ADDR" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); } if ( getenv( "REMOTE_HOST" ) ) { - QgsMessageLog::logMessage( "remote ip: " + QString( getenv( "REMOTE_HOST" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); + QgsMessageLog::logMessage( "REMOTE_HOST: " + QString( getenv( "REMOTE_HOST" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); } if ( getenv( "REMOTE_USER" ) ) { - QgsMessageLog::logMessage( "remote user: " + QString( getenv( "REMOTE_USER" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); + QgsMessageLog::logMessage( "REMOTE_USER: " + QString( getenv( "REMOTE_USER" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); } if ( getenv( "REMOTE_IDENT" ) ) { @@ -199,6 +199,10 @@ void QgsServer::printRequestInfos() { QgsMessageLog::logMessage( "NO_PROXY: " + QString( getenv( "NO_PROXY" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); } + if ( getenv( "HTTP_AUTHORIZATION" ) ) + { + QgsMessageLog::logMessage( "HTTP_AUTHORIZATION: " + QString( getenv( "HTTP_AUTHORIZATION" ) ), QStringLiteral( "Server" ), QgsMessageLog::INFO ); + } } /** From 46f786eb52e548e2277ea0f565efa734199a9fd3 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 12 Jan 2017 20:29:08 +0100 Subject: [PATCH 021/332] add interactive mode to spell checking (allow direct replace or ignore) --- scripts/chkspelling_ag.sh | 59 - scripts/prepare-commit.sh | 2 +- scripts/{ => spell_check}/.agignore | 4 +- scripts/spell_check/check_spelling.sh | 162 + scripts/spell_check/spelling.dat | 7495 +++++++++++++++++++++++++ scripts/spelling.dat | 529 -- 6 files changed, 7661 insertions(+), 590 deletions(-) delete mode 100755 scripts/chkspelling_ag.sh rename scripts/{ => spell_check}/.agignore (91%) create mode 100755 scripts/spell_check/check_spelling.sh create mode 100644 scripts/spell_check/spelling.dat delete mode 100644 scripts/spelling.dat diff --git a/scripts/chkspelling_ag.sh b/scripts/chkspelling_ag.sh deleted file mode 100755 index e92490a29d44..000000000000 --- a/scripts/chkspelling_ag.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash -########################################################################### -# chkspelling_ag.sh -# --------------------- -# Date : December 2016 -# Copyright : (C) 2016 by Denis Rouzaud -# Email : denis.rouzaud@gmail.com -########################################################################### -# # -# This program is free software; you can redistribute it and/or modify # -# it under the terms of the GNU General Public License as published by # -# the Free Software Foundation; either version 2 of the License, or # -# (at your option) any later version. # -# # -########################################################################### - -# optional arguments: files to be checked -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -AGIGNORE=${DIR}/.agignore - -# This will try to look for mispelling within larger words. -# Condition is hard to explain in words. -# You can test it here: https://regex101.com/r/7kznVA/9 -# extra words that should not be checked in longer words -WHOLEWORDS=$(echo "("; perl -ne 'print if not /^(\w)(\w)\w{2,}(\w)(\w):(\2\2|\1(?:(?!\1)\w)|(?:(?!\1)\w)\2|(?:(?!\1)\w)(?:(?!\1)\w)|\2\1)\w*(\3\3|(?:(?!\4)\w)(?:(?!\3)\4)|\3(?:(?!\4).)|(?:(?!\4)\w)(?:(?!\4)\w)|\4\3)(?!:\*)$/' scripts/spelling.dat | cut -d: -f1 | tr '\n' '\|' | sed -e 's/|$//'; echo ")") -INWORDS=$( echo "("; perl -ne 'print if /^(\w)(\w)\w{2,}(\w)(\w):(\2\2|\1(?:(?!\1)\w)|(?:(?!\1)\w)\2|(?:(?!\1)\w)(?:(?!\1)\w)|\2\1)\w*(\3\3|(?:(?!\4)\w)(?:(?!\3)\4)|\3(?:(?!\4).)|(?:(?!\4)\w)(?:(?!\4)\w)|\4\3)(?!:\*)$/' scripts/spelling.dat | cut -d: -f1 | tr '\n' '\|' | sed -e 's/|$//'; echo ")") - -if [ ! $# -eq 0 ]; then - EXCLUDE=$(cat $AGIGNORE | sed -e 's/\s*#.*$//' -e '/^\s*$/d' | tr '\n' '|' | sed -e 's/|$//') - FILES=$(echo $@ | tr -s '[[:blank:]]' '\n' | egrep -iv "$EXCLUDE" | tr '\n' ' ' ) - echo "Running spell check on files: $FILES" -else - FILES="." -fi - -SPELLOK='(#\s*spellok|)$' - - -exec 5>&1 -# "path-to-ignore" option differs on ag version: --path-to-ignore on fedora, --path-to-agignore on ubuntu 16.04: using short option -OUTPUT=$(unbuffer ag --smart-case --all-text --nopager --numbers --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOK}"')' $FILES | tee /dev/fd/5 ; \ - unbuffer ag --smart-case --all-text --nopager --numbers -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOK}"')' $FILES | tee /dev/fd/5) - - -ESCSPELLOK=$(echo $SPELLOK | sed 's/(/\\\\(/' | sed 's/)/\\\\)/' | sed 's/|/\\\\|/') - -if [[ ! -z $OUTPUT ]]; then - echo "Spelling errors have been found" - echo "****" - # < ---------- get files + error ---------------------------------------------------------------------------> <-- generate sed command .... <------------------------------ get correction word ----------------------------------> <------------------------------- match case -------------------------------------------> <-----replace : by / and add word boundary------> ...finalize sed command> remove duplicate line - ag --smart-case --only-matching --nogroup --nonumbers --all-text --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOK}"')' $FILES | sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i \x27\/'"$ESCSPELLOK"'\/! s\/"$( echo "\2:$(ag --nonumbers --ignore-case --word-regexp \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -r \x27s\/(\\S\*):\/\\\\b\\1\\\\b\\\/\/\x27)"\/g\x27 \1" /e' | sort -u - ag --smart-case --only-matching --nogroup --nonumbers --all-text -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOK}"')' $FILES | sed -e 's/\(\S*\):\([[:alnum:]]*\)$/ echo "sed -i \x27\/'"$ESCSPELLOK"'\/! s\/"$( echo "\2:$(ag --nonumbers --ignore-case --word-regexp \2 scripts\/spelling.dat | cut -d: -f2)" | sed -r \x27s\/([A-Z]+):(.*)\/\\1:\\U\\2\/; s\/([A-Z][a-z]+):([a-z])\/\\1:\\U\\2\\L\/\x27 | sed -r \x27s\/(\\S\*):\/\\1\\\/\/\x27)"\/g\x27 \1" /e' | sort -u - echo "****" - echo "Run above commands to fix spelling errors or add #spellok at the end of the line to discard spell check on this line." - exit 1 -else - exit 0 -fi diff --git a/scripts/prepare-commit.sh b/scripts/prepare-commit.sh index e3fe4f79d88f..412f07c194c6 100755 --- a/scripts/prepare-commit.sh +++ b/scripts/prepare-commit.sh @@ -41,7 +41,7 @@ set -e # determine changed files MODIFIED=$(git status --porcelain| sed -ne "s/^ *[MA] *//p" | sort -u) -${TOPLEVEL}/scripts/chkspelling_ag.sh $MODIFIED +${TOPLEVEL}/scripts/spell_check/check_spelling.sh $MODIFIED if [ -z "$MODIFIED" ]; then diff --git a/scripts/.agignore b/scripts/spell_check/.agignore similarity index 91% rename from scripts/.agignore rename to scripts/spell_check/.agignore index 5730374feef6..7e77281b08f6 100644 --- a/scripts/.agignore +++ b/scripts/spell_check/.agignore @@ -25,6 +25,8 @@ src/plugins/grass/qtermwidget/ ChangeLog debian/qgis.desktop debian/qbrowser.desktop +debian/qgis-provider-grass.lintian-overrides +debian/qgis-plugin-grass.lintian-overrides doc/contributors.json Exception_to_GPL_for_Qt.txt images/themes/default/svgbase/hammer.svg @@ -35,7 +37,7 @@ python/plugins/processing/tests/testdata/expected/orthagonal_lines.gml python/plugins/processing/tests/testdata/expected/orthagonal_lines.gfs python/plugins/processing/tests/testdata/expected/orthagonal_polys.gfs python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml -spelling.dat +scripts/spell_check/spelling.dat src/server/qgis_wms.xmi resources/cpt-city-qgis-min/fme/metres/DESC.xml resources/cpt-city-qgis-min/selections/reds.xml diff --git a/scripts/spell_check/check_spelling.sh b/scripts/spell_check/check_spelling.sh new file mode 100755 index 000000000000..573e44e9f1b0 --- /dev/null +++ b/scripts/spell_check/check_spelling.sh @@ -0,0 +1,162 @@ +#!/bin/bash +########################################################################### +# chkspelling_ag.sh +# --------------------- +# Date : December 2016 +# Copyright : (C) 2016 by Denis Rouzaud +# Email : denis.rouzaud@gmail.com +########################################################################### +# # +# This program is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +########################################################################### + +# -i: enter interactive mode to fix errors +# optional argument: list of files to be checked + + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +AGIGNORE=${DIR}/.agignore + +# ARGUMENTS +INTERACTIVE=YES +while getopts ":r" opt; do + case $opt in + r) + echo "interactive mode turned off" >&2 + INTERACTIVE=NO + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + esac +done +shift $(expr $OPTIND - 1) + +if [ ! $# -eq 0 ]; then + EXCLUDE=$(cat $AGIGNORE | sed -e 's/\s*#.*$//' -e '/^\s*$/d' | tr '\n' '|' | sed -e 's/|$//') + INPUTFILES=$(echo $@ | tr -s '[[:blank:]]' '\n' | egrep -iv "$EXCLUDE" | tr '\n' ' ' ) + echo "Running spell check on files: $INPUTFILES" +else + INPUTFILES="." +fi + +SPELLOK='(#\s*spellok|)$' + +# split into several files to avoid too long regexes +SPLIT=4 +GNUPREFIX= +if [[ "$OSTYPE" =~ darwin* ]]; then + GNUPREFIX=g +fi + +${GNUPREFIX}split --number=l/$SPLIT --numeric-suffixes=1 --suffix-length=1 --additional-suffix=~ ${DIR}/spelling.dat spelling + + +for ((I=1;I<=$SPLIT;I++)) ; do + SPELLFILE=spelling$I~; + + # This will try to look for mispelling within larger words. + # Condition is hard to explain in words. + # You can test it here: https://regex101.com/r/7kznVA/9 + # extra words that should not be checked in longer words + WHOLEWORDS=$(echo "("; perl -ne 'print if not /^(\w)(\w)\w{2,}(\w)(\w):(\2\2|\1(?:(?!\1)\w)|(?:(?!\1)\w)\2|(?:(?!\1)\w)(?:(?!\1)\w)|\2\1)\w*(\3\3|(?:(?!\4)\w)(?:(?!\3)\4)|\3(?:(?!\4).)|(?:(?!\4)\w)(?:(?!\4)\w)|\4\3)(?!:\*)$/' $SPELLFILE | cut -d: -f1 | tr '\n' '\|' | sed -e 's/|$//'; echo ")") + INWORDS=$( echo "("; perl -ne 'print if /^(\w)(\w)\w{2,}(\w)(\w):(\2\2|\1(?:(?!\1)\w)|(?:(?!\1)\w)\2|(?:(?!\1)\w)(?:(?!\1)\w)|\2\1)\w*(\3\3|(?:(?!\4)\w)(?:(?!\3)\4)|\3(?:(?!\4).)|(?:(?!\4)\w)(?:(?!\4)\w)|\4\3)(?!:\*)$/' $SPELLFILE | cut -d: -f1 | tr '\n' '\|' | sed -e 's/|$//'; echo ")") + + FILE=$INPUTFILES # init with input files (if ag is run with single file, file path is now in output) + COMMANDS="" + ERRORFOUND=NO + while read -u 3 -r LINE; do + echo "$LINE" + ERRORFOUND=YES + if [[ "$INTERACTIVE" =~ YES ]]; then + NOCOLOR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g') + if [[ "$NOCOLOR" =~ ^[[:alnum:]][[:alnum:]\/\._-]+$ ]]; then + FILE=$NOCOLOR + fi + if [[ "$NOCOLOR" =~ ^[0-9]+: ]]; then + if [[ -z $FILE ]]; then + echo "Error: no file" + exit 1 + fi + NUMBER=$(echo "$NOCOLOR" | cut -d: -f1) + ERROR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/^.*\x1B\[30;43m(.*?)\x1B\[0m.*$/\1/') + CORRECTION=$(ag --nonumbers --ignore-case --word-regexp "$ERROR" ${DIR}/spelling.dat | cut -d: -f2) + + SPELLOKSTR='//#spellok' + if [[ "$FILE" =~ \.(txt|html|htm)$ ]]; then + SPELLOKSTR='' + fi + if [[ "$FILE" =~ \.(h|cpp|sip)$ ]]; then + if [[ "$NOCOLOR" =~ ^\s*(\/*)|(\/\/) ]]; then + SPELLOKSTR='#spellok' + fi + fi + if [[ "$FILE" =~ \.(py)$ ]]; then + SPELLOKSTR='#spellok' + fi + + echo "" + echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTION\x1B[0m" + echo -e " \x1B[4ma\x1B[0mppend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line to avoid spell check on this line" + echo -e " en\x1B[4mt\x1B[0mer your own correction" + echo -e " ignore and \x1B[4mc\x1B[0montinue" + echo -e " ignore and \x1B[4me\x1B[0mxit" + + while read -n 1 n; do + echo "" + case $n in + r) + MATCHCASE="$ERROR:$CORRECTION" + CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\U\2/;s/([A-Z][a-z]+):([a-z])/\U\2\L/') + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTION\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + ${GNUPREFIX}sed -i "${NUMBER}s/$ERROR/$CORRECTION/g" $FILE + break + ;; + a) + echo -e "appending \x1B[33m$SPELLOKSTR\x1B[0m to \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + SPELLOKSTR=$(echo "$SPELLOKSTR" | ${GNUPREFIX}sed -r 's/\//\\\//g') + ${GNUPREFIX}sed -i "${NUMBER}s/\$/ $SPELLOKSTR/" $FILE + break + ;; + t) + echo "Enter the correction: " + read CORRECTION + MATCHCASE="$ERROR:$CORRECTION" + CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\U\2/;s/([A-Z][a-z]+):([a-z])/\U\2\L/') + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTION\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" sed -i "${NUMBER}s/$ERROR/$CORRECTION/g" $FILE + break + ;; + c) + break + ;; + e) + exit 1 + ;; + *) invalid option;; + esac + done + + fi + if [[ "$NOCOLOR" =~ ^\s*$ ]]; then + FILE="" + fi + fi + done 3< <(unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOK}"')' $INPUTFILES ; \ + unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOK}"')' $INPUTFILES ) + + rm $SPELLFILE + + if [[ "$ERRORFOUND" =~ YES ]]; then + echo -e "\x1B[1msome errors have been found.\x1B[0m" + exit 1 + else + exit 0 + fi +done +exit diff --git a/scripts/spell_check/spelling.dat b/scripts/spell_check/spelling.dat new file mode 100644 index 000000000000..cea656297ad7 --- /dev/null +++ b/scripts/spell_check/spelling.dat @@ -0,0 +1,7495 @@ +abailable:available +abandonded:abandoned +abandonned:abandoned +abandonning:abandoning +abbout:about +abbrevation:abbreviation +abbrevations:abbreviations +abbriviation:abbreviation +abbriviations:abbreviations +aberation:aberration +abigious:ambiguous +abilties:abilities +abilty:ability +abitrate:arbitrate +abolute:absolute +abondon:abandon +abondoned:abandoned +abondoning:abandoning +abondons:abandons +aborigene:aborigine +abortificant:abortifacient +abotu:about +abouta:about a +aboutit:about it +aboutthe:about the +abov:above +abreviate:abbreviate +abreviated:abbreviated +abreviates:abbreviates +abreviating:abbreviating +abreviation:abbreviation +abritrary:arbitrary +absail:abseil +absailing:abseiling +absance:absence +abscence:absence +absense:absence +absolut:absolute +absolutly:absolutely +absorbsion:absorption +absorbtion:absorption +absoulte:absolute +abstact:abstract +abstactly:abstractly +absymal:abysmal +abudance:abundance +abundacies:abundances +abundancies:abundances +abundunt:abundant +abutts:abuts +acadamy:academy +acadmic:academic +accademic:academic +accademy:academy +acccept:accept +acccepted:accepted +acccepting:accepting +acccepts:accepts +acccess:access +acccessible:accessible +acccused:accused +acceleratoin:acceleration +accelleration:acceleration +accension:ascension +acceptence:acceptance +acceptible:acceptable +acces:access +accesing:accessing +accesnt:accent +accesories:accessories +accessable:accessible +accesss:access +accidant:accident +accidentaly:accidentally +accidential:accidental +accidentially:accidentally +accidentily:accidentally +accidently:accidentally +accidentually:accidentally +acclimitization:acclimatization +accoding:according +accodingly:accordingly +accomadate:accommodate +accomadated:accommodated +accomadates:accommodates +accomadating:accommodating +accomadation:accommodation +accomadations:accommodations +accomdate:accommodate +accomodate:accommodate +accomodated:accommodated +accomodates:accommodates +accomodating:accommodating +accomodation:accommodation +accomodations:accommodations +accompagnied:accompanied +accompagnies:accompanies +accompagny:accompany +accompagnying:accompanying +accompanyed:accompanied +accordeon:accordion +accordian:accordion +accordint:according +accoring:according +accoustic:acoustic +accout:account +accquainted:acquainted +accquire:acquire +accquired:acquired +accquires:acquires +accquiring:acquiring +accrediation:accreditation +accredidation:accreditation +accross:across +accumlate:accumulate +accumlated:accumulated +accumlates:accumulates +accumlating:accumulating +accussed:accused +acedemic:academic +acessable:accessible +acess:access +acheive:achieve +acheived:achieved +acheivement:achievement +acheivements:achievements +acheives:achieves +acheiving:achieving +acheivment:achievement +acheivments:achievements +achievment:achievement +achievments:achievements +achitecture:architecture +achitectures:architectures +achive:achieve +achived:achieved +achivement:achievement +achivements:achievements +achives:achieves +achiving:achieving +achor:anchor +achored:anchored +achoring:anchoring +achors:anchors +acident:accident +acient:ancient +acknoledge:acknowledge +acknoledged:acknowledged +acknoledges:acknowledges +acknoledging:acknowledging +acknowldeged:acknowledged +acknowldegement:acknowledgement +acknowledgeing:acknowledging +acknowlege:acknowledge +acknowleged:acknowledged +acknowleges:acknowledges +acknowleging:acknowledging +ackowledge:acknowledge +ackowledged:acknowledged +ackward:awkward* +acommodate:accommodate +acommodated:accommodated +acommodates:accommodates +acommodating:accommodating +acomplish:accomplish +acomplished:accomplished +acomplishment:accomplishment +acomplishments:accomplishments +acording:according +acordingly:accordingly +acquaintence:acquaintance +acquaintences:acquaintances +acquiantence:acquaintance +acquiantences:acquaintances +acquited:acquitted +acqure:acquire +acqured:acquired +acqures:acquires +acquring:acquiring +actaul:actual +actaully:actually +actived:activated +activete:activate +activites:activities +activly:actively +actualy:actually +actully:actually +acually:actually +acumulating:accumulating +acuracy:accuracy +acused:accused +acustom:accustom +acustommed:accustomed +acutal:actual +acutally:actually +adapated:adapted +adapater:adapter +adapaters:adapters +adatper:adapter +adatpers:adapters +adavanced:advanced +adbandon:abandon +addd:add +addded:added +addding:adding +adddress:address +adddresses:addresses +addds:adds +addess:address +addessed:addressed +addesses:addresses +addessing:addressing +addional:additional +addionally:additionally +additinally:additionally +additionaly:additionally +additionnal:additional +additionnally:additionally +additon:addition +additonal:additional +additonally:additionally +addjust:adjust +addjusted:adjusted +addjusting:adjusting +addjusts:adjusts +addmission:admission +addopt:adopt +addopted:adopted +addoptive:adoptive +addresable:addressable +addres:address +addresed:addressed +addreses:addresses +addresing:addressing +addressess:addresses +addresss:address +addresssed:addressed +addressses:addresses +addresssing:addressing +addtion:addition +addtional:additional +addtionally:additionally +adecuate:adequate +adequit:adequate +adhearing:adhering +adherance:adherence +aditional:additional +aditionally:additionally +aditionaly:additionally +admendment:amendment +admininistrative:administrative +adminstered:administered +adminstrate:administrate +adminstration:administration +adminstrative:administrative +adminstrator:administrator +adminstrators:administrators +admissability:admissibility +admissable:admissible +admited:admitted +admitedly:admittedly +adn:and +adolecent:adolescent +adquire:acquire +adquired:acquired +adquires:acquires +adquiring:acquiring +adresable:addressable +adres:address +adresing:addressing +adressable:addressable +adress:address +adressed:addressed +adresses:addresses +adressing:addressing +adventrous:adventurous +advertisment:advertisement +advertisments:advertisements +advesary:adversary +adviced:advised +aeriel:aerial +aeriels:aerials +afair:affair +afecting:affecting +afer:after +afficianados:aficionados +afficionado:aficionado +afficionados:aficionados +affilate:affiliate +affilliate:affiliate +affort:afford +affraid:afraid +aforememtioned:aforementioned +aforementionned:aforementioned +aformentioned:aforementioned +afterall:after all +againnst:against +agains:against +againts:against +agaisnt:against +agaist:against +aganist:against +aggaravates:aggravates +aggreed:agreed +aggreement:agreement +aggregious:egregious +aggresive:aggressive +agian:again +agianst:against +agin:again +aginst:against +agravate:aggravate +agre:agree +agred:agreed +agreeement:agreement +agreemnt:agreement +agregate:aggregate +agregates:aggregates +agregation:aggregation +agreing:agreeing +agression:aggression +agressive:aggressive +agressively:aggressively +agressor:aggressor +agricuture:agriculture +agrieved:aggrieved +agrument:argument +agruments:arguments +agument:argument +aguments:arguments +aheared:adhered +ahev:have +ahppen:happen +ahve:have +aicraft:aircraft +aiport:airport +airbourne:airborne +aircaft:aircraft +aircrafts:aircraft +airporta:airports +airrcraft:aircraft +aisian:asian +albiet:albeit +albumns:albums +alchohol:alcohol +alchoholic:alcoholic +alchol:alcohol +alcholic:alcoholic +alcohal:alcohol +alcoholical:alcoholic +aleady:already +aledge:allege +aledged:alleged +aledges:alleges +alege:allege +aleged:alleged +alegience:allegiance +alegorical:allegorical +algebraical:algebraic +algorhitms:algorithms +algorith:algorithm +algorithmical:algorithmically +algoritm:algorithm +algoritms:algorithms +algorrithm:algorithm +algorritm:algorithm +algorythm:algorithm +alientating:alienating +alignemnt:alignment +alignemnts:alignments +alledge:allege +alledged:alleged +alledgedly:allegedly +alledges:alleges +allegedely:allegedly +allegedy:allegedly +allegely:allegedly +allegence:allegiance +allegience:allegiance +allign:align +alligned:aligned +alligning:aligning +allignment:alignment +allignments:alignments +alligns:aligns +alliviate:alleviate +allmost:almost +allopone:allophone +allopones:allophones +allowd:allowed +allpication:application +allready:already +allthough:although +alltime:all-time +alltogether:altogether +allways:always +almsot:almost +alocate:allocate +alocated:allocated +alocates:allocates +alocating:allocating +alochol:alcohol +alogirhtms:algorithms +alogrithm:algorithm +alogrithms:algorithms +alomst:almost +alot:a lot +alotted:allotted +alow:allow +alowed:allowed +alowing:allowing +alows:allows +alpabet:alphabet +alpabetical:alphabetical +alpabetic:alphabetic +alpabets:alphabets +alrady:already +alraedy:already +alreay:already +alreayd:already +als:also +alse:also +alsot:also +alterative:alternative +alteratives:alternatives +alternativly:alternatively +alternitives:alternatives +altho:although +althought:although +altough:although +alusion:allusion +alwasy:always +alwyas:always +amalgomated:amalgamated +amatuer:amateur +amature:amateur +ambigious:ambiguous +ambigous:ambiguous +amendmant:amendment +Amercia:America +amerliorate:ameliorate +amke:make +amking:making +ammend:amend +ammended:amended +ammending:amending +ammendment:amendment +ammendments:amendments +ammends:amends +ammount:amount +ammused:amused +amoung:among +amoungst:amongst +amout:amount +amung:among +amunition:ammunition +analagous:analogous +analitic:analytic +analogeous:analogous +analysator:analyzer +analysies:analyses +anarchim:anarchism +anarchistm:anarchism +anbd:and +ancestory:ancestry +ancilliary:ancillary +andd:and +androgenous:androgynous +androgeny:androgyny +ang:and +anihilation:annihilation +aniversary:anniversary +anlge:angle +anniversery:anniversary +annoint:anoint +annointed:anointed +annointing:anointing +annoints:anoints +annother:another +annouce:announce +annouced:announced +annoucement:announcement +annouces:announces +annoucing:announcing +announcment:announcement +announcments:announcements +annualy:annually +annuled:annulled +anohter:another +anomolies:anomalies +anomolous:anomalous +anomoly:anomaly +anonimity:anonymity +an other:another +anounced:announced +anouncement:announcement +ansalisation:nasalisation +ansalization:nasalization +ansestors:ancestors +antartic:antarctic +anthromorphization:anthropomorphization +anthropolgist:anthropologist +anthropolgy:anthropology +anual:annual +anulled:annulled +anway:anyway +anwser:answer +anwsered:answered +anwsering:answering +anwsers:answers +anyhwere:anywhere +anyother:any other +anyting:anything +anytying:anything +aparent:apparent +aparment:apartment +aplication:application +aplied:applied +apllied:applied +apllies:applies +aplly:apply +apllying:applying +apolegetics:apologetics +apon:upon +apparant:apparent +apparantly:apparently +appart:apart +appartment:apartment +appartments:apartments +appealling:appealing +appeareance:appearance +appearence:appearance +appearences:appearances +appeneded:appended +apperance:appearance +apperances:appearances +appereance:appearance +appereances:appearances +appered:appeared +appers:appears +applicaiton:application +applicaitons:applications +appliction:application +applictions:applications +appologies:apologies +appology:apology +appplication:application +appplications:applications +apprearance:appearance +apprieciate:appreciate +approachs:approaches +appropiate:appropriate +appropiately:appropriately +appropraite:appropriate +appropraitely:appropriately +appropriatly:appropriately +appropriatness:appropriateness +approproate:appropriate +appropropiate:appropriate +appropropiately:appropriately +appropropriate:appropriate +approproximate:approximate +approriate:appropriate +approriately:appropriately +approxamately:approximately +approxiately:approximately +approximatly:approximately +approximitely:approximately +aprehensive:apprehensive +apropriate:appropriate +apropriately:appropriately +aproval:approval +aproximate:approximate +aproximately:approximately +aproximation:approximation +aproximations:approximations +aqcuire:acquire +aqcuired:acquired +aqcuires:acquires +aqcuiring:acquiring +aquaduct:aqueduct +aquaint:acquaint +aquaintance:acquaintance +aquainted:acquainted +aquainting:acquainting +aquaints:acquaints +aquiantance:acquaintance +aquire:acquire +aquired:acquired +aquiring:acquiring +aquisition:acquisition +aquitted:acquitted +aranged:arranged +arangement:arrangement +arbitarily:arbitrarily +arbitary:arbitrary +arbitray:arbitrary +archaelogical:archaeological +archaelogists:archaeologists +archaelogy:archaeology +archaoelogy:archeology +archaology:archeology +archeaologist:archeologist +archeaologists:archeologists +archetect:architect +archetects:architects +archetectural:architectural +archetecturally:architecturally +archetecture:architecture +archiac:archaic +archictect:architect +archiecture:architecture +archiectures:architectures +archimedian:archimedean +architecht:architect +architechturally:architecturally +architechture:architecture +architechtures:architectures +architectual:architectural +archtype:archetype +archtypes:archetypes +archvie:archive +archvies:archives +aready:already +are'nt:aren't +arent:aren't +areodynamics:aerodynamics +argment:argument +argments:arguments +argubly:arguably +arguement:argument +arguements:arguments +aribitary:arbitrary +aribtrarily:arbitrarily +aribtrary:arbitrary +arised:arose +arithmatic:arithmetic +arithmentic:arithmetic +aritmetic:arithmetic +arival:arrival +armamant:armament +armistace:armistice +arne't:aren't +arogant:arrogant +arogent:arrogant +aroud:around +aroung:around +arount:around +arraival:arrival +arrangment:arrangement +arrangments:arrangements +arrengement:arrangement +arrengements:arrangements +arround:around +artcile:article +artefact:artifact +artefacts:artifacts +artical:article +artice:article +articel:article +artifical:artificial +artifically:artificially +artillary:artillery +arugment:argument +arugments:arguments +arund:around +asetic:ascetic +asfar:as far +asign:assign +asigned:assigned +aslo:also +asociated:associated +asorbed:absorbed +asphyxation:asphyxiation +assasin:assassin +assasinate:assassinate +assasinated:assassinated +assasinates:assassinates +assasination:assassination +assasinations:assassinations +assasined:assassinated +assasins:assassins +assassintation:assassination +assemple:assemble +assertation:assertion +assesment:assessment +assgin:assign +assgined:assigned +assgining:assigning +assginment:assignment +assginments:assignments +assgins:assigns +asside:aside +assiged:assigned +assigment:assignment +assigments:assignments +assignement:assignment +assignements:assignments +assignemnt:assignment +assignemnts:assignments +assisnate:assassinate +assistent:assistant +assitant:assistant +assit:assist +assocaited:associated +assocate:associate +assocated:associated +assocates:associates +assocating:associating +assocation:association +associcate:associate +associcated:associated +associcates:associates +associcating:associating +assoicate:associate +assoicated:associated +assoicates:associates +assosciate:associate +assosciated:associated +assosciates:associates +assosciating:associating +assosiate:associate +assosiated:associated +assosiates:associates +assosiating:associating +assosication:assassination +assotiated:associated +asssassans:assassins +asssertion:assertion +assualt:assault +assualted:assaulted +assymetrical:asymmetrical +assymetric:asymmetric +asteriod:asteroid +asthetic:aesthetic +asthetical:aesthetical +asthetically:aesthetically +asume:assume +asuming:assuming +aswell:as well +asychronously:asynchronously +asycronous:asynchronous +asynchonous:asynchronous +asynchonously:asynchronously +asyncronous:asynchronous +asyncronously:asynchronously +atain:attain +atempting:attempting +atheistical:atheistic +athenean:athenian +atheneans:athenians +athiesm:atheism +athiest:atheist +atomatically:automatically +atomical:atomic +atomicly:atomically +atorney:attorney +atribute:attribute +atributed:attributed +atributes:attributes +attachement:attachment +attaindre:attainder +attatch:attach +attatched:attached +attatches:attaches +attatching:attaching +attatchment:attachment +attatchments:attachments +attched:attached +attemp:attempt +attemped:attempted +attemps:attempts +attemt:attempt +attemted:attempted +attemting:attempting +attemtp:attempt +attemtped:attempted +attemtping:attempting +attemtps:attempts +attemts:attempts +attendence:attendance +attendent:attendant +attendents:attendants +attened:attended +attension:attention +attibute:attribute +attibutes:attributes +attirbute:attribute +attirbutes:attributes +attitide:attitude +attribut:attribute +attributred:attributed +attrocities:atrocities +attruibutes:attributes +atttribute:attribute +atttributes:attributes +audeince:audience +auromated:automated +austrailia:Australia +austrailian:Australian +autenticate:authenticate +autenticated:authenticated +autenticates:authenticates +autenticating:authenticating +autentication:authentication +authenticaiton:authentication +authentification:authentication +auther:author +authetication:authentication +authobiographic:autobiographic +authobiography:autobiography +authorative:authoritative +authorites:authorities +authorithy:authority +authoritiers:authorities +authoritive:authoritative +authrorities:authorities +autochtonous:autochthonous +autoctonous:autochthonous +autoincrememnt:autoincrement +automaticall:automatically +automaticaly:automatically +automaticly:automatically +automatize:automate +automatized:automated +automatizes:automates +automibile:automobile +automonomous:autonomous +autonymous:autonomous +autor:author +autorisation:authorisation +autority:authority +autorization:authorization +auxilary:auxiliary +auxiliar:auxiliary +auxillaries:auxiliaries +auxillary:auxiliary +auxilliaries:auxiliaries +auxilliary:auxiliary +avaiable:available +avaialble:available +avaible:available +availabe:available +availabel:available +availabled:available:* +availablity:availability +availaible:available +availale:available +availavility:availability +availble:available +availiable:available +availibility:availability +availible:available +avalable:available +avalance:avalanche +avaliable:available +avaluated:evaluated +avaluate:evaluate +avaluates:evaluates +avaluating:evaluating +avation:aviation +avengence:a vengeance +averageed:averaged +aviable:available +avilable:available +avod:avoid +avoded:avoided +avoding:avoiding +avods:avoids +awared:awarded +aweful:awful +awefully:awfully +awya:away +baceause:because +backgorund:background +backgroud:background +backrounds:backgrounds +backslashs:backslashes +bahavior:behavior +bakc:back +bakup:backup +bakups:backups +baloon:balloon +baloons:balloons +banannas:bananas +bandwidht:bandwidth +bandwith:bandwidth +bankrupcy:bankruptcy +banruptcy:bankruptcy +baout:about +basicaly:basically +basicly:basically +batery:battery +bcak:back +beacause:because +beachead:beachhead +beacuse:because +beastiality:bestiality +beatiful:beautiful +beaurocracy:bureaucracy +beaurocratic:bureaucratic +beause:because +beautyfull:beautiful +becamae:became +becames:becomes +becase:because +becasue:because +becausee:because +beccause:because +becomeing:becoming +becomming:becoming +becouse:because +becuase:because +bedore:before +beeing:being +beetween:between +befoer:before +befor:before +beggin:begin +begginer:beginner +begginers:beginners +beggining:beginning +begginings:beginnings +beggins:begins +begining:beginning +beginnig:beginning +behaviour:behavior +behavoir:behavior +behavoirs:behaviors +behavour:behavior +beleagured:beleaguered +beleif:belief +beleive:believe +beleived:believed +beleives:believes +beleiving:believing +beligum:belgium +belive:believe +belived:believed +belives:believes +beliving:believing +belligerant:belligerent +bellow:below +bellweather:bellwether +bemusemnt:bemusement +beneficary:beneficiary +beng:being +benificial:beneficial +benifit:benefit +benifits:benefits +bergamont:bergamot +Bernouilli:Bernoulli +beseige:besiege +beseiged:besieged +beseiging:besieging +beteen:between +betweeen:between +betwen:between +beween:between +bewteen:between +bianries:binaries +bianry:binary +bilateraly:bilaterally +billingualism:bilingualism +binominal:binomial +bizzare:bizarre +blaim:blame +blaimed:blamed +blessure:blessing +blindy:blindly +bofore:before +bombardement:bombardment +bombarment:bombardment +bondary:boundary +Bonnano:Bonanno +bootsrap:bootstrap +bootstap:bootstrap +bootstapped:bootstrapped +bootstapping:bootstrapping +bootstaps:bootstraps +boradcast:broadcast +borke:broke +boudaries:boundaries +boudary:boundary +bouding:bounding +boundries:boundaries +boundry:boundary +bouyancy:buoyancy +bouyant:buoyant +boyant:buoyant +Brasillian:Brazilian +breakthough:breakthrough +breakthroughts:breakthroughs +breif:brief +breifly:briefly +brethen:brethren +bretheren:brethren +brige:bridge +briges:bridges +brighness:brightness +brigth:bright +briliant:brilliant +brillant:brilliant +brimestone:brimstone +Britian:Britain +Brittish:British +broacasted:broadcast +broadacasting:broadcasting +broady:broadly +brokeness:brokenness +brower:browser +browers:browsers +Buddah:Buddha +Buddist:Buddhist +bufffer:buffer +bufffers:buffers +bugus:bogus +buid:build +buisness:business +buisnessman:businessman +bulding:building +bulid:build +buliding:building +bulids:builds +bulit:built +bulletted:bulleted +buoancy:buoyancy +buring:during +burried:buried +busines:business +busineses:business +busness:business +bussiness:business +cacheing:caching +cacluate:calculate +cacluated:calculated +cacluates:calculates +cacluating:calculating +cacluation:calculation +cacluations:calculations +caculate:calculate +caculated:calculated +caculater:calculator +caculates:calculates +caculating:calculating +caculation:calculation +caculations:calculations +cacuses:caucuses +cahracters:characters +calaber:caliber +calander:calendar +calcualte:calculate +calcualted:calculated +calcualtes:calculates +calcualting:calculating +calculater:calculator +calculs:calculus +calender:calendar +calenders:calendars +caligraphy:calligraphy +caluclate:calculate +caluclated:calculated +caluculate:calculate +caluculated:calculated +calulate:calculate +calulated:calculated +calulater:calculator +calulates:calculates +calulating:calculating +calulation:calculation +calulations:calculations +Cambrige:Cambridge +camoflage:camouflage +campagin:campaign +campain:campaign +campaing:campaign +campains:campaigns +cancelation:cancellation +candadate:candidate +candiate:candidate +candidiate:candidate +canidate:candidate +canidates:candidates +cannister:canister +cannisters:canisters +cannnot:cannot +cannonical:canonical +cannotation:connotation +cannotations:connotations +canonalize:canonicalize +canonalized:canonicalized +canonalizes:canonicalizes +canonalizing:canonicalizing +cant:can't +caost:coast +capabilies:capabilities +capabilites:capabilities +capatibilities:capabilities +caperbility:capability +capible:capable +capitalise:capitalize +captial:capital +captued:captured +capturd:captured +carachter:character +caracter:character +caracterized:characterized +carefull:careful +carefuly:carefully +careing:caring +cariage:carriage +carismatic:charismatic +carreer:career +carrers:careers +Carribbean:Caribbean +Carribean:Caribbean +cartdridge:cartridge +carthographer:cartographer +cartilege:cartilage +cartilidge:cartilage +cartrige:cartridge +casette:cassette +casion:caisson +cassawory:cassowary +cassowarry:cassowary +casue:cause +casued:caused +casues:causes +casuing:causing +casulaties:casualties +casulaty:casualty +catagories:categories +catagorized:categorized +catagory:category +catched:caught +catepillar:caterpillar +catepillars:caterpillars +catergorize:categorize +catergorized:categorized +caterpilar:caterpillar +caterpilars:caterpillars +caterpiller:caterpillar +caterpillers:caterpillars +cathlic:catholic +catholocism:catholicism +catterpilar:caterpillar +catterpilars:caterpillars +catterpillar:caterpillar +catterpillars:caterpillars +cattleship:battleship +caugt:caught +cauhgt:caught +causalities:casualties +Ceasar:Caesar +ceate:create +ceated:created +ceates:creates +ceating:creating +cehck:check +cehcked:checked +cehcking:checking +cehcks:checks +Celcius:Celsius +cellpading:cellpadding +cementary:cemetery +cemetarey:cemetery +cemetaries:cemeteries +cemetary:cemetery +cencus:census +cententenial:centennial +centimetre:centimeter +centimetres:centimeters +centralise:centralize +centruies:centuries +centruy:century +centuties:centuries +centuty:century +ceratin:certain +cerimonial:ceremonial +cerimonies:ceremonies +cerimonious:ceremonious +cerimony:ceremony +ceromony:ceremony +certainity:certainty +certficate:certificate +certficates:certificates +certian:certain +certicate:certificate +certicates:certificates +certifcate:certificate +certifcates:certificates +chalenging:challenging +challanage:challenge +challange:challenge +challanged:challenged +challanges:challenges +challege:challenge +Champange:Champagne +changable:changeable +chaning:changing +channle:channel +channles:channels +channnel:channel +channnels:channels +characer:character +characers:characters +charachter:character +charachters:characters +characted:character +characteds:characters +charactersistic:characteristic +charactor:character +charactors:characters +charasmatic:charismatic +charater:character +charaterized:characterized +charaters:characters +charcter:character +chariman:chairman +charistics:characteristics +chasr:chase +chatacter:character +chatacters:characters +chcek:check +chceked:checked +chceking:checking +chceks:checks +checksuming:checksumming +cheif:chief +cheifs:chiefs +chek:check +cheking:checking +cheksum:checksum +cheksums:checksums +chemcial:chemical +chemcially:chemically +chemestry:chemistry +chemicaly:chemically +childen:children +childern:children +childs:children +chnage:change +chnages:changes +choise:choice +choosed:chose +choosen:chosen +chosing:choosing +chould:should +chracter:character +chracters:characters +chuch:church +churchs:churches +Cincinatti:Cincinnati +Cincinnatti:Cincinnati +circulaton:circulation +circumsicion:circumcision +circut:circuit +circuts:circuits +ciricuit:circuit +ciriculum:curriculum +cirumstance:circumstance +cirumstances:circumstances +civillian:civilian +claer:clear +claerer:clearer +claerly:clearly +claimes:claims +clasical:classical +clasically:classically +clasic:classic +clasified:classified +clasifies:classifies +clasify:classify +clasifying:classifying +classess:classes +classs:class +classses:classes +cleareance:clearance +clearified:clarified +clearifies:clarifies +clearify:clarify +clearifying:clarifying +cleint:client +cleints:clients +clera:clear +clincial:clinical +clinicaly:clinically +closeing:closing +cmoputer:computer +Coca Cola:Coca-Cola +coctail:cocktail +codespel:codespell +coefficent:coefficient +coefficents:coefficients +cofigure:configure +cofigured:configured +cofigures:configures +cofiguring:configuring +coform:conform +cognizent:cognizant +coincedentally:coincidentally +co-incided:coincided +colaboration:collaboration +colaborations:collaborations +colateral:collateral +colelctive:collective +collaberative:collaborative +collaobrative:collaborative +collapsable:collapsible +collecion:collection +collecions:collections +collecton:collection +collegue:colleague +collegues:colleagues +collonade:colonnade +collonies:colonies +collony:colony +collosal:colossal +collumn:column +collumns:columns +colonizators:colonizers +colorfull:colorful +coloum:column +coloumn:column +coloumns:columns +coloums:columns +colour:color +colours:colors +colum:column +colums:columns +comamnd:command +comamnds:commands +comand:command +comander:commander +comando:commando +comandos:commandos +comany:company +comapany:company +comaptible:compatible +comback:comeback +combanations:combinations +combatibility:compatibility +combinatins:combinations +combinded:combined +combusion:combustion +comdemnation:condemnation +comemmorates:commemorates +comemoretion:commemoration +coment:comment +comented:commented +comenting:commenting +coments:comments +comision:commission +comisioned:commissioned +comisioner:commissioner +comisioning:commissioning +comisions:commissions +comission:commission +comissioned:commissioned +comissioner:commissioner +comissioning:commissioning +comissions:commissions +comit:commit +comited:committed +comiting:committing +comitted:committed +comittee:committee +comitting:committing +commad:command +commads:commands +commandoes:commandos +commedic:comedic +commemerative:commemorative +commemmorate:commemorate +commemmorating:commemorating +commerical:commercial +commerically:commercially +commericial:commercial +commericially:commercially +commerorative:commemorative +comming:coming +comminication:communication +comminucation:communication +commision:commission +commisioned:commissioned +commisioner:commissioner +commisioning:commissioning +commisions:commissions +commited:committed +commitee:committee +commiter:committer +commiters:committers +commiting:committing +committ:commit +committe:committee +committment:commitment +committments:commitments +commmand:command +commmands:commands +commmemorated:commemorated +commment:comment +commmented:commented +commmenting:commenting +commments:comments +commnad:command +commnads:commands +commoditiy:commodity +commongly:commonly +commonweath:commonwealth +commuication:communication +commuications:communications +commuinications:communications +communcation:communication +communciation:communication +communiation:communication +communites:communities +comonent:component +compability:compatibility +compair:compare +compairs:compares +comparaison:comparison +comparation:comparison +comparations:comparisons +comparision:comparison +comparisions:comparisons +comparitive:comparative +comparitively:comparatively +comparsion:comparison +comparsions:comparisons +compatabilities:compatibilities +compatability:compatibility +compatabilty:compatibility +compatable:compatible +compatablities:compatibilities +compatablity:compatibility +compatbility:compatibility +compatiability:compatibility +compatiable:compatible +compatibiliy:compatibility +compatibilty:compatibility +compatibily:compatibility +compatiblities:compatibilities +compatiblity:compatibility +compeitions:competitions +compensantion:compensation +competance:competence +competant:competent +competative:competitive +competion:competition +competion:completion +competions:completions +competitiion:competition +competive:competitive +competiveness:competitiveness +comphrehensive:comprehensive +compilant:compliant +compitent:competent +compleate:complete +compleated:completed +compleates:completes +compleating:completing +compleatly:completely +completedthe:completed the +completelyl:completely +completetion:completion +completition:completion +completly:completely +completness:completeness +complianse:compliance +complient:compliant +complier:compiler +compliers:compilers +complile:compile +compliled:compiled +compliles:compiles +compliling:compiling +compling:compiling +componant:component +compontent:component +compontents:components +comprable:comparable +compres:compress +compresed:compressed +compreses:compresses +compresing:compressing +compresion:compression +comprimise:compromise +comptible:compatible +compulsary:compulsory +compulsery:compulsory +computarized:computerized +comression:compression +comsumer:consumer +comsumers:consumers +comunication:communication +conain:contain +conained:contained +conainer:container +conainers:containers +conaining:containing +conains:contains +conatin:contain +conatined:contained +conatining:containing +conatins:contains +conbination:combination +conbinations:combinations +concatentate:concatenate +concatentated:concatenated +concatentates:concatenates +concatentating:concatenating +concatentation:concatenation +concatentations:concatenations +concatination:concatenation +concatinations:concatenations +concatonate:concatenate +concatonated:concatenated +concatonates:concatenates +concatonating:concatenating +concensus:consensus +concider:consider +concidered:considered +concidering:considering +conciders:considers +concieted:conceited +concieved:conceived +concious:conscious +conciously:consciously +conciousness:consciousness +concurent:concurrent +concurently:concurrently +condamned:condemned +condemmed:condemned +condidtion:condition +condidtions:conditions +conditionaly:conditionally +conditionnaly:conditionally +conditionsof:conditions of +conect:connect +conected:connected +conecting:connecting +conection:connection +conections:connections +conectix:connectix +conects:connects +conenction:connection +conenctions:connections +conent:content +conents:contents +conesencus:consensus +confidental:confidential +confidentally:confidentially +confids:confides +configration:configuration +configrations:configurations +configuation:configuration +configuations:configurations +configuraion:configuration +configuratoin:configuration +configuraton:configuration +configuratons:configurations +configureable:configurable +confortable:comfortable +congradulations:congratulations +congresional:congressional +conived:connived +conjecutre:conjecture +conjuction:conjunction +conneciton:connection +connecitons:connections +connectinos:connections +Conneticut:Connecticut +connnect:connect +connnected:connected +connnecting:connecting +connnection:connection +connnections:connections +connnects:connects +connot:cannot +conotations:connotations +conquerd:conquered +conquerer:conqueror +conquerers:conquerors +conqured:conquered +conscent:consent +consciouness:consciousness +consdider:consider +consdidered:considered +consdiered:considered +consectutive:consecutive +consenquently:consequently +consentrate:concentrate +consentrated:concentrated +consentrates:concentrates +consept:concept +consequentually:consequently +consequeseces:consequences +consequtive:consecutive +consequtively:consecutively +consern:concern +conserned:concerned +conserning:concerning +conservitive:conservative +consiciousness:consciousness +consicousness:consciousness +considerd:considered +consideres:considered +consious:conscious +consisent:consistent +consisently:consistently +consistancy:consistency +consistant:consistent +consistantly:consistently +consistenly:consistently +consituencies:constituencies +consituency:constituency +consituted:constituted +consitutional:constitutional +consitution:constitution +consolodate:consolidate +consolodated:consolidated +consonent:consonant +consonents:consonants +consorcium:consortium +conspiracys:conspiracies +conspiriator:conspirator +constaints:constraints +constanly:constantly +constarnation:consternation +constatn:constant +constinually:continually +constituant:constituent +constituants:constituents +constituional:constitutional +constituion:constitution +constructes:constructs +constructred:constructed +construtor:constructor +consttruction:construction +constuction:construction +constuctor:constructor +constuctors:constructors +consulant:consultant +consumate:consummate +consumated:consummated +contaiminate:contaminate +containes:contains +containg:containing +containging:containing +containting:containing +containts:contains +contaisn:contains +contamporaries:contemporaries +contamporary:contemporary +contan:contain +contaned:contained +contaning:containing +contans:contains +contein:contain +conteined:contained +conteining:containing +conteins:contains +contempoary:contemporary +contemporaneus:contemporaneous +contempory:contemporary +contence:contents +contendor:contender +contian:contain +contians:contains +contibute:contribute +contibuted:contributed +contibutes:contributes +contigent:contingent +contigious:contiguous +contined:continued +continiously:continuously +continous:continuous +continously:continuously +continueing:continuing +contiuguous:contiguous +contoller:controller +contollers:controllers +contraints:constraints +contravercial:controversial +contraversy:controversy +contributer:contributor +contributers:contributors +contries:countries +contritutions:contributions +controled:controlled +controler:controller +controlers:controllers +controling:controlling +controll:control +controlls:controls +controvercial:controversial +controvercy:controversy +controveries:controversies +controversal:controversial +controversey:controversy +controvertial:controversial +controvery:controversy +contruct:construct +contructed:constructed +contructing:constructing +contruction:construction +contructions:constructions +contructor:constructor +contructors:constructors +contructs:constructs +contry:country +contstruction:construction +conveinent:convenient +convenant:covenant +convential:conventional +converion:conversion +converions:conversions +conversly:conversely +converstion:conversion +converstions:conversions +convertable:convertible +convertables:convertibles +convertion:conversion +convertions:conversions +convertor:converter +convery:convert +convet:convert +conveted:converted +conveting:converting +convets:converts +conveyer:conveyor +conviced:convinced +convienient:convenient +convieniently:conveniently +convinience:convenience +convinient:convenient +conviniently:conveniently +coodinate:coordinate +coodinates:coordinates +coordiantion:coordination +coorperation:corporation +coorperations:corporations +copmetitors:competitors +coputer:computer +copyrigth:copyright +copyrigthed:copyrighted +copyrigths:copyrights +copywrite:copyright +corected:corrected +corespond:correspond +coresponded:corresponded +corespondence:correspondence +coresponding:corresponding +coresponds:corresponds +coridal:cordial +cornmitted:committed +corosion:corrosion +corparate:corporate +corperations:corporations +correclty:correctly +correcters:correctors +correctnes:correctness +correect:correct +correectly:correctly +correnspond:correspond +corrensponded:corresponded +corrensponding:corresponding +corrensponds:corresponds +correponding:corresponding +correponds:corresponds +correposding:corresponding +corresond:correspond +corresonded:corresponded +corresonding:corresponding +corresonds:corresponds +correspoding:corresponding +correspoinding:corresponding +correspondance:correspondence +correspondant:correspondent +correspondants:correspondents +correspondes:corresponds +corresponing:corresponding +corresponsing:corresponding +corretly:correctly +corridoors:corridors +corrispondant:correspondent +corrispondants:correspondents +corrispond:correspond +corrisponded:corresponded +corrisponding:corresponding +corrisponds:corresponds +costitution:constitution +cotrol:control +cotrolled:controlled +cotrolling:controlling +cotrols:controls +coucil:council +coudl:could +coudn't:couldn't +could'nt:couldn't +could't:couldn't +coult:could +councellor:councillor +councellors:councillors +counries:countries +countains:contains +countires:countries +countour:contour +countours:contours +coururier:courier +coutner:counter +coutners:counters +coverted:converted +coypright:copyright +cpoy:copy +creaeted:created +creationg:creating +creche:crèche +creedence:credence +critera:criteria +critereon:criterion +criterias:criteria +criticial:critical +criticially:critically +criticists:critics +critising:criticizing +critisising:criticising +critisism:criticism +critisisms:criticisms +critisize:criticize +critisized:criticized +critisizes:criticizes +critisizing:criticizing +critized:criticized +critizing:criticizing +crockodiles:crocodiles +crowm:crown +crtical:critical +crticised:criticised +crucifiction:crucifixion +crusies:cruises +cryptocraphic:cryptographic +crystalisation:crystallisation +ctificates:certificates +culiminating:culminating +cummulative:cumulative +cumulatative:cumulative +curch:church +curcuit:circuit +curcumstance:circumstance +curcumstances:circumstances +curently:currently +currenly:currently +curriculem:curriculum +cxan:cyan +cyclinder:cylinder +cymk:CMYK +dacquiri:daiquiri +daed:dead +dael:deal +dafault:default +dalmation:dalmatian +damenor:demeanor +dammage:damage +Dardenelles:Dardanelles +daugher:daughter +deafault:default +deafult:default +deamon:daemon +deamons:daemons +deatch:detach +deatched:detached +deatches:detaches +deatching:detaching +debain:Debian +debateable:debatable +debians:Debian's +debuging:debugging +decalared:declared +decalare:declare +decalares:declares +decalaring:declaring +decendant:descendant +decendants:descendants +decendent:descendant +decendent:descendent +decendents:descendants +decideable:decidable +decidely:decidedly +decieved:deceived +decison:decision +declaritive:declarative +declaritively:declaratively +declation:declaration +declations:declarations +decomissioned:decommissioned +decomposit:decompose +decomposited:decomposed +decompositing:decomposing +decomposits:decomposes +decompres:decompress +decompresed:decompressed +decompreses:decompresses +decompresing:decompressing +decress:decrees +decribed:described +decribe:describe +decribes:describes +decribing:describing +decription:description +decriptions:descriptions +decriptor:descriptor +decriptors:descriptors +decsriptor:descriptor +decsriptors:descriptors +decstiption:description +decstiptions:descriptions +dectect:detect +defailt:default +defalt:default +defautl:default +defendent:defendant +defendents:defendants +defenition:definition +defenitions:definitions +defered:deferred +deffensively:defensively +deffined:defined +deffine:define +defiend:defined +definance:defiance +definate:definite +definately:definitely +definatly:definitely +definetly:definitely +definining:defining +defininition:definition +defininitions:definitions +definintion:definition +definit:definite +definitly:definitely +definiton:definition +defintion:definition +defintions:definitions +defition:definition +defitions:definitions +defualt:default +defult:default +degrate:degrade +deimiter:delimiter +deivce:device +deivces:devices +delagates:delegates +delapidated:dilapidated +delared:declared +delare:declare +delares:declares +delaring:declaring +delemeter:delimiter +delemiter:delimiter +delerious:delirious +deleteing:deleting +delevopment:development +delevopp:develop +deliberatly:deliberately +delimeter:delimiter +delimeters:delimiters +delimted:delimited +delusionally:delusively +demenor:demeanor +demographical:demographic +demolision:demolition +demoninator:denominator +demoninators:denominators +demorcracy:democracy +demostrated:demonstrated +demostrate:demonstrate +demostrates:demonstrates +demostrating:demonstrating +demostration:demonstration +denegrating:denigrating +densly:densely +deparmental:departmental +deparment:department +deparments:departments +depdencies:dependencies +depdency:dependency +depdendencies:dependencies +depdendency:dependency +depedencies:dependencies +depedency:dependency +depencies:dependencies +depency:dependency +dependance:dependence +dependancies:dependencies +dependancy:dependency +dependant:dependent +dependecies:dependencies +dependecy:dependency +dependend:dependent +depenencies:dependencies +depenency:dependency +deployement:deployment +depreacted:deprecated +depreacte:deprecate +deprectated:deprecated +deprectate:deprecate +deprectates:deprecates +deprectating:deprecating +deprected:deprecated +depricated:deprecated +depricate:deprecate +depricates:deprecates +depricating:deprecating +deram:dream +derectory:directory +derefenced:dereferenced +deriviated:derived +derivitive:derivative +derogitory:derogatory +derprecated:deprecated +desactivate:deactivate +descencing:descending +descendands:descendants +descibed:described +descibe:describe +descibes:describes +descibing:describing +descided:decided +descide:decide +descides:decides +desciding:deciding +desciptor:descriptor +desciptors:descriptors +descision:decision +descisions:decisions +descriibes:describes +descripters:descriptors +descriptior:descriptor +descriptiors:descriptors +descripton:description +descriptons:descriptions +descrition:description +descritpion:description +descritpions:descriptions +descryption:description +descryptions:descriptions +desctiptor:descriptor +desctiptors:descriptors +desctruction:destruction +descuss:discuss +desgined:designed +deside:decide +desigining:designing +desination:destination +desinations:destinations +desintegrated:disintegrated +desintegration:disintegration +desireable:desirable +desitned:destined +deskop:desktop +deskops:desktops +desktiop:desktop +desorder:disorder +desoriented:disoriented +desparate:disparate +despict:depict +despiration:desperation +desribed:described +desribe:describe +desribes:describes +desribing:describing +desription:description +desriptions:descriptions +desriptor:descriptor +desriptors:descriptors +dessicated:desiccated +dessigned:designed +destablized:destabilized +destiantion:destination +destiantions:destinations +destory:destroy +destoryed:destroyed +destorying:destroying +destorys:destroys +destroi:destroy +destroied:destroyed +destroing:destroying +destrois:destroys +destuction:destruction +detabase:database +detailled:detailed +detatch:detach +detatched:detached +detatches:detaches +detatching:detaching +detemined:determined +detemine:determine +detemines:determines +detemining:determining +deteoriated:deteriorated +deteriate:deteriorate +deterioriating:deteriorating +determin:determine +determing:determining +determinining:determining +determins:determines +determinstically:deterministically +determinstic:deterministic +detremental:detrimental +detroy:destroy +detroyed:destroyed +detroying:destroying +detroys:destroys +devasted:devastated +develoment:development +develoments:developments +develope:develop +developement:development +developements:developments +developped:developed +developpement:development +developper:developer +developpment:development +develpment:development +devels:delves +deveolpment:development +devestated:devastated +devestating:devastating +devided:divided +devide:divide +devides:divides +deviding:dividing +devistating:devastating +devolopement:development +diabled:disabled +diable:disable +diables:disables +diablical:diabolical +diabling:disabling +diamons:diamonds +diaster:disaster +dichtomy:dichotomy +diconnects:disconnects +dicover:discover +dicovered:discovered +dicovering:discovering +dicovers:discovers +dicovery:discovery +dictionarys:dictionaries +dictionay:dictionary +dictionnary:dictionary +dicussed:discussed +did'nt:didn't +didnt:didn't +didnt':didn't +diea:idea +dieing:dying +dieties:deities +diety:deity +diferent:different +diferently:differently +diferrent:different +diffcult:difficult +diffculties:difficulties +diffculty:difficulty +differenciated:differentiated +differenciate:differentiate +differenciates:differentiates +differenciating:differentiating +differentiatiations:differentiations +differents:different +differnet:different +differnt:different +difficulity:difficulty +diffrent:different +dificulties:difficulties +dificulty:difficulty +difinition:definition +difinitions:definitions +digitial:digital +dimenions:dimensions +dimentional:dimensional +dimention:dimension +dimentions:dimensions +dimesnional:dimensional +diminuitive:diminutive +dimunitive:diminutive +diosese:diocese +diphtong:diphthong +diphtongs:diphthongs +diplay:display +diplayed:displayed +diplaying:displaying +diplays:displays +diplomancy:diplomacy +dipthong:diphthong +dipthongs:diphthongs +dirctories:directories +dirctory:directory +direcories:directories +direcory:directory +directores:directories +directorys:directories +directoty:directory +directoy:directory +directries:directories +directry:directory +directy:directly +dirived:derived +disagreeed:disagreed +disapeard:disappeared +disapear:disappear +disapeared:disappeared +disapearing:disappearing +disapears:disappears +disapointing:disappointing +disappearred:disappeared +disapper:disappear +disappered:disappeared +disappering:disappearing +disappers:disappears +disaproval:disapproval +disasterous:disastrous +disatisfaction:dissatisfaction +disatisfied:dissatisfied +disatrous:disastrous +disbaled:disabled +disbale:disable +disbales:disables +disbaling:disabling +discernable:discernible +disconnet:disconnect +disconneted:disconnected +disconneting:disconnecting +disconnets:disconnects +discontentment:discontent +discontigous:discontiguous +discontinous:discontinuous +discribed:described +discribe:describe +discribes:describes +discribing:describing +discription:description +discriptions:descriptions +disctinction:distinction +disctinctive:distinctive +discusion:discussion +disemination:dissemination +disenchanged:disenchanted +disiplined:disciplined +dislay:display +dislayed:displayed +dislaying:displaying +dislays:displays +disobediance:disobedience +disobediant:disobedient +disolved:dissolved +disolve:dissolve +disover:discover +dispair:despair +disparingly:disparagingly +dispath:dispatch +dispathed:dispatched +dispathes:dispatches +dispathing:dispatching +dispenced:dispensed +dispence:dispense +dispencing:dispensing +dispertion:dispersion +dispicable:despicable +dispite:despite +dispostion:disposition +disproportiate:disproportionate +disputandem:disputandum +disricts:districts +dissagreement:disagreement +dissapearance:disappearance +dissapear:disappear +dissapeared:disappeared +dissapearing:disappearing +dissapears:disappears +dissappear:disappear +dissappears:disappears +dissappointed:disappointed +dissarray:disarray +dissobediance:disobedience +dissobediant:disobedient +dissobedience:disobedience +dissobedient:disobedient +distibuted:distributed +distibute:distribute +distibutes:distributes +distibuting:distributing +distibution:distribution +distibutions:distributions +distiction:distinction +distingish:distinguish +distingished:distinguished +distingishes:distinguishes +distingishing:distinguishing +distingquished:distinguished +distingush:distinguish +distingushed:distinguished +distingushes:distinguishes +distingushing:distinguishing +distribtion:distribution +distribtions:distributions +distribtuion:distribution +distribtuions:distributions +distrobution:distribution +distrubution:distribution +distrubutions:distributions +distruction:destruction +distructive:destructive +ditributed:distributed +diversed:diverse +divice:device +divinition:definition +divison:division +divisons:divisions +divsion:division +divsions:divisions +doccument:document +doccumented:documented +doccuments:documents +docrines:doctrines +doctines:doctrines +docuement:document +docuements:documents +docuentation:documentation +documantation:documentation +documenation:documentation +documenatry:documentary +documentaion:documentation +documentaiton:documentation +documention:documentation +documetation:documentation +documment:document +documments:documents +doens:does +doens't:doesn't +doesen't:doesn't +does'nt:doesn't +doesnt:doesn't +doesnt':doesn't +doesnt't:doesn't +does't:doesn't +doign:doing +doman:domain +domans:domains +dominaton:domination +dominent:dominant +dominiant:dominant +donig:doing +donnot:do not +do'nt:don't +dont:don't +dont':don't +dont't:don't +donwload:download +donwloaded:downloaded +donwloading:downloading +donwloads:downloads +dosen't:doesn't +dosent':doesn't +doub:doubt +doulbe:double +dowloads:downloads +downlad:download +downlads:downloads +draging:dragging +dramtic:dramatic +drasticaly:drastically +draughtman:draughtsman +Dravadian:Dravidian +dreasm:dreams +driectly:directly +drnik:drink +droped:dropped +droppped:dropped +druming:drumming +drummless:drumless +dstination:destination +dum:dumb +dumplicated:duplicated +dumplicate:duplicate +dumplicates:duplicates +dumplicating:duplicating +dupicate:duplicate +dupliate:duplicate +dupliates:duplicates +durig:during +durring:during +duting:during +dyas:dryas +dynamicaly:dynamically +dynamicly:dynamically +dynmaically:dynamically +dynmaic:dynamic +eahc:each +ealier:earlier +eample:example +eamples:examples +earlies:earliest +earnt:earned +easilly:easily +ecclectic:eclectic +eceonomy:economy +ecidious:deciduous +eclispe:eclipse +ecomonic:economic +ecspecially:especially +ect:etc +edditable:editable +editting:editing +eearly:early +efect:effect +efel:evil +effeciency:efficiency +effecient:efficient +effeciently:efficiently +effectly:effectively +efficency:efficiency +efficent:efficient +efficently:efficiently +effiency:efficiency +effient:efficient +effiently:efficiently +efford:effort +effulence:effluence +egde:edge +egdes:edges +eigth:eight +eiter:either +elction:election +electic:eclectic +electon:election +electrial:electrical +electricly:electrically +electricty:electricity +elemenet:element +elemenets:elements +elementay:elementary +eleminated:eliminated +eleminating:eliminating +eles:else +eletricity:electricity +eletronic:electronic +elicided:elicited +eligable:eligible +elimentary:elementary +ellected:elected +elliminated:eliminated +elliminate:eliminate +elliminates:eliminates +elliminating:eliminating +elment:element +elments:elements +elminated:eliminated +elminate:eliminate +elminates:eliminates +elminating:eliminating +elphant:elephant +emabaroged:embargoed +embarassed:embarrassed +embarass:embarrass +embarassing:embarrassing +embarassment:embarrassment +embargos:embargoes +embarrased:embarrassed +embarras:embarrass +embarrasing:embarrassing +embarrasment:embarrassment +embeddded:embedded +embeddeding:embedding +embeded:embedded +embezelled:embezzled +emblamatic:emblematic +eminated:emanated +eminate:emanate +emision:emission +emited:emitted +emiting:emitting +emition:emission +emmediately:immediately +emmigrated:emigrated +emminent:eminent +emminently:eminently +emmisaries:emissaries +emmisarries:emissaries +emmisarry:emissary +emmisary:emissary +emmision:emission +emmisions:emissions +emmited:emitted +emmit:emit +emmiting:emitting +emmits:emits +emmitted:emitted +emmitting:emitting +emnity:enmity +emperical:empirical +emphaised:emphasised +emphsis:emphasis +emphysyma:emphysema +empirial:imperial +emporer:emperor +emprisoned:imprisoned +emptry:empty +emtied:emptied +emties:empties +emtpy:empty +emty:empty +emtying:emptying +enameld:enameled +enbaled:enabled +enbale:enable +enbales:enables +enbaling:enabling +enchanced:enhanced +enchancement:enhancement +enconding:encoding +encondings:encodings +encorporating:incorporating +encosed:enclosed +encose:enclose +encoses:encloses +encosing:enclosing +encouraing:encouraging +encryptiion:encryption +encrytion:encryption +encylopedia:encyclopedia +encyption:encryption +endevors:endeavors +endevour:endeavour +endianes:endianness +endianess:endianness +endiannes:endianness +endig:ending +endolithes:endoliths +enduce:induce +ened:need +enflamed:inflamed +enforceing:enforcing +engagment:engagement +engeneer:engineer +engeneering:engineering +engieneer:engineer +engieneers:engineers +enhaced:enhanced +enhancment:enhancement +enhancments:enhancements +enitities:entities +enitity:entity +enlargment:enlargement +enlargments:enlargements +enlightnment:enlightenment +Enlish:English +enocded:encoded +enought:enough +enourmous:enormous +enourmously:enormously +enque:enqueue +enrties:entries +enrty:entry +ensconsed:ensconced +entaglements:entanglements +enteratinment:entertainment +enterily:entirely +enthousiasm:enthusiasm +enthusiatic:enthusiastic +entites:entities +entitities:entities +entitity:entity +entitiy:entity +entitlied:entitled +entrepeneur:entrepreneur +entrepeneurs:entrepreneurs +entrys:entries +enumarated:enumerated +enumarate:enumerate +enumarates:enumerates +enumarating:enumerating +envionment:environment +enviormental:environmental +enviormentally:environmentally +enviorment:environment +enviorments:environments +enviornmental:environmental +enviornmentalist:environmentalist +enviornmentally:environmentally +enviornment:environment +enviornments:environments +envireonment:environment +envirnmental:environmental +envirnment:environment +envirnments:environments +envirnoment:environment +envirnoments:environments +enviroiment:environment +enviromental:environmental +enviromentalist:environmentalist +enviromentally:environmentally +enviroment:environment +enviroments:environments +environement:environment +environemntal:environmental +environemnt:environment +environemnts:environments +environent:environment +envolutionary:evolutionary +envrionments:environments +enxt:next +epidsodes:episodes +epsiode:episode +eqivalent:equivalent +equialent:equivalent +equilibium:equilibrium +equilibrum:equilibrium +equiped:equipped +equippment:equipment +equitorial:equatorial +equivelant:equivalent +equivelent:equivalent +equivilant:equivalent +equivilent:equivalent +equivlalent:equivalent +equvalent:equivalent +eratically:erratically +eratic:erratic +eraticly:erratically +eroneous:erroneous +eror:error +erorr:error +erorrs:errors +erors:errors +erroneus:erroneous +erroneusly:erroneously +erronous:erroneous +erronously:erroneously +errorneous:erroneous +errorneously:erroneously +errror:error +errrors:errors +errupted:erupted +esential:essential +esentially:essentially +esitmated:estimated +esle:else +espacially:especially +especailly:especially +especialy:especially +essencial:essential +essense:essence +essentail:essential +essentialy:essentially +essentual:essential +essesital:essential +estabishes:establishes +establising:establishing +estbalishment:establishment +ethnocentricm:ethnocentrism +etsablishment:establishment +etsbalishment:establishment +Europian:European +Europians:Europeans +Eurpean:European +Eurpoean:European +evalutated:evaluated +evalutate:evaluate +evalutates:evaluates +evalutating:evaluating +evaluted:evaluated +evalute:evaluate +evalutes:evaluates +evaluting:evaluating +evenhtually:eventually +eventally:eventually +eventhough:even though +eventially:eventually +eventuall:eventually +eventualy:eventually +everbody:everybody +everone:everyone +everthing:everything +everwhere:everywhere +everyhing:everything +everythings:everything +everytime:every time +everyting:everything +eveyr:every +evidentally:evidently +evironment:environment +evironments:environments +exacly:exactly +exagerated:exaggerated +exagerate:exaggerate +exagerates:exaggerates +exagerating:exaggerating +exagerrated:exaggerated +exagerrate:exaggerate +exagerrates:exaggerates +exagerrating:exaggerating +examinated:examined +exampt:exempt +exapansion:expansion +exapmle:example +exapmles:examples +excact:exact +excactly:exactly +excange:exchange +excecutable:executable +excecuted:executed +excecute:execute +excecutes:executes +excecuting:executing +excecution:execution +excedded:exceeded +exceded:exceeded +excelent:excellent +excellance:excellence +excellant:excellent +excell:excel +excells:excels +excercised:exercised +excercise:exercise +excerciser:exerciser +excercises:exercises +excercising:exercising +exchanching:exchanging +excisted:existed +excisting:existing +excpected:expected +excpect:expect +excpecting:expecting +excpects:expects +exculsivly:exclusively +excutable:executable +excutables:executables +excuted:executed +excute:execute +excutes:executes +excuting:executing +exeception:exception +execeptions:exceptions +execising:exercising +exection:execution +exections:executions +exectuable:executable +exectuables:executables +exectued:executed +exectution:execution +exectutions:executions +execuable:executable +execuables:executables +executablble:executable +executeable:executable +executeables:executables +exeedingly:exceedingly +exelent:excellent +exellent:excellent +exemple:example +exension:extension +exensions:extensions +exept:except +exeptional:exceptional +exeption:exception +exeptions:exceptions +exerbated:exacerbated +exerbate:exacerbate +exerciese:exercises +exerpt:excerpt +exerpts:excerpts +exersize:exercise +exerternal:external +exhalted:exalted +exhibtion:exhibition +exibition:exhibition +exibitions:exhibitions +exicting:exciting +exinct:extinct +exising:existing +exisiting:existing +existance:existence +existant:existent +existince:existence +exlcude:exclude +exlcusive:exclusive +exlicit:explicit +exlicitly:explicitly +exliled:exiled +exludes:excludes +exlusive:exclusive +exlusively:exclusively +exmaple:example +exonorate:exonerate +exoskelaton:exoskeleton +expalin:explain +expatriot:expatriate +expeced:expected +expecially:especially +expectes:expects +expection:exception +expections:exceptions +expeditonary:expeditionary +expeiments:experiments +expell:expel +expells:expels +experianced:experienced +experiance:experience +expeted:expected +expiditions:expeditions +expierence:experience +explaination:explanation +explainations:explanations +explaning:explaining +explantion:explanation +explantions:explanations +explicitely:explicitly +explicitily:explicitly +explicity:explicitly +explict:explicit +explictly:explicitly +explit:explicit +explitly:explicitly +exploititive:exploitative +explotation:exploitation +expresion:expression +expresions:expressions +expresssion:expression +expresssions:expressions +exprimental:experimental +expropiated:expropriated +expropiation:expropriation +exressed:expressed +extemely:extremely +extened:extended +extensability:extensibility +extenstion:extension +extenstions:extensions +extented:extended +extention:extension +extentions:extensions +exteral:external +extered:exerted +extermist:extremist +extesion:extension +extesions:extensions +extint:extinct +extracter:extractor +extradiction:extradition +extraenous:extraneous +extraterrestial:extraterrestrial +extraterrestials:extraterrestrials +extravagent:extravagant +extrememly:extremely +extremeophile:extremophile +extremly:extremely +extrordinarily:extraordinarily +extrordinary:extraordinary +eyar:year +faciliated:facilitated +faciliate:facilitate +faciliates:facilitates +faciliating:facilitating +facilites:facilities +facillitate:facilitate +facinated:fascinated +facist:fascist +faild:failed +failue:failure +failuer:failure +failues:failures +falg:flag +falgs:flags +faliure:failure +faliures:failures +familar:familiar +familes:families +familiies:families +familliar:familiar +famoust:famous +fanatism:fanaticism +Farenheit:Fahrenheit +fatc:fact +fatser:faster +faught:fought +favoutrable:favourable +feasable:feasible +featue:feature +featues:features +feauture:feature +feautures:features +Febuary:February +Feburary:February +fedreally:federally +feeded:fed +femminist:feminist +feromone:pheromone +fertily:fertility +fetaure:feature +fetaures:features +feture:feature +fianite:finite +fianlly:finally +ficticious:fictitious +fictious:fictitious +fidn:find +fiel:field +fiels:fields +fiercly:fiercely +fightings:fighting +filesytem:filesystem +filesytems:filesystems +fileystem:filesystem +fileystems:filesystems +filiament:filament +fimilies:families +finacial:financial +finaly:finally +financialy:financially +findout:find out +finsihed:finished +finsihes:finishes +finsih:finish +finsihing:finishing +firends:friends +firts:first +fisionable:fissionable +fisrt:first +fitler:filter +fitlers:filters +flaged:flagged +flakyness:flakiness +flamable:flammable +flavour:flavor +flavours:flavors +flawess:flawless +fleed:fled +Flemmish:Flemish +flexable:flexible +flie:file +florescent:fluorescent +floting:floating +flourescent:fluorescent +flourine:fluorine +flourishment:flourishing +flter:filter +fluorish:flourish +flusing:flushing +foget:forget +fogot:forgot +fogotten:forgotten +folllowed:followed +folllow:follow +folllowing:following +folllows:followings +folloing:following +follwing:following +follwoing:following +folowing:following +fomed:formed +fomr:form +fonetic:phonetic +fontrier:fontier +foootball:football +forbad:forbade +forbiden:forbidden +foreing:foreign +foreward:forward +forfiet:forfeit +forground:foreground +forhead:forehead +foriegn:foreign +Formalhaut:Fomalhaut +formallized:formalized +formallize:formalize +formaly:formally +formated:formatted +formating:formatting +formelly:formerly +formidible:formidable +formost:foremost +forsaw:foresaw +forseeable:foreseeable +forse:force +fortan:fortran +fortelling:foretelling +fortunatly:fortunately +forunate:fortunate +forunately:fortunately +forunner:forerunner +forwaded:forwarded +forwad:forward +forwading:forwarding +forwads:forwards +forwardig:forwarding +foucs:focus +foudn:found +fougth:fought +foundaries:foundries +foundary:foundry +Foundland:Newfoundland +fourties:forties +fourty:forty +fouth:fourth +fowarded:forwarded +foward:forward +fowarding:forwarding +fowards:forwards +fragement:fragment +fragements:fragments +framwork:framework +Fransiscan:Franciscan +Fransiscans:Franciscans +freind:friend +freindly:friendly +freqencies:frequencies +freqency:frequency +frequentily:frequently +frequncies:frequencies +frequncy:frequency +frist:first +fromed:formed +frome:from +froniter:frontier +frontent:frontend +frontents:frontends +fucntion:function +fucntioning:functioning +fucntions:functions +fuction:function +fuctions:functions +fufilled:fulfilled +fufill:fulfill +fulfiled:fulfilled +fullfilled:fulfilled +fullfill:fulfill +fullfilling:fulfilling +fullfills:fulfills +funcion:function +funcions:functions +funciton:function +funcitons:functions +functin:function +functino:function +functins:functions +functionallity:functionality +functionaly:functionally +functionnality:functionality +functios:functions +functiosn:functions +functonality:functionality +functon:function +functons:functions +fundametal:fundamental +fundametals:fundamentals +fundemental:fundamental +fundementally:fundamentally +funguses:fungi +funtional:functional +funtionalities:functionalities +funtionality:functionality +funtion:function +funtions:functions +furter:further +furthur:further +furture:future +furuther:further +futher:further +futhermore:furthermore +galatic:galactic +gallaxies:galaxies +galvinized:galvanized +ganerate:generate +ganes:games +ganster:gangster +garanteed:guaranteed +garantee:guarantee +garantees:guarantees +gardai:gardaí +garnison:garrison +gauarana:guaraná +gauranteed:guaranteed +gaurantee:guarantee +gauranteeing:guaranteeing +gaurantees:guarantees +gaurd:guard +gaurenteed:guaranteed +gaurentee:guarantee +gaurentees:guarantees +gausian:Gaussian +geneological:genealogical +geneologies:genealogies +geneology:genealogy +generaly:generally +generater:generator +generaters:generators +generatting:generating +genereated:generated +genereate:generate +genereates:generates +genereating:generating +generiously:generously +genialia:genitalia +genrated:generated +genrate:generate +genrates:generates +genrating:generating +genreated:generated +genreate:generate +genreates:generates +genreating:generating +genric:generic +geographicial:geographical +geometrician:geometer +geometricians:geometers +geomtry:geometry +gerat:great +geting:getting +Ghandi:Gandhi +gived:given +glight:flight +gloabl:global +glpyh:glyph +glpyhs:glyphs +glyphes:glyphs +gnawwed:gnawed +godesses:goddesses +godess:goddess +Godounov:Godunov +gogin:going +goign:going +goind:going +gonig:going +Gothenberg:Gothenburg +Gottleib:Gottlieb +gouvener:governor +govement:government +govenment:government +govenor:governor +govenrment:government +goverance:governance +govermental:governmental +goverment:government +governer:governor +governmnet:government +govormental:governmental +govorment:government +govornment:government +grabed:grabbed +grabing:grabbing +gracefull:graceful +graet:great +grafitti:graffiti +grahical:graphical +grahpical:graphical +gramar:grammar +gramatically:grammatically +grammaticaly:grammatically +grammer:grammar +grammers:grammars +granulatiry:granularity +grapic:graphic +grat:great +gratuitious:gratuitous +greatful:grateful +greatfully:gratefully +greif:grief +gridles:griddles +gropu:group +gruop:group +grwo:grow +guage:gauge +guaranted:guaranteed +guarenteed:guaranteed +guarentee:guarantee +guarenteeing:guaranteeing +guarentees:guarantees +guarranteed:guaranteed +guarrantee:guarantee +guarranteeing:guaranteeing +guarrantees:guarantees +guarrenteed:guaranteed +guassian:Gaussian +Guatamala:Guatemala +Guatamalan:Guatemalan +guerilla:guerrilla +guerillas:guerrillas +guerrila:guerrilla +guerrilas:guerrillas +gueswork:guesswork +guidence:guidance +guidline:guideline +guidlines:guidelines +Guilia:Giulia +Guilio:Giulio +Guiness:Guinness +Guiseppe:Giuseppe +gunanine:guanine +guranteed:guaranteed +gurantee:guarantee +guranteeing:guaranteeing +gurantees:guarantees +guttaral:guttural +gutteral:guttural +habaeus:habeas +habeus:habeas +Habsbourg:Habsburg +haemorrage:haemorrhage +haev:have +halarious:hilarious +halfs:halves +halp:help +hander:handler +handfull:handful +hanled:handled +hanle:handle +hanles:handles +hanling:handling +hanshake:handshake +hanshakes:handshakes +hapened:happened +hapen:happen +hapening:happening +happended:happened +happend:happened +happenned:happened +harased:harassed +harases:harasses +harasment:harassment +harasments:harassments +harassement:harassment +harcoded:hardcoded +harcode:hardcode +harcodes:hardcodes +harcoding:hardcoding +harrased:harassed +harrases:harasses +harras:harass +harrasing:harassing +harrasment:harassment +harrasments:harassments +harrassed:harassed +harrasses:harassed +harrassing:harassing +harrassment:harassment +harrassments:harassments +harware:hardware +has'nt:hasn't +hasnt:hasn't +hasnt':hasn't +Hatian:Haitian +have'nt:haven't +havent:haven't +haviest:heaviest +havn't:haven't +hazzle:hassle +headquarer:headquarter +headquatered:headquartered +headquater:headquarter +headquaters:headquarters +healthercare:healthcare +heared:heard +heathy:healthy +Heidelburg:Heidelberg +heigher:higher +heigh:height +heigt:height +heigth:height +heirachies:hierarchies +heirarchical:hierarchical +heirarchically:hierarchically +heirarchies:hierarchies +heirarchy:hierarchy +heiroglyphics:hieroglyphics +helment:helmet +helpfull:helpful +helpped:helped +hemmorhage:hemorrhage +herad:heard +heridity:heredity +heroe:hero +heros:heroes +hertiage:heritage +hertzs:hertz +hesistant:hesitant +heterogenous:heterogeneous +hexidecimal:hexadecimal +hiddden:hidden +hidding:hiding +hiearchies:hierarchies +hiearchy:hierarchy +hieght:height +hierachical:hierarchical +hierachies:hierarchies +hierachy:hierarchy +hierarchie:hierarchy +hierarcical:hierarchical +hierarcy:hierarchy +hieroglph:hieroglyph +hieroglphs:hieroglyphs +higer:higher +higest:highest +highlighing:highlighting +highlightning:highlighting +highligted:highlighted +highligt:highlight +highligting:highlighting +highligts:highlights +hightlighted:highlighted +hightlight:highlight +hightlighting:highlighting +hightlights:highlights +higlighted:highlighted +higlight:highlight +higlighting:highlighting +higlights:highlights +higway:highway +hilighted:highlighted +hilight:highlight +hilighting:highlighting +hilights:highlights +hillarious:hilarious +himselv:himself +hinderance:hindrance +hinderence:hindrance +hindrence:hindrance +hipopotamus:hippopotamus +hismelf:himself +hisory:history +histocompatability:histocompatibility +historicians:historians +hitsingles:hit singles +holf:hold +holliday:holiday +homestate:home state +homogeneized:homogenized +homogeneize:homogenize +honory:honorary +hoook:hook +hoooks:hooks +hopefuly:hopefully +hoppefully:hopefully +horrifing:horrifying +horzontal:horizontal +horzontally:horizontally +hosited:hoisted +hospitible:hospitable +hounour:honour +housr:hours +hovewer:however +howerver:however +howver:however +hsitorians:historians +hstory:history +hten:then +htere:there +htey:they +htikn:think +hting:thing +htink:think +htis:this +humer:humor +huminoid:humanoid +humoural:humoral +humurous:humorous +husban:husband +hvae:have +hvaing:having +hvea:have +hwihc:which +hwile:while +hwole:whole +hydogen:hydrogen +hydropile:hydrophile +hydropilic:hydrophilic +hydropobe:hydrophobe +hydropobic:hydrophobic +hygeine:hygiene +hypenated:hyphenated +hypenate:hyphenate +hypenates:hyphenates +hypenating:hyphenating +hypenation:hyphenation +hypen:hyphen +hypens:hyphens +hypocracy:hypocrisy +hypocrasy:hypocrisy +hypocricy:hypocrisy +hypocrit:hypocrite +hypocrits:hypocrites +iconclastic:iconoclastic +idaeidae:idea +idaes:ideas +idealogies:ideologies +idealogy:ideology +identicial:identical +identifer:identifier +identifers:identifiers +ideosyncratic:idiosyncratic +idesa:ideas +idicated:indicated +idicate:indicate +idicates:indicates +idicating:indicating +idiosyncracy:idiosyncrasy +igored:ignored +igore:ignore +igores:ignores +igoring:ignoring +Ihaca:Ithaca +illegimacy:illegitimacy +illegitmate:illegitimate +illess:illness +illiegal:illegal +illution:illusion +ilness:illness +ilogical:illogical +imagenary:imaginary +imaginery:imaginary +imagin:imagine +imanent:imminent +imcoming:incoming +imcomplete:incomplete +imediate:immediate +imediately:immediately +imediatly:immediately +imense:immense +imigrant:immigrant +imigrated:immigrated +imigration:immigration +iminent:imminent +immeadiately:immediately +immedate:immediate +immedately:immediately +immediatelly:immediately +immediatley:immediately +immediatly:immediately +immidately:immediately +immidiate:immediate +immidiately:immediately +immitated:imitated +immitate:imitate +immitating:imitating +immitator:imitator +immmediate:immediate +immmediately:immediately +immunosupressant:immunosuppressant +impecabbly:impeccably +impedence:impedance +impementation:implementation +impementations:implementations +implamenting:implementing +implemantation:implementation +implemementation:implementation +implemementations:implementations +implememented:implemented +implemement:implement +implemementing:implementing +implemements:implements +implememtation:implementation +implememtations:implementations +implememted:implemented +implememt:implement +implememting:implementing +implememts:implements +implemenation:implementation +implemenations:implementations +implementaed:implemented +implementaion:implementation +implementaions:implementations +implementaiton:implementation +implementaitons:implementations +implementated:implemented +implementatin:implementation +implementatins:implementations +implemention:implementation +implemetation:implementation +implemeted:implemented +implemet:implement +implemeting:implementing +implemets:implements +implemntation:implementation +implemntations:implementations +implentation:implementation +implentations:implementations +implicitely:implicitly +implicity:implicitly +implimented:implemented +impliment:implement +implimenting:implementing +impliments:implements +implmentation:implementation +implmented:implemented +implment:implement +implmenting:implementing +implments:implements +imploys:employs +importamt:important +impoved:improved +impove:improve +impovements:improvements +impoves:improves +impoving:improving +impressario:impresario +imprioned:imprisoned +imprisonned:imprisoned +improvision:improvisation +improvment:improvement +improvments:improvements +inablility:inability +inacccessible:inaccessible +inaccesible:inaccessible +inaccessable:inaccessible +inadiquate:inadequate +inadquate:inadequate +inadvertant:inadvertent +inadvertantly:inadvertently +inagurated:inaugurated +inaguration:inauguration +inappropiate:inappropriate +inaugures:inaugurates +inbalanced:imbalanced +inbalance:imbalance +inbetween:between +incarcirated:incarcerated +incase:in case +incidentially:incidentally +incidently:incidentally +inclding:including +incldued:included +incldue:include +incldues:includes +inclreased:increased +includ:include +includng:including +inclued:included +inclue:include +inclues:includes +incluing:including +incomaptible:incompatible +incombatibilities:incompatibilities +incombatibility:incompatibility +incomming:incoming +incompatabilities:incompatibilities +incompatability:incompatibility +incompatable:incompatible +incompatablities:incompatibilities +incompatablity:incompatibility +incompatbility:incompatibility +incompatiability:incompatibility +incompatiblities:incompatibilities +incompatiblity:incompatibility +incompetance:incompetence +incompetant:incompetent +incompleate:incomplete +incomptable:incompatible +incomptetent:incompetent +incomptible:incompatible +inconsisent:inconsistent +inconsisently:inconsistently +inconsistant:inconsistent +inconsistenly:inconsistently +inconsitent:inconsistent +inconvertable:inconvertible +inconvienient:inconvenient +incoporated:incorporated +incoporate:incorporate +incoporates:incorporates +incoporating:incorporating +incoroporated:incorporated +incorperated:incorporated +incorperate:incorporate +incorperates:incorporates +incorperating:incorporating +incorperation:incorporation +incorportaed:incorporated +incorprates:incorporates +incorreclty:incorrectly +incorreect:incorrect +incorreectly:incorrectly +incorruptable:incorruptible +incosistent:inconsistent +incramentally:incrementally +increadible:incredible +increas:increase +incredable:incredible +incremeantal:incremental +incrmental:incremental +incrmentally:incrementally +incrmented:incremented +incrment:increment +incrmenting:incrementing +incrments:increments +inctroduced:introduced +inctroduce:introduce +incuded:included +incude:include +incudes:includes +incuding:including +incunabla:incunabula +incure:incur +indeces:indices +indefinately:indefinitely +indefineable:undefinable +indefinitly:indefinitely +indempotent:idempotent +indendation:indentation +indended:intended +indentical:identical +indentification:identification +indentified:identified +indentifier:identifier +indentifies:identifies +indentify:identify +indentifying:identifying +indepedantly:independently +indepedence:independence +independance:independence +independant:independent +independantly:independently +independece:independence +independed:independent +independendet:independent +independend:independent +indepenent:independent +indepenently:independently +indespensable:indispensable +indespensible:indispensable +indiated:indicated +indiate:indicate +indiates:indicates +indiating:indicating +indiciated:indicated +indiciate:indicate +indiciates:indicates +indiciating:indicating +indicies:indices +indicte:indicate +indictement:indictment +indictes:indicates +indigineous:indigenous +indipendence:independence +indipendent:independent +indipendently:independently +indispensible:indispensable +indisputible:indisputable +indisputibly:indisputably +indite:indict +indivdual:individual +indivdually:individually +individualy:individually +indivudual:individual +indivudually:individually +indpendent:independent +indpendently:independently +indulgue:indulge +indutrial:industrial +indviduals:individuals +inefficency:inefficiency +inefficienty:inefficiently +ineffient:inefficient +ineffiently:inefficiently +inevatible:inevitable +inevitible:inevitable +inevititably:inevitably +infalability:infallibility +infallable:infallible +infectuous:infectious +infered:inferred +infering:inferring +inferrence:inference +infilitrated:infiltrated +infilitrate:infiltrate +infilitration:infiltration +infinit:infinite +inflamation:inflammation +inflexable:inflexible +influencial:influential +influented:influenced +infomation:information +informaion:information +informatiom:information +informations:information +informtion:information +infrantryman:infantryman +infrigement:infringement +infromation:information +ingenius:ingenious +ingored:ignored +ingore:ignore +ingores:ignores +ingoring:ignoring +ingration:integration +ingreediants:ingredients +inhabitans:inhabitants +inherantly:inherently +inheritage:inheritance +inheritence:inheritance +inifinite:infinite +inital:initial +initalisation:initialisation +initalised:initialised +initalise:initialise +initalises:initialises +initalising:initialising +initalization:initialization +initalized:initialized +initalize:initialize +initalizer:initializer +initalizes:initializes +initalizing:initializing +initally:initially +initation:initiation +initators:initiators +initiaitive:initiative +initialisation:initialization +initializiation:initialization +initialsed:initialised +initialse:initialise +initialses:initialises +initialysed:initialised +initialyse:initialise +initialyses:initialises +initialysing:initialising +initialyzed:initialized +initialyze:initialize +initialyzes:initializes +initialyzing:initializing +initialzed:initialized +initialze:initialize +initialzes:initializes +initialzing:initializing +initiliased:initialised +initiliase:initialise +initiliases:initialises +initiliasing:initialising +initiliazed:initialized +initiliaze:initialize +initiliazes:initializes +initiliazing:initializing +initilisation:initialisation +initilisations:initialisations +initilised:initialised +initilise:initialise +initilises:initialises +initilising:initialising +initilization:initialization +initilizations:initializations +initilized:initialized +initilize:initialize +initilizes:initializes +initilizing:initializing +inlcuded:included +inlcude:include +inlcudes:includes +inlcuding:including +inmigrant:immigrant +inmigrants:immigrants +innacurate:inaccurate +innacurately:inaccurately +innoculated:inoculated +inocence:innocence +inofficial:unofficial +inot:into +inpeach:impeach +inpolite:impolite +inprisonment:imprisonment +inproper:improper +inproperly:improperly +inproving:improving +inscpeting:inspecting +insde:inside +insectiverous:insectivorous +insensative:insensitive +insensetive:insensitive +insensistive:insensitive +insensistively:insensitively +inseperable:inseparable +insistance:insistence +insitution:institution +insitutions:institutions +inspite:in spite +instade:instead +instalation:installation +instalations:installations +instanciated:instantiated +instanciate:instantiate +instanciates:instantiates +instanciating:instantiating +instanciation:instantiation +instanciations:instantiations +instatance:instance +instersction:intersection +ins't:isn't +institue:institute +instruciton:instruction +instrucitons:instructions +instuction:instruction +instuments:instruments +instutionalized:institutionalized +instutions:intuitions +insurence:insurance +intance:instance +intances:instances +intead:instead +inteface:interface +integreated:integrated +integrety:integrity +integrey:integrity +intelectual:intellectual +inteligence:intelligence +inteligent:intelligent +intenational:international +intendet:intended +intented:intended +intentially:intentionally +intepretation:interpretation +intepretator:interpretor +intepreted:interpreted +intepreter:interpreter +intepreters:interpreters +intepreting:interpreting +intepret:interpret +inteprets:interprets +interace:interface +interaces:interfaces +interactivly:interactively +interal:internal +interally:internally +interals:internals +interanl:internal +interanlly:internally +interational:international +interator:iterator +interators:iterators +interchangable:interchangeable +interchangably:interchangeably +intercontinential:intercontinental +intercontinetal:intercontinental +intereference:interference +intereferences:interferences +interelated:interrelated +interesected:intersected +interesecting:intersecting +interesect:intersect +interesection:intersection +interesections:intersections +interesects:intersects +interferance:interference +interfereing:interfering +interferred:interfered +interferring:interfering +interger:integer +intergers:integers +intergrated:integrated +intergration:integration +intermidiate:intermediate +interm:interim +intermittant:intermittent +internation:international +internel:internal +internels:internals +interpeted:interpreted +interpeter:interpreter +interpeters:interpreters +interpeting:interpreting +interpet:interpret +interpets:interprets +interpretes:interprets +interrim:interim +interrput:interrupt +interrrupted:interrupted +interrrupting:interrupting +interrrupt:interrupt +interrrupts:interrupts +interrugum:interregnum +interruped:interrupted +interruping:interrupting +interrups:interrupts +intersecton:intersection +intersectons:intersections +intertaining:entertaining +interupted:interrupted +interupting:interrupting +interupt:interrupt +interupts:interrupts +intervines:intervenes +intevene:intervene +intiailised:initialised +intiailise:initialise +intiailises:initialises +intiailized:initialized +intiailize:initialize +intiailizes:initializes +intiailizing:initialising +intiailizing:initializing +intial:initial +intialisation:initialisation +intialised:initialised +intialised:initialized +intialise:initialise +intialises:initialises +intialising:initialising +intialization:initialization +intialized:initialized +intialize:initialize +intializes:initializes +intializing:initializing +intially:initially +intials:initials +intrduced:introduced +intreface:interface +intregral:integral +intrest:interest +introdued:introduced +intrrupted:interrupted +intrrupting:interrupting +intrrupt:interrupt +intrrupts:interrupts +intruction:instruction +intructions:instructions +intruduced:introduced +intrumental:instrumental +intrumented:instrumented +intrumenting:instrumenting +intrument:instrument +intruments:instruments +intrusted:entrusted +intuative:intuitive +intutive:intuitive +intutively:intuitively +inudstry:industry +inumerable:enumerable +invaid:invalid +invaild:invalid +invalud:invalid +invarient:invariant +inventer:inventor +invertibrates:invertebrates +investingate:investigate +invididual:individual +invidual:individual +invidually:individually +invokation:invocation +invokations:invocations +invokved:invoked +invokve:invoke +invokves:invokes +invokving:invoking +involvment:involvement +irelevent:irrelevant +iresistable:irresistible +iresistably:irresistibly +iresistible:irresistible +iresistibly:irresistibly +iritable:irritable +iritated:irritated +ironicly:ironically +irregardless:regardless +irrelavent:irrelevant +irrelevent:irrelevant +irreplacable:irreplaceable +irresistable:irresistible +irresistably:irresistibly +isntance:instance +isntances:instances +is'nt:isn't +isnt:isn't +isnt':isn't +Israelies:Israelis +isssue:issue +isssues:issues +issueing:issuing +istead:instead +iterface:interface +iterfaces:interfaces +itialised:initialised +itialise:initialise +itialises:initialises +itialized:initialized +itialize:initialize +itializes:initializes +itializing:initializing +itnernal:internal +itnroduced:introduced +itsef:itself +itselfs:itself +itslef:itself +iunior:junior +iwll:will +iwth:with +Janurary:January +Januray:January +Japanes:Japanese +jaques:jacques +jave:java +jeapardy:jeopardy +jewllery:jewellery +Johanine:Johannine +jorunal:journal +Jospeh:Joseph +jouney:journey +journied:journeyed +journies:journeys +jstu:just +jsut:just +Juadaism:Judaism +Juadism:Judaism +judical:judicial +judisuary:judiciary +juducial:judicial +juristiction:jurisdiction +juristictions:jurisdictions +kenrel:kernel +keyboad:keyboard +keyboads:keyboards +keybord:keyboard +keybords:keyboards +keywork:keyword +kilometre:kilometer +kilometres:kilometers +kindergarden:kindergarten +klenex:kleenex +knifes:knives +knive:knife +knowlegeable:knowledgeable +knowlege:knowledge +knwo:know +knwon:known +knwos:knows +konw:know +konwn:known +konws:knows +kwno:know +labatory:laboratory +labelling:labeling +labled:labeled +lables:labels +labour:labor +labratory:laboratory +laguage:language +laguages:languages +langage:language +langauage:language +langauge:language +langauges:languages +langugage:language +languge:language +languges:languages +laoded:loaded +laoding:loading +laod:load +laods:loads +larg:large +largst:largest +larrry:larry +lastr:last +lattitude:latitude +lauched:launched +laucher:launcher +lauches:launches +lauching:launching +lauch:launch +launchs:launch +launhed:launched +lavae:larvae +layed:laid +lazyness:laziness +leage:league +leanr:learn +leathal:lethal +leats:least +lefted:left +legitamate:legitimate +legitmate:legitimate +leibnitz:leibniz +leightweight:lightweight +lengh:length +lenghs:lengths +lenght:length +lenghts:lengths +lenghty:lengthy +lengthes:lengths +lenth:length +leran:learn +lerans:learns +lesstiff:lesstif +leutenant:lieutenant +levetated:levitated +levetate:levitate +levetates:levitates +levetating:levitating +levle:level +leyer:layer +liasion:liaison +liason:liaison +liasons:liaisons +libaries:libraries +libary:library +libell:libel +libguistic:linguistic +libguistics:linguistics +libitarianisn:libertarianism +lible:liable +librairies:libraries +libraris:libraries +licenced:licensed +licenceing:licencing +licese:license +lieing:lying +liekd:liked +liek:like +liesure:leisure +lieuenant:lieutenant +lieved:lived +liftime:lifetime +lightweigh:lightweight +lightyear:light year +lightyears:light years +ligth:light +likelyhood:likelihood +limted:limited +linnaena:linnaean +lintain:lintian +lippizaner:lipizzaner +liquify:liquefy +liscense:license +lisence:license +lisense:license +listners:listeners +litature:literature +literaly:literally +literture:literature +litle:little +littel:little +litterally:literally +liuke:like +livley:lively +lmits:limits +loev:love +loger:logger +loggging:logging +loggin:login:* +logile:logfile +lonelyness:loneliness +longers:longer +longitudonal:longitudinal +longuer:longer +lonley:lonely +lonly:lonely +loosing:losing +loosly:loosely +losely:loosely +lotharingen:lothringen +lsat:last +lsit:list +lsits:lists +lukid:likud +lveo:love +lvoe:love +Lybia:Libya +machanism:mechanism +machanisms:mechanisms +machinary:machinery +maching:matching +mackeral:mackerel +magasine:magazine +magincian:magician +magisine:magazine +magizine:magazine +magnificient:magnificent +magolia:magnolia +mailny:mainly +maintainance:maintenance +maintainence:maintenance +maintaing:maintaining +maintance:maintenance +maintan:maintain +maintenence:maintenance +maintinaing:maintaining +maintioned:mentioned +majoroty:majority +maked:made +makeing:making +makse:makes +Malcom:Malcolm +malicously:maliciously +malicous:malicious +malplaced:misplaced +malplace:misplace +maltesian:Maltese +mamalian:mammalian +mamal:mammal +mamory:memory +managable:manageable +managment:management +manangement:management +maneouvred:manoeuvred +maneouvre:manoeuvre +maneouvres:manoeuvres +maneouvring:manoeuvring +mangement:management +manger:manager +manisfestations:manifestations +mannor:manner +mannually:manually +mannual:manual +manoeuverability:maneuverability +manoeuvering:maneuvering +manouverability:manoeuvrability +manouverable:manoeuvrable +manouver:manoeuvre +manouvers:manoeuvres +mantained:maintained +mantainer:maintainer +mantaining:maintaining +mantain:maintain +mantains:maintains +manuever:manoeuvre +manuevers:manoeuvres +manufacturedd:manufactured +manufatured:manufactured +manufature:manufacture +manufaturing:manufacturing +manully:manually +manupulation:manipulation +manupulations:manipulations +manuver:maneuver +mapp:map +mappping:mapping +mapppings:mappings +mariage:marriage +marjority:majority +markes:marked +marketting:marketing +marmelade:marmalade +marrage:marriage +marraige:marriage +marrtyred:martyred +marryied:married +Massachussets:Massachusetts +Massachussetts:Massachusetts +massmedia:mass media +masterbation:masturbation +mataphysical:metaphysical +matchin:matching +matcing:matching +materalists:materialist +mathamatics:mathematics +mathematican:mathematician +mathematicas:mathematics +matheticians:mathematicians +mathimatical:mathematical +mathimatic:mathematic +mathimatics:mathematics +mathmatically:mathematically +mathmatician:mathematician +mathmaticians:mathematicians +maximimum:maximum +maxium:maximum +mccarthyst:mccarthyist +mchanics:mechanics +meaninng:meaning +mear:mere +meber:member +mecanism:mechanism +mecanisms:mechanisms +mechamism:mechanism +mechamisms:mechanisms +mechandise:merchandise +medacine:medicine +medeival:medieval +medevial:medieval +mediciney:mediciny +medievel:medieval +mediterainnean:mediterranean +Mediteranean:Mediterranean +meerkrat:meerkat +melieux:milieux +membranaphone:membranophone +memeber:member +menally:mentally +mentiond:mentioned +mentionned:mentioned +ment:meant +mercentile:mercantile +mesage:message +mesages:messages +messagin:messaging +messags:messages +messanger:messenger +messangers:messengers +messenging:messaging +messge:message +messges:messages +messsage:message +messsages:messages +metalic:metallic +metalurgical:metallurgical +metalurgic:metallurgic +metalurgy:metallurgy +metamorphysis:metamorphosis +metaphoricial:metaphorical +meterologist:meteorologist +meterology:meteorology +methaphor:metaphor +methaphors:metaphors +metres:meters +Michagan:Michigan +micoscopy:microscopy +microprocesspr:microprocessor +midwifes:midwives +mileau:milieu +milennia:millennia +milennium:millennium +mileu:milieu +miliary:military +miligram:milligram +milion:million +miliraty:military +milisecond:millisecond +miliseconds:milliseconds +millenialism:millennialism +millenial:millennial +millenia:millennia +millenium:millennium +millepede:millipede +millimetre:millimeter +millimetres:millimeters +millioniare:millionaire +milliseonds:milliseconds +millitary:military +millon:million +miltary:military +mimicing:mimicking +mimick:mimic +mimicks:mimics +mimimum:minimum +minature:miniature +minerial:mineral +MingGW:MinGW +minimise:minimize +minimun:minimum +mininum:minimum +miniscule:minuscule +ministery:ministry +minium:minimum +miniums:minimums +minsitry:ministry +minstries:ministries +minstry:ministry +minumum:minimum +mirro:mirror +mirrorred:mirrored +miscelaneous:miscellaneous +miscellanious:miscellaneous +miscellanous:miscellaneous +miscelleneous:miscellaneous +mischeivous:mischievous +mischevious:mischievous +mischievious:mischievous +misdameanor:misdemeanor +misdameanors:misdemeanors +misdemenor:misdemeanor +misdemenors:misdemeanors +misformed:malformed +misfourtunes:misfortunes +misile:missile +mismached:mismatched +mismaches:mismatches +mismaching:mismatching +mismach:mismatch +Misouri:Missouri +mispelled:misspelled +mispelling:misspelling +mispell:misspell +mispelt:misspelt +missconfiguration:misconfiguration +missconfigured:misconfigured +missconfigure:misconfigure +missconfigures:misconfigures +missconfiguring:misconfiguring +missen:mizzen +Missisipi:Mississippi +Missisippi:Mississippi +missleading:misleading +missle:missile +missmatched:mismatched +missmatches:mismatches +missmatching:mismatching +missmatch:mismatch +missonary:missionary +misterious:mysterious +mistery:mystery +misteryous:mysterious +mkae:make +mkaes:makes +mkaing:making +mkea:make +mmnemonic:mnemonic +moderm:modem +modfied:modified +modfies:modifies +modfying:modifying +modfy:modify +modifed:modified +modifes:modifies +modifing:modifying +modle:model +moduel:module +moduels:modules +modulues:modules +moent:moment +moeny:money +mohammedans:muslims +moil:mohel +moil:soil +moleclues:molecules +momento:memento +monestaries:monasteries +monestary:monastery +monickers:monikers +monochorome:monochrome +monochromo:monochrome +monocrome:monochrome +monolite:monolithic +Monserrat:Montserrat +montains:mountains +montanous:mountainous +Montnana:Montana +monts:months +montypic:monotypic +moreso:more so +morever:moreover +morgage:mortgage +Morisette:Morissette +Morrisette:Morissette +morroccan:moroccan +morrocco:morocco +morroco:morocco +mortage:mortgage +mosture:moisture +motiviated:motivated +mounth:month +movei:movie +movment:movement +mroe:more +mssing:missing +mucuous:mucous +mudering:murdering +muder:murder +muhammadan:muslim +mulitple:multiple +mulitplied:multiplied +multible:multiple +multicultralism:multiculturalism +multidimensionnal:multidimensional +multifuction:multifunction +multipe:multiple +multipes:multiples +multipled:multiplied +multiplers:multipliers +multple:multiple +multplied:multiplied +multplies:multiplies +multplying:multiplying +multply:multiply +multy-thread:multithread +mumber:number +mumbers:numbers +munbers:numbers +muncipalities:municipalities +muncipality:municipality +munnicipality:municipality +muscels:muscles +muscial:musical +muscician:musician +muscicians:musicians +musn't:mustn't +mutiliated:mutilated +mutiple:multiple +mutliple:multiple +myraid:myriad +mysef:myself +mysogynist:misogynist +mysogyny:misogyny +mysterous:mysterious +Mythraic:Mithraic +naieve:naive +nams:names +Naploeon:Napoleon +Napolean:Napoleon +Napoleonian:Napoleonic +naturaly:naturally +naturely:naturally +naturually:naturally +naturual:natural +navagating:navigating +Nazereth:Nazareth +nead:need +neccecarily:necessarily +neccecary:necessary +neccesarily:necessarily +neccesary:necessary +neccessarily:necessarily +neccessary:necessary +neccessities:necessities +necesarily:necessarily +necesarrily:necessarily +necesarry:necessary +necesary:necessary +necessarilly:necessarily +necessar:necessary +necesserily:necessarily +necessery:necessary +necessiate:necessitate +nedded:needed +neeeded:needed +neeeding:needing +neeed:need +neeeds:needs +nees:needs +negitive:negative +neglible:negligible +negligable:negligible +negligble:negligible +negociated:negotiated +negociate:negotiate +negociates:negotiates +negociating:negotiating +negociation:negotiation +negociations:negotiations +negotation:negotiation +neice:nice +neigborhood:neighborhood +neigbourhood:neighbourhood +neigbouring:neighboring +neigbour:neighbor +neigbours:neighbors +neolitic:neolithic +nescessarily:necessarily +nescessary:necessary +nesesarily:necessarily +nessasarily:necessarily +nessasary:necessary +nessecarily:necessarily +nessecary:necessary +nessesarily:necessarily +nessesary:necessary +nessessarily:necessarily +nessessary:necessary +nestin:nesting +netwplit:netsplit +neverthless:nevertheless +newletters:newsletters +nework:network +neworks:networks +newtork:network +Newyorker:New Yorker +nickle:nickel +nightfa;;:nightfall +nightime:nighttime +nineth:ninth +ninteenth:nineteenth +ninties:1990s +ninty:ninety +nkow:know +nkwo:know +nmae:name +noncombatents:noncombatants +nonexistant:nonexistent +nonsence:nonsense +nontheless:nonetheless +noone:no one +norhern:northern +normaly:normally +northen:northern +northereastern:northeastern +notabley:notably +noteable:notable +noteably:notably +noteriety:notoriety +notfication:notification +notfications:notifications +nothern:northern +noth:north +noticable:noticeable +noticably:noticeably +notications:notifications +noticeing:noticing +noticible:noticeable +notifcation:notification +notifcations:notifications +notifed:notified +notifiying:notifying +notifiy:notify +notwhithstanding:notwithstanding +noveau:nouveau +Novermber:November +nowdays:nowadays +nowe:now +nubmer:number +nubmers:numbers +nucular:nuclear +nuculear:nuclear +nuisanse:nuisance +Nullabour:Nullarbor +numberal:numeral +numberals:numerals +numberous:numerous +numebr:number +numebrs:numbers +numering:numbering +numner:number +numners:numbers +nunber:number +nunbers:numbers +Nuremburg:Nuremberg +nusance:nuisance +nutritent:nutrient +nutritents:nutrients +nuturing:nurturing +obediance:obedience +obediant:obedient +obession:obsession +observered:observed +obssessed:obsessed +obstacal:obstacle +obstancles:obstacles +obstruced:obstructed +obsure:obscure +o'caml:OCaml +ocasionally:occasionally +ocasional:occasional +ocasionaly:occasionally +ocasioned:occasioned +ocasion:occasion +ocasions:occasions +ocassionally:occasionally +ocassional:occasional +ocassionaly:occasionally +ocassioned:occasioned +ocassion:occasion +ocassions:occasions +occaison:occasion +occassionally:occasionally +occassional:occasional +occassionaly:occasionally +occassioned:occasioned +occassion:occasion +occassions:occasions +occationally:occasionally +occoured:occurred +occouring:occurring +occour:occur +occourring:occurring +occours:occurs +occurance:occurrence +occurances:occurrences +occured:occurred +occurence:occurrence +occurences:occurrences +occure:occur +occures:occurs +occuring:occurring +occurrance:occurrence +occurrances:occurrences +occurr:occur +octohedral:octahedral +octohedra:octahedra +octohedron:octahedron +ocuntries:countries +ocuntry:country +ocupied:occupied +ocupies:occupies +ocupying:occupying +ocupy:occupy +ocurrance:occurrence +ocurred:occurred +ocurrence:occurrence +ocurrences:occurrences +ocurr:occur +offcers:officers +offcially:officially +offereings:offerings +offet:offset +offets:offsets +offically:officially +offical:official +officals:officials +officaly:officially +officialy:officially +offred:offered +oftenly:often +ofthe:of the +oging:going +olny:only +omision:omission +omited:omitted +omiting:omitting +omitt:omit +omlette:omelette +ommision:omission +ommited:omitted +ommiting:omitting +ommit:omit +ommits:omits +ommitted:omitted:* +ommitting:omitting +omniverously:omnivorously +omniverous:omnivorous +omre:more +onot:not +onself:oneself +onthe:on the +onyl:only +opague:opaque +openened:opened +openess:openness +openin:opening +openned:opened +openning:opening +opertaion:operation +opertaions:operations +opion:option +opions:options +oponent:opponent +oportunity:opportunity +opose:oppose +oposite:opposite +oposition:opposition +oppenly:openly +oppinion:opinion +opponant:opponent +oppononent:opponent +oppositition:opposition +oppossed:opposed +opprotunity:opportunity +opps:oops +opression:oppression +opressive:oppressive +opthalmic:ophthalmic +opthalmologist:ophthalmologist +opthalmology:ophthalmology +opthamologist:ophthalmologist +optinally:optionally +optinal:optional +optionaly:optionally +optionnal:optional +optio:option +optmization:optimization +optmizations:optimizations +optomism:optimism +orded:ordered +orderd:ordered +organim:organism +organistion:organisation +organiztion:organization +orginally:originally +orginal:original +orginal:orignal +orginated:originated +orginate:originate +orginates:originates +orginating:originating +orginize:organize +orgin:origin +oridinarily:ordinarily +orientatied:orientated +orientied:oriented +origanaly:originally +originall:original +originaly:originally +originially:originally +originial:original +originnally:originally +origionally:originally +origional:original +orignally:originally +orignal:original +orignially:originally +orthagonalize:orthogonalize +orthagonal:orthogonal +oscilated:oscillated +oscilate:oscillate +oscilating:oscillating +otehr:other +otherise:otherwise +otherwhise:otherwise +othwerwise:otherwise +oublisher:publisher +ouevre:oeuvre +ouptut:output +ouput:output +ouputs:outputs +ouputted:outputted +ouputting:outputting +oustanding:outstanding +outputing:outputting +outut:output +oveerun:overrun +oveflowed:overflowed +oveflowing:overflowing +oveflow:overflow +oveflows:overflows +overaall:overall +overidden:overridden +overiden:overridden +overide:override +overides:overrides +overiding:overriding +overlaped:overlapped +overlaping:overlapping +overlayed:overlaid +overriddden:overridden +overridded:overridden +overridding:overriding +overrided:overridden +overriden:overridden +overrridden:overridden +overrriden:overridden +overrride:override +overrriding:overriding +overshaddowed:overshadowed +overthere:over there +overun:overrun +overwelming:overwhelming +overwheliming:overwhelming +overwite:overwrite +overwites:overwrites +overwitten:overwritten +overwriten:overwritten +ovverridden:overridden +ovverride:override +ovverrides:overrides +ovverriding:overriding +owership:ownership +owrk:work +owudl:would +oxigen:oxygen +oximoron:oxymoron +p0enis:penis +pacakge:package +pachage:package +pach:patch +packacge:package +packege:package +packge:package +packges:packages +paide:paid +paitience:patience +pakage:package +pakages:packages +palce:place +paleolitic:paleolithic +palete:palette +paliamentarian:parliamentarian +Palistian:Palestinian +Palistinian:Palestinian +Palistinians:Palestinians +pallete:palette +palletted:paletted +pallette:palette +pamflet:pamphlet +pamplet:pamphlet +paniced:panicked +panicing:panicking +pantomine:pantomime +Papanicalou:Papanicolaou +paralellism:parallelism +paralell:parallel +paralelly:parallelly +paralel:parallel +paralely:parallelly +parallell:parallel +parallely:parallelly +parallization:parallelization +parallized:parallelized +parallize:parallelize +parallizes:parallelizes +parallizing:parallelizing +paramameters:parameters +paramater:parameter +paramaters:parameters +parameterize:parametrize +parametes:parameters +parametised:parametrised +paramter:parameter +paramters:parameters +parantheses:parentheses +paranthesis:parenthesis +paraphenalia:paraphernalia +parellels:parallels +paremeter:parameter +paremeters:parameters +parenthesed:parenthesized +parisitic:parasitic +parituclar:particular +parliment:parliament +parrakeets:parakeets +parralel:parallel +parrallell:parallel +parrallelly:parallelly +parrallel:parallel +parrallely:parallelly +partialy:partially +particually:particularly +particualr:particular +particuarly:particularly +particuar:particular +particularily:particularly +particulary:particularly +partioning:partitioning +partion:partition +pary:party +pased:passed +pasengers:passengers +passerbys:passersby +pasttime:pastime +pastural:pastoral +pathes:paths +paticularly:particularly +paticular:particular +pattented:patented +pavillion:pavilion +payed:paid +pblisher:publisher +pbulisher:publisher +peacefuland:peaceful and +peageant:pageant +pecularities:peculiarities +pecularity:peculiarity +peculure:peculiar +pedestrain:pedestrian +peference:preference +peformance:performance +peformed:performed +peice:piece +peices:pieces +Peloponnes:Peloponnesus +penalities:penalties +penality:penalty +penatly:penalty +pendantic:pedantic +penerator:penetrator +penisula:peninsula +penisular:peninsular +penninsula:peninsula +penninsular:peninsular +pennisula:peninsula +Pennyslvania:Pennsylvania +pensinula:peninsula +pensle:pencil +peom:poem +peoms:poems +peopel:people +peotry:poetry +peprocessor:preprocessor +perade:parade +peraphs:perhaps +percepted:perceived +percieved:perceived +percieve:perceive +perenially:perennially +perfomance:performance +perfomed:performed +perfomers:performers +perfoming:performing +perfom:perform +perfoms:performs +performace:performance +performence:performance +performes:performs +perfromance:performance +perfromed:performed +perfroming:performing +perfrom:perform +perfroms:performs +perhasp:perhaps +perheaps:perhaps +perhpas:perhaps +peripathetic:peripatetic +peristent:persistent +perjery:perjury +perjorative:pejorative +permanantly:permanently +permanant:permanent +permenantly:permanently +permenant:permanent +permision:permission +permisions:permissions +permissable:permissible +permissons:permissions +permuation:permutation +permuations:permutations +perogative:prerogative +peroid:period +peroids:periods +peronal:personal +perosnality:personality +perpertrated:perpetrated +perphas:perhaps +perpindicular:perpendicular +perseverence:perseverance +persistance:persistence +persistant:persistent +personell:personnel +personel:personal +personnal:personal +personnell:personnel +persuded:persuaded +persued:pursued +persue:pursue +persuing:pursuing +persuit:pursuit +persuits:pursuits +pertubation:perturbation +pertubations:perturbations +perviously:previously +pervious:previous +pessiary:pessary +petetion:petition +Pharoah:Pharaoh +phenomenom:phenomenon +phenomenonal:phenomenal +phenomenonly:phenomenally +phenomonenon:phenomenon +phenomonon:phenomenon +phenonmena:phenomena +Philipines:Philippines +philisopher:philosopher +philisophical:philosophical +philisophy:philosophy +Phillipine:Philippine +Phillipines:Philippines +Phillippines:Philippines +phillosophically:philosophically +philospher:philosopher +philosphies:philosophies +philosphy:philosophy +Phonecian:Phoenecian +phongraph:phonograph +phsyically:physically +phyiscally:physically +phyiscal:physical +phylosophical:philosophical +physcial:physical +physicaly:physically +piblisher:publisher +pich:pitch +pilgrimmage:pilgrimage +pilgrimmages:pilgrimages +pinapple:pineapple +pinnaple:pineapple +pinoneered:pioneered +pitty:pity +plaform:platform +plaforms:platforms +plaftorm:platform +plaftorms:platforms +plagarism:plagiarism +planation:plantation +planed:planned +plantiff:plaintiff +plase:please +plateu:plateau +platfrom:platform +platfroms:platforms +plathome:platform +plattform:platform +plattforms:platforms +plausable:plausible +playright:playwright +playwrite:playwright +playwrites:playwrights +pleaes:please +pleasent:pleasant +plebicite:plebiscite +plesant:pleasant +ploting:plotting +poenis:penis +poeoples:peoples +poety:poetry +poinnter:pointer +poisin:poison +poiter:pointer +poiters:pointers +polical:political +polinator:pollinator +polinators:pollinators +politican:politician +politicans:politicians +poltical:political +poluted:polluted +polute:pollute +polutes:pollutes +poluting:polluting +polution:pollution +polyphonyic:polyphonic +polysaccaride:polysaccharide +polysaccharid:polysaccharide +pomegranite:pomegranate +pomotion:promotion +poportional:proportional +popoulation:population +popularaty:popularity +populare:popular +populer:popular +porshan:portion +porshon:portion +portait:portrait +portayed:portrayed +portraing:portraying +portugese:Portuguese +Portugese:Portuguese +portuguease:portuguese +portugues:Portuguese +posessed:possessed +posesses:possesses +posessing:possessing +posession:possession +posessions:possessions +posess:possess +posibilities:possibilities +posibility:possibility +posible:possible +posion:poison +positionned:positioned +positon:position +positons:positions +positve:positive +positves:positives +possable:possible +possably:possibly +posseses:possesses +possesing:possessing +possesion:possession +possessess:possesses +possibe:possible +possibile:possible +possibilites:possibilities +possibilties:possibilities +possibilty:possibility +possiblility:possibility +possiblilty:possibility +possiblities:possibilities +possiblity:possibility +possition:position +Postdam:Potsdam +postgressql:PostgreSQL +posthomous:posthumous +postion:position +postions:positions +postive:positive +postives:positives +potatos:potatoes +potentally:potentially +potental:potential +potrait:portrait +potrayed:portrayed +poulations:populations +poverful:powerful +poweful:powerful +powerfull:powerful +ppublisher:publisher +practially:practically +practial:practical +practicaly:practically +practicioner:practitioner +practicioners:practitioners +practicly:practically +practioner:practitioner +practioners:practitioners +prairy:prairie +prarie:prairie +praries:prairies +pratice:practice +prcesses:processes +prcess:process +preample:preamble +precedessor:predecessor +preceeded:preceded +preceeding:preceding +preceed:precede +preceeds:precedes +precendence:precedence +precentage:percentage +precice:precise +precisly:precisely +precison:precision +precission:precision +precurser:precursor +predecesors:predecessors +predicatble:predictable +predicitons:predictions +predifined:predefined +predomiantly:predominately +prefered:preferred +prefering:preferring +preferrable:preferable +preferrably:preferably +prefferable:preferable +prefferably:preferably +preformance:performance +preform:perform +preforms:performs +pregancies:pregnancies +preiod:period +preliferation:proliferation +premeired:premiered +premeire:premiere +premillenial:premillennial +preminence:preeminence +premission:permission +Premonasterians:Premonstratensians +preocupation:preoccupation +prepaired:prepared +prepair:prepare +prepartion:preparation +prepartions:preparations +prepatory:preparatory +preperation:preparation +preperations:preparations +prepresent:represent +prerequisit:prerequisite +prerequisits:prerequisites +prerequsite:prerequisite +prerequsites:prerequisites +preriod:period +presance:presence +presedential:presidential +presense:presence +presidenital:presidential +presidental:presidential +presist:persist +presitgious:prestigious +prespective:perspective +prestigeous:prestigious +prestigous:prestigious +presumabely:presumably +presumibly:presumably +pretection:protection +prevelant:prevalent +preverse:perverse +previvous:previous +prevously:previously +prevous:previous +pricipal:principal +priciple:principle +priciples:principles +priestood:priesthood +primarly:primarily +primatively:primitively +primative:primitive +primatives:primitives +primordal:primordial +principaly:principality +principial:principal +principlaity:principality +principly:principally +princliple:principle +prinicipal:principal +prioritise:prioritize +prioritising:prioritizing +priorty:priority +privalege:privilege +privaleges:privileges +priveledges:privileges +priveleged:privileged +privelege:privilege +priveleges:privileges +priveliged:privileged +privelige:privilege +priveliges:privileges +privelleges:privileges +privide:provide +privilaged:privileged +privilage:privilege +privilages:privileges +priviledge:privilege +priviledges:privileges +privilige:privilege +priviliges:privileges +privledge:privilege +privte:private +probabilaty:probability +probablistic:probabilistic +probablly:probably +probalibity:probability +probaly:probably +probelm:problem +probelms:problems +proberly:properly +problably:probably +problimatic:problematic +problme:problem +problmes:problems +procceed:proceed +proccesors:processors +proccesses:processes +proccessing:processing +proccess:process +proceded:proceeded +procede:proceed +procedes:proceeds +procedger:procedure +proceding:proceeding +procedings:proceedings +proceedure:procedure +proceedures:procedures +proceeeded:proceeded +proceeeding:proceeding +proceeed:proceed +proceeeds:proceeds +procesed:processed +proceses:processes +proces:process +processer:processor +processessing:processing +processess:processes +processpr:processor +processsed:processed +processses:processes +processsing:processing +processs:process +proclaimation:proclamation +proclamed:proclaimed +proclaming:proclaiming +proclomation:proclamation +proctected:protected +proctecting:protecting +proctect:protect +proctects:protects +procude:produce +profesion:profession +profesor:professor +professer:professor +proffesed:professed +proffesional:professional +proffesion:profession +proffesor:professor +profilic:prolific +progams:programs +progessed:progressed +progess:progress +progidy:prodigy +programable:programmable +programatically:programmatically +programatic:programmatic +programers:programmers +programing:programming +programm:program +programms:programs +progresss:progress +progrom:program +progroms:programs +prohabition:prohibition +prologomena:prolegomena +prominance:prominence +prominantly:prominently +prominant:prominent +prominately:prominently +promiscous:promiscuous +promiss:promise +promotted:promoted +promps:prompts +pronnounced:pronounced +pronomial:pronominal +prononciation:pronunciation +pronouced:pronounced +pronouce:pronounce +pronounched:pronounced +pronounciation:pronunciation +pronunce:pronounce +prooved:proved +proove:prove +properies:properties +propery:property +prophacy:prophecy +propietary:proprietary +propigate:propagate +propigation:propagation +propmted:prompted +propoganda:propaganda +propogated:propagated +propogate:propagate +propogates:propagates +propogating:propagating +propogation:propagation +propostion:proposition +propotions:proportions +propperly:properly +propper:proper +proprietory:proprietary +proseletyzing:proselytizing +prosess:process +protable:portable +protaganist:protagonist +protaganists:protagonists +protcol:protocol +protecion:protection +protocal:protocol +protocals:protocols +protocoll:protocol +protoganist:protagonist +protoype:prototype +protoypes:prototypes +protrayed:portrayed +protruberance:protuberance +protruberances:protuberances +prouncements:pronouncements +provacative:provocative +provded:provided +provicial:provincial +provinicial:provincial +provisiosn:provision +provisonal:provisional +proximty:proximity +pseudononymous:pseudonymous +pseudonyn:pseudonym +psuedo:pseudo +psychadelic:psychedelic +psycology:psychology +psyhic:psychic +pubilsher:publisher +pubisher:publisher +publiaher:publisher +publically:publicly +publicaly:publicly +publicher:publisher +publihser:publisher +publisehr:publisher +publiser:publisher +publisger:publisher +publisheed:published +publisherr:publisher +publishher:publisher +publishor:publisher +publishre:publisher +publissher:publisher +publlisher:publisher +publsiher:publisher +publusher:publisher +puchasing:purchasing +Pucini:Puccini +Puertorrican:Puerto Rican +Puertorricans:Puerto Ricans +pulisher:publisher +pumkin:pumpkin +puplisher:publisher +puritannical:puritanical +purposedly:purposely +purpotedly:purportedly +pursuaded:persuaded +pursuade:persuade +pursuades:persuades +pususading:persuading +puting:putting +pwoer:power +pyscic:psychic +qouted:quoted +qoute:quote +qoutes:quotes +qouting:quoting +qtuie:quite +quantaty:quantity +quantitiy:quantity +quarantaine:quarantine +Queenland:Queensland +queing:queueing +quering:querying +questonable:questionable +quicklyu:quickly +quinessential:quintessential +quiting:quitting +quitted:quit +quizes:quizzes +qutie:quite +rabinnical:rabbinical +racaus:raucous +radiactive:radioactive +radify:ratify +raelly:really +rarified:rarefied +rasterise:rasterize +reaccurring:recurring +reachs:reaches +reacing:reaching +reacll:recall +readabilty:readability +readible:readable +readmition:readmission +realise:realize +realitvely:relatively +realsitic:realistic +realtions:relations +realyl:really +realy:really +reamde:README +reaons:reasons +reasearcher:researcher +reasearchers:researchers +reasearch:research +reasonble:reasonable +reasonbly:reasonably +reasonnable:reasonable +reasonnably:reasonably +rebiulding:rebuilding +rebllions:rebellions +rebounce:rebound +rebuliding:rebuilding +rebulid:rebuild +rebulids:rebuilds +rebulit:rebuilt +reccomendations:recommendations +reccomended:recommended +reccomending:recommending +reccomend:recommend +reccommended:recommended +reccommending:recommending +reccommend:recommend +reccommends:recommends +reccuring:recurring +receeded:receded +receeding:receding +receieved:received +receieve:receive +receieves:receives +receieving:receiving +receivedfrom:received from +recepient:recipient +recepients:recipients +receved:received +receve:receive +receves:receives +recevied:received +recevie:receive +recevies:receives +receving:receiving +rechargable:rechargeable +reched:reached +recided:resided +recident:resident +recidents:residents +recide:reside +reciding:residing +reciepents:recipients +reciept:receipt +recieved:received +recieve:receive +reciever:receiver +recievers:receivers +recieves:receives +recieving:receiving +recipiant:recipient +recipiants:recipients +recipies:recipes +recived:received +recive:receive +recivership:receivership +recives:receives +reciving:receiving +recod:record +recogise:recognise +recogized:recognized +recogize:recognize +recogizes:recognizes +recogizing:recognizing +recogniced:recognised +recognizeable:recognizable +recomended:recommended +recomending:recommending +recomend:recommend +recomends:recommends +recommanded:recommended +recommedations:recommendations +recommeded:recommended +recommeding:recommending +recommed:recommend +recommeds:recommends +recommeneded:recommended +recommened:recommended +recommented:recommended +recompence:recompense +reconaissance:reconnaissance +reconcilation:reconciliation +reconized:recognized +reconnaisance:reconnaissance +reconnaissence:reconnaissance +recontructed:reconstructed +recordproducer:record producer +recquired:required +recrational:recreational +recrod:record +rectange:rectangle +rectanges:rectangles +recuiting:recruiting +recuring:recurring +recurrance:recurrence +recursivly:recursively +recyled:recycled +recyle:recycle +recyles:recycles +recyling:recycling +redefintion:redefinition +redefintions:redefinitions +rediculous:ridiculous +redircet:redirect +redirectrion:redirection +reedeming:redeeming +reenabled:re-enabled +reenable:re-enable +reencode:re-encode +reenforced:reinforced +refected:reflected +refecting:reflecting +refect:reflect +refects:reflects +refedendum:referendum +refence:reference +refences:references +referal:referral +referece:reference +refereces:references +refered:referred +referemce:reference +referemces:references +referencs:references +refereneced:referenced +referenece:reference +refereneces:references +referiang:referring +refering:referring +refernced:referenced +refernce:reference +refernce:references +refernces:references +referncing:referencing +referrence:reference +referrences:references +referrs:refers +refeshed:refreshed +refeshes:refreshes +refeshing:refreshing +refesh:refresh +reffered:referred +refference:reference +reffering:referring +refrenced:referenced +refrence:reference +refrences:references +refrencing:referencing +refrers:refers +refridgeration:refrigeration +refridgerator:refrigerator +refromist:reformist +refusla:refusal +regardes:regards +regaring:regarding +regarless:regardless +registed:registered +registeing:registering +registerd:registered:* +registe:register +registes:registers +registraration:registration +registred:registered +registrs:registers +regluar:regular +regsitered:registered +regsitering:registering +regsiter:register +regsiters:registers +regstered:registered +regstering:registering +regster:register +regsters:registers +regualarly:regularly +regualar:regular +reguarly:regularly +regulaion:regulation +regulamentations:regulations +regulaotrs:regulators +regularily:regularly +rehersal:rehearsal +reicarnation:reincarnation +reigining:reigning +reigstered:registered +reigstering:registering +reigster:register +reigsters:registers +reimplmentation:reimplementation +reimplmented:reimplemented +reimplmenting:reimplementing +reimplment:reimplement +reimplments:reimplements +reknowned:renowned +reknown:renown +relaly:really +rela:real +relased:released +relase:release +relases:releases +relasing:releasing +relatiopnship:relationship +relativly:relatively +relavent:relevant +releasse:release +releated:related +relected:reelected +releived:relieved +releive:relieve +releiver:reliever +releses:releases +reletively:relatively +reletive:relative +relevence:relevance +relevent:relevant +reliablity:reliability +relient:reliant +religeous:religious +religously:religiously +religous:religious +relinqushment:relinquishment +relitavely:relatively +relized:realized +relocateable:relocatable +relpacement:replacement +relys:relies +remaing:remaining +remebered:remembered +remebering:remembering +remeber:remember +remebers:remembers +rememberable:memorable +rememberance:remembrance +remembrence:remembrance +remenant:remnant +remenicent:reminiscent +reminent:remnant +reminescent:reminiscent +reminscent:reminiscent +reminsicent:reminiscent +remoote:remote +removeable:removable +renderering:rendering +rendevous:rendezvous +rendezous:rendezvous +renedered:rende +renegotation:renegotiation +renewl:renewal +rennovated:renovated +rennovate:renovate +rennovating:renovating +rennovation:renovation +rentors:renters +reoccurrence:recurrence +reorganision:reorganisation +repaced:replaced +repace:replace +repaces:replaces +repacing:replacing +repatition:repetition +repblican:republican +repblicans:republicans +repblic:republic +repblics:republics +repeatly:repeatedly +repectively:respectively +repective:respective +repeition:repetition +repentence:repentance +repentent:repentant +repesented:represented +repesenting:representing +repesent:represent +repesents:represents +repeteadly:repeatedly +repetion:repetition +repetions:repetitions +repid:rapid +replacable:replaceable +replacments:replacements +replys:replies +reponse:response +reponses:responses +reponsibilities:responsibilities +reponsibility:responsibility +reponsible:responsible +reporitory:repository +reportadly:reportedly +repostiories:repositories +repostiory:repository +repport:report +represantative:representative +representaion:representation +representaions:representations +representiative:representative +representive:representative +representives:representatives +represneted:represented +represneting:representing +represnet:represent +represnets:represents +represnted:represented +reproducabely:reproducibly +reproducable:reproducible +reprtoire:repertoire +repsectively:respectively +repsonse:response +repsonses:responses +reptition:repetition +repubican:republican +repubicans:republicans +repubic:republic +repubics:republics +republian:republican +republians:republicans +republi:republic +republis:republics +repulican:republican +repulicans:republicans +repulic:republic +repulics:republics +reqest:request +reqeust:request +reqeusts:requests +requiered:required +requiere:require +requieres:requires +requiering:requiring +requirment:requirement +requirments:requirements +requred:required +requrested:requested +requresting:requesting +requrest:request +requrests:requests +requried:required +requsted:requested +requsting:requesting +requst:request +requsts:requests +resaurant:restaurant +resembelance:resemblance +resembes:resembles +resemblence:resemblance +reserverd:reserved +reseted:reset +reseting:resetting +resetted:reset +resevoir:reservoir +resgister:register +resgisters:registers +residental:residential +resignement:resignment +resistable:resistible +resistence:resistance +resistent:resistant +resizeable:resizable +resloved:resolved +reslove:resolve +resloves:resolves +resloving:resolving +resonable:reasonable +resopnse:response +resorce:resource +resorces:resources +resouce:resource +resouces:resources +resoure:resource +resoures:resources +respectivly:respectively +responce:response +responces:responses +responibilities:responsibilities +responisble:responsible +responnsibilty:responsibility +responsabilities:responsibilities +responsability:responsibility +responsed:responded +responsibile:responsible +responsibilites:responsibilities +responsiblities:responsibilities +responsiblity:responsibility +responsing:responding +resposible:responsible +respositories:repositories +respository:repository +ressemblance:resemblance +ressembled:resembled +ressemblence:resemblance +ressemble:resemble +ressembling:resembling +ressize:resize +ressource:resource +ressources:resources +resssurecting:resurrecting +ressurected:resurrected +ressurecting:resurrecting +ressurection:resurrection +ressurect:resurrect +ressurects:resurrects +ressurrection:resurrection +restarant:restaurant +restarants:restaurants +restaraunteur:restaurateur +restaraunteurs:restaurateurs +restaraunt:restaurant +restaraunts:restaurants +restauranteurs:restaurateurs +restauration:restoration +restauraunt:restaurant +resteraunt:restaurant +resteraunts:restaurants +resticted:restricted +restraunt:restraint +resturant:restaurant +resturants:restaurants +resturaunt:restaurant +resturaunts:restaurants +resultion:resolution +resultions:resolutions +resurecting:resurrecting +resursively:recursively +resursive:recursive +retalitated:retaliated +retalitation:retaliation +retored:restored +retore:restore +retores:restores +retoring:restoring +retransmited:retransmitted +retreived:retrieved +retreive:retrieve +retrived:retrieved +retrive:retrieve +retrives:retrieves +retriving:retrieving +retrun:return +retuns:returns +retured:returned +returing:returning +returnd:returned +returnes:returns +retur:return +returs:returns +reuest:request +reuests:requests +reuqested:requested +reuqesting:requesting +reuqest:request +reuqests:requests +revaluated:reevaluated +reveiw:re +reveral:reversal +reversable:reversible +revison:revision +revisons:revisions +revolutionar:revolutionary +revrese:reverse +rewitten:rewritten +rewriet:rewrite +rewriten:rewritten +rewuired:required +rference:reference +rferences:references +rhymme:rhyme +rhythem:rhythm +rhythim:rhythm +rhytmic:rhythmic +rigeur:rigor +rigourous:rigorous +rigth:right +rigths:rights +rigt:right +rininging:ringing +rised:raised +rmeoved:removed +rmeove:remove +rmeoves:removes +Rockerfeller:Rockefeller +rococco:rococo +rocord:record +roomate:roommate +rouding:rounding +rougly:roughly +rouine:routine +rouines:routines +rountine:routine +rountines:routines +routins:routines +rquested:requested +rquesting:requesting +rquest:request +rquests:requests +rucuperate:recuperate +rudimentatry:rudimentary +rulle:rule +runing:running:* +runned:ran +runnig:running +runnning:running +runnung:running +russina:Russian +Russion:Russian +rwite:write +rythem:rhythm +rythim:rhythm +rythmic:rhythmic +rythm:rhythm +rythyms:rhythms +sacrafice:sacrifice +sacreligious:sacrilegious +Sacremento:Sacramento +sacrifical:sacrificial +sacrifying:sacrificing +safly:safely +saftey:safety +safty:safety +salery:salary +sanctionning:sanctioning +sandwhich:sandwich +Sanhedrim:Sanhedrin +santioned:sanctioned +santized:sanitized +santize:sanitize +santizes:sanitizes +santizing:sanitizing +sargant:sergeant +sargeant:sergeant +sasy:says +satelite:satellite +satelites:satellites +Saterday:Saturday +Saterdays:Saturdays +satified:satisfied +satifies:satisfies +satifying:satisfying +satify:satisfy +satisfactority:satisfactorily +satisfiabilty:satisfiability +satisified:satisfied +satisifies:satisfies +satisifying:satisfying +satisify:satisfy +satrically:satirically +satrical:satirical +satric:satiric +sattelite:satellite +sattelites:satellites +saught:sought +savable:saveable +saveing:saving +savely:safely +savety:safety +saxaphone:saxophone +scaleable:scalable +scalled:scaled +scandanavia:Scandinavia +scaned:scanned +scaning:scanning +scaricity:scarcity +scavanged:scavenged +schedual:schedule +scholarhip:scholarship +scholarstic:scholastic +schould:should +scientfic:scientific +scientifc:scientific +scientis:scientist +scince:science +scinece:science +scirpt:script +scolling:scrolling +scoll:scroll +screenwrighter:screenwriter +scriping:scripting +scrutinity:scrutiny +scuptures:sculptures +seached:searched +seaches:searches +seaching:searching +seach:search +searchs:searches:* +secceeded:succeeded +seceeded:succeeded +seceed:succeed +secific:specific +secion:section +secions:sections +seciton:section +secitons:sections +secratary:secretary +secretery:secretary +sectionning:sectioning +secund:second +securty:security +sedereal:sidereal +seeked:sought +segementation:segmentation +segement:segment +segements:segments +segmentaion:segmentation +seguoys:segues +seige:siege +seing:seeing +seinor:senior +selction:selection +selctions:selections +seldomly:seldom +sematically:semantically +sematical:semantical +sematic:semantic +sematics:semantics +sempahore:semaphore +sempahores:semaphores +senario:scenario +senarios:scenarios +sence:sense +sensistive:insensitive +sensistively:insensitively +senstive:sensitive +sensure:censure +sentance:sentence +sentances:sentences +sentinal:sentinel +sentinals:sentinels +separatly:separately +separed:separated +separeted:separated +separete:separate +separetes:separates +separeting:separating +separted:separated +separte:separate +separtes:separates +separting:separating +sepcial:special +sepcified:specified +sepcifies:specifies +sepcifying:specifying +sepcify:specify +seperated:separated +seperately:separately +seperate:separate +seperates:separates +seperating:separating +seperation:separation +seperatism:separatism +seperatist:separatist +seperatly:separately +seperator:separator +sepina:subpoena +sepperate:separate +seprator:separator +seprators:separators +sepulchure:sepulchre +sepulcre:sepulchre +sequece:sequence +sequeces:sequences +sequencially:sequentially +sequencial:sequential +sergent:sergeant +serie:series +serivce:service +serivces:services +sertificate:certificate +sertificates:certificates +serveral:several +sesssion:session +sesssions:sessions +setted:set +settelement:settlement +settlment:settlement +setts:sets +settting:setting +setttings:settings +severeal:several +severley:severely +severly:severely +sevice:service +shadasloo:shadaloo +shaddow:shadow +shadoloo:shadaloo +shamen:shaman +shashes:slashes +sheat:sheet +sheduled:scheduled +shedule:schedule +shedules:schedules +sheduling:scheduling +sheild:shield +sherif:sheriff +shineing:shining +shiped:shipped +shiping:shipping +shopkeeepers:shopkeepers +shorly:shortly +shortwhile:short while +shoudln: shouldn't +shoudl:should +shoud:should +should'nt:shouldn't +shouldnt:shouldn't +shouldnt':shouldn't +should't:shouldn't +shoule:should +shreak:shriek +shrinked:shrunk +sicne:since +sideral:sidereal +siezed:sized +sieze:size +siezing:sizing +siezure:seizure +siezures:seizures +siginificantly:significantly +siginificant:significant +signficantly:significantly +signficant:significant +signficiant:significant +signfies:signifies +signifantly:significantly +significently:significantly +signifigantly:significantly +signifigant:significant +signitories:signatories +signitory:signatory +signle:single +signto:sign to +similarily:similarly +similary:similarly +similiarity:similarity +similiarly:similarly +similiar:similar +simlarlity:similarity +simlarly:similarly +simlar:similar +simliar:similar +simmilar:similar +simpley:simply +simplier:simpler +simpliest:simplest +simultanously:simultaneously +simultanous:simultaneous +sincerley:sincerely +singal:signal +singed:signed +singsog:singsong +sinse:since +Sionists:Zionists +Sionist:Zionist +sitation:situation +sitations:situations +Sixtin:Sistine +Skagerak:Skagerrak +skateing:skating +skiped:skipped +skiping:skipping +slashs:slashes +slaugterhouses:slaughterhouses +slighly:slightly +sligthly:slightly +sligth:slight +slippy:slippery +slowy:slowly +smae:same +smaple:sample +smaples:samples +smealting:smelting +smoe:some +sneeks:sneaks +snese:sneeze +socalism:socialism +socities:societies +soem:some +softwares:software +sofware:software +sohw:show +soilders:soldiers +solatary:solitary +soley:solely +soliders:soldiers +soliliquy:soliloquy +soluable:soluble +somehwat:somewhat +somehwere:somewhere +somene:someone +somes:some +somethign:something +someting:something +somthing:something +somtimes:sometimes +somwhere:somewhere +sonething:something +sophicated:sophisticated +sophmore:sophomore +sorceror:sorcerer +sorrounding:surrounding +sotry:story +sotyr:story +souce:source +souces:sources +soudn:sound +soudns:sounds +sould:sold +sountrack:soundtrack +soure:source +soures:sources +sourthern:southern +sourth:south +southbrige:southbridge +souvenier:souvenir +souveniers:souvenirs +soveits:soviets +sovereignity:sovereignty +soverignity:sovereignty +soverign:sovereign +soverignty:sovereignty +spagetti:spaghetti +spainish:Spanish +spawed:spawned +spawing:spawning +spaw:spawn +spaws:spawns +speach:speech +spearator:separator +spearators:separators +specail:special +specfication:specification +specfications:specifications +specfic:specific +specfied:specified +specfies:specifies +specfying:specifying +specfy:specify +specialise:specialize +speciallized:specialized +speciefied:specified +specifc:specific +specifed:specified +specificatin:specification +specificaton:specification +specificiation:specification +specificiations:specifications +specificly:specifically +specifing:specifying +specifiying:specifying +specifiy:specify +specif:specify +speciman:specimen +spectauclar:spectacular +spectaulars:spectaculars +spects:aspects +spectum:spectrum +speficied:specified +spefic:specific +speices:species +speling:spelling +spendour:splendour +spermatozoan:spermatozoon +splitted:split +spoace:space +sponsered:sponsored +sponser:sponsor +spontanous:spontaneous +sponzored:sponsored +spoonfulls:spoonfuls +sppeches:speeches +spported:supported +spporting:supporting +spports:supports +spport:support +spreaded:spread +sprech:speech +spred:spread +spriritual:spiritual +spritual:spiritual +spurios:spurious +spurrious:spurious +sqaure:square +sructures:structures +sructure:structure +stablility:stability +staically:statically +stainlees:stainless +staion:station +standardss:standards +standars:standards +standart:standard +stange:strange +startegic:strategic +startegies:strategies +startegy:strategy +stateman:statesman +statememts:statements +staticly:statically +statics:statistics:* +statisfied:satisfied +statisfies:satisfies +statisfying:satisfying +statisfy:satisfy +statments:statements +statment:statement +stength:strength +steriods:steroids +sterotypes:stereotypes +stilus:stylus +stingent:stringent +stiring:stirring +stirngs:strings +stirng:string +stirrs:stirs +stlye:style +stomache:stomach +stong:strong +stoped:stopped:* +stoping:stopping +stoppped:stopped +stopry:story +storeis:stories +storise:stories +stornegst:strongest +stoyr:story +stpo:stop +stradegies:strategies +stradegy:strategy +straighforward:straightforward +straightfoward:straightforward +straigth:straight +straigt:straight +stratagically:strategically +strat:start +streched:stretched +streches:stretches +streching:stretching +strech:stretch +streemlining:streamlining +stregth:strength +strenghened:strengthened +strenghening:strengthening +strenghen:strengthen +strenghtened:strengthened +strenghtening:strengthening +strenghten:strengthen +strenghts:strengths +strenght:strength +strengtened:strengthened +strenous:strenuous +strenth:strength +strictist:strictest +strikely:strikingly +strnad:strand +strored:stored +strores:stores +strore:store +stroring:storing +stroy:story +structered:structured +structres:structures +structre:structure +structual:structural +stubborness:stubbornness +stucts:structs +stuct:struct +stuctured:structured +stuctures:structures +stucture:structure +studdy:study +studing:studying +stuggling:struggling +sturctures:structures +sturcture:structure +subcatagories:subcategories +subcatagory:subcategory +subconsiously:subconsciously +subcribed:subscribed +subcribes:subscribes +subcribe:subscribe +subcribing:subscribing +subdirectoires:subdirectories +subdirectorys:subdirectories +subexpresssions:subexpressions +subexpresssion:subexpression +subjudgation:subjugation +suble:subtle +submachne:submachine +subpecies:subspecies +subseqent:subsequent +subsequest:subsequent +subsidary:subsidiary +subsiduary:subsidiary +subsituting:substituting +subsquently:subsequently +subsquent:subsequent +substace:substance +substancial:substantial +substatial:substantial +substituded:substituted +substitudes:substitutes +substitude:substitute +substituding:substituting +substituions:substitutions +substituion:substitution +substracted:subtracted +substracting:subtracting +substraction:subtraction +substracts:subtracts +substract:subtract +subsytems:subsystems +subsytem:subsystem +subtances:substances +subterranian:subterranean +subtituted:substituted +subtitutes:substitutes +subtitute:substitute +subtituting:substituting +subtitutions:substitutions +subtitution:substitution +suburburban:suburban +succceeded:succeeded +succcesses:successes +succedded:succeeded +succeded:succeeded +succedes:succeeds +succede:succeed +succeding:succeeding +succeds:succeeds +succeedes:succeeds +succesfull:successful +succesfully:successfully +succesful:successful +succesfuly:successfully +succesion:succession +succesive:successive +succesors:successors +succesor:successor +successfull:successful +successfuly:successfully +successully:successfully +succint:succinct +succsessfull:successful +succsess:success +suceeded:succeeded +suceeding:succeeding +suceeds:succeeds +suceed:succeed +sucesfully:successfully +sucesful:successful +sucesfuly:successfully +sucesion:succession +sucesses:successes +sucessfull:successful +sucessfully:successfully +sucessful:successful +sucessfuly:successfully +sucession:succession +sucessive:successive +sucessor:successor +sucessot:successor +sucess:success +sucide:suicide +sucidial:suicidal +sufferage:suffrage +sufferred:suffered +sufferring:suffering +sufficently:sufficiently +sufficent:sufficient +sugestions:suggestions +sugestion:suggestion +sugests:suggests +sumary:summary +sunglases:sunglasses +suop:soup +superceded:superseded +supercedes:supersedes +supercede:supersede +superceding:superseding +superceeded:superseded +superflous:superfluous +superintendant:superintendent +superseeded:superseded +suphisticated:sophisticated +suplementary:supplementary +suplied:supplied +suplimented:supplemented +suported:supported +suporting:supporting +suports:supports +suport:support +suposedly:supposedly +suposed:supposed +suposes:supposes +supose:suppose +suposing:supposing +suppied:supplied +suppies:supplies +supplamented:supplemented +suppliementing:supplementing +suppoed:supposed +suppored:supported +supportd:supported +supportin:supporting +supposingly:supposedly +suppoted:supported +suppported:supported +suppporting:supporting +suppports:supports +suppport:support +suppying:supplying +suppy:supply +supressed:suppressed +supresses:suppresses +supressing:suppressing +supress:suppress +suprised:surprised +suprises:surprises +suprise:surprise +suprisingly:surprisingly +suprising:surprising +suprized:surprised +suprize:surprise +suprizingly:surprisingly +suprizing:surprising +surfce:surface +surley:surely +surounded:surrounded +suroundings:surroundings +surounding:surrounding +surounds:surrounds +suround:surround +surplanted:supplanted +surpressed:suppressed +surpresses:suppresses +surpressing:suppressing +surpress:suppress +surprized:surprised +surprize:surprise +surprizingly:surprisingly +surprizing:surprising +surrended:surrounded +surrepetitiously:surreptitiously +surrepetitious:surreptitious +surreptiously:surreptitiously +surreptious:surreptitious +surronded:surrounded +surrouded:surrounded +surrouding:surrounding +surrundering:surrendering +surveilence:surveillance +surveill:surveil +surveyer:surveyor +survivers:survivors +surviver:survivor +survivied:survived +suseptable:susceptible +suseptible:susceptible +suspention:suspension +suspicously:suspiciously +suspicous:suspicious +sustitutions:substitutions +sustitution:substitution +suuported:supported +suuporting:supporting +suuports:supports +suuport:support +swaers:swears +swaer:swear +swaped:swapped:* +swaping:swapping +swepth:swept +swiming:swimming +switchs:switches +syas:says +syles:styles +syle:style +sylog:syslog +symbo:symbol +symetrically:symmetrically +symetrical:symmetrical +symetric:symmetric +symetry:symmetry +symettric:symmetric +symmetral:symmetric +symmetricaly:symmetrically +synagouge:synagogue +synax:syntax +synchonisation:synchronisation +synchonised:synchronised +synchonises:synchronises +synchonise:synchronise +synchonising:synchronising +synchonization:synchronization +synchonized:synchronized +synchonizes:synchronizes +synchonize:synchronize +synchonizing:synchronizing +syncronised:synchronised +syncronises:synchronises +syncronise:synchronise +syncronising:synchronising +syncronizations:synchronizations +syncronization:synchronization +syncronized:synchronized +syncronizes:synchronizes +syncronize:synchronize +syncronizing:synchronizing +syncronously:synchronously +syncronous:synchronous +syncronus:synchronous +synonomous:synonymous +synonymns:synonyms +synopsys:synopsis +synphony:symphony +synronous:synchronous +syphyllis:syphilis +sypmtoms:symptoms +syrap:syrup +sysmatically:systematically +syste:system +sytems:systems +sytem:system +sythesis:synthesis +sytle:style +tabacco:tobacco +tahn:than +taht:that +talekd:talked +targetted:targeted +targetting:targeting +tast:taste +tath:that +tattooes:tattoos +taxanomic:taxonomic +taxanomy:taxonomy +teached:taught +techicians:technicians +techician:technician +techiniques:techniques +technitian:technician +technnology:technology +technolgy:technology +teh:the +tehy:they +telelevision:television +televsion:television +telphony:telephony +temerature:temperature +temorary:temporary +tempaltes:templates +tempalte:template +tempararily:temporarily +temparary:temporary +temparate:temperate +temperarily:temporarily +temperment:temperament +tempertaure:temperature +temperture:temperature +temprary:temporary +tenacles:tentacles +tenacle:tentacle +tenatively:tentatively +tenative:tentative +tendacy:tendency +tendancies:tendencies +tendancy:tendency +tennisplayer:tennis player +tepmorarily:temporarily +terminaters:terminators +terminater:terminator +terrestial:terrestrial +terriories:territories +terriory:territory +territorist:terrorist +territoy:territory +terroist:terrorist +testiclular:testicular +testomony:testimony +texually:textually +texual:textual +tghe:the +thansk:thanks +thast:that +thats:that's +theather:theater +theer:there +theese:these +theif:thief +theives:thieves +themselfs:themselves +themslves:themselves +therafter:thereafter +therby:thereby +theres:there's +therfore:therefore +theri:their +ther:there +theshold:threshold +theyre:they're +thgat:that +thge:the +thier:their +thie:the +thigns:things +thign:thing +thigsn:things +thikning:thinking +thikns:thinks +thikn:think +thiunk:think +thna:than +thne:then +thnigs:things +thnig:thing +thn:then +thoughout:throughout +threasholds:thresholds +threashold:threshold +threatend:threatened +threatning:threatening +threds:threads +thred:thread +threee:three +threhold:threshold +threshholds:thresholds +threshhold:threshold +thrid:third +throrough:thorough +throughly:thoroughly +throught:through +througout:throughout +throug:through +throuth:through +thses:these +thsi:this +thsoe:those +ths:the +thta:that +thyat:that +tiem:time +tiggered:triggered +tiggering:triggering +tiggers:triggers +tigger:trigger +tigthened:tightened +tigthening:tightening +tigthens:tightens +tigthen:tighten +tigth:tight +tihkn:think +tihs:this +timeing:timing +timetamps:timestamps +timetamp:timestamp +timming:timing +timne:time +timout:timeout +tiome:time +tipically:typically +tje:the +tjhe:the +tjpanishad:upanishad +tkaes:takes +tkae:take +tkaing:taking +tlaking:talking +tobbaco:tobacco +todays:today's +todya:today +togehter:together +toghether:together +togther:together +toke:took +tolerence:tolerance +Tolkein:Tolkien +tomatos:tomatoes +tommorow:tomorrow +tommorrow:tomorrow +tongiht:tonight +toriodal:toroidal +tormenters:tormentors +tornadoe:tornado +torpeados:torpedoes +torpedos:torpedoes +tothe:to the +toubles:troubles +tounge:tongue +touple:tuple +tourch:torch +towords:towards +towrad:toward +tradionally:traditionally +traditionaly:traditionally +traditionnal:traditional +traditition:tradition +tradtionally:traditionally +trafficed:trafficked +trafficing:trafficking +trafic:traffic +trailling:trailing +tranceivers:transceivers +tranceiver:transceiver +trancendent:transcendent +trancending:transcending +tranfered:transfered +tranfering:transfering +tranfers:transfers +tranfer:transfer +tranformations:transformations +tranformation:transformation +tranformed:transformed +tranforming:transforming +tranforms:transforms +tranform:transform +tranlated:translated +tranlates:translates +tranlate:translate +tranlating:translating +tranlations:translations +tranlation:translation +tranparently:transparently +tranparent:transparent +transations:transactions +transation:transaction +transcendance:transcendence +transcendant:transcendent +transcendentational:transcendental +transciever:transceiver +transcripting:transcribing +transending:transcending +transesxuals:transsexuals +transfered:transferred +transfering:transferring +transformaton:transformation +transfromations:transformations +transfromation:transformation +transfromed:transformed +transfroming:transforming +transfroms:transforms +transfrom:transform +transisions:transitions +transision:transition +transistions:transitions +transistion:transition +transitionned:transitioned +transitons:transitions +transiton:transition +translaters:translators +translater:translator +transmissable:transmissible +transmited:transmitted +transmiters:transmitters +transmiter:transmitter +transmiting:transmitting +transmition:transmission +transmittion:transmission +transormed:transformed +transorming:transforming +transorms:transforms +transorm:transform +transparancy:transparency +transparantly:transparently +transparant:transparent +transporation:transportation +transtions:transitions +transtion:transition +transtitions:transitions +transtition:transition +trasaction:transaction +trascation:transaction +traslates:translates +trasmission:transmission +trasnaction:transaction +tremelos:tremolos +tremelo:tremolo +treshold:threshold +trigerring:triggering +trigers:triggers +triggerred:triggered +triguered:triggered +triology:trilogy +troling:trolling +troups:troops +troup:troupe +trucated:truncated +trucates:truncates +trucate:truncate +trucating:truncating +truely:truly +trustworthyness:trustworthiness +tupples:tuples +tupple:tuple +turnk:trunk +Tuscon:Tucson +tust:trust +twelth:twelfth +twon:town +twpo:two +tyhat:that +tyhe:they +typcial:typical +typicaly:typically +typles:tuples +typle:tuple +tyranies:tyrannies +tyrany:tyranny +tyrranies:tyrannies +tyrrany:tyranny +ubiquitious:ubiquitous +ublisher:publisher +udpated:updated +udpates:updates +udpate:update +udpating:updating +uesd:used +uglyness:ugliness +uise:use +uknown:unknown +Ukranian:Ukrainian +ultimely:ultimately +unabailable:unavailable +unacceptible:unacceptable +unacompanied:unaccompanied +unahppy:unhappy +unamed:unnamed +unanymous:unanimous +unathorised:unauthorised +unavaible:unavailable +unavailabel:unavailable +unavailible:unavailable +unballance:unbalance +unbeknowst:unbeknownst +unbeleivable:unbelievable +uncertainities:uncertainties +uncertainity:uncertainty +unchallengable:unchallengeable +unchangable:unchangeable +uncomented:uncommented +uncomenting:uncommenting +uncoments:uncomments +uncoment:uncomment +uncommited:uncommitted +uncommmented:uncommented +uncommmenting:uncommenting +uncommments:uncomments +uncommment:uncomment +uncompetive:uncompetitive +uncomplete:incomplete +unconciousness:unconsciousness +unconcious:unconscious +unconditionaly:unconditionally +unconfortability:discomfort +uncontitutional:unconstitutional +unconvential:unconventional +uncorrect:incorrect +uncorrectly:incorrectly +uncoverted:unconverted +uncrypted:unencrypted +undecideable:undecidable +undefuned:undefined +understoon:understood +underuns:underruns +underun:underrun +undesireable:undesirable +undestand:understand +undestood:understood +undetecable:undetectable +undoubtely:undoubtedly +undreground:underground +uneccesary:unnecessary +unecessary:unnecessary +uneeded:unneeded +unequalities:inequalities +uner:under +unexcpected:unexpected +unexecpted:unexpected +unexected:unexpected +unexepcted:unexpected +unexpcted:unexpected +unexpetedly:unexpectedly +unexpeted:unexpected +unflaged:unflagged +unforetunately:unfortunately +unforgetable:unforgettable +unforgiveable:unforgivable +unfortunatelly:unfortunately +unfortunatley:unfortunately +unfortunatly:unfortunately +unforunately:unfortunately +unforunate:unfortunate +unfourtunately:unfortunately +unihabited:uninhabited +unilateraly:unilaterally +unilatreally:unilaterally +unilatreal:unilateral +uninitalized:uninitialized +unintentially:unintentionally +uninterruped:uninterrupted +uninterupted:uninterrupted +unintialised:uninitialised +unintialized:uninitialized +uniqe:unique +UnitesStates:UnitedStates +unitialized:uninitialized +univeral:universal +univeristies:universities +univeristy:university +univerities:universities +univerity:university +universtiy:university +univesities:universities +univesity:university +unknonw:unknown +unknow:unknown +unknwon:unknown +unkonwn:unknown +unkown:unknown +unles:unless +unlikey:unlikely +unmanouverable:unmanoeuvrable +unmistakeably:unmistakably +unneccecarily:unnecessarily +unneccecary:unnecessary +unneccesarily:unnecessarily +unneccesary:unnecessary +unneccessarily:unnecessarily +unneccessary:unnecessary +unnecesarily:unnecessarily +unnecesarrily:unnecessarily +unnecesarry:unnecessary +unnecesary:unnecessary +unnecessarilly:unnecessarily +unnecessar:unnecessary +unnecesserily:unnecessarily +unnecessery:unnecessary +unnedded:unneeded +unneedingly:unnecessarily +unnescessarily:unnecessarily +unnescessary:unnecessary +unnesesarily:unnecessarily +unnessasary:unnecessary +unnessecarily:unnecessarily +unnessecary:unnecessary +unnessesarily:unnecessarily +unnessesary:unnecessary +unnessessarily:unnecessarily +unnessessary:unnecessary +unoffical:unofficial +unoperational:nonoperational +unorderd:unordered +unoticeable:unnoticeable +unplease:displease +unplesant:unpleasant +unprecendented:unprecedented +unprecidented:unprecedented +unqouted:unquoted +unqoutes:unquotes +unqoute:unquote +unqouting:unquoting +unrecogized:unrecognized +unreconized:unrecognized +unregnized:unrecognized +unrepentent:unrepentant +unrepetant:unrepentant +unrepetent:unrepentant +unresonable:unreasonable +unsed:unused +unselect:deselect +unsinged:unsigned +unspported:unsupported +unsual:unusual +unsubstanciated:unsubstantiated +unsuccesfull:unsuccessful +unsuccesfully:unsuccessfully +unsuccesful:unsuccessful +unsuccessfull:unsuccessful +unsucesful:unsuccessful +unsucesfuly:unsuccessfully +unsucessfull:unsuccessful +unsucessfully:unsuccessfully +unsucessful:unsuccessful +unsued:unused +unsuported:unsupported +unsuprised:unsurprised +unsuprisingly:unsurprisingly +unsuprising:unsurprising +unsuprized:unsurprised +unsuprizingly:unsurprisingly +unsuprizing:unsurprising +unsurprized:unsurprised +unsurprizingly:unsurprisingly +unsurprizing:unsurprising +untill:until +untranslateable:untranslatable +unusally:unusually +unusal:unusual +unuseable:unusable +unuseful:useless +unusuable:unusable +unvailable:unavailable +unversionned:unversioned +unversoned:unversioned +unviersity:university +unwarrented:unwarranted +unweildly:unwieldy +unwieldly:unwieldy +unwrritten:unwritten +upated:updated +upates:updates +upate:update +upating:updating +upcomming:upcoming +updateing:updating +upgradded:upgraded +uppstream:upstream +upsream:upstream +upsteam:upstream +upstrema:upstream +upto:up to +usally:usually +usal:usual +useable:usable +useage:usage +usefule:useful +usefull:useful +usefuly:usefully +usege:usage +useing:using +usera:users +userful:useful +usetnet:Usenet +usuable:usable +usualy:usually +ususally:usually +utilites:utilities +utillities:utilities +utilties:utilities +utiltity:utility +utitlty:utility +utlity:utility +vaccume:vacuum +vaccum:vacuum +vacinity:vicinity +vaguaries:vagaries +vaiables:variables +vaiable:variable +vaieties:varieties +vaild:valid +vailidty:validity +valetta:valletta +validing:validating +valied:valid +valuble:valuable +valueable:valuable +varables:variables +varable:variable +varaibles:variables +varaible:variable +varations:variations +variabes:variables +variabe:variable +variantions:variations +varibales:variables +varibale:variable +varient:variant +variey:variety +varing:varying +varities:varieties +varity:variety +vasalls:vassals +vasall:vassal +vauled:valued +vaules:values +vaule:value +vauling:valuing +vebrose:verbose +vegatarian:vegetarian +vegitables:vegetables +vegitable:vegetable +vegtable:vegetable +vehicule:vehicle +vell:well +venemous:venomous +vengance:vengeance +vengence:vengeance +verbse:verbose +verfication:verification +verions:versions +verion:version +verious:various +verisons:versions +verison:version +veritical:vertical +vermillion:vermilion +verry:very +versionned:versioned +versionning:versioning +versitilaty:versatility +versitlity:versatility +versoned:versioned +versons:versions +verson:version +verticaly:vertically +verticies:vertices +veryified:verified +veryifies:verifies +veryifying:verifying +veryify:verify +vetween:between +veyr:very +vicefersa:vice-versa +vigeur:vigor +vigilence:vigilance +vigourous:vigorous +villian:villain +villification:vilification +villify:vilify +vill:will +vincinity:vicinity +violentce:violence +virtualy:virtually +virutally:virtually +virutal:virtual +visability:visibility +visable:visible +visably:visibly +visibile:visible +visiters:visitors +visting:visiting +vistors:visitors +vitories:victories +vitual:virtual +volcanoe:volcano +voleyball:volleyball +volontary:voluntary +volonteered:volunteered +volonteering:volunteering +volonteers:volunteers +volonteer:volunteer +volounteered:volunteered +volounteering:volunteering +volounteers:volunteers +volounteer:volunteer +volumne:volume +vreity:variety +vrey:very +vriety:variety +vulnerablility:vulnerability +vyer:very +vyre:very +waht:what +wanna:want to +want's:wants +wan't:want +warantee:warranty +waranties:warranties +waranty:warranty +wardobe:wardrobe +waring:warning +warrent:warrant +warrriors:warriors +wasnt:wasn't +wasnt':wasn't +was'nt:weren't +wass:was +watn:want +wayword:wayward +weaponary:weaponry +weas:was +wehn:when +weigth:weight +weilded:wielded +weild:wield +weired:weird +wendsay:Wednesday +wensday:Wednesday +wereabouts:whereabouts +were'nt:wasn't +werent:weren't +wether:whether +whants:wants +whant:want +whataver:whatever +whcih:which +whenver:whenever +wheras:whereas +wherease:whereas +whereever:wherever +wheter:whether +whic:which +whihc:which +whiped:wiped +whish:wish +whitch:which +whithout:without +whith:with +whlch:which +whn:when +wholey:wholly +wholy:wholly +whta:what +whther:whether +wich:which +widesread:widespread +widht:width +wief:wife +wierd:weird +wiew:view +wihout:without +wiht:with +wih:with +wiil:will +wilcards:wildcards +wilcard:wildcard +wille:will +willingless:willingness +willk:will +willl:will +wirtes:writes +wirte:write +wirting:writing +withdrawl:withdrawal +witheld:withheld +withe:with +withh:with +withing:within +withold:withhold +withthe:with the +witht:with +witin:within +witn:with +wiull:will +wnated:wanted +wnating:wanting +wnats:wants +wnat:want +wohle:whole +wokring:working +wokr:work +wonderfull:wonderful +wont:won't +wordlwide:worldwide +workaroung:workaround +workststion:workstation +worls:world +worstened:worsened +woudl:would +woudn't:wouldn't +woud:would +would'nt:wouldn't +wouldnt:wouldn't +would't:wouldn't +wresters:wrestlers +wriet:write +writeable:writable +writeing:writing +writen:written +writting:writing +wroet:wrote +wroking:working +wrok:work +wtih:with +wupport:support +xenophoby:xenophobia +xour:your +xwindows:X +yaching:yachting +yaerly:yearly +yaers:years +yaer:year +yatch:yacht +yearm:year +yeasr:years +yeilded:yielded +yeilding:yielding +yeilds:yields +yeild:yield +yelded:yielded +yelding:yielding +yelds:yields +yeld:yield +yeras:years +yera:year +yersa:years +yotube:youtube +youseff:yousef +youself:yourself +yrea:year +ytou:you +yuo:you +yur:your diff --git a/scripts/spelling.dat b/scripts/spelling.dat deleted file mode 100644 index 9df2ba2c556a..000000000000 --- a/scripts/spelling.dat +++ /dev/null @@ -1,529 +0,0 @@ -abandonning:abandoning -abigious:ambiguous -abitrate:arbitrate -abov:above -absolut:absolute -accelleration:acceleration -accesing:accessing -accesnt:accent -accessable:accessible -accidentaly:accidentally -accidentually:accidentally -accomadate:accommodate -accomodate:accommodate -accomodates:accommodates -accout:account -acess:access -acheive:achieve -acording:according -actully:actually -acumulating:accumulating -addional:additional -additionaly:additionally -adress:address -adresses:addresses -adviced:advised -afecting:affecting -albumns:albums -alegorical:allegorical -algorith:algorithm -algorithmical:algorithmically -allpication:application -alot:a lot -alows:allows -als:also -altough:although -ambigious:ambiguous -amoung:among -amout:amount -an other:another -analysator:analyzer -analysies:analyses -annoucement:announcement -aplication:application -appearence:appearance -appropiate:appropriate -appropriatly:appropriately -aquired:acquired -architechture:architecture -arguement:argument -arguements:arguments -aribitary:arbitrary -aritmetic:arithmetic -arne't:aren't -arount:around -arraival:arrival -artefact:artifact -artefacts:artifacts -artifical:artificial -artillary:artillery -assigment:assignment -assigments:assignments -assistent:assistant -asuming:assuming -atomatically:automatically -attemps:attempts -attemtps:attempts -attribut:attribute -attruibutes:attributes -authentification:authentication -automaticaly:automatically -automaticly:automatically -automatize:automate -automatized:automated -automatizes:automates -auxilliary:auxiliary -avaiable:available -availabel:available -availabled:available:* -availablity:availability -availale:available -availavility:availability -availble:available -availiable:available -avaliable:available -backgroud:background -baloons:balloons -batery:battery -becomming:becoming -becuase:because -begining:beginning -behaviour:behavior -calender:calendar -cancelation:cancellation -capabilites:capabilities -capatibilities:capabilities -capitalise:capitalize -cariage:carriage -centimetre:centimeter -centimetres:centimeters -challanges:challenges -changable:changeable -charachters:characters -charcter:character -chnages:changes -choosen:chosen -colorfull:colorful -colour:color -colours:colors -comand:command -comit:commit -commerical:commercial -comminucation:communication -commiting:committing -committ:commit -commoditiy:commodity -compability:compatibility -comparaison:comparison -compatability:compatibility -compatable:compatible -compatibiliy:compatibility -compatibilty:compatibility -compleatly:completely -complient:compliant -compres:compress -compresion:compression -connectinos:connections -consistancy:consistency -containes:contains -containging:containing -containts:contains -contence:contents -continous:continuous -continueing:continuing -contraints:constraints -convertor:converter -convinient:convenient -corected:corrected -cryptocraphic:cryptographic -deamon:daemon -debain:Debian -debians:Debian's -decompres:decompress -definate:definite -definately:definitely -definintion:definition -deimiter:delimiter -delemeter:delimiter -delemiter:delimiter -delimeter:delimiter -delimted:delimited -dependancies:dependencies -dependancy:dependency -dependant:dependent -descencing:descending -detabase:database -determin:determine -developement:development -developped:developed -deveolpment:development -devided:divided -dictionnary:dictionary -diplay:display -disapeared:disappeared -disolve:dissolve -dispertion:dispersion -dissapears:disappears -docuentation:documentation -documantation:documentation -documentaion:documentation -dont:don't -easilly:easily -ecspecially:especially -edditable:editable -editting:editing -eletronic:electronic -emited:emitted -emmited:emitted -emmitted:emitted -enchanced:enhanced -encorporating:incorporating -endianess:endianness -enhaced:enhanced -enlightnment:enlightenment -enterily:entirely -enviroiment:environment -enviroment:environment -environement:environment -excecutable:executable -exceded:exceeded -excellant:excellent -exlcude:exclude -expecially:especially -explicitely:explicitly -expresion:expression -exprimental:experimental -extention:extension -failuer:failure -familar:familiar -fatser:faster -fetaures:features -feture:feature -flter:filter -flavour:flavor -flavours:flavors -forse:force -fortan:fortran -forwardig:forwarding -framwork:framework -frist:first -fuction:function -fuctions:functions -functionaly:functionally -functionnality:functionality -functonality:functionality -furter:further -futher:further -futhermore:furthermore -generiously:generously -grahical:graphical -grahpical:graphical -granulatiry:granularity -grapic:graphic -guage:gauge -halfs:halves -heigh:height -heigth:height -heirarchically:hierarchically -helpfull:helpful -hierachy:hierarchy -hierarchie:hierarchy -howver:however -immediatelly:immediately -implemantation:implementation -implementaed:implemented -incomming:incoming -incompatabilities:incompatibilities -incompatable:incompatible -inconsistant:inconsistent -indendation:indentation -indended:intended -independant:independent -informatiom:information -informations:information -infromation:information -initalize:initialize -initators:initiators -initialisation:initialization -initializiation:initialization -inofficial:unofficial -instersction:intersection -integreated:integrated -integrety:integrity -integrey:integrity -intendet:intended -interactivly:interactively -interchangable:interchangeable -intermittant:intermittent -intersecton:intersection -intersectons:intersections -interupted:interrupted -intialised:initialized -intreface:interface -jave:java -kilometre:kilometer -kilometres:kilometers -labelling:labeling -labour:labor -langage:language -langauage:language -langugage:language -lauch:launch -lenght:length -lesstiff:lesstif -libaries:libraries -libary:library -libraris:libraries -licenceing:licencing -loggging:logging -loggin:login:* -logile:logfile -machinary:machinery -maintainance:maintenance -maintainence:maintenance -makeing:making -managable:manageable -manger:manager -manoeuvering:maneuvering -mathimatic:mathematic -mathimatical:mathematical -mathimatics:mathematics -ment:meant -messsages:messages -metres:meters -microprocesspr:microprocessor -millimetre:millimeter -millimetres:millimeters -milliseonds:milliseconds -minimise:minimize -miscelleneous:miscellaneous -misformed:malformed -mispelled:misspelled -mmnemonic:mnemonic -modulues:modules -monochorome:monochrome -monochromo:monochrome -monocrome:monochrome -mroe:more -multidimensionnal:multidimensional -navagating:navigating -nead:need -neccesary:necessary -neccessary:necessary -necesary:necessary -negotation:negotiation -nescessary:necessary -nessessary:necessary -noticable:noticeable -notications:notifications -nubmer:number -o'caml:OCaml -occured:occurred -occurence:occurrence -occuring:occurring -omitt:omit -ommitted:omitted:* -opps:oops -optionnal:optional -optmizations:optimizations -orientatied:orientated -orientied:oriented -orthagonal:orthogonal -orthagonalize:orthogonalize -overaall:overall -overidden:overridden -overide:override -overiden:overridden -overriden:overridden -pacakge:package -pachage:package -packacge:package -packege:package -packge:package -pakage:package -palletted:paletted -paramameters:parameters -parameterize:parametrize -paramter:parameter -paramters:parameters -particularily:particularly -pased:passed -peference:preference -peprocessor:preprocessor -perfoming:performing -permissons:permissions -persistant:persistent -plattform:platform -ploting:plotting -posible:possible -postgressql:PostgreSQL -postion:position -powerfull:powerful -preceeded:preceded -preceeding:preceding -precendence:precedence -precission:precision -prefered:preferred -prefferably:preferably -prepaired:prepared -primative:primitive -princliple:principle -priorty:priority -prioritise:prioritize -prioritising:prioritizing -proccesors:processors -proces:process -processessing:processing -processpr:processor -processsing:processing -progams:programs -programers:programmers -programm:program -programms:programs -promps:prompts -pronnounced:pronounced -prononciation:pronunciation -pronouce:pronounce -pronunce:pronounce -propery:property -prosess:process -protable:portable -protcol:protocol -protecion:protection -protocoll:protocol -psychadelic:psychedelic -quering:querying -rasterise:rasterize -recieve:receive -recieved:received -reciever:receiver -recognizeable:recognizable -recommanded:recommended -recommeneded:recommended -redircet:redirect -redirectrion:redirection -reenable:re-enable -reenabled:re-enabled -reencode:re-encode -refence:reference -registerd:registered:* -registraration:registration -regulamentations:regulations -remoote:remote -removeable:removable -repectively:respectively -replacments:replacements -requiere:require -requred:required -resizeable:resizable -ressize:resize -ressource:resource -retransmited:retransmitted -retrun:return -rigth:right -runnning:running -safly:safely -savable:saveable -searchs:searches:* -secific:specific -secund:second -separatly:separately -sepcify:specify -seperate:separate -seperated:separated -seperately:separately -seperatly:separately -seperator:separator -sequencial:sequential -serveral:several -setts:sets -signto:sign to -similiar:similar -simliar:similar -sofware:software -speach:speech -speciefied:specified -specifed:specified -specificaton:specification -specifing:specifying -speficied:specified -speling:spelling -splitted:split -staically:statically -standart:standard -staticly:statically -statics:statistics:* -stoped:stopped:* -subdirectoires:subdirectories -succesful:successful -succesfully:successfully -sucess:success -sucessful:successful -sucessfully:successfully -superceded:superseded -superflous:superfluous -superseeded:superseded -suplied:supplied -suport:support -suppored:supported -supportin:supporting -suppoted:supported -suppport:support -suppported:supported -supress:suppress -surpress:suppress -suspicously:suspiciously -swaped:swapped:* -symbo:symbol -syle:style -symetrical:symmetrical -synax:syntax -synchonized:synchronized -syncronize:synchronize -syncronizing:synchronizing -syncronus:synchronous -syste:system -sythesis:synthesis -taht:that -teh:the -throught:through -tranform:transform -transfering:transferring -traslates:translates -trasmission:transmission -treshold:threshold -trigerring:triggering -unexecpted:unexpected -unfortunatelly:unfortunately -unknonw:unknown -unkown:unknown -unselect:deselect -unuseful:useless -useable:usable -useage:usage -usefull:useful -usera:users -usetnet:Usenet -utilites:utilities -utillities:utilities -utilties:utilities -utiltity:utility -utitlty:utility -vaild:valid -variantions:variations -varient:variant -verbse:verbose -verison:version -verisons:versions -verson:version -vicefersa:vice-versa -vitual:virtual -whataver:whatever -wheter:whether -wich:which -widht:width -wierd:weird -writeable:writable -writting:writing -xwindows:X -yur:your From 6c74e4ea5d1385a85812cf21dfd3b1a1c58da0db Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Thu, 12 Jan 2017 22:01:50 +0100 Subject: [PATCH 022/332] spelling fixes --- CMakeLists.txt | 2 +- INSTALL | 2 +- NEWS | 14 +++++------ ci/travis/check_spelling.sh | 3 +-- cmake/FindPyQt4.cmake | 2 +- cmake/FindPyQt5.cmake | 2 +- cmake/FindSIP.cmake | 2 +- debian/changelog | 2 +- doc/INSTALL.html | 2 +- doc/msys.t2t | 2 +- doc/news.html | 14 +++++------ doc/news.t2t | 14 +++++------ .../interpolation/NormVecDecorator.sip | 2 +- .../analysis/openstreetmap/qgsosmimport.sip | 2 +- python/core/auth/qgsauthconfig.sip | 2 +- python/core/composer/qgscomposeritem.sip | 4 ++-- python/core/qgsnetworkaccessmanager.sip | 2 +- python/core/qgspoint.sip | 2 +- python/core/qgsrenderchecker.sip | 6 ++--- python/core/qgsvectordataprovider.sip | 2 +- python/core/qgsvectorlayer.sip | 2 +- python/core/qgsvectorlayerfeatureiterator.sip | 4 ++-- python/core/qgsvectorlayertools.sip | 4 ++-- .../core/symbology-ng/qgscptcityarchive.sip | 2 +- python/core/symbology-ng/qgssymbollayer.sip | 4 ++-- .../attributetable/qgsattributetableview.sip | 2 +- .../attributetable/qgsfeaturelistmodel.sip | 2 +- .../gui/attributetable/qgsfeaturelistview.sip | 2 +- python/gui/qgisinterface.sip | 2 +- .../gui/qgsadvanceddigitizingdockwidget.sip | 2 +- python/gui/qgsexternalresourcewidget.sip | 2 +- python/gui/qgsmaplayeractionregistry.sip | 2 +- python/gui/qgsmaptooladvanceddigitizing.sip | 2 +- python/gui/qgsmaptoolidentify.sip | 4 ++-- .../db_manager/db_plugins/oracle/TODO.md | 2 +- .../db_plugins/postgis/connector.py | 2 +- .../db_plugins/spatialite/sql_dictionary.py | 2 +- .../db_plugins/vlayers/sql_dictionary.py | 2 +- python/plugins/processing/algs/help/qgis.yaml | 4 ++-- .../algs/lidar/lastools/lascontrol.py | 2 +- .../plugins/processing/algs/qgis/Eliminate.py | 2 +- python/plugins/processing/tools/postgis.py | 2 +- python/pyplugin_installer/version_compare.py | 4 ++-- python/server/qgsserverinterface.sip | 2 +- python/server/qgsservicemodule.sip | 2 +- qgis.dtd | 2 +- .../cpt-city-qgis-min/selections/div.xml | 4 ++-- rpm/default.cfg | 2 +- scripts/spell_check/.agignore | 3 +-- scripts/spell_check/spelling.dat | 24 ++++++++++++------- .../interpolation/CloughTocherInterpolator.cc | 2 +- .../interpolation/DualEdgeTriangulation.cc | 2 +- src/analysis/interpolation/NormVecDecorator.h | 2 +- src/analysis/openstreetmap/qgsosmimport.h | 2 +- src/analysis/vector/qgspointsample.cpp | 2 +- src/app/composer/qgscomposeritemwidget.h | 4 ++-- src/app/gps/qgsgpsinformationwidget.cpp | 2 +- src/app/qgisappinterface.h | 2 +- src/app/qgsdecorationnortharrow.h | 2 +- src/app/qgsguivectorlayertools.h | 4 ++-- src/app/qgsidentifyresultsdialog.cpp | 2 +- src/app/qgsprojectproperties.h | 2 +- src/astyle/ASBeautifier.cpp | 2 +- src/astyle/ASFormatter.cpp | 2 +- src/astyle/astyle_main.cpp | 2 +- src/core/auth/qgsauthconfig.h | 2 +- src/core/composer/qgsaddremoveitemcommand.cpp | 4 ++-- src/core/composer/qgscomposerarrow.cpp | 6 ++--- src/core/composer/qgscomposeritem.h | 4 ++-- src/core/geometry/qgsgeometryutils.h | 2 +- src/core/qgsapplication.cpp | 6 ++--- src/core/qgsclipper.h | 6 ++--- src/core/qgscoordinatereferencesystem.h | 2 +- src/core/qgscoordinatereferencesystem_p.h | 2 +- src/core/qgscoordinatetransform_p.h | 2 +- src/core/qgserror.cpp | 2 +- src/core/qgsmaptopixelgeometrysimplifier.cpp | 2 +- src/core/qgspoint.cpp | 8 +++---- src/core/qgspoint.h | 2 +- src/core/qgsprojectfiletransform.cpp | 2 +- src/core/qgsrenderchecker.h | 6 ++--- src/core/qgssqlstatement.h | 2 +- src/core/qgstextrenderer.cpp | 2 +- src/core/qgsvectorlayer.h | 4 ++-- src/core/qgsvectorlayerfeatureiterator.h | 4 ++-- src/core/qgsvectorlayertools.h | 4 ++-- src/core/raster/qgscolorrampshader.cpp | 2 +- src/core/raster/qgsrasterinterface.cpp | 2 +- src/core/raster/qgsrasterlayer.cpp | 2 +- src/core/raster/qgsrasterlayerrenderer.cpp | 2 +- src/core/symbology-ng/qgscptcityarchive.cpp | 2 +- src/core/symbology-ng/qgscptcityarchive.h | 2 +- .../symbology-ng/qgsrulebasedrenderer.cpp | 2 +- src/core/symbology-ng/qgsstyle.cpp | 2 +- src/core/symbology-ng/qgssymbol.cpp | 4 ++-- src/core/symbology-ng/qgssymbollayer.h | 4 ++-- .../attributetable/qgsattributetableview.h | 2 +- src/gui/attributetable/qgsfeaturelistmodel.h | 2 +- src/gui/attributetable/qgsfeaturelistview.h | 2 +- src/gui/qgisgui.cpp | 2 +- src/gui/qgisinterface.h | 2 +- src/gui/qgsadvanceddigitizingdockwidget.cpp | 8 +++---- src/gui/qgsadvanceddigitizingdockwidget.h | 2 +- src/gui/qgscomposerview.cpp | 2 +- src/gui/qgsdetaileditemdelegate.cpp | 2 +- src/gui/qgsexternalresourcewidget.h | 2 +- src/gui/qgsfiledropedit.cpp | 2 +- src/gui/qgshighlight.cpp | 2 +- src/gui/qgsmaplayeractionregistry.h | 2 +- src/gui/qgsmaptooladvanceddigitizing.h | 2 +- src/gui/qgsmaptoolidentify.cpp | 2 +- src/gui/qgsmaptoolidentify.h | 4 ++-- src/gui/qgsowssourceselect.cpp | 2 +- src/gui/qgsprojectionselector.cpp | 4 ++-- src/gui/symbology-ng/qgssizescalewidget.cpp | 2 +- .../evisdatabaseconnection.h | 2 +- .../evisdatabaseconnectiongui.cpp | 2 +- .../evisgenericeventbrowsergui.cpp | 6 ++--- .../eventbrowser/evisimagedisplaywidget.h | 2 +- .../qgsgeometryselfintersectioncheck.cpp | 2 +- .../georeferencer/qgsgeorefplugingui.cpp | 2 +- .../qgstransformsettingsdialog.cpp | 2 +- src/plugins/grass/modules/r.colors.table.qgm | 2 +- src/plugins/grass/modules/r.texture.bis.qgm | 2 +- src/plugins/grass/modules/r.texture.qgm | 2 +- src/plugins/grass/modules/v.clean.prune.qgm | 2 +- src/plugins/grass/qgsgrassmodule.cpp | 4 ++-- src/plugins/grass/qgsgrassplugin.cpp | 2 +- src/plugins/grass/qgsgrasstools.cpp | 2 +- .../grass/scripts/db.connect-login.pg.py | 2 +- .../grass/scripts/v.class.mlpy.qgis.py | 6 ++--- .../spatialquery/qgsmngprogressbar.cpp | 2 +- .../spatialquery/qgsspatialquerydialog.cpp | 2 +- src/plugins/topology/topolTest.cpp | 2 +- src/providers/db2/qgsdb2dataitems.cpp | 4 ++-- .../delimitedtext/qgsdelimitedtextfile.h | 2 +- .../qgsdelimitedtextprovider.cpp | 2 +- .../delimitedtext/qgsdelimitedtextprovider.h | 2 +- .../qgsdelimitedtextsourceselect.cpp | 2 +- src/providers/gdal/qgsgdaldataitems.cpp | 2 +- src/providers/grass/qgsgrassgislib.cpp | 2 +- src/providers/grass/qgsgrassprovidermodule.h | 2 +- .../grass/qgsgrassrasterprovider.cpp | 2 +- src/providers/mssql/qgsmssqldataitems.cpp | 4 ++-- src/providers/mssql/qgsmssqlprovider.h | 2 +- src/providers/ogr/qgsogrdataitems.cpp | 2 +- src/providers/ogr/qgsogrprovider.cpp | 2 +- src/providers/postgres/qgspostgresconn.cpp | 4 ++-- src/providers/postgres/qgspostgresconn.h | 4 ++-- .../spatialite/qgsspatialiteconnection.h | 2 +- src/providers/virtual/qgsvirtuallayerblob.cpp | 2 +- src/providers/virtual/qgsvirtuallayerblob.h | 2 +- src/providers/wcs/URI | 2 +- src/providers/wfs/qgswfsshareddata.cpp | 2 +- src/server/qgsaccesscontrol.h | 4 ++-- src/server/qgsserverinterface.h | 2 +- .../services/wms/qgswmsservertransitional.h | 2 +- tests/bench/README | 2 +- tests/qt_modeltest/modeltest.cpp | 2 +- tests/src/core/testqgsmaprendererjob.cpp | 2 +- tests/src/core/testqgsogcutils.cpp | 2 +- tests/src/providers/testqgswcsprovider.cpp | 2 +- tests/src/python/test_provider_wfs.py | 2 +- tests/src/python/test_qgsauthsystem.py | 2 +- tests/src/python/test_qgsissue7244.py | 2 +- .../testdata/font/QGIS-Vera/RELEASENOTES.TXT | 2 +- .../lighttpd/config/conf/debug.conf | 2 +- .../lighttpd/config/modules.conf | 2 +- 168 files changed, 245 insertions(+), 241 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a123deea0ba..a17413f82833 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,7 +451,7 @@ IF (WIN32) SET (DEFAULT_BIN_SUBDIR bin) SET (DEFAULT_CGIBIN_SUBDIR bin) # put all the build products into a single directory - # under build (doesnt affect install target) to make for + # under build (doesn't affect install target) to make for # easier debugging. # Turn on defines for non standard maths stuff diff --git a/INSTALL b/INSTALL index 8ec81eb5c6fb..c3a9e28cf12e 100644 --- a/INSTALL +++ b/INSTALL @@ -753,7 +753,7 @@ to get versions that match your current Qt installed version. =========================== /!\ You can delete the directories with unpacked SIP and PyQt4 sources after a -successfull install, they're not needed anymore. +successful install, they're not needed anymore. 4.2.5. git diff --git a/NEWS b/NEWS index d9970b5fefe8..e74e09833b8d 100644 --- a/NEWS +++ b/NEWS @@ -1063,7 +1063,7 @@ features for you. Probably the biggest new feature is the addition of the new vector symbology infrastructure. This is provided alongside the old implementation - you can -switch using a button in the vector layer properties dialog. It does't replace +switch using a button in the vector layer properties dialog. It doesn't replace the old symbology implementation completely yet because there are various isues that need to be resolved and a large amount of testinhen it is considered ready. @@ -1926,13 +1926,13 @@ Complete buffering so that bar as well as text will be visible on both Fix for bug [ 973922 ] Overview shows layers in wrong order -Fixed show stopper bug where maplayerregistry wasnt being cleared properly on file new +Fixed show stopper bug where maplayerregistry wasn't being cleared properly on file new Added setZOrder which will be used in next commit to fix projectio zorder problem 2004-06-20 [ts] 0.3.0devel43 -Fix anoying 'mapcanvas isnt freezing while loading rasters' bug +Fix anoying 'mapcanvas isn't freezing while loading rasters' bug 2004-06-19 [ts] 0.3.0devel42 @@ -1947,8 +1947,8 @@ Added an option for setting the length of the scale bar to closest Win32 support for package path - which will hopefully ensure pyramid and overview mini icons are displayed on legend entry now. -Beginnings of generic vector file writer - incomplete and doesnt do anything useful - yet except has abilty to make a shapefile with a couple of user defined fields e.g. +Beginnings of generic vector file writer - incomplete and doesn't do anything useful + yet except has ability to make a shapefile with a couple of user defined fields e.g. to create a new point shapefile: QgsVectorFileWriter myFileWriter("/tmp/test.shp", wkbPoint); @@ -2394,7 +2394,7 @@ updated German translation !! otherwise it's not detected by the plugins autogen.sh (more exactly !! aclocal) !! It can be cheated by adding -I path/to/qgis.m4 to the aclocal of -!! autogen.sh. But be carefull not to commit that to CVS +!! autogen.sh. But be careful not to commit that to CVS 2004-04-18 [jobi] 0.1.0devel33 Added internationalisations stuff @@ -2408,7 +2408,7 @@ Fix for crash when opening singleband grayscale images introduced by Steves grayscale 2004-04-06 [ts] 0.1.0devel31 -Added new plugin (grid_maker) to build arbitary sized graticules and add +Added new plugin (grid_maker) to build arbitrary sized graticules and add them to the current map view. 2004-04-05 [jobi] 0.1.0devel30 diff --git a/ci/travis/check_spelling.sh b/ci/travis/check_spelling.sh index dc5ec5c5bc74..0c666cfac930 100755 --- a/ci/travis/check_spelling.sh +++ b/ci/travis/check_spelling.sh @@ -11,6 +11,5 @@ if [[ ! -z $TRAVIS_PULL_REQUEST_BRANCH ]]; then echo "TRAVIS PR BRANCH: $TRAVIS_PULL_REQUEST_BRANCH" FILES=$(git diff --diff-filter=AM --name-only $(git merge-base HEAD master) | tr '\n' ' ' ) fi - -./scripts/chkspelling_ag.sh $FILES +./scripts/spell_check/check_spelling.sh -r $FILES diff --git a/cmake/FindPyQt4.cmake b/cmake/FindPyQt4.cmake index 77a93e244477..c2c9e9b9548d 100644 --- a/cmake/FindPyQt4.cmake +++ b/cmake/FindPyQt4.cmake @@ -12,7 +12,7 @@ # This file defines the following variables: # # PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number -# suitable for comparision as a string +# suitable for comparison as a string # # PYQT4_VERSION_STR - The version of PyQt4 as a human readable string. # diff --git a/cmake/FindPyQt5.cmake b/cmake/FindPyQt5.cmake index 0fcf1b5bdff3..bb449cb4cbd2 100644 --- a/cmake/FindPyQt5.cmake +++ b/cmake/FindPyQt5.cmake @@ -12,7 +12,7 @@ # This file defines the following variables: # # PYQT5_VERSION - The version of PyQt5 found expressed as a 6 digit hex number -# suitable for comparision as a string +# suitable for comparison as a string # # PYQT5_VERSION_STR - The version of PyQt5 as a human readable string. # diff --git a/cmake/FindSIP.cmake b/cmake/FindSIP.cmake index c7542200423b..744cb25ff98e 100644 --- a/cmake/FindSIP.cmake +++ b/cmake/FindSIP.cmake @@ -9,7 +9,7 @@ # This file defines the following variables: # # SIP_VERSION - The version of SIP found expressed as a 6 digit hex number -# suitable for comparision as a string. +# suitable for comparison as a string. # # SIP_VERSION_STR - The version of SIP found as a human readable string. # diff --git a/debian/changelog b/debian/changelog index a0e7e42bcbdd..bcc3f7b3c21d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -279,7 +279,7 @@ qgis (1.3.0) UNRELEASED; urgency=low * new upstream release * add analysis library and raster terrain analysis plugin - * alternativly depend on libgdal1-1.6.0-grass + * alternatively depend on libgdal1-1.6.0-grass * include CONTRIBUTORS, TRANSLATORS and DONORS * reverse order of libgdal1-*-grass dependencies diff --git a/doc/INSTALL.html b/doc/INSTALL.html index cf1d14ad4665..6815e2c965b1 100644 --- a/doc/INSTALL.html +++ b/doc/INSTALL.html @@ -1094,7 +1094,7 @@

    4.2.4.5. Final python notes

    /!\ You can delete the directories with unpacked SIP and PyQt4 sources after a -successfull install, they're not needed anymore. +successful install, they're not needed anymore.

    4.2.5. git

    diff --git a/doc/msys.t2t b/doc/msys.t2t index eb1bd12ba23a..73e72a913dbb 100644 --- a/doc/msys.t2t +++ b/doc/msys.t2t @@ -108,7 +108,7 @@ make install ==== Final python notes ==== /!\ You can delete the directories with unpacked SIP and PyQt4 sources after a -successfull install, they're not needed anymore. +successful install, they're not needed anymore. === git === diff --git a/doc/news.html b/doc/news.html index a62ebe5863a9..895ef8da0ecf 100644 --- a/doc/news.html +++ b/doc/news.html @@ -1192,7 +1192,7 @@

    17. Whats new in Version 1.4.0 'Enceladus'?

    Probably the biggest new feature is the addition of the new vector symbology infrastructure. This is provided alongside the old implementation - you can -switch using a button in the vector layer properties dialog. It does't replace +switch using a button in the vector layer properties dialog. It doesn't replace the old symbology implementation completely yet because there are various isues that need to be resolved and a large amount of testinhen it is considered ready. @@ -2099,13 +2099,13 @@

    28. 0.5

    Fix for bug [ 973922 ] Overview shows layers in wrong order

    -Fixed show stopper bug where maplayerregistry wasnt being cleared properly on file new +Fixed show stopper bug where maplayerregistry wasn't being cleared properly on file new

    Added setZOrder which will be used in next commit to fix projectio zorder problem

    2004-06-20 [ts] 0.3.0devel43

    -Fix anoying 'mapcanvas isnt freezing while loading rasters' bug +Fix anoying 'mapcanvas isn't freezing while loading rasters' bug

    2004-06-19 [ts] 0.3.0devel42

    @@ -2120,8 +2120,8 @@

    28. 0.5

    Win32 support for package path - which will hopefully ensure pyramid and overview mini icons are displayed on legend entry now.

    -Beginnings of generic vector file writer - incomplete and doesnt do anything useful - yet except has abilty to make a shapefile with a couple of user defined fields e.g. +Beginnings of generic vector file writer - incomplete and doesn't do anything useful + yet except has ability to make a shapefile with a couple of user defined fields e.g. to create a new point shapefile:

    QgsVectorFileWriter myFileWriter("/tmp/test.shp", wkbPoint); @@ -2682,7 +2682,7 @@

    28. 0.5

    !! otherwise it's not detected by the plugins autogen.sh (more exactly !! aclocal) !! It can be cheated by adding -I path/to/qgis.m4 to the aclocal of -!! autogen.sh. But be carefull not to commit that to CVS +!! autogen.sh. But be careful not to commit that to CVS

    2004-04-18 [jobi] 0.1.0devel33 @@ -2699,7 +2699,7 @@

    28. 0.5

    2004-04-06 [ts] 0.1.0devel31 -Added new plugin (grid_maker) to build arbitary sized graticules and add +Added new plugin (grid_maker) to build arbitrary sized graticules and add them to the current map view.

    diff --git a/doc/news.t2t b/doc/news.t2t index b315114eaf72..7c4493b2fc25 100644 --- a/doc/news.t2t +++ b/doc/news.t2t @@ -1032,7 +1032,7 @@ features for you. Probably the biggest new feature is the addition of the new vector symbology infrastructure. This is provided alongside the old implementation - you can -switch using a button in the vector layer properties dialog. It does't replace +switch using a button in the vector layer properties dialog. It doesn't replace the old symbology implementation completely yet because there are various isues that need to be resolved and a large amount of testinhen it is considered ready. @@ -1877,13 +1877,13 @@ Complete buffering so that bar as well as text will be visible on both Fix for bug [ 973922 ] Overview shows layers in wrong order -Fixed show stopper bug where maplayerregistry wasnt being cleared properly on file new +Fixed show stopper bug where maplayerregistry wasn't being cleared properly on file new Added setZOrder which will be used in next commit to fix projectio zorder problem 2004-06-20 [ts] 0.3.0devel43 -Fix anoying 'mapcanvas isnt freezing while loading rasters' bug +Fix anoying 'mapcanvas isn't freezing while loading rasters' bug 2004-06-19 [ts] 0.3.0devel42 @@ -1898,8 +1898,8 @@ Added an option for setting the length of the scale bar to closest Win32 support for package path - which will hopefully ensure pyramid and overview mini icons are displayed on legend entry now. -Beginnings of generic vector file writer - incomplete and doesnt do anything useful - yet except has abilty to make a shapefile with a couple of user defined fields e.g. +Beginnings of generic vector file writer - incomplete and doesn't do anything useful + yet except has ability to make a shapefile with a couple of user defined fields e.g. to create a new point shapefile: QgsVectorFileWriter myFileWriter("/tmp/test.shp", wkbPoint); @@ -2348,7 +2348,7 @@ updated German translation !! otherwise it's not detected by the plugins autogen.sh (more exactly !! aclocal) !! It can be cheated by adding -I path/to/qgis.m4 to the aclocal of -!! autogen.sh. But be carefull not to commit that to CVS +!! autogen.sh. But be careful not to commit that to CVS 2004-04-18 [jobi] 0.1.0devel33 Added internationalisations stuff @@ -2362,7 +2362,7 @@ Fix for crash when opening singleband grayscale images introduced by Steves grayscale 2004-04-06 [ts] 0.1.0devel31 -Added new plugin (grid_maker) to build arbitary sized graticules and add +Added new plugin (grid_maker) to build arbitrary sized graticules and add them to the current map view. 2004-04-05 [jobi] 0.1.0devel30 diff --git a/python/analysis/interpolation/NormVecDecorator.sip b/python/analysis/interpolation/NormVecDecorator.sip index c6a945f05684..574d92343a7d 100644 --- a/python/analysis/interpolation/NormVecDecorator.sip +++ b/python/analysis/interpolation/NormVecDecorator.sip @@ -26,7 +26,7 @@ class NormVecDecorator : TriDecorator bool estimateFirstDerivatives( QProgressDialog* d = 0 ); /** Returns a pointer to the normal vector for the point with the number n*/ Vector3D* getNormal( int n ) const; - /** Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', exept if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise*/ + /** Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', except if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise*/ bool getTriangle( double x, double y, Point3D* p1 /Out/, Vector3D* v1 /Out/, Point3D* p2 /Out/, Vector3D* v2 /Out/, Point3D* p3 /Out/, Vector3D* v3 /Out/ ); /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3) * @note not available in Python bindings diff --git a/python/analysis/openstreetmap/qgsosmimport.sip b/python/analysis/openstreetmap/qgsosmimport.sip index c5dcb52ff3a2..0a6467498b02 100644 --- a/python/analysis/openstreetmap/qgsosmimport.sip +++ b/python/analysis/openstreetmap/qgsosmimport.sip @@ -3,7 +3,7 @@ * @brief The QgsOSMXmlImport class imports OpenStreetMap XML format to our topological representation * in a SQLite database (see QgsOSMDatabase for details). * - * How to use the classs: + * How to use the class: * 1. set input XML file name and output DB file name (in constructor or with respective functions) * 2. run import() * 3. check errorString() if the import failed diff --git a/python/core/auth/qgsauthconfig.sip b/python/core/auth/qgsauthconfig.sip index fe308cb69b6b..d77e69c1f51c 100644 --- a/python/core/auth/qgsauthconfig.sip +++ b/python/core/auth/qgsauthconfig.sip @@ -121,7 +121,7 @@ class QgsAuthMethodConfig * against the config's uri() for auto-selecting authentication configs to use * @note Essentially strips the URL query variables, and by default, strips the path as well * @param accessurl A URL to process - * @param resource Ouput variable for result + * @param resource Output variable for result * @param withpath Whether to include the URI's path in output */ static bool uriToResource( const QString &accessurl, QString *resource, bool withpath = false ); diff --git a/python/core/composer/qgscomposeritem.sip b/python/core/composer/qgscomposeritem.sip index 03ec8843cf05..ddd1cec5e76a 100644 --- a/python/core/composer/qgscomposeritem.sip +++ b/python/core/composer/qgscomposeritem.sip @@ -515,7 +515,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem virtual void setVisibility( const bool visible ); /** Returns whether the item should be excluded from composer exports and prints - * @param valueType controls whether the returned value is the user specified vaule, + * @param valueType controls whether the returned value is the user specified value, * or the current evaluated value (which may be affected by data driven settings). * @returns true if item should be excluded * @note added in version 2.5 @@ -629,7 +629,7 @@ class QgsComposerItem : QgsComposerObject, QGraphicsRectItem /** Evaluates an item's bounding rect to consider data defined position and size of item * and reference point - * @param newRect target bouding rect for item + * @param newRect target bounding rect for item * @param resizeOnly set to true if the item is only being resized. If true then * the position of the returned rect will be adjusted to account for the item's * position mode diff --git a/python/core/qgsnetworkaccessmanager.sip b/python/core/qgsnetworkaccessmanager.sip index 1d98a06cfaf6..6d1c2741b515 100644 --- a/python/core/qgsnetworkaccessmanager.sip +++ b/python/core/qgsnetworkaccessmanager.sip @@ -57,7 +57,7 @@ class QgsNetworkAccessManager : QNetworkAccessManager //! Get QNetworkRequest::CacheLoadControl from name static QNetworkRequest::CacheLoadControl cacheLoadControlFromName( const QString &theName ); - //! Setup the NAM according to the user's settings + //! Setup the NAM according to the user's settings #spellok void setupDefaultProxyAndCache(); //! return whether the system proxy should be used diff --git a/python/core/qgspoint.sip b/python/core/qgspoint.sip index 7d2c3305877c..97ba9b808782 100644 --- a/python/core/qgspoint.sip +++ b/python/core/qgspoint.sip @@ -241,7 +241,7 @@ class QgsPoint /** Calculates azimuth between this point and other one (clockwise in degree, starting from north) */ double azimuth( const QgsPoint& other ) const; - /** Returns a new point which correponds to this point projected by a specified distance + /** Returns a new point which corresponds to this point projected by a specified distance * in a specified bearing. * @param distance distance to project * @param bearing angle to project in, clockwise in degrees starting from north diff --git a/python/core/qgsrenderchecker.sip b/python/core/qgsrenderchecker.sip index f3f7e58d45a4..225cd17c9347 100644 --- a/python/core/qgsrenderchecker.sip +++ b/python/core/qgsrenderchecker.sip @@ -80,7 +80,7 @@ class QgsRenderChecker bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); /** - * Test using two arbitary images (map renderer will not be used) + * Test using two arbitrary images (map renderer will not be used) * @param theTestName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png * @param theMismatchCount - defaults to 0 - the number of pixels that @@ -93,9 +93,9 @@ class QgsRenderChecker bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = "" ); /** Get a list of all the anomalies. An anomaly is a rendered difference * file where there is some red pixel content (indicating a render check - * mismatch), but where the output was still acceptible. If the render + * mismatch), but where the output was still acceptable. If the render * diff matches one of these anomalies we will still consider it to be - * acceptible. + * acceptable. * @return a bool indicating if the diff matched one of the anomaly files */ bool isKnownAnomaly( const QString& theDiffImageFile ); diff --git a/python/core/qgsvectordataprovider.sip b/python/core/qgsvectordataprovider.sip index b948a131806b..88cc6f57ce89 100644 --- a/python/core/qgsvectordataprovider.sip +++ b/python/core/qgsvectordataprovider.sip @@ -157,7 +157,7 @@ class QgsVectorDataProvider : QgsDataProvider * @param substring substring to match (case insensitive) * @param limit maxmum number of the values to return, or -1 to return all unique values * @param feedback optional feedback object for cancelling request - * @returns list of unique strings containg substring + * @returns list of unique strings containing substring */ virtual QStringList uniqueStringsMatching( int index, const QString& substring, int limit = -1, QgsFeedback* feedback = nullptr ) const; diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 0f0ce14e5eda..ba30c07b4ebe 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -1580,7 +1580,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator /** Is emitted, when edited changes successfully have been written to the data provider */ void editingStopped(); - /** Is emitted, before changes are commited to the data provider */ + /** Is emitted, before changes are committed to the data provider */ void beforeCommitChanges(); /** Is emitted, before changes are rolled back*/ diff --git a/python/core/qgsvectorlayerfeatureiterator.sip b/python/core/qgsvectorlayerfeatureiterator.sip index 0685e20592be..3a102df6874c 100644 --- a/python/core/qgsvectorlayerfeatureiterator.sip +++ b/python/core/qgsvectorlayerfeatureiterator.sip @@ -59,12 +59,12 @@ class QgsVectorLayerFeatureIterator : QgsAbstractFeatureIterator */ //void addVirtualAttributes( QgsFeature &f ); - /** Update feature with uncommited attribute updates. + /** Update feature with uncommitted attribute updates. * @note not available in Python bindings */ //void updateChangedAttributes( QgsFeature& f ); - /** Update feature with uncommited geometry updates. + /** Update feature with uncommitted geometry updates. * @note not available in Python bindings */ //void updateFeatureGeometry( QgsFeature& f ); diff --git a/python/core/qgsvectorlayertools.sip b/python/core/qgsvectorlayertools.sip index fcc2c8b90a1f..67216ba4dabc 100644 --- a/python/core/qgsvectorlayertools.sip +++ b/python/core/qgsvectorlayertools.sip @@ -31,7 +31,7 @@ class QgsVectorLayerTools : QObject virtual bool startEditing( QgsVectorLayer* layer ) const = 0; /** - * Will be called, when an editing session is ended and the features should be commited. + * Will be called, when an editing session is ended and the features should be committed. * Appropriate dialogs should be shown like * * @param layer The layer to commit @@ -41,7 +41,7 @@ class QgsVectorLayerTools : QObject virtual bool stopEditing( QgsVectorLayer* layer, bool allowCancel = true ) const = 0; /** - * Should be called, when the features should be commited but the editing session is not ended. + * Should be called, when the features should be committed but the editing session is not ended. * * @param layer The layer to commit * @return True if successful diff --git a/python/core/symbology-ng/qgscptcityarchive.sip b/python/core/symbology-ng/qgscptcityarchive.sip index ab758d032ac9..b01bda03bff0 100644 --- a/python/core/symbology-ng/qgscptcityarchive.sip +++ b/python/core/symbology-ng/qgscptcityarchive.sip @@ -315,7 +315,7 @@ class QgsCptCityBrowserModel : QAbstractItemModel // Refresh item specified by path void refresh( const QString& path ); - // Refresh item childs + // Refresh item children void refresh( const QModelIndex &index = QModelIndex() ); //! return index of a path diff --git a/python/core/symbology-ng/qgssymbollayer.sip b/python/core/symbology-ng/qgssymbollayer.sip index b9c8bf85d425..e9a3531cc6fc 100644 --- a/python/core/symbology-ng/qgssymbollayer.sip +++ b/python/core/symbology-ng/qgssymbollayer.sip @@ -225,7 +225,7 @@ class QgsSymbolLayer virtual bool hasDataDefinedProperties() const; /** Checks whether the layer has a matching data defined property and if - * that property is currently actived. + * that property is currently activated. * @param property property key * @returns true if data defined property exists and is active * @see hasDataDefinedProperties @@ -243,7 +243,7 @@ class QgsSymbolLayer * @param defaultVal default value to return if evaluation was not successful * @param ok if specified, will be set to true if evaluation was successful * @returns calculated value for data defined property, or default value - * if property does not exist or is deactived. + * if property does not exist or is deactivated. * @see hasDataDefinedProperty * @see getDataDefinedProperty * @note added in QGIS 2.12 diff --git a/python/gui/attributetable/qgsattributetableview.sip b/python/gui/attributetable/qgsattributetableview.sip index cb73d7cbb313..751dafbcaa2f 100644 --- a/python/gui/attributetable/qgsattributetableview.sip +++ b/python/gui/attributetable/qgsattributetableview.sip @@ -86,7 +86,7 @@ class QgsAttributeTableView : QTableView signals: /** * @brief - * Is emitted, in order to provide a hook to add aditional menu entries to the context menu. + * Is emitted, in order to provide a hook to add additional* menu entries to the context menu. * * @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. diff --git a/python/gui/attributetable/qgsfeaturelistmodel.sip b/python/gui/attributetable/qgsfeaturelistmodel.sip index 6e9d9d72e5eb..ff8a336463b2 100644 --- a/python/gui/attributetable/qgsfeaturelistmodel.sip +++ b/python/gui/attributetable/qgsfeaturelistmodel.sip @@ -53,7 +53,7 @@ class QgsFeatureListModel : QAbstractProxyModel, QgsFeatureModel /** * @brief Returns a detailed message about errors while parsing a QgsExpression. - * @return A message containg information about the parser error. + * @return A message containing information about the parser error. */ QString parserErrorString(); diff --git a/python/gui/attributetable/qgsfeaturelistview.sip b/python/gui/attributetable/qgsfeaturelistview.sip index 6019de1b945b..54b22bd96fb7 100644 --- a/python/gui/attributetable/qgsfeaturelistview.sip +++ b/python/gui/attributetable/qgsfeaturelistview.sip @@ -57,7 +57,7 @@ class QgsFeatureListView : QListView /** * Returns a detailed message about errors while parsing a QgsExpression. * - * @return A message containg information about the parser error. + * @return A message containing information about the parser error. */ QString parserErrorString(); diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 6449fff3bb09..10053a8741b1 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -535,7 +535,7 @@ class QgisInterface : QObject virtual QgsVectorLayerTools* vectorLayerTools() = 0; /** This method is only needed when using a UI form with a custom widget plugin and calling - * openFeatureForm or getFeatureForm from Python (PyQt4) and you havn't used the info tool first. + * openFeatureForm or getFeatureForm from Python (PyQt4) and you haven't used the info tool first. * Python will crash bringing QGIS wtih it * if the custom form is not loaded from a C++ method call. * diff --git a/python/gui/qgsadvanceddigitizingdockwidget.sip b/python/gui/qgsadvanceddigitizingdockwidget.sip index f63a181dc69d..28782b2f081b 100644 --- a/python/gui/qgsadvanceddigitizingdockwidget.sip +++ b/python/gui/qgsadvanceddigitizingdockwidget.sip @@ -310,7 +310,7 @@ class QgsAdvancedDigitizingDockWidget : QDockWidget private slots: //! set the additiona constraint by clicking on the perpendicular/parallel buttons - void addtionalConstraintClicked( bool activated ); + void additionalConstraintClicked( bool activated ); //! lock/unlock a constraint and set its value void lockConstraint( bool activate = true ); diff --git a/python/gui/qgsexternalresourcewidget.sip b/python/gui/qgsexternalresourcewidget.sip index 70809ce186d7..f51c798e7bbf 100644 --- a/python/gui/qgsexternalresourcewidget.sip +++ b/python/gui/qgsexternalresourcewidget.sip @@ -38,7 +38,7 @@ class QgsExternalResourceWidget : QWidget //! returns the type of content used in the document viewer QgsExternalResourceWidget::DocumentViewerContent documentViewerContent() const; - //! setDocumentViewerContent defines the type of content to be shown. Widget will be adapated accordingly + //! setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly void setDocumentViewerContent( QgsExternalResourceWidget::DocumentViewerContent content ); //! returns the height of the document viewer diff --git a/python/gui/qgsmaplayeractionregistry.sip b/python/gui/qgsmaplayeractionregistry.sip index 8212acc70f7e..783f2fcdd538 100644 --- a/python/gui/qgsmaplayeractionregistry.sip +++ b/python/gui/qgsmaplayeractionregistry.sip @@ -15,7 +15,7 @@ class QgsMapLayerAction : QAction typedef QFlags Targets; //! Creates a map layer action which can run on any layer - //! @note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatiblity reasons. + //! @note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatibility reasons. QgsMapLayerAction( const QString& name, QObject *parent /TransferThis/, Targets targets = AllActions, const QIcon& icon = QIcon() ); //! Creates a map layer action which can run only on a specific layer diff --git a/python/gui/qgsmaptooladvanceddigitizing.sip b/python/gui/qgsmaptooladvanceddigitizing.sip index 60be954e25be..4e86456f40f6 100644 --- a/python/gui/qgsmaptooladvanceddigitizing.sip +++ b/python/gui/qgsmaptooladvanceddigitizing.sip @@ -14,7 +14,7 @@ ***************************************************************************/ /** - * @brief The QgsMapToolAdvancedDigitizing class is a QgsMapTool whcih gives event directly in map coordinates and allows filtering its events. + * @brief The QgsMapToolAdvancedDigitizing class is a QgsMapTool which gives event directly in map coordinates and allows filtering its events. * Events from QgsMapTool are caught and their QMouseEvent are transformed into QgsMapMouseEvent (with map coordinates). * Events are then forwarded to corresponding virtual methods which can be reimplemented in subclasses. * An event filter can be set on the map tool to filter and modify the events in map coordinates (@see QgsMapToolMapEventFilter). diff --git a/python/gui/qgsmaptoolidentify.sip b/python/gui/qgsmaptoolidentify.sip index 4ea75faa6a8e..8a685925a992 100644 --- a/python/gui/qgsmaptoolidentify.sip +++ b/python/gui/qgsmaptoolidentify.sip @@ -71,7 +71,7 @@ class QgsMapToolIdentify : QgsMapTool QList identify( int x, int y, const QList& layerList = QList(), IdentifyMode mode = DefaultQgsSetting ); /** Performs the identification. - To avoid beeing forced to specify IdentifyMode with a list of layers + To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered @param x x coordinates of mouseEvent @param y y coordinates of mouseEvent @@ -94,7 +94,7 @@ class QgsMapToolIdentify : QgsMapTool protected: /** Performs the identification. - To avoid beeing forced to specify IdentifyMode with a list of layers + To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered @param x x coordinates of mouseEvent @param y y coordinates of mouseEvent diff --git a/python/plugins/db_manager/db_plugins/oracle/TODO.md b/python/plugins/db_manager/db_plugins/oracle/TODO.md index 85a13c070533..55a54a2017fa 100644 --- a/python/plugins/db_manager/db_plugins/oracle/TODO.md +++ b/python/plugins/db_manager/db_plugins/oracle/TODO.md @@ -104,7 +104,7 @@ * Connector * getVectorTablesCache should present only one line per table (don't show tables more than once). - * correspondance between Oracle SDO_GTYPE and Qgis.WkbType in a class dict. + * correspondence between Oracle SDO_GTYPE and Qgis.WkbType in a class dict. * Show only one table/layer in the table tree even if entry is duplicated in cache. * Reuse the pre-calculated extent metadata when updating. * Create a better privilege function using ALL_PRIVS_RECD diff --git a/python/plugins/db_manager/db_plugins/postgis/connector.py b/python/plugins/db_manager/db_plugins/postgis/connector.py index b2ba6b6ff106..6096e201b842 100644 --- a/python/plugins/db_manager/db_plugins/postgis/connector.py +++ b/python/plugins/db_manager/db_plugins/postgis/connector.py @@ -513,7 +513,7 @@ def getTableFields(self, table): return res def getTableIndexes(self, table): - """ get info about table's indexes. ignore primary key constraint index, they get listed in constaints """ + """ get info about table's indexes. ignore primary key constraint index, they get listed in constraints """ schema, tablename = self.getSchemaTableName(table) schema_where = u" AND nspname=%s " % self.quoteString(schema) if schema is not None else "" diff --git a/python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py b/python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py index e8054439b0bc..42aa41060a37 100644 --- a/python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py +++ b/python/plugins/db_manager/db_plugins/spatialite/sql_dictionary.py @@ -116,7 +116,7 @@ # SQL functions for Spatial-MetaData and Spatial-Index handling "*initspatialmetadata", "*addgeometrycolumn", "*recovergeometrycolumn", "*discardgeometrycolumn", "*createspatialindex", "*creatembrcache", "*disablespatialindex", - # SQL functions implementing FDO/OGR compatibily + # SQL functions implementing FDO/OGR compatibility "*checkspatialmetadata", "*autofdostart", "*autofdostop", "*initfdospatialmetadata", "*addfdogeometrycolumn", "*recoverfdogeometrycolumn", "*discardfdogeometrycolumn", # SQL functions for MbrCache-based queries diff --git a/python/plugins/db_manager/db_plugins/vlayers/sql_dictionary.py b/python/plugins/db_manager/db_plugins/vlayers/sql_dictionary.py index 85e4eac61c14..e43b9d2adc34 100644 --- a/python/plugins/db_manager/db_plugins/vlayers/sql_dictionary.py +++ b/python/plugins/db_manager/db_plugins/vlayers/sql_dictionary.py @@ -117,7 +117,7 @@ # SQL functions for Spatial-MetaData and Spatial-Index handling "*initspatialmetadata", "*addgeometrycolumn", "*recovergeometrycolumn", "*discardgeometrycolumn", "*createspatialindex", "*creatembrcache", "*disablespatialindex", - # SQL functions implementing FDO/OGR compatibily + # SQL functions implementing FDO/OGR compatibility "*checkspatialmetadata", "*autofdostart", "*autofdostop", "*initfdospatialmetadata", "*addfdogeometrycolumn", "*recoverfdogeometrycolumn", "*discardfdogeometrycolumn", # SQL functions for MbrCache-based queries diff --git a/python/plugins/processing/algs/help/qgis.yaml b/python/plugins/processing/algs/help/qgis.yaml index 188f45bc7e99..f93473cdbf02 100644 --- a/python/plugins/processing/algs/help/qgis.yaml +++ b/python/plugins/processing/algs/help/qgis.yaml @@ -247,7 +247,7 @@ qgis:intersection: > qgis:joinattributesbylocation: > This algorithm takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table. - The additional attributes and their values are taken from a second vector layer. A spatial critera is applied to select the values from the second layer that are added to each feature from the first layer in the resulting one. + The additional attributes and their values are taken from a second vector layer. A spatial criteria is applied to select the values from the second layer that are added to each feature from the first layer in the resulting one. qgis:joinattributestable: > @@ -441,7 +441,7 @@ qgis:rasterlayerstatistics: > qgis:refactorfields: > This algorithms allows editing the structure of the attributes table of a vector layer. Fields can be modified in their type and name, using a fields mapping - The original layer is not modified. A new layer is generated, which contains a modified attributes table, accordint to the provided fields mapping + The original layer is not modified. A new layer is generated, which contains a modified attributes table, according to the provided fields mapping qgis:regularpoints: diff --git a/python/plugins/processing/algs/lidar/lastools/lascontrol.py b/python/plugins/processing/algs/lidar/lastools/lascontrol.py index f2f9d77a9623..6821fe041100 100644 --- a/python/plugins/processing/algs/lidar/lastools/lascontrol.py +++ b/python/plugins/processing/algs/lidar/lastools/lascontrol.py @@ -42,7 +42,7 @@ class lascontrol(LAStoolsAlgorithm): CONTROL_POINT_FILE = "CONTROL_POINT_FILE" PARSE_STRING = "PARSE_STRING" USE_POINTS = "USE_POINTS" - USE_POINTS_LIST = ["all", "ground (2)", "ground (2) and keypoints (8)", "ground (2), buldings (6), and keypoints (8)"] + USE_POINTS_LIST = ["all", "ground (2)", "ground (2) and keypoints (8)", "ground (2), buildings (6), and keypoints (8)"] ADJUST_Z = "ADJUST_Z" def defineCharacteristics(self): diff --git a/python/plugins/processing/algs/qgis/Eliminate.py b/python/plugins/processing/algs/qgis/Eliminate.py index 689b308e5a06..8d698eb94ced 100644 --- a/python/plugins/processing/algs/qgis/Eliminate.py +++ b/python/plugins/processing/algs/qgis/Eliminate.py @@ -154,7 +154,7 @@ def processAlgorithm(self, feedback): msg = '' if y.isNull(): - # Conversion was unsuccessfull + # Conversion was unsuccessful selectionError = True msg += self.tr('Enter the date and the date format, e.g. "07.26.2011" "MM.dd.yyyy".') diff --git a/python/plugins/processing/tools/postgis.py b/python/plugins/processing/tools/postgis.py index bf3a2772da3a..08a05c2c0fe9 100644 --- a/python/plugins/processing/tools/postgis.py +++ b/python/plugins/processing/tools/postgis.py @@ -411,7 +411,7 @@ def get_table_fields(self, table, schema=None): def get_table_indexes(self, table, schema=None): """Get info about table's indexes. ignore primary key and unique - index, they get listed in constaints. + index, they get listed in constraints. """ c = self.con.cursor() diff --git a/python/pyplugin_installer/version_compare.py b/python/pyplugin_installer/version_compare.py index 4071d3091fd7..07a37ad73f6f 100644 --- a/python/pyplugin_installer/version_compare.py +++ b/python/pyplugin_installer/version_compare.py @@ -1,7 +1,7 @@ """ /*************************************************************************** Plugin Installer module - Plugin version comparision functions + Plugin version comparison functions ------------------- Date : 2008-11-24 Copyright : (C) 2008 by Borys Jurgiel @@ -23,7 +23,7 @@ Usage: compareVersions(version1, version2) -The function accepts arguments of any type convertable to Unicode string +The function accepts arguments of any type convertible to Unicode string and returns integer value: 0 - the versions are equal 1 - version 1 is higher diff --git a/python/server/qgsserverinterface.sip b/python/server/qgsserverinterface.sip index 0499089eaec1..85e97b9ac339 100644 --- a/python/server/qgsserverinterface.sip +++ b/python/server/qgsserverinterface.sip @@ -24,7 +24,7 @@ * made available to plugins. * * This class provides methods to access the request handler and - * the capabilties cache. A method to read the environment + * the capabilities cache. A method to read the environment * variables set in the main FCGI loop is also available. * Plugins can add listeners (instances of QgsServerFilter) with * a certain priority through the registerFilter( QgsServerFilter* , int) method. diff --git a/python/server/qgsservicemodule.sip b/python/server/qgsservicemodule.sip index 40bfc5fa8c95..4f67ab34aeed 100644 --- a/python/server/qgsservicemodule.sip +++ b/python/server/qgsservicemodule.sip @@ -41,7 +41,7 @@ class QgsServiceModule virtual ~QgsServiceModule() = 0; /** - * Ask module to registe all provided services + * Ask module to register all provided services * @param registry QgsServiceRegistry */ virtual void registerSelf( QgsServiceRegistry& registry, diff --git a/qgis.dtd b/qgis.dtd index 1cfa6c655472..437775abacd2 100644 --- a/qgis.dtd +++ b/qgis.dtd @@ -105,7 +105,7 @@ outlinecolor,outlinestyle,outlinewidth,fillcolor,fillpattern) > - + diff --git a/resources/cpt-city-qgis-min/selections/div.xml b/resources/cpt-city-qgis-min/selections/div.xml index 3f2ed12522b1..ef5b8ea3b0f0 100644 --- a/resources/cpt-city-qgis-min/selections/div.xml +++ b/resources/cpt-city-qgis-min/selections/div.xml @@ -2,10 +2,10 @@ Diverging - Palettes for diverging, signed or anomoly data + Palettes for diverging, signed or anomaly data - Palettes for diverging, signed or anomoly data. + Palettes for diverging, signed or anomaly data. Kenneth Moreland diff --git a/rpm/default.cfg b/rpm/default.cfg index a83d735537ed..00394cc0b15f 100644 --- a/rpm/default.cfg +++ b/rpm/default.cfg @@ -2,7 +2,7 @@ # # Create a file local.cfg instead and redefine any options in your local.cfg. # -# This file conatins a default configuration and will be overwritten by the +# This file contains a default configuration and will be overwritten by the # maintainer. # Where should the results go diff --git a/scripts/spell_check/.agignore b/scripts/spell_check/.agignore index 7e77281b08f6..caea4933fe71 100644 --- a/scripts/spell_check/.agignore +++ b/scripts/spell_check/.agignore @@ -13,6 +13,7 @@ python/qsci_apis/ src/app/dwg/libdxfrw/ src/app/gps/qwtpolar-1.0/ src/app/gps/qwtpolar-1.1.1/ +src/core/pal src/plugins/grass/qtermwidget/ #Extensions @@ -45,5 +46,3 @@ resources/cpt-city-qgis-min/wkp/schwarzwald/COPYING.xml tests/testdata/qgis_server/ets-wms13/project.qgs tests/testdata/qgis_server_accesscontrol/project.qgs tests/testdata/qgis_server_accesscontrol/Hello.qml - - diff --git a/scripts/spell_check/spelling.dat b/scripts/spell_check/spelling.dat index cea656297ad7..a8d4701707dd 100644 --- a/scripts/spell_check/spelling.dat +++ b/scripts/spell_check/spelling.dat @@ -244,8 +244,8 @@ adecuate:adequate adequit:adequate adhearing:adhering adherance:adherence -aditional:additional -aditionally:additionally +aditional:additional:* +aditionally:additionally:* aditionaly:additionally admendment:amendment admininistrative:administrative @@ -349,7 +349,7 @@ alcholic:alcoholic alcohal:alcohol alcoholical:alcoholic aleady:already -aledge:allege +aledge:allege:* aledged:alleged aledges:alleges alege:allege @@ -537,7 +537,7 @@ apperances:appearances appereance:appearance appereances:appearances appered:appeared -appers:appears +appers:appears* applicaiton:application applicaitons:applications appliction:application @@ -633,7 +633,7 @@ arguements:arguments aribitary:arbitrary aribtrarily:arbitrarily aribtrary:arbitrary -arised:arose +arised:arose:* arithmatic:arithmetic arithmentic:arithmetic aritmetic:arithmetic @@ -781,7 +781,7 @@ attemts:attempts attendence:attendance attendent:attendant attendents:attendants -attened:attended +attened:attended:* attension:attention attibute:attribute attibutes:attributes @@ -818,7 +818,7 @@ authrorities:authorities autochtonous:autochthonous autoctonous:autochthonous autoincrememnt:autoincrement -automaticall:automatically +automaticall:automatically* automaticaly:automatically automaticly:automatically automatize:automate @@ -858,6 +858,7 @@ avaluated:evaluated avaluate:evaluate avaluates:evaluates avaluating:evaluating +avaoided:avoided avation:aviation avengence:a vengeance averageed:averaged @@ -1120,7 +1121,7 @@ cartilege:cartilage cartilidge:cartilage cartrige:cartridge casette:cassette -casion:caisson +casion:caisson:* cassawory:cassowary cassowarry:cassowary casue:cause @@ -1273,7 +1274,7 @@ clasifies:classifies clasify:classify clasifying:classifying classess:classes -classs:class +classs:class:* classses:classes cleareance:clearance clearified:clarified @@ -5335,6 +5336,7 @@ proctecting:protecting proctect:protect proctects:protects procude:produce +proejction:projection profesion:profession profesor:professor professer:professor @@ -5358,6 +5360,7 @@ progresss:progress progrom:program progroms:programs prohabition:prohibition +projectio:projection prologomena:prolegomena prominance:prominence prominantly:prominently @@ -5746,6 +5749,7 @@ reminscent:reminiscent reminsicent:reminiscent remoote:remote removeable:removable +rendereing:rendering renderering:rendering rendevous:rendezvous rendezous:rendezvous @@ -6156,6 +6160,7 @@ seperatly:separately seperator:separator sepina:subpoena sepperate:separate +seprate:separate seprator:separator seprators:separators sepulchure:sepulchre @@ -7375,6 +7380,7 @@ wehn:when weigth:weight weilded:wielded weild:wield +weill:will weired:weird wendsay:Wednesday wensday:Wednesday diff --git a/src/analysis/interpolation/CloughTocherInterpolator.cc b/src/analysis/interpolation/CloughTocherInterpolator.cc index 4ac5c1e566e1..c0a3aa294c0e 100644 --- a/src/analysis/interpolation/CloughTocherInterpolator.cc +++ b/src/analysis/interpolation/CloughTocherInterpolator.cc @@ -73,7 +73,7 @@ bool CloughTocherInterpolator::calcNormVec( double x, double y, Vector3D* result if ( result ) { init( x, y ); - Point3D barycoord( 0, 0, 0 );//barycentric coordinates of (x,y) whith respect to the triangle + Point3D barycoord( 0, 0, 0 );//barycentric coordinates of (x,y) with respect to the triangle Point3D endpointUXY( 0, 0, 0 );//endpoint of the derivative in u-direction (in xy-coordinates) Point3D endpointV( 0, 0, 0 );//endpoint of the derivative in v-direction (in barycentric coordinates) Point3D endpointVXY( 0, 0, 0 );//endpoint of the derivative in v-direction (in xy-coordinates) diff --git a/src/analysis/interpolation/DualEdgeTriangulation.cc b/src/analysis/interpolation/DualEdgeTriangulation.cc index 5c5a56d6fb47..bff234b2d98c 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.cc +++ b/src/analysis/interpolation/DualEdgeTriangulation.cc @@ -1527,7 +1527,7 @@ int DualEdgeTriangulation::insertForcedSegment( int p1, int p2, bool breakline ) rightPolygon.append( mHalfEdge[mHalfEdge[crossedEdges.last()]->getDual()]->getNext() ); mHalfEdge[rightPolygon.last()]->setNext( dualfirstedge );//set 'Next' of the last edge to dualfirstedge - //set the necessary nexts of leftPolygon(exept the first) + //set the necessary nexts of leftPolygon(except the first) int actedgel = leftPolygon[1]; leftiter = leftPolygon.constBegin(); leftiter += 2; diff --git a/src/analysis/interpolation/NormVecDecorator.h b/src/analysis/interpolation/NormVecDecorator.h index 836de5bc9181..f94db7d5bb85 100644 --- a/src/analysis/interpolation/NormVecDecorator.h +++ b/src/analysis/interpolation/NormVecDecorator.h @@ -51,7 +51,7 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator bool estimateFirstDerivatives( QProgressDialog* d = nullptr ); //! Returns a pointer to the normal vector for the point with the number n Vector3D* getNormal( int n ) const; - //! Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', exept if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise + //! Finds out, in which triangle a point with coordinates x and y is and assigns the triangle points to p1, p2, p3 and the estimated normals to v1, v2, v3. The vectors are normaly taken from 'mNormVec', except if p1, p2 or p3 is a point on a breakline. In this case, the normal is calculated on-the-fly. Returns false, if something went wrong and true otherwise bool getTriangle( double x, double y, Point3D* p1, Vector3D* v1, Point3D* p2, Vector3D* v2, Point3D* p3, Vector3D* v3 ); /** This function behaves similar to the one above. Additionally, the numbers of the points are returned (ptn1, ptn2, ptn3) as well as the PointStates of the triangle points (state1, state2, state3) diff --git a/src/analysis/openstreetmap/qgsosmimport.h b/src/analysis/openstreetmap/qgsosmimport.h index 5a1d4cef54ec..60220cef63a0 100644 --- a/src/analysis/openstreetmap/qgsosmimport.h +++ b/src/analysis/openstreetmap/qgsosmimport.h @@ -28,7 +28,7 @@ class QXmlStreamReader; * @brief The QgsOSMXmlImport class imports OpenStreetMap XML format to our topological representation * in a SQLite database (see QgsOSMDatabase for details). * - * How to use the classs: + * How to use the class: * 1. set input XML file name and output DB file name (in constructor or with respective functions) * 2. run import() * 3. check errorString() if the import failed diff --git a/src/analysis/vector/qgspointsample.cpp b/src/analysis/vector/qgspointsample.cpp index d3f114b711ba..baec2abd8ef7 100644 --- a/src/analysis/vector/qgspointsample.cpp +++ b/src/analysis/vector/qgspointsample.cpp @@ -64,7 +64,7 @@ int QgsPointSample::createRandomPoints( QProgressDialog* pd ) QgsWkbTypes::Point, mInputLayer->crs() ); - //check if creation of output layer successfull + //check if creation of output layer successful if ( writer.hasError() != QgsVectorFileWriter::NoError ) { return 3; diff --git a/src/app/composer/qgscomposeritemwidget.h b/src/app/composer/qgscomposeritemwidget.h index b13932c5e31b..c01caef05c9b 100644 --- a/src/app/composer/qgscomposeritemwidget.h +++ b/src/app/composer/qgscomposeritemwidget.h @@ -61,7 +61,7 @@ class QgsComposerConfigObject: public QObject /** Registers a data defined button, setting up its initial value, connections and description. * @param button button to register - * @param property correponding data defined property + * @param property corresponding data defined property * @param type valid data types for button * @param description user visible description for data defined property */ @@ -101,7 +101,7 @@ class QgsComposerItemBaseWidget: public QgsPanelWidget /** Registers a data defined button, setting up its initial value, connections and description. * @param button button to register - * @param property correponding data defined property + * @param property corresponding data defined property * @param type valid data types for button * @param description user visible description for data defined property */ diff --git a/src/app/gps/qgsgpsinformationwidget.cpp b/src/app/gps/qgsgpsinformationwidget.cpp index 8a6e6f2a8e8f..288fa709806a 100644 --- a/src/app/gps/qgsgpsinformationwidget.cpp +++ b/src/app/gps/qgsgpsinformationwidget.cpp @@ -683,7 +683,7 @@ void QgsGPSInformationWidget::displayGPSInformation( const QgsGPSInformation& in mTxtStatus->setText( info.status == 'A' ? tr( "Valid" ) : info.status == 'V' ? tr( "Invalid" ) : QLatin1String( "" ) ); } //position - // Avoid refreshing / panning if we havent moved + // Avoid refreshing / panning if we haven't moved if ( mLastGpsPosition != myNewCenter ) { mLastGpsPosition = myNewCenter; diff --git a/src/app/qgisappinterface.h b/src/app/qgisappinterface.h index 8a5c924cc472..245d9f62f9a0 100644 --- a/src/app/qgisappinterface.h +++ b/src/app/qgisappinterface.h @@ -497,7 +497,7 @@ class APP_EXPORT QgisAppInterface : public QgisInterface virtual QgsVectorLayerTools* vectorLayerTools() override; /** This method is only needed when using a UI form with a custom widget plugin and calling - * openFeatureForm or getFeatureForm from Python (PyQt4) and you havn't used the info tool first. + * openFeatureForm or getFeatureForm from Python (PyQt4) and you haven't used the info tool first. * Python will crash bringing QGIS wtih it * if the custom form is not loaded from a C++ method call. * diff --git a/src/app/qgsdecorationnortharrow.h b/src/app/qgsdecorationnortharrow.h index a9971f428cd3..231f19b142da 100644 --- a/src/app/qgsdecorationnortharrow.h +++ b/src/app/qgsdecorationnortharrow.h @@ -46,7 +46,7 @@ class APP_EXPORT QgsDecorationNorthArrow: public QgsDecorationItem //! Show the dialog box void run() override; - //! draw some arbitary text to the screen + //! draw some arbitrary text to the screen void render( QPainter * ) override; //! try to calculate the direction for the north arrow. Sets the diff --git a/src/app/qgsguivectorlayertools.h b/src/app/qgsguivectorlayertools.h index ecc57ce7664c..42c234efb9a3 100644 --- a/src/app/qgsguivectorlayertools.h +++ b/src/app/qgsguivectorlayertools.h @@ -52,7 +52,7 @@ class QgsGuiVectorLayerTools : public QgsVectorLayerTools bool startEditing( QgsVectorLayer* layer ) const override; /** - * Should be called, when an editing session is ended and the features should be commited. + * Should be called, when an editing session is ended and the features should be committed. * An appropriate dialog asking the user if he wants to save the edits will be shown if * allowCancel is set to true. * @@ -64,7 +64,7 @@ class QgsGuiVectorLayerTools : public QgsVectorLayerTools bool stopEditing( QgsVectorLayer* layer, bool allowCancel = true ) const override; /** - * Should be called, when the features should be commited but the editing session is not ended. + * Should be called, when the features should be committed but the editing session is not ended. * * @param layer The layer to commit * @return True if successful diff --git a/src/app/qgsidentifyresultsdialog.cpp b/src/app/qgsidentifyresultsdialog.cpp index 347cedc8e927..933918e021d4 100644 --- a/src/app/qgsidentifyresultsdialog.cpp +++ b/src/app/qgsidentifyresultsdialog.cpp @@ -1941,7 +1941,7 @@ void QgsIdentifyResultsDialog::formatChanged( int index ) // Store selected identify format in layer layer->setCustomProperty( QStringLiteral( "identify/format" ), QgsRasterDataProvider::identifyFormatName( format ) ); - // remove all childs of that layer from results, except the first (format) + // remove all children of that layer from results, except the first (format) QTreeWidgetItem *layItem = layerItem( layer ); if ( !layItem ) { diff --git a/src/app/qgsprojectproperties.h b/src/app/qgsprojectproperties.h index 559b0ebfbd88..a47e1b763c48 100644 --- a/src/app/qgsprojectproperties.h +++ b/src/app/qgsprojectproperties.h @@ -173,7 +173,7 @@ class APP_EXPORT QgsProjectProperties : public QgsOptionsDialogBase, private Ui: //! Signal used to inform listeners that the mouse display precision may have changed void displayPrecisionChanged(); - //! Signal used to inform listeners that project scale list may have chnaged + //! Signal used to inform listeners that project scale list may have changed void scalesChanged( const QStringList &scales = QStringList() ); //! let listening canvases know to refresh diff --git a/src/astyle/ASBeautifier.cpp b/src/astyle/ASBeautifier.cpp index d81ded722954..d1548ce2711e 100644 --- a/src/astyle/ASBeautifier.cpp +++ b/src/astyle/ASBeautifier.cpp @@ -1649,7 +1649,7 @@ string ASBeautifier::beautify(const string &originalLine) foundAssignmentOp = findHeader(line, i, assignmentOperators, true); const string *foundNonAssignmentOp = findHeader(line, i, nonAssignmentOperators, false); - // Since findHeader's boundry checking was not used above, it is possible + // Since findHeader's boundary checking was not used above, it is possible // that both an assignment op and a non-assignment op where found, // e.g. '>>' and '>>='. If this is the case, treat the LONGER one as the // found operator. diff --git a/src/astyle/ASFormatter.cpp b/src/astyle/ASFormatter.cpp index 4242d4eeb73c..e4465519eb1a 100644 --- a/src/astyle/ASFormatter.cpp +++ b/src/astyle/ASFormatter.cpp @@ -307,7 +307,7 @@ string ASFormatter::nextLine() } else // stuff to do when reading a new character... { - // make sure that a virgin '{' at the beginning ofthe file will be treated as a block... + // make sure that a virgin '{' at the beginning of the file will be treated as a block... if (isInVirginLine && currentChar == '{' && lineBeginsWith('{')) previousCommandChar = '{'; isPreviousCharPostComment = isCharImmediatelyPostComment; diff --git a/src/astyle/astyle_main.cpp b/src/astyle/astyle_main.cpp index 5c6508259588..524d514f3a08 100644 --- a/src/astyle/astyle_main.cpp +++ b/src/astyle/astyle_main.cpp @@ -160,7 +160,7 @@ bool g_isQuiet = false; bool g_optionsFileRequired = false; string g_origSuffix = ".orig"; vector g_excludeVector; // exclude from wildcard hits -vector g_excludeHitsVector; // exclude flags for eror reporting +vector g_excludeHitsVector; // exclude flags for error reporting size_t g_mainDirectoryLength; // main directory name can be excluded for displays // stringstream g_msg; // info messages are not printed until a file is read int _CRT_glob = 0; // turn off MinGW automatic file globbing diff --git a/src/core/auth/qgsauthconfig.h b/src/core/auth/qgsauthconfig.h index 927b4a9ff47a..053885e3bdad 100644 --- a/src/core/auth/qgsauthconfig.h +++ b/src/core/auth/qgsauthconfig.h @@ -154,7 +154,7 @@ class CORE_EXPORT QgsAuthMethodConfig * against the config's uri() for auto-selecting authentication configs to use * @note Essentially strips the URL query variables, and by default, strips the path as well * @param accessurl A URL to process - * @param resource Ouput variable for result + * @param resource Output variable for result * @param withpath Whether to include the URI's path in output */ static bool uriToResource( const QString &accessurl, QString *resource, bool withpath = false ); diff --git a/src/core/composer/qgsaddremoveitemcommand.cpp b/src/core/composer/qgsaddremoveitemcommand.cpp index 42e1f8159434..dfa7745dd3f4 100644 --- a/src/core/composer/qgsaddremoveitemcommand.cpp +++ b/src/core/composer/qgsaddremoveitemcommand.cpp @@ -36,7 +36,7 @@ QgsAddRemoveItemCommand::~QgsAddRemoveItemCommand() void QgsAddRemoveItemCommand::redo() { - QUndoCommand::redo(); // call redo() on all childs + QUndoCommand::redo(); // call redo() on all children if ( mFirstRun ) { mFirstRun = false; @@ -47,7 +47,7 @@ void QgsAddRemoveItemCommand::redo() void QgsAddRemoveItemCommand::undo() { - QUndoCommand::undo(); // call undo() on all childs, in reverse order + QUndoCommand::undo(); // call undo() on all children, in reverse order if ( mFirstRun ) { mFirstRun = false; diff --git a/src/core/composer/qgscomposerarrow.cpp b/src/core/composer/qgscomposerarrow.cpp index c5c7a98ef120..47f64d616f18 100644 --- a/src/core/composer/qgscomposerarrow.cpp +++ b/src/core/composer/qgscomposerarrow.cpp @@ -222,7 +222,7 @@ void QgsComposerArrow::drawHardcodedMarker( QPainter *p, MarkerType type ) void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QString &markerPath ) { Q_UNUSED( markerPath ); - double ang = QgsComposerUtils::angle( mStartPoint, mStopPoint ); + double theAngle = QgsComposerUtils::angle( mStartPoint, mStopPoint ); double arrowHeadHeight; if ( type == StartMarker ) @@ -280,7 +280,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin fixPoint.setY( -arrowHeadHeight / 2.0 ); } QPointF rotatedFixPoint; - double angleRad = ang / 180 * M_PI; + double angleRad = theAngle / 180 * M_PI; rotatedFixPoint.setX( fixPoint.x() * cos( angleRad ) + fixPoint.y() * -sin( angleRad ) ); rotatedFixPoint.setY( fixPoint.x() * sin( angleRad ) + fixPoint.y() * cos( angleRad ) ); p->translate( canvasPoint.x() - rotatedFixPoint.x(), canvasPoint.y() - rotatedFixPoint.y() ); @@ -290,7 +290,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin p->translate( canvasPoint.x(), canvasPoint.y() ); } - p->rotate( ang ); + p->rotate( theAngle ); p->translate( -mArrowHeadWidth / 2.0, -arrowHeadHeight / 2.0 ); r.render( p, QRectF( 0, 0, mArrowHeadWidth, arrowHeadHeight ) ); p->restore(); diff --git a/src/core/composer/qgscomposeritem.h b/src/core/composer/qgscomposeritem.h index d96f287623ea..021b09eeda19 100644 --- a/src/core/composer/qgscomposeritem.h +++ b/src/core/composer/qgscomposeritem.h @@ -475,7 +475,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec virtual void setVisibility( const bool visible ); /** Returns whether the item should be excluded from composer exports and prints - * @param valueType controls whether the returned value is the user specified vaule, + * @param valueType controls whether the returned value is the user specified value, * or the current evaluated value (which may be affected by data driven settings). * @returns true if item should be excluded * @note added in version 2.5 @@ -647,7 +647,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec /** Evaluates an item's bounding rect to consider data defined position and size of item * and reference point - * @param newRect target bouding rect for item + * @param newRect target bounding rect for item * @param resizeOnly set to true if the item is only being resized. If true then * the position of the returned rect will be adjusted to account for the item's * position mode diff --git a/src/core/geometry/qgsgeometryutils.h b/src/core/geometry/qgsgeometryutils.h index 3e132830d99d..1cb13efaa0c3 100644 --- a/src/core/geometry/qgsgeometryutils.h +++ b/src/core/geometry/qgsgeometryutils.h @@ -239,7 +239,7 @@ class CORE_EXPORT QgsGeometryUtils /** Parses a WKT string and returns of list of blocks contained in the WKT. * @param wkt WKT string in the format "TYPE1 (contents1), TYPE2 (TYPE3 (contents3), TYPE4 (contents4))" - * @param defaultType default geometry type for childen + * @param defaultType default geometry type for children * @returns list of WKT child block strings, e.g., List("TYPE1 (contents1)", "TYPE2 (TYPE3 (contents3), TYPE4 (contents4))") */ static QStringList wktGetChildBlocks( const QString& wkt , const QString &defaultType = "" ); diff --git a/src/core/qgsapplication.cpp b/src/core/qgsapplication.cpp index 3fd902dc1d73..7f96c5d25617 100644 --- a/src/core/qgsapplication.cpp +++ b/src/core/qgsapplication.cpp @@ -484,7 +484,7 @@ QIcon QgsApplication::getThemeIcon( const QString &theName ) else if ( QFile::exists( myDefaultPath ) ) { //could still return an empty icon if it - //doesnt exist in the default theme either! + //doesn't exist in the default theme either! icon = QIcon( myDefaultPath ); } else @@ -509,7 +509,7 @@ QPixmap QgsApplication::getThemePixmap( const QString &theName ) else { //could still return an empty icon if it - //doesnt exist in the default theme either! + //doesn't exist in the default theme either! return QPixmap( myDefaultPath ); } } @@ -1417,7 +1417,7 @@ bool QgsApplication::createDB( QString *errorMessage ) // first we look for ~/.qgis/qgis.db if ( !qgisPrivateDbFile.exists() ) { - // if it doesnt exist we copy it in from the global resources dir + // if it doesn't exist we copy it in from the global resources dir QString qgisMasterDbFileName = QgsApplication::qgisMasterDbFilePath(); QFile masterFile( qgisMasterDbFileName ); diff --git a/src/core/qgsclipper.h b/src/core/qgsclipper.h index 6e6b7ec96e5b..45e3c8d27c5e 100644 --- a/src/core/qgsclipper.h +++ b/src/core/qgsclipper.h @@ -195,7 +195,7 @@ inline void QgsClipper::trimPolygon( QPolygonF& pts, const QgsRectangle& clipRec trimPolygonToBoundary( tmpPts, pts, clipRect, YMin, clipRect.yMinimum() ); } -// An auxilary function that is part of the polygon trimming +// An auxiliary function that is part of the polygon trimming // code. Will trim the given polygon to the given boundary and return // the trimmed polygon in the out pointer. Uses Sutherland and // Hodgman's polygon-clipping algorithm. @@ -299,7 +299,7 @@ inline void QgsClipper::trimPolygonToBoundary( const QPolygonF& inPts, QPolygonF } } -// An auxilary function to trimPolygonToBoundarY() that returns +// An auxiliary function to trimPolygonToBoundarY() that returns // whether a point is inside or outside the given boundary. inline bool QgsClipper::inside( const double x, const double y, Boundary b ) @@ -343,7 +343,7 @@ inline bool QgsClipper::inside( QPointF pt, Boundary b, double val ) } -// An auxilary function to trimPolygonToBoundarY() that calculates and +// An auxiliary function to trimPolygonToBoundarY() that calculates and // returns the intersection of the line defined by the given points // and the given boundary. diff --git a/src/core/qgscoordinatereferencesystem.h b/src/core/qgscoordinatereferencesystem.h index 6259f425a3dc..9bf6f45bcfa0 100644 --- a/src/core/qgscoordinatereferencesystem.h +++ b/src/core/qgscoordinatereferencesystem.h @@ -580,7 +580,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem static void invalidateCache(); // Mutators ----------------------------------- - // We don't want to expose these to the public api since they wont create + // We don't want to expose these to the public api since they won't create // a fully valid crs. Programmers should use the createFrom* methods rather private: diff --git a/src/core/qgscoordinatereferencesystem_p.h b/src/core/qgscoordinatereferencesystem_p.h index d3a32ac3637a..c7c7040f15e6 100644 --- a/src/core/qgscoordinatereferencesystem_p.h +++ b/src/core/qgscoordinatereferencesystem_p.h @@ -116,7 +116,7 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData mutable QString mWkt; mutable QString mProj4; - //! True if presence of an inverted axis needs to be recaculated + //! True if presence of an inverted axis needs to be recalculated mutable bool mAxisInvertedDirty; //! Whether this is a coordinate system has inverted axis diff --git a/src/core/qgscoordinatetransform_p.h b/src/core/qgscoordinatetransform_p.h index 0f25b70726bc..c3b5a26a6a89 100644 --- a/src/core/qgscoordinatetransform_p.h +++ b/src/core/qgscoordinatetransform_p.h @@ -191,7 +191,7 @@ class QgsCoordinateTransformPrivate : public QSharedData #endif //XXX todo overload == operator for QgsCoordinateReferenceSystem - //at the moment srs.parameters contains the whole proj def...soon it wont... + //at the moment srs.parameters contains the whole proj def...soon it won't... //if (mSourceCRS->toProj4() == mDestCRS->toProj4()) if ( mSourceCRS == mDestCRS ) { diff --git a/src/core/qgserror.cpp b/src/core/qgserror.cpp index 2bdae5c4ad3d..05bcff5ec567 100644 --- a/src/core/qgserror.cpp +++ b/src/core/qgserror.cpp @@ -57,7 +57,7 @@ QString QgsError::message( QgsErrorMessage::Format theFormat ) const #if defined(QGISDEBUG) && defined(QGS_GIT_REMOTE_URL) // TODO: verify if we are not ahead to origin (remote hash does not exist) - // and there are no local not commited changes + // and there are no local not committed changes QString hash = QString( Qgis::QGIS_DEV_VERSION ); QString remote = QStringLiteral( QGS_GIT_REMOTE_URL ); if ( !hash.isEmpty() && !remote.isEmpty() && remote.contains( QLatin1String( "github.com" ) ) ) diff --git a/src/core/qgsmaptopixelgeometrysimplifier.cpp b/src/core/qgsmaptopixelgeometrysimplifier.cpp index 1ac739b29190..ae90c95ff5cb 100644 --- a/src/core/qgsmaptopixelgeometrysimplifier.cpp +++ b/src/core/qgsmaptopixelgeometrysimplifier.cpp @@ -335,7 +335,7 @@ QgsGeometry QgsMapToPixelSimplifier::simplify( const QgsGeometry& geometry ) con const QgsRectangle envelope = geometry.boundingBox(); if ( qMax( envelope.width(), envelope.height() ) / numPoints > mTolerance * 2.0 ) { - //points are in average too far appart to lead to any significant simplification + //points are in average too far apart to lead to any significant simplification return geometry; } diff --git a/src/core/qgspoint.cpp b/src/core/qgspoint.cpp index 01bf797c0bc5..75267a1aa210 100644 --- a/src/core/qgspoint.cpp +++ b/src/core/qgspoint.cpp @@ -106,8 +106,8 @@ QgsVector QgsVector::perpVector() const double QgsVector::angle() const { - double ang = atan2( mY, mX ); - return ang < 0.0 ? ang + 2.0 * M_PI : ang; + double theAngle = atan2( mY, mX ); + return theAngle < 0.0 ? theAngle + 2.0 * M_PI : theAngle; } double QgsVector::angle( QgsVector v ) const @@ -117,9 +117,9 @@ double QgsVector::angle( QgsVector v ) const QgsVector QgsVector::rotateBy( double rot ) const { - double ang = atan2( mY, mX ) + rot; + double theAngle = atan2( mY, mX ) + rot; double len = length(); - return QgsVector( len * cos( ang ), len * sin( ang ) ); + return QgsVector( len * cos( theAngle ), len * sin( theAngle ) ); } QgsVector QgsVector::normalized() const diff --git a/src/core/qgspoint.h b/src/core/qgspoint.h index ea65981ba215..ca6104667194 100644 --- a/src/core/qgspoint.h +++ b/src/core/qgspoint.h @@ -298,7 +298,7 @@ class CORE_EXPORT QgsPoint //! Calculates azimuth between this point and other one (clockwise in degree, starting from north) double azimuth( const QgsPoint& other ) const; - /** Returns a new point which correponds to this point projected by a specified distance + /** Returns a new point which corresponds to this point projected by a specified distance * in a specified bearing. * @param distance distance to project * @param bearing angle to project in, clockwise in degrees starting from north diff --git a/src/core/qgsprojectfiletransform.cpp b/src/core/qgsprojectfiletransform.cpp index ff9d0117bd93..d850ab1b9ebc 100644 --- a/src/core/qgsprojectfiletransform.cpp +++ b/src/core/qgsprojectfiletransform.cpp @@ -42,7 +42,7 @@ QgsProjectFileTransform::TransformItem QgsProjectFileTransform::sTransformers[] {PFV( 0, 9, 0 ), PFV( 0, 9, 1 ), &QgsProjectFileTransform::transformNull}, {PFV( 0, 9, 1 ), PFV( 0, 10, 0 ), &QgsProjectFileTransform::transform091to0100}, // Following line is a hack that takes us straight from 0.9.2 to 0.11.0 - // due to an unknown bug in migrating 0.9.2 files which we didnt pursue (TS & GS) + // due to an unknown bug in migrating 0.9.2 files which we didn't pursue (TS & GS) {PFV( 0, 9, 2 ), PFV( 0, 11, 0 ), &QgsProjectFileTransform::transformNull}, {PFV( 0, 10, 0 ), PFV( 0, 11, 0 ), &QgsProjectFileTransform::transform0100to0110}, {PFV( 0, 11, 0 ), PFV( 1, 0, 0 ), &QgsProjectFileTransform::transform0110to1000}, diff --git a/src/core/qgsrenderchecker.h b/src/core/qgsrenderchecker.h index d724296bd4ee..c650a862a38c 100644 --- a/src/core/qgsrenderchecker.h +++ b/src/core/qgsrenderchecker.h @@ -112,7 +112,7 @@ class CORE_EXPORT QgsRenderChecker bool runTest( const QString& theTestName, unsigned int theMismatchCount = 0 ); /** - * Test using two arbitary images (map renderer will not be used) + * Test using two arbitrary images (map renderer will not be used) * @param theTestName - to be used as the basis for writing a file to * e.g. /tmp/theTestName.png * @param theMismatchCount - defaults to 0 - the number of pixels that @@ -126,9 +126,9 @@ class CORE_EXPORT QgsRenderChecker /** Get a list of all the anomalies. An anomaly is a rendered difference * file where there is some red pixel content (indicating a render check - * mismatch), but where the output was still acceptible. If the render + * mismatch), but where the output was still acceptable. If the render * diff matches one of these anomalies we will still consider it to be - * acceptible. + * acceptable. * @return a bool indicating if the diff matched one of the anomaly files */ bool isKnownAnomaly( const QString& theDiffImageFile ); diff --git a/src/core/qgssqlstatement.h b/src/core/qgssqlstatement.h index 08c5bf001bc9..98e6979c583f 100644 --- a/src/core/qgssqlstatement.h +++ b/src/core/qgssqlstatement.h @@ -454,7 +454,7 @@ class CORE_EXPORT QgsSQLStatement class CORE_EXPORT NodeColumnRef : public Node { public: - //! Constructor with colum name only + //! Constructor with column name only NodeColumnRef( const QString& name, bool star ) : mName( name ), mDistinct( false ), mStar( star ) {} //! Constructor with table and column name NodeColumnRef( const QString& tableName, const QString& name, bool star ) : mTableName( tableName ), mName( name ), mDistinct( false ), mStar( star ) {} diff --git a/src/core/qgstextrenderer.cpp b/src/core/qgstextrenderer.cpp index f668d734c570..e71e81ed1521 100644 --- a/src/core/qgstextrenderer.cpp +++ b/src/core/qgstextrenderer.cpp @@ -2305,7 +2305,7 @@ void QgsTextRenderer::drawShadow( QgsRenderContext& context, const QgsTextRender componentHeight + ( pictbuffer * 2.0 ) + ( blurbuffer * 2.0 ), QImage::Format_ARGB32_Premultiplied ); - // TODO: add labeling gui option to not show any shadows under/over a certian size + // TODO: add labeling gui option to not show any shadows under/over a certain size // keep very small QImages from causing paint device issues, i.e. must be at least > 1 int minBlurImgSize = 1; // max limitation on QgsSvgCache is 10,000 for screen, which will probably be reasonable for future caching here, too diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index c11fdee50433..9da9abb20f04 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -1740,7 +1740,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte //! Is emitted, when edited changes successfully have been written to the data provider void editingStopped(); - //! Is emitted, before changes are commited to the data provider + //! Is emitted, before changes are committed to the data provider void beforeCommitChanges(); //! Is emitted, before changes are rolled back @@ -1958,7 +1958,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte */ bool setDataProvider( QString const & provider ); - //! Goes through all features and finds a free id (e.g. to give it temporarily to a not-commited feature) + //! Goes through all features and finds a free id (e.g. to give it temporarily to a not-committed feature) QgsFeatureId findFreeId(); /** Snaps to a geometry and adds the result to the multimap if it is within the snapping result diff --git a/src/core/qgsvectorlayerfeatureiterator.h b/src/core/qgsvectorlayerfeatureiterator.h index 405cf6845a62..ecda9c4fd760 100644 --- a/src/core/qgsvectorlayerfeatureiterator.h +++ b/src/core/qgsvectorlayerfeatureiterator.h @@ -153,12 +153,12 @@ class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeatureItera */ void addExpressionAttribute( QgsFeature& f, int attrIndex ); - /** Update feature with uncommited attribute updates. + /** Update feature with uncommitted attribute updates. * @note not available in Python bindings */ void updateChangedAttributes( QgsFeature& f ); - /** Update feature with uncommited geometry updates. + /** Update feature with uncommitted geometry updates. * @note not available in Python bindings */ void updateFeatureGeometry( QgsFeature& f ); diff --git a/src/core/qgsvectorlayertools.h b/src/core/qgsvectorlayertools.h index e1f397fed79b..736a77d39e65 100644 --- a/src/core/qgsvectorlayertools.h +++ b/src/core/qgsvectorlayertools.h @@ -68,7 +68,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject virtual bool startEditing( QgsVectorLayer* layer ) const = 0; /** - * Will be called, when an editing session is ended and the features should be commited. + * Will be called, when an editing session is ended and the features should be committed. * Appropriate dialogs should be shown like * * @param layer The layer to commit @@ -80,7 +80,7 @@ class CORE_EXPORT QgsVectorLayerTools : public QObject virtual bool stopEditing( QgsVectorLayer* layer, bool allowCancel = true ) const = 0; /** - * Should be called, when the features should be commited but the editing session is not ended. + * Should be called, when the features should be committed but the editing session is not ended. * * @param layer The layer to commit * @return True if successful diff --git a/src/core/raster/qgscolorrampshader.cpp b/src/core/raster/qgscolorrampshader.cpp index 927d6c004d66..69a644a9abb8 100644 --- a/src/core/raster/qgscolorrampshader.cpp +++ b/src/core/raster/qgscolorrampshader.cpp @@ -372,7 +372,7 @@ bool QgsColorRampShader::shade( double theValue, int* theReturnRedValue, int* th // get initial value from LUT idx = mLUT.at( lutIndex ); - // check if it's correct and if not increase untill correct + // check if it's correct and if not increase until correct // the LUT is made in such a way the index is always correct or too low, never too high while ( idx < colorRampItemListCount && mColorRampItemList.at( idx ).value + DOUBLE_DIFF_THRESHOLD < theValue ) { diff --git a/src/core/raster/qgsrasterinterface.cpp b/src/core/raster/qgsrasterinterface.cpp index b73e091b02f4..7beb7d2c8857 100644 --- a/src/core/raster/qgsrasterinterface.cpp +++ b/src/core/raster/qgsrasterinterface.cpp @@ -268,7 +268,7 @@ void QgsRasterInterface::initHistogram( QgsRasterHistogram &theHistogram, else { // We need statistics -> avoid histogramDefaults in hasHistogram if possible - // TODO: use approximated statistics if aproximated histogram is requested + // TODO: use approximated statistics if approximated histogram is requested // (theSampleSize > 0) QgsRasterBandStats stats = bandStatistics( theBandNo, QgsRasterBandStats::Min, theExtent, theSampleSize ); theHistogram.minimum = stats.minimumValue; diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index a455b2f846cc..4a79f8c3f0c3 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -1537,7 +1537,7 @@ bool QgsRasterLayer::readXml( const QDomNode& layer_node ) // Check timestamp // This was probably introduced to reload completely raster if data changed and - // reset completly symbology to reflect new data type etc. It creates however + // reset completely symbology to reflect new data type etc. It creates however // problems, because user defined symbology is complete lost if data file time // changed (the content may be the same). See also 6900. #if 0 diff --git a/src/core/raster/qgsrasterlayerrenderer.cpp b/src/core/raster/qgsrasterlayerrenderer.cpp index f2df19feab5d..6f698e5b8d76 100644 --- a/src/core/raster/qgsrasterlayerrenderer.cpp +++ b/src/core/raster/qgsrasterlayerrenderer.cpp @@ -147,7 +147,7 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer* layer, QgsRender mRasterViewPort->mWidth = static_cast( mRasterViewPort->mBottomRightPoint.x() - mRasterViewPort->mTopLeftPoint.x() ); mRasterViewPort->mHeight = static_cast( mRasterViewPort->mBottomRightPoint.y() - mRasterViewPort->mTopLeftPoint.y() ); - //the drawable area can start to get very very large when you get down displaying 2x2 or smaller, this is becasue + //the drawable area can start to get very very large when you get down displaying 2x2 or smaller, this is because //mapToPixel.mapUnitsPerPixel() is less then 1, //so we will just get the pixel data and then render these special cases differently in paintImageToCanvas() diff --git a/src/core/symbology-ng/qgscptcityarchive.cpp b/src/core/symbology-ng/qgscptcityarchive.cpp index f97119a5c472..6be7ca64a6c0 100644 --- a/src/core/symbology-ng/qgscptcityarchive.cpp +++ b/src/core/symbology-ng/qgscptcityarchive.cpp @@ -655,7 +655,7 @@ void QgsCptCityDataItem::refresh() // Add new items Q_FOREACH ( QgsCptCityDataItem *item, items ) { - // Is it present in childs? + // Is it present in children? if ( findItem( mChildren, item ) >= 0 ) { delete item; diff --git a/src/core/symbology-ng/qgscptcityarchive.h b/src/core/symbology-ng/qgscptcityarchive.h index 9a916fa6366d..e5d58d0c61e1 100644 --- a/src/core/symbology-ng/qgscptcityarchive.h +++ b/src/core/symbology-ng/qgscptcityarchive.h @@ -361,7 +361,7 @@ class CORE_EXPORT QgsCptCityBrowserModel : public QAbstractItemModel // Refresh item specified by path void refresh( const QString& path ); - // Refresh item childs + // Refresh item children void refresh( const QModelIndex &index = QModelIndex() ); //! return index of a path diff --git a/src/core/symbology-ng/qgsrulebasedrenderer.cpp b/src/core/symbology-ng/qgsrulebasedrenderer.cpp index b2f2ac319a4a..6395d1b2a5e8 100644 --- a/src/core/symbology-ng/qgsrulebasedrenderer.cpp +++ b/src/core/symbology-ng/qgsrulebasedrenderer.cpp @@ -389,7 +389,7 @@ void QgsRuleBasedRenderer::Rule::toSld( QDomDocument& doc, QDomElement &element, mSymbol->toSld( doc, ruleElem, props ); } - // loop into childern rule list + // loop into children rule list Q_FOREACH ( Rule* rule, mChildren ) { rule->toSld( doc, element, props ); diff --git a/src/core/symbology-ng/qgsstyle.cpp b/src/core/symbology-ng/qgsstyle.cpp index a361fabdd9de..627fcfe8e2b8 100644 --- a/src/core/symbology-ng/qgsstyle.cpp +++ b/src/core/symbology-ng/qgsstyle.cpp @@ -366,7 +366,7 @@ bool QgsStyle::load( const QString& filename ) return false; } - // Make sure there are no Null fields in parenting symbols ang groups + // Make sure there are no Null fields in parenting symbols and groups char *query = sqlite3_mprintf( "UPDATE symbol SET favorite=0 WHERE favorite IS NULL;" "UPDATE colorramp SET favorite=0 WHERE favorite IS NULL;" "UPDATE symgroup SET parent=0 WHERE parent IS NULL;" ); diff --git a/src/core/symbology-ng/qgssymbol.cpp b/src/core/symbology-ng/qgssymbol.cpp index 63db78bf928d..f30ec1d12cdc 100644 --- a/src/core/symbology-ng/qgssymbol.cpp +++ b/src/core/symbology-ng/qgssymbol.cpp @@ -1083,10 +1083,10 @@ QgsMarkerSymbol::QgsMarkerSymbol( const QgsSymbolLayerList& layers ) mLayers.append( new QgsSimpleMarkerSymbolLayer() ); } -void QgsMarkerSymbol::setAngle( double ang ) +void QgsMarkerSymbol::setAngle( double theAngle ) { double origAngle = angle(); - double angleDiff = ang - origAngle; + double angleDiff = theAngle - origAngle; Q_FOREACH ( QgsSymbolLayer* layer, mLayers ) { QgsMarkerSymbolLayer* markerLayer = dynamic_cast( layer ); diff --git a/src/core/symbology-ng/qgssymbollayer.h b/src/core/symbology-ng/qgssymbollayer.h index a7ab29772102..d538f8bd5aac 100644 --- a/src/core/symbology-ng/qgssymbollayer.h +++ b/src/core/symbology-ng/qgssymbollayer.h @@ -214,7 +214,7 @@ class CORE_EXPORT QgsSymbolLayer virtual bool hasDataDefinedProperties() const; /** Checks whether the layer has a matching data defined property and if - * that property is currently actived. + * that property is currently activated. * @param property property key * @returns true if data defined property exists and is active * @see hasDataDefinedProperties @@ -232,7 +232,7 @@ class CORE_EXPORT QgsSymbolLayer * @param defaultVal default value to return if evaluation was not successful * @param ok if specified, will be set to true if evaluation was successful * @returns calculated value for data defined property, or default value - * if property does not exist or is deactived. + * if property does not exist or is deactivated. * @see hasDataDefinedProperty * @see getDataDefinedProperty * @note added in QGIS 2.12 diff --git a/src/gui/attributetable/qgsattributetableview.h b/src/gui/attributetable/qgsattributetableview.h index 2472304209b4..982e9392f33b 100644 --- a/src/gui/attributetable/qgsattributetableview.h +++ b/src/gui/attributetable/qgsattributetableview.h @@ -129,7 +129,7 @@ class GUI_EXPORT QgsAttributeTableView : public QTableView /** * @brief - * Is emitted, in order to provide a hook to add aditional menu entries to the context menu. + * Is emitted, in order to provide a hook to add additional* menu entries to the context menu. * * @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. diff --git a/src/gui/attributetable/qgsfeaturelistmodel.h b/src/gui/attributetable/qgsfeaturelistmodel.h index b804de2b6c6c..ff668a714088 100644 --- a/src/gui/attributetable/qgsfeaturelistmodel.h +++ b/src/gui/attributetable/qgsfeaturelistmodel.h @@ -90,7 +90,7 @@ class GUI_EXPORT QgsFeatureListModel : public QAbstractProxyModel, public QgsFea /** * @brief Returns a detailed message about errors while parsing a QgsExpression. - * @return A message containg information about the parser error. + * @return A message containing information about the parser error. */ QString parserErrorString(); diff --git a/src/gui/attributetable/qgsfeaturelistview.h b/src/gui/attributetable/qgsfeaturelistview.h index b93109377d2f..bb4a446aa5e6 100644 --- a/src/gui/attributetable/qgsfeaturelistview.h +++ b/src/gui/attributetable/qgsfeaturelistview.h @@ -95,7 +95,7 @@ class GUI_EXPORT QgsFeatureListView : public QListView /** * Returns a detailed message about errors while parsing a QgsExpression. * - * @return A message containg information about the parser error. + * @return A message containing information about the parser error. */ QString parserErrorString(); diff --git a/src/gui/qgisgui.cpp b/src/gui/qgisgui.cpp index eecef73c95a8..b63c14adcdf4 100644 --- a/src/gui/qgisgui.cpp +++ b/src/gui/qgisgui.cpp @@ -90,7 +90,7 @@ namespace QgisGui QMap filterMap; Q_FOREACH ( const QByteArray& format, QImageWriter::supportedImageFormats() ) { - //svg doesnt work so skip it + //svg doesn't work so skip it if ( format == "svg" ) continue; diff --git a/src/gui/qgisinterface.h b/src/gui/qgisinterface.h index b2c507242f0c..1b588d33730b 100644 --- a/src/gui/qgisinterface.h +++ b/src/gui/qgisinterface.h @@ -590,7 +590,7 @@ class GUI_EXPORT QgisInterface : public QObject virtual QgsVectorLayerTools* vectorLayerTools() = 0; /** This method is only needed when using a UI form with a custom widget plugin and calling - * openFeatureForm or getFeatureForm from Python (PyQt4) and you havn't used the info tool first. + * openFeatureForm or getFeatureForm from Python (PyQt4) and you haven't used the info tool first. * Python will crash bringing QGIS wtih it * if the custom form is not loaded from a C++ method call. * diff --git a/src/gui/qgsadvanceddigitizingdockwidget.cpp b/src/gui/qgsadvanceddigitizingdockwidget.cpp index 218b7fc4c666..60f4e3f6a85c 100644 --- a/src/gui/qgsadvanceddigitizingdockwidget.cpp +++ b/src/gui/qgsadvanceddigitizingdockwidget.cpp @@ -126,8 +126,8 @@ QgsAdvancedDigitizingDockWidget::QgsAdvancedDigitizingDockWidget( QgsMapCanvas* // Connect the UI to the event filter to update constraints connect( mEnableAction, SIGNAL( triggered( bool ) ), this, SLOT( activateCad( bool ) ) ); connect( mConstructionModeButton, SIGNAL( clicked( bool ) ), this, SLOT( setConstructionMode( bool ) ) ); - connect( mParallelButton, SIGNAL( clicked( bool ) ), this, SLOT( addtionalConstraintClicked( bool ) ) ); - connect( mPerpendicularButton, SIGNAL( clicked( bool ) ), this, SLOT( addtionalConstraintClicked( bool ) ) ); + connect( mParallelButton, SIGNAL( clicked( bool ) ), this, SLOT( additionalConstraintClicked( bool ) ) ); + connect( mPerpendicularButton, SIGNAL( clicked( bool ) ), this, SLOT( additionalConstraintClicked( bool ) ) ); connect( mLockAngleButton, SIGNAL( clicked( bool ) ), this, SLOT( lockConstraint( bool ) ) ); connect( mLockDistanceButton, SIGNAL( clicked( bool ) ), this, SLOT( lockConstraint( bool ) ) ); connect( mLockXButton, SIGNAL( clicked( bool ) ), this, SLOT( lockConstraint( bool ) ) ); @@ -234,7 +234,7 @@ void QgsAdvancedDigitizingDockWidget::activateCad( bool enabled ) setCadEnabled( enabled ); } -void QgsAdvancedDigitizingDockWidget::addtionalConstraintClicked( bool activated ) +void QgsAdvancedDigitizingDockWidget::additionalConstraintClicked( bool activated ) { if ( !activated ) { @@ -787,7 +787,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e ) } // ***************************** - // ---- caluclate CAD values + // ---- calculate CAD values QgsDebugMsg( QString( "point: %1 %2" ).arg( point.x() ).arg( point.y() ) ); QgsDebugMsg( QString( "previous point: %1 %2" ).arg( previousPt.x() ).arg( previousPt.y() ) ); QgsDebugMsg( QString( "penultimate point: %1 %2" ).arg( penultimatePt.x() ).arg( penultimatePt.y() ) ); diff --git a/src/gui/qgsadvanceddigitizingdockwidget.h b/src/gui/qgsadvanceddigitizingdockwidget.h index 4a409cbdcf89..63af6ffee66a 100644 --- a/src/gui/qgsadvanceddigitizingdockwidget.h +++ b/src/gui/qgsadvanceddigitizingdockwidget.h @@ -357,7 +357,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private private slots: //! set the additional constraint by clicking on the perpendicular/parallel buttons - void addtionalConstraintClicked( bool activated ); + void additionalConstraintClicked( bool activated ); //! lock/unlock a constraint and set its value void lockConstraint( bool activate = true ); diff --git a/src/gui/qgscomposerview.cpp b/src/gui/qgscomposerview.cpp index 5303b3f01f04..4d2ecd338348 100644 --- a/src/gui/qgscomposerview.cpp +++ b/src/gui/qgscomposerview.cpp @@ -2015,7 +2015,7 @@ void QgsComposerView::wheelZoom( QWheelEvent * event ) zoomFactor = 1.0 + ( zoomFactor - 1.0 ) / 10.0; } - //caculate zoom scale factor + //calculate zoom scale factor bool zoomIn = event->delta() > 0; double scaleFactor = ( zoomIn ? 1 / zoomFactor : zoomFactor ); diff --git a/src/gui/qgsdetaileditemdelegate.cpp b/src/gui/qgsdetaileditemdelegate.cpp index 456763a5f050..fb577069e691 100644 --- a/src/gui/qgsdetaileditemdelegate.cpp +++ b/src/gui/qgsdetaileditemdelegate.cpp @@ -86,7 +86,7 @@ QSize QgsDetailedItemDelegate::sizeHint( //return QSize(theOption.rect.width(), myHeight + myVerticalSpacer); } } - else //cant convert to qgsdetaileditemdata + else //can't convert to qgsdetaileditemdata { return QSize( 50, 50 ); //fallback } diff --git a/src/gui/qgsexternalresourcewidget.h b/src/gui/qgsexternalresourcewidget.h index 9e1a41774a9a..85119f8efe6e 100644 --- a/src/gui/qgsexternalresourcewidget.h +++ b/src/gui/qgsexternalresourcewidget.h @@ -76,7 +76,7 @@ class GUI_EXPORT QgsExternalResourceWidget : public QWidget //! returns the type of content used in the document viewer QgsExternalResourceWidget::DocumentViewerContent documentViewerContent() const; - //! setDocumentViewerContent defines the type of content to be shown. Widget will be adapated accordingly + //! setDocumentViewerContent defines the type of content to be shown. Widget will be adapted accordingly void setDocumentViewerContent( QgsExternalResourceWidget::DocumentViewerContent content ); //! returns the height of the document viewer diff --git a/src/gui/qgsfiledropedit.cpp b/src/gui/qgsfiledropedit.cpp index 74b49507b67c..b75b6d7be0a0 100644 --- a/src/gui/qgsfiledropedit.cpp +++ b/src/gui/qgsfiledropedit.cpp @@ -89,7 +89,7 @@ QString QgsFileDropEdit::acceptableFilePath( QDropEvent *event ) const } /*! - Check if dragged object is acceptible. Called when a drag is in progress + Check if dragged object is acceptable. Called when a drag is in progress and the mouse enters this widget. */ void QgsFileDropEdit::dragEnterEvent( QDragEnterEvent *event ) diff --git a/src/gui/qgshighlight.cpp b/src/gui/qgshighlight.cpp index 4be8d80ac68a..df6bb4d7e895 100644 --- a/src/gui/qgshighlight.cpp +++ b/src/gui/qgshighlight.cpp @@ -251,7 +251,7 @@ void QgsHighlight::paintPolygon( QPainter *p, QgsPolygon polygon ) for ( int j = 0; j < polygon[i].size(); j++ ) { - //adding point only if it is more than a pixel appart from the previous one + //adding point only if it is more than a pixel apart from the previous one const QPointF cur = toCanvasCoordinates( polygon[i][j] ) - pos(); if ( 0 == j || std::abs( ring.back().x() - cur.x() ) > 1 || std::abs( ring.back().y() - cur.y() ) > 1 ) { diff --git a/src/gui/qgsmaplayeractionregistry.h b/src/gui/qgsmaplayeractionregistry.h index c06ab2eb8cfc..5d87f5514fe4 100644 --- a/src/gui/qgsmaplayeractionregistry.h +++ b/src/gui/qgsmaplayeractionregistry.h @@ -45,7 +45,7 @@ class GUI_EXPORT QgsMapLayerAction : public QAction Q_DECLARE_FLAGS( Targets, Target ) //! Creates a map layer action which can run on any layer - //! @note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatiblity reasons. + //! @note using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatibility reasons. QgsMapLayerAction( const QString& name, QObject *parent, Targets targets = AllActions, const QIcon& icon = QIcon() ); //! Creates a map layer action which can run only on a specific layer diff --git a/src/gui/qgsmaptooladvanceddigitizing.h b/src/gui/qgsmaptooladvanceddigitizing.h index 7ab938479b17..4842fbb6c40f 100644 --- a/src/gui/qgsmaptooladvanceddigitizing.h +++ b/src/gui/qgsmaptooladvanceddigitizing.h @@ -24,7 +24,7 @@ class QgsMapMouseEvent; class QgsAdvancedDigitizingDockWidget; /** \ingroup gui - * @brief The QgsMapToolAdvancedDigitizing class is a QgsMapTool whcih gives event directly in map coordinates and allows filtering its events. + * @brief The QgsMapToolAdvancedDigitizing class is a QgsMapTool which gives event directly in map coordinates and allows filtering its events. * Events from QgsMapTool are caught and their QMouseEvent are transformed into QgsMapMouseEvent (with map coordinates). * Events are then forwarded to corresponding virtual methods which can be reimplemented in subclasses. * An event filter can be set on the map tool to filter and modify the events in map coordinates (@see QgsMapToolMapEventFilter). diff --git a/src/gui/qgsmaptoolidentify.cpp b/src/gui/qgsmaptoolidentify.cpp index 02a1e02702bc..e4a2a249e150 100644 --- a/src/gui/qgsmaptoolidentify.cpp +++ b/src/gui/qgsmaptoolidentify.cpp @@ -518,7 +518,7 @@ bool QgsMapToolIdentify::identifyRasterLayer( QList *results, Qg { // It would be nice to use the same extent and size which was used for drawing, // so that WCS can use cache from last draw, unfortunately QgsRasterLayer::draw() - // is doing some tricks with extent and size to allign raster to output which + // is doing some tricks with extent and size to align raster to output which // would be difficult to replicate here. // Note: cutting the extent may result in slightly different x and y resolutions // and thus shifted point calculated back in QGIS WMS (using average resolution) diff --git a/src/gui/qgsmaptoolidentify.h b/src/gui/qgsmaptoolidentify.h index e0834b639efa..8a4f99ad3080 100644 --- a/src/gui/qgsmaptoolidentify.h +++ b/src/gui/qgsmaptoolidentify.h @@ -109,7 +109,7 @@ class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool QList identify( int x, int y, const QList& layerList = QList(), IdentifyMode mode = DefaultQgsSetting ); /** Performs the identification. - To avoid beeing forced to specify IdentifyMode with a list of layers + To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered @param x x coordinates of mouseEvent @param y y coordinates of mouseEvent @@ -133,7 +133,7 @@ class GUI_EXPORT QgsMapToolIdentify : public QgsMapTool protected: /** Performs the identification. - To avoid beeing forced to specify IdentifyMode with a list of layers + To avoid being forced to specify IdentifyMode with a list of layers this has been made private and two publics methods are offered @param x x coordinates of mouseEvent @param y y coordinates of mouseEvent diff --git a/src/gui/qgsowssourceselect.cpp b/src/gui/qgsowssourceselect.cpp index f0a27adade29..e6b9f2f97215 100644 --- a/src/gui/qgsowssourceselect.cpp +++ b/src/gui/qgsowssourceselect.cpp @@ -159,7 +159,7 @@ void QgsOWSSourceSelect::populateFormats() // value used in UMN Mapserver for OUTPUTFORMAT->NAME is used in // WCS 1.0.0 SupportedFormats/Format - // TODO: It is impossible to cover all possible formats comming from server + // TODO: It is impossible to cover all possible formats coming from server // -> enabled all formats, GDAL may be able to open them QMap formatsMap; diff --git a/src/gui/qgsprojectionselector.cpp b/src/gui/qgsprojectionselector.cpp index 33cbf9ef3f31..01e841a0cf1e 100644 --- a/src/gui/qgsprojectionselector.cpp +++ b/src/gui/qgsprojectionselector.cpp @@ -480,7 +480,7 @@ void QgsProjectionSelector::loadUserCrsList( QSet *crsFilter ) //now only will be shown QString databaseFileName = QgsApplication::qgisUserDbFilePath(); // first we look for ~/.qgis/qgis.db - // if it doesnt exist we copy it in from the global resources dir + // if it doesn't exist we copy it in from the global resources dir //return straight away if the user has not created any custom projections if ( !QFileInfo::exists( databaseFileName ) ) @@ -915,7 +915,7 @@ long QgsProjectionSelector::getLargestCrsIdMatch( const QString& theSql ) } else { - //only bother looking in srs.db if it wasnt found above + //only bother looking in srs.db if it wasn't found above result = sqlite3_open_v2( mSrsDatabaseFileName.toUtf8().data(), &database, SQLITE_OPEN_READONLY, nullptr ); if ( result ) { diff --git a/src/gui/symbology-ng/qgssizescalewidget.cpp b/src/gui/symbology-ng/qgssizescalewidget.cpp index d26128468dc0..d94068e27587 100644 --- a/src/gui/symbology-ng/qgssizescalewidget.cpp +++ b/src/gui/symbology-ng/qgssizescalewidget.cpp @@ -226,7 +226,7 @@ void QgsSizeScaleWidget::updatePreview() { QScopedPointer< QgsMarkerSymbol > symbol( static_cast( mSymbol->clone() ) ); symbol->setDataDefinedSize( QgsDataDefined() ); - symbol->setDataDefinedAngle( QgsDataDefined() ); // to avoid symbol not beeing drawn + symbol->setDataDefinedAngle( QgsDataDefined() ); // to avoid symbol not being drawn symbol->setSize( expr->size( breaks[i] ) ); node.reset( new QgsSymbolLegendNode( mLayerTreeLayer, QgsLegendSymbolItem( symbol.data(), QString::number( i ), QString() ) ) ); } diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h index 1d9304015518..a6c08346a1f8 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnection.h +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnection.h @@ -42,7 +42,7 @@ class eVisDatabaseConnection public: - //! \brief Enum containting the type of database supported by this class + //! \brief Enum containing the type of database supported by this class enum DatabaseType { Undefined, diff --git a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp index ccb183434ab9..db39930e8083 100644 --- a/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp +++ b/src/plugins/evis/databaseconnection/evisdatabaseconnectiongui.cpp @@ -269,7 +269,7 @@ void eVisDatabaseConnectionGui::on_pbtnConnect_clicked() myDatabaseType = eVisDatabaseConnection::QSqlite; } - //If there is aready a database connection object, reset with the current parameters + //If there is already a database connection object, reset with the current parameters if ( mDatabaseConnection ) { mDatabaseConnection->resetConnectionParameters( leDatabaseHost->text(), leDatabasePort->text().toInt(), leDatabaseName->text(), leDatabaseUsername->text(), leDatabasePassword->text(), myDatabaseType ); diff --git a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp index 5dd15a580f4b..b7cc8b3cd15f 100644 --- a/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp +++ b/src/plugins/evis/eventbrowser/evisgenericeventbrowsergui.cpp @@ -131,7 +131,7 @@ eVisGenericEventBrowserGui::~eVisGenericEventBrowserGui() } /** - * This method is an extension of the constructor. It was implemented to reduce the amount of code duplicated between the constuctors. + * This method is an extension of the constructor. It was implemented to reduce the amount of code duplicated between the constructors. */ bool eVisGenericEventBrowserGui::initBrowser() { @@ -484,7 +484,7 @@ void eVisGenericEventBrowserGui::accept() */ void eVisGenericEventBrowserGui::buildEventImagePath() { - //This if statement is a bit of a hack, have to track down where the 0 is comming from on initalization + //This if statement is a bit of a hack, have to track down where the 0 is coming from on initalization if ( "0" != mEventImagePath ) { int myImageNameMarker = 0; @@ -519,7 +519,7 @@ void eVisGenericEventBrowserGui::buildEventImagePath() */ void eVisGenericEventBrowserGui::displayImage() { - //This if statement is a bit of a hack, have to track down where the 0 is comming from on initalization + //This if statement is a bit of a hack, have to track down where the 0 is coming from on initalization if ( "0" != mEventImagePath && 0 == displayArea->currentIndex() ) { if ( mEventImagePath.startsWith( QLatin1String( "http://" ), Qt::CaseInsensitive ) ) diff --git a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h index a6b2159fb952..da3382c26fae 100644 --- a/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h +++ b/src/plugins/evis/eventbrowser/evisimagedisplaywidget.h @@ -83,7 +83,7 @@ class eVisImageDisplayWidget : public QWidget //! \brief widget to display the image in QScrollArea* mDisplayArea; - //! \brief Method that acually display the image in the widget + //! \brief Method that actually display the image in the widget void displayImage(); //! \brief Pointer to the http buffer diff --git a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp index b7f4a0dbc751..364b458b7aab 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp @@ -229,7 +229,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError* error, i if ( method == ToMultiObject ) { - // If is alreay a geometry collection, just add the new polygon. + // If is already a geometry collection, just add the new polygon. if ( dynamic_cast( geom ) ) { static_cast( geom )->addGeometry( poly2 ); diff --git a/src/plugins/georeferencer/qgsgeorefplugingui.cpp b/src/plugins/georeferencer/qgsgeorefplugingui.cpp index 51b252252ce8..ba2e924db518 100644 --- a/src/plugins/georeferencer/qgsgeorefplugingui.cpp +++ b/src/plugins/georeferencer/qgsgeorefplugingui.cpp @@ -2097,7 +2097,7 @@ QString QgsGeorefPluginGui::guessWorldFileName( const QString &rasterFileName ) } // Note this code is duplicated from qgisapp.cpp because -// I didnt want to make plugins on qgsapplication [TS] +// I didn't want to make plugins on qgsapplication [TS] QIcon QgsGeorefPluginGui::getThemeIcon( const QString &theName ) { if ( QFile::exists( QgsApplication::activeThemePath() + theName ) ) diff --git a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp index a9b53a5c139c..40cd82e3ce33 100644 --- a/src/plugins/georeferencer/qgstransformsettingsdialog.cpp +++ b/src/plugins/georeferencer/qgstransformsettingsdialog.cpp @@ -297,7 +297,7 @@ QString QgsTransformSettingsDialog::generateModifiedRasterFileName( const QStrin } // Note this code is duplicated from qgisapp.cpp because -// I didnt want to make plugins on qgsapplication [TS] +// I didn't want to make plugins on qgsapplication [TS] QIcon QgsTransformSettingsDialog::getThemeIcon( const QString &theName ) { if ( QFile::exists( QgsApplication::activeThemePath() + theName ) ) diff --git a/src/plugins/grass/modules/r.colors.table.qgm b/src/plugins/grass/modules/r.colors.table.qgm index 96c78904a940..b80dee5306a1 100644 --- a/src/plugins/grass/modules/r.colors.table.qgm +++ b/src/plugins/grass/modules/r.colors.table.qgm @@ -1,7 +1,7 @@ - + diff --git a/src/plugins/grass/modules/r.texture.bis.qgm b/src/plugins/grass/modules/r.texture.bis.qgm index c7de154ff741..58767b9f4606 100644 --- a/src/plugins/grass/modules/r.texture.bis.qgm +++ b/src/plugins/grass/modules/r.texture.bis.qgm @@ -1,7 +1,7 @@ - + - :/images/themes/default/copyright_label.png:/images/themes/default/copyright_label.png + :/images/themes/default/copyright_label.svg:/images/themes/default/copyright_label.svg &Copyright Label @@ -1829,7 +1829,7 @@ Ctrl (Cmd) increments by 15 deg. - :/images/themes/default/scale_bar.png:/images/themes/default/scale_bar.png + :/images/themes/default/mActionScaleBar.svg:/images/themes/default/scale_bar.png &Scale Bar From 231f6af0e112ed001acf3ac6a2db1e92b0ccb0b0 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Jan 2017 13:46:26 +1000 Subject: [PATCH 040/332] Don't return const references to implicitly shared Qt classes Instead return the inexpensive copies. Should provide extra safety against issues like #14822 (refs #14822) --- python/analysis/raster/qgsrelief.sip | 2 +- python/core/composer/qgsatlascomposition.sip | 2 +- python/core/composer/qgscomposerhtml.sip | 2 +- python/core/composer/qgscomposition.sip | 2 +- python/core/layertree/qgslayertreemodel.sip | 2 +- python/core/qgsdataitem.sip | 22 ++--- python/core/qgsexpressionfieldbuffer.sip | 2 +- python/core/qgsnetworkaccessmanager.sip | 2 +- python/core/qgsproviderregistry.sip | 2 +- python/core/qgsrelationmanager.sip | 2 +- python/core/qgsvectordataprovider.sip | 2 +- python/core/qgsvectorlayer.sip | 4 +- python/core/symbology-ng/qgssvgcache.sip | 6 +- .../core/qgseditorwidgetregistry.sip | 2 +- .../gui/qgsadvanceddigitizingdockwidget.sip | 2 +- python/server/qgsserverprojectparser.sip | 8 +- python/server/qgswmsconfigparser.sip | 4 +- python/server/qgswmsprojectparser.sip | 4 +- src/analysis/interpolation/qgsinterpolator.h | 2 +- src/analysis/raster/qgsrelief.h | 2 +- src/app/composer/qgscomposer.h | 2 +- src/app/qgsmeasuretool.cpp | 2 +- src/app/qgsmeasuretool.h | 2 +- src/core/auth/qgsauthmethodregistry.cpp | 2 +- src/core/auth/qgsauthmethodregistry.h | 2 +- src/core/composer/qgsatlascomposition.h | 2 +- src/core/composer/qgscomposerhtml.h | 2 +- src/core/composer/qgscomposition.h | 2 +- src/core/layertree/qgslayertreemodel.cpp | 9 +- src/core/layertree/qgslayertreemodel.h | 2 +- .../layertree/qgslayertreemodellegendnode.cpp | 2 +- .../layertree/qgslayertreemodellegendnode.h | 2 +- src/core/layertree/qgslayertreenode.h | 2 +- src/core/qgsdataitem.cpp | 85 +++++-------------- src/core/qgsdataitem.h | 22 ++--- src/core/qgsexpressionfieldbuffer.h | 2 +- src/core/qgsgml.h | 4 +- src/core/qgsnetworkaccessmanager.cpp | 2 +- src/core/qgsnetworkaccessmanager.h | 2 +- src/core/qgsogcutils.h | 4 +- src/core/qgsproviderregistry.cpp | 2 +- src/core/qgsproviderregistry.h | 2 +- src/core/qgsrelationmanager.cpp | 2 +- src/core/qgsrelationmanager.h | 2 +- src/core/qgsvectordataprovider.cpp | 2 +- src/core/qgsvectordataprovider.h | 2 +- src/core/qgsvectorlayer.h | 4 +- src/core/symbology-ng/qgssvgcache.cpp | 12 +-- src/core/symbology-ng/qgssvgcache.h | 12 +-- .../core/qgseditorwidgetregistry.cpp | 2 +- .../core/qgseditorwidgetregistry.h | 2 +- src/gui/qgsadvanceddigitizingdockwidget.h | 2 +- src/gui/qgscolorschemelist.cpp | 2 +- src/gui/qgscolorschemelist.h | 2 +- src/gui/qgscolorswatchgrid.cpp | 2 +- src/gui/qgscolorswatchgrid.h | 2 +- src/gui/qgsgradientstopeditor.cpp | 2 +- src/gui/qgsgradientstopeditor.h | 2 +- .../checks/qgsgeometryanglecheck.cpp | 2 +- .../checks/qgsgeometryanglecheck.h | 2 +- .../checks/qgsgeometryareacheck.cpp | 2 +- .../checks/qgsgeometryareacheck.h | 2 +- .../checks/qgsgeometrycheck.h | 6 +- .../checks/qgsgeometrycontainedcheck.cpp | 2 +- .../checks/qgsgeometrycontainedcheck.h | 2 +- .../qgsgeometrydegeneratepolygoncheck.cpp | 2 +- .../qgsgeometrydegeneratepolygoncheck.h | 2 +- .../checks/qgsgeometryduplicatecheck.cpp | 2 +- .../checks/qgsgeometryduplicatecheck.h | 4 +- .../checks/qgsgeometryduplicatenodescheck.cpp | 2 +- .../checks/qgsgeometryduplicatenodescheck.h | 2 +- .../checks/qgsgeometrygapcheck.cpp | 2 +- .../checks/qgsgeometrygapcheck.h | 2 +- .../checks/qgsgeometryholecheck.cpp | 2 +- .../checks/qgsgeometryholecheck.h | 2 +- .../checks/qgsgeometrymultipartcheck.cpp | 2 +- .../checks/qgsgeometrymultipartcheck.h | 2 +- .../checks/qgsgeometryoverlapcheck.cpp | 2 +- .../checks/qgsgeometryoverlapcheck.h | 2 +- .../checks/qgsgeometrysegmentlengthcheck.cpp | 2 +- .../checks/qgsgeometrysegmentlengthcheck.h | 2 +- .../qgsgeometryselfintersectioncheck.cpp | 2 +- .../checks/qgsgeometryselfintersectioncheck.h | 2 +- .../checks/qgsgeometrytypecheck.cpp | 2 +- .../checks/qgsgeometrytypecheck.h | 2 +- .../geometry_checker/qgsgeometrychecker.h | 2 +- src/plugins/gps_importer/qgsbabelformat.cpp | 2 +- src/plugins/gps_importer/qgsbabelformat.h | 2 +- src/providers/arcgisrest/qgsamsprovider.h | 2 +- src/providers/wfs/qgswfsrequest.h | 4 +- src/server/qgsbufferserverresponse.h | 4 +- src/server/qgsserverprojectparser.h | 10 +-- src/server/qgssldconfigparser.cpp | 4 +- src/server/qgssldconfigparser.h | 4 +- src/server/qgswmsconfigparser.h | 4 +- src/server/qgswmsprojectparser.cpp | 4 +- src/server/qgswmsprojectparser.h | 4 +- 97 files changed, 172 insertions(+), 222 deletions(-) diff --git a/python/analysis/raster/qgsrelief.sip b/python/analysis/raster/qgsrelief.sip index 704464d39b16..5d98cc50a674 100644 --- a/python/analysis/raster/qgsrelief.sip +++ b/python/analysis/raster/qgsrelief.sip @@ -26,7 +26,7 @@ class QgsRelief void clearReliefColors(); void addReliefColorClass( const QgsRelief::ReliefColor& color ); - const QList< QgsRelief::ReliefColor >& reliefColors() const; + QList< QgsRelief::ReliefColor > reliefColors() const; void setReliefColors( const QList< QgsRelief::ReliefColor >& c ); /** Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip index 0cf6fe696b4f..45e9f2b96bf9 100644 --- a/python/core/composer/qgsatlascomposition.sip +++ b/python/core/composer/qgsatlascomposition.sip @@ -145,7 +145,7 @@ public: * @see setPredefinedScales * @see QgsComposerMap::atlasScalingMode */ - const QVector& predefinedScales() const; + QVector predefinedScales() const; /** Sets the list of predefined scales for the atlas. This is used * for maps which are set to the predefined atlas scaling mode. diff --git a/python/core/composer/qgscomposerhtml.sip b/python/core/composer/qgscomposerhtml.sip index 9d965409737a..e3c581a5ccd8 100644 --- a/python/core/composer/qgscomposerhtml.sip +++ b/python/core/composer/qgscomposerhtml.sip @@ -51,7 +51,7 @@ class QgsComposerHtml: QgsComposerMultiFrame * @see setUrl * @see contentMode */ - const QUrl& url() const; + QUrl url() const; /** Sets the HTML to display in the item when the item is using * the QgsComposerHtml::ManualHtml mode. Setting the HTML using this function diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 87b9206b1b04..7a351a75f765 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -235,7 +235,7 @@ class QgsComposition : QGraphicsScene, QgsExpressionContextGenerator double snapGridOffsetY() const; void setGridPen( const QPen& p ); - const QPen& gridPen() const; + QPen gridPen() const; void setGridStyle( const GridStyle s ); GridStyle gridStyle() const; diff --git a/python/core/layertree/qgslayertreemodel.sip b/python/core/layertree/qgslayertreemodel.sip index bab15b39367f..143ab479dc5c 100644 --- a/python/core/layertree/qgslayertreemodel.sip +++ b/python/core/layertree/qgslayertreemodel.sip @@ -228,7 +228,7 @@ class QgsLayerTreeModel : QAbstractItemModel */ void refreshScaleBasedLayers( const QModelIndex& index = QModelIndex() ); - static const QIcon& iconGroup(); + static QIcon iconGroup(); //! Filter nodes from QgsMapLayerLegend according to the current filtering rules QList filterLegendNodes( const QList& nodes ); diff --git a/python/core/qgsdataitem.sip b/python/core/qgsdataitem.sip index 3db121ea0559..817db82cfc1a 100644 --- a/python/core/qgsdataitem.sip +++ b/python/core/qgsdataitem.sip @@ -308,12 +308,12 @@ class QgsLayerItem : QgsDataItem virtual QString comments() const; public: - static const QIcon &iconPoint(); - static const QIcon &iconLine(); - static const QIcon &iconPolygon(); - static const QIcon &iconTable(); - static const QIcon &iconRaster(); - static const QIcon &iconDefault(); + static QIcon iconPoint(); + static QIcon iconLine(); + static QIcon iconPolygon(); + static QIcon iconTable(); + static QIcon iconRaster(); + static QIcon iconDefault(); virtual QString layerName() const; }; @@ -331,8 +331,8 @@ class QgsDataCollectionItem : QgsDataItem void addChild( QgsDataItem *item /Transfer/ ); - static const QIcon &iconDir(); // shared icon: open/closed directory - static const QIcon &iconDataCollection(); // default icon for data collection + static QIcon iconDir(); // shared icon: open/closed directory + static QIcon iconDataCollection(); // default icon for data collection }; /** A directory: contains subdirectories and layers */ @@ -477,7 +477,7 @@ class QgsFavoritesItem : QgsDataCollectionItem void removeDirectory( QgsDirectoryItem *item ); //! Icon for favorites group - static const QIcon &iconFavorites(); + static QIcon iconFavorites(); }; /** A zip file: contains layers, using GDAL/OGR VSIFILE mechanism */ @@ -492,7 +492,7 @@ class QgsZipItem : QgsDataCollectionItem ~QgsZipItem(); QVector createChildren(); - const QStringList & getZipFileList(); + QStringList getZipFileList(); //! @note not available via python bindings // static QVector mDataItemPtr; @@ -504,6 +504,6 @@ class QgsZipItem : QgsDataCollectionItem //! @note available in python as itemFromFilePath static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& filePath, const QString& name, const QString& path ) /Factory,PyName=itemFromFilePath/; - static const QIcon &iconZip(); + static QIcon iconZip(); }; diff --git a/python/core/qgsexpressionfieldbuffer.sip b/python/core/qgsexpressionfieldbuffer.sip index 8bceb4a67db4..118d59e0feaf 100644 --- a/python/core/qgsexpressionfieldbuffer.sip +++ b/python/core/qgsexpressionfieldbuffer.sip @@ -64,5 +64,5 @@ class QgsExpressionFieldBuffer */ void updateFields( QgsFields& flds ); - const QList& expressions() const; + QList expressions() const; }; diff --git a/python/core/qgsnetworkaccessmanager.sip b/python/core/qgsnetworkaccessmanager.sip index 6d1c2741b515..de273b8ed1b7 100644 --- a/python/core/qgsnetworkaccessmanager.sip +++ b/python/core/qgsnetworkaccessmanager.sip @@ -46,7 +46,7 @@ class QgsNetworkAccessManager : QNetworkAccessManager const QNetworkProxy &fallbackProxy() const; //! retrieve exclude list (urls shouldn't use the fallback proxy) - const QStringList &excludeList() const; + QStringList excludeList() const; //! set fallback proxy and URL that shouldn't use it. void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); diff --git a/python/core/qgsproviderregistry.sip b/python/core/qgsproviderregistry.sip index 0ad4e92a97b0..ab92d1c969fb 100644 --- a/python/core/qgsproviderregistry.sip +++ b/python/core/qgsproviderregistry.sip @@ -29,7 +29,7 @@ class QgsProviderRegistry QString pluginList( bool asHtml = false ) const; /** Return library directory where plugins are found */ - const QDir & libraryDirectory() const; + QDir libraryDirectory() const; /** Set library directory where to search for plugins */ void setLibraryDirectory( const QDir & path ); diff --git a/python/core/qgsrelationmanager.sip b/python/core/qgsrelationmanager.sip index 4704694fe124..20fc6d43c80b 100644 --- a/python/core/qgsrelationmanager.sip +++ b/python/core/qgsrelationmanager.sip @@ -25,7 +25,7 @@ class QgsRelationManager : QObject * * @return A QMap where the key is the relation id, the value the relation object. */ - const QMap& relations() const; + QMap relations() const; /** * Add a relation. diff --git a/python/core/qgsvectordataprovider.sip b/python/core/qgsvectordataprovider.sip index 88cc6f57ce89..9f6b624835b9 100644 --- a/python/core/qgsvectordataprovider.sip +++ b/python/core/qgsvectordataprovider.sip @@ -375,7 +375,7 @@ class QgsVectorDataProvider : QgsDataProvider /** * Returns the names of the supported types */ - const QList< QgsVectorDataProvider::NativeType > &nativeTypes() const; + QList< QgsVectorDataProvider::NativeType > nativeTypes() const; /** * Returns true if the provider is strict about the type of inserted features diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index ba30c07b4ebe..1e122ef578e0 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -1111,10 +1111,10 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator const QMap< QString, QString >& attributeAliases() const; - const QSet& excludeAttributesWms() const; + QSet excludeAttributesWms() const; void setExcludeAttributesWms( const QSet& att ); - const QSet& excludeAttributesWfs() const; + QSet excludeAttributesWfs() const; void setExcludeAttributesWfs( const QSet& att ); /** Delete an attribute field (but does not commit it) */ diff --git a/python/core/symbology-ng/qgssvgcache.sip b/python/core/symbology-ng/qgssvgcache.sip index 0325fb69776f..e880be0e646c 100644 --- a/python/core/symbology-ng/qgssvgcache.sip +++ b/python/core/symbology-ng/qgssvgcache.sip @@ -79,7 +79,7 @@ class QgsSvgCache : QObject * @param rasterScaleFactor raster scale factor * @param fitsInCache */ - const QImage& svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + QImage svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ); /** Get SVG as QPicture&. * @param file Absolute or relative path to SVG file. @@ -91,7 +91,7 @@ class QgsSvgCache : QObject * @param rasterScaleFactor raster scale factor * @param forceVectorOutput */ - const QPicture& svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + QPicture svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput = false ); /** Calculates the viewbox size of a (possibly cached) SVG file. @@ -144,7 +144,7 @@ class QgsSvgCache : QObject QByteArray getImageData( const QString &path ) const; /** Get SVG content*/ - const QByteArray& svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + QByteArray svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, double widthScaleFactor, double rasterScaleFactor ); signals: diff --git a/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip b/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip index 9fd5eb886072..0785c43e3320 100644 --- a/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip +++ b/python/gui/editorwidgets/core/qgseditorwidgetregistry.sip @@ -110,7 +110,7 @@ class QgsEditorWidgetRegistry : QObject * * @return All ids and factories */ - const QMap& factories(); + QMap factories(); /** * Get a factory for the given widget type id. diff --git a/python/gui/qgsadvanceddigitizingdockwidget.sip b/python/gui/qgsadvanceddigitizingdockwidget.sip index 28782b2f081b..9f7b198413b4 100644 --- a/python/gui/qgsadvanceddigitizingdockwidget.sip +++ b/python/gui/qgsadvanceddigitizingdockwidget.sip @@ -269,7 +269,7 @@ class QgsAdvancedDigitizingDockWidget : QDockWidget /** * Snapped to a segment */ - const QList& snappedSegment() const; + QList snappedSegment() const; //! return the action used to enable/disable the tools QAction* enableAction(); diff --git a/python/server/qgsserverprojectparser.sip b/python/server/qgsserverprojectparser.sip index 3f189590559d..24aab70f50a0 100644 --- a/python/server/qgsserverprojectparser.sip +++ b/python/server/qgsserverprojectparser.sip @@ -60,9 +60,9 @@ class QgsServerProjectParser QStringList supportedOutputCrsList() const; - const QList& projectLayerElements() const; + QList projectLayerElements() const; - const QList& legendGroupElements() const; + QList legendGroupElements() const; QString projectTitle() const; @@ -73,8 +73,8 @@ class QgsServerProjectParser const QSet& restrictedLayers() const; bool useLayerIds() const; - const QHash< QString, QDomElement >& projectLayerElementsByName() const; - const QHash< QString, QDomElement >& projectLayerElementsById() const; + QHash< QString, QDomElement > projectLayerElementsByName() const; + QHash< QString, QDomElement > projectLayerElementsById() const; // SIP doesn't like QMap: // void layerFromLegendLayer( const QDomElement& legendLayerElem, QMap< int, QgsMapLayer*>& layers, bool useCache = true ) const; diff --git a/python/server/qgswmsconfigparser.sip b/python/server/qgswmsconfigparser.sip index c95e4f235a44..1b25da50d83e 100644 --- a/python/server/qgswmsconfigparser.sip +++ b/python/server/qgswmsconfigparser.sip @@ -88,8 +88,8 @@ class QgsWmsConfigParser virtual double legendIconLabelSpace() const = 0; virtual double legendSymbolWidth() const = 0; virtual double legendSymbolHeight() const = 0; - virtual const QFont& legendLayerFont() const = 0; - virtual const QFont& legendItemFont() const = 0; + virtual QFont legendLayerFont() const = 0; + virtual QFont legendItemFont() const = 0; virtual double maxWidth() const = 0; virtual double maxHeight() const = 0; diff --git a/python/server/qgswmsprojectparser.sip b/python/server/qgswmsprojectparser.sip index 554a3c87642c..4d75c6a646e6 100644 --- a/python/server/qgswmsprojectparser.sip +++ b/python/server/qgswmsprojectparser.sip @@ -46,8 +46,8 @@ class QgsWmsProjectParser : public QgsWmsConfigParser double legendIconLabelSpace() const /*override*/ ; double legendSymbolWidth() const /*override*/ ; double legendSymbolHeight() const /*override*/ ; - const QFont& legendLayerFont() const /*override*/ ; - const QFont& legendItemFont() const /*override*/ ; + QFont legendLayerFont() const /*override*/ ; + QFont legendItemFont() const /*override*/ ; double maxWidth() const /*override*/ ; double maxHeight() const /*override*/ ; diff --git a/src/analysis/interpolation/qgsinterpolator.h b/src/analysis/interpolation/qgsinterpolator.h index 1843ce0aac98..3febb2ba4c4d 100644 --- a/src/analysis/interpolation/qgsinterpolator.h +++ b/src/analysis/interpolation/qgsinterpolator.h @@ -67,7 +67,7 @@ class ANALYSIS_EXPORT QgsInterpolator virtual int interpolatePoint( double x, double y, double& result ) = 0; //! @note not available in Python bindings - const QList& layerData() const { return mLayerData; } + QList layerData() const { return mLayerData; } protected: diff --git a/src/analysis/raster/qgsrelief.h b/src/analysis/raster/qgsrelief.h index 2915a4787c8f..b5e4fdbf3959 100644 --- a/src/analysis/raster/qgsrelief.h +++ b/src/analysis/raster/qgsrelief.h @@ -61,7 +61,7 @@ class ANALYSIS_EXPORT QgsRelief void clearReliefColors(); void addReliefColorClass( const ReliefColor& color ); - const QList< ReliefColor >& reliefColors() const { return mReliefColors; } + QList< ReliefColor > reliefColors() const { return mReliefColors; } void setReliefColors( const QList< ReliefColor >& c ) { mReliefColors = c; } /** Calculates class breaks according with the method of Buenzli (2011) using an iterative algorithm for segmented regression diff --git a/src/app/composer/qgscomposer.h b/src/app/composer/qgscomposer.h index 167406ed7022..8d7923edf4f2 100644 --- a/src/app/composer/qgscomposer.h +++ b/src/app/composer/qgscomposer.h @@ -104,7 +104,7 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase QAction* windowAction() {return mWindowAction;} - const QString& title() const {return mTitle;} + QString title() const {return mTitle;} void setTitle( const QString& title ); /** Loads the contents of a template document into the composer's composition. diff --git a/src/app/qgsmeasuretool.cpp b/src/app/qgsmeasuretool.cpp index 62e25b981d49..1c224992a205 100644 --- a/src/app/qgsmeasuretool.cpp +++ b/src/app/qgsmeasuretool.cpp @@ -65,7 +65,7 @@ QgsMeasureTool::~QgsMeasureTool() } -const QList& QgsMeasureTool::points() +QList QgsMeasureTool::points() { return mPoints; } diff --git a/src/app/qgsmeasuretool.h b/src/app/qgsmeasuretool.h index 4f31922462b3..5dea8c5bbdad 100644 --- a/src/app/qgsmeasuretool.h +++ b/src/app/qgsmeasuretool.h @@ -52,7 +52,7 @@ class APP_EXPORT QgsMeasureTool : public QgsMapTool void addPoint( const QgsPoint &point ); //! Returns reference to array of the points - const QList& points(); + QList points(); // Inherited from QgsMapTool diff --git a/src/core/auth/qgsauthmethodregistry.cpp b/src/core/auth/qgsauthmethodregistry.cpp index 2c80fa567260..1550eaeb7076 100644 --- a/src/core/auth/qgsauthmethodregistry.cpp +++ b/src/core/auth/qgsauthmethodregistry.cpp @@ -246,7 +246,7 @@ QString QgsAuthMethodRegistry::pluginList( bool asHtml ) const return list; } -const QDir &QgsAuthMethodRegistry::libraryDirectory() const +QDir QgsAuthMethodRegistry::libraryDirectory() const { return mLibraryDirectory; } diff --git a/src/core/auth/qgsauthmethodregistry.h b/src/core/auth/qgsauthmethodregistry.h index 857316b113a7..45b567df9beb 100644 --- a/src/core/auth/qgsauthmethodregistry.h +++ b/src/core/auth/qgsauthmethodregistry.h @@ -56,7 +56,7 @@ class CORE_EXPORT QgsAuthMethodRegistry QString pluginList( bool asHtml = false ) const; //! Return library directory where plugins are found - const QDir & libraryDirectory() const; + QDir libraryDirectory() const; //! Set library directory where to search for plugins void setLibraryDirectory( const QDir & path ); diff --git a/src/core/composer/qgsatlascomposition.h b/src/core/composer/qgsatlascomposition.h index a512c2a14f0f..de86863bd36a 100644 --- a/src/core/composer/qgsatlascomposition.h +++ b/src/core/composer/qgsatlascomposition.h @@ -176,7 +176,7 @@ class CORE_EXPORT QgsAtlasComposition : public QObject * @see setPredefinedScales * @see QgsComposerMap::atlasScalingMode */ - const QVector& predefinedScales() const { return mPredefinedScales; } + QVector predefinedScales() const { return mPredefinedScales; } /** Sets the list of predefined scales for the atlas. This is used * for maps which are set to the predefined atlas scaling mode. diff --git a/src/core/composer/qgscomposerhtml.h b/src/core/composer/qgscomposerhtml.h index c915d17edff5..c8fd41a5ad4f 100644 --- a/src/core/composer/qgscomposerhtml.h +++ b/src/core/composer/qgscomposerhtml.h @@ -80,7 +80,7 @@ class CORE_EXPORT QgsComposerHtml: public QgsComposerMultiFrame * @see setUrl * @see contentMode */ - const QUrl& url() const { return mUrl; } + QUrl url() const { return mUrl; } /** Sets the HTML to display in the item when the item is using * the QgsComposerHtml::ManualHtml mode. Setting the HTML using this function diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index bdab5f552c2d..9c4b9448a7af 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -301,7 +301,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo double snapGridOffsetY() const {return mSnapGridOffsetY;} void setGridPen( const QPen& p ); - const QPen& gridPen() const {return mGridPen;} + QPen gridPen() const {return mGridPen;} void setGridStyle( const GridStyle s ); GridStyle gridStyle() const {return mGridStyle;} diff --git a/src/core/layertree/qgslayertreemodel.cpp b/src/core/layertree/qgslayertreemodel.cpp index c4faea10573b..c8900d7f2f5c 100644 --- a/src/core/layertree/qgslayertreemodel.cpp +++ b/src/core/layertree/qgslayertreemodel.cpp @@ -1109,14 +1109,9 @@ bool QgsLayerTreeModel::testFlag( QgsLayerTreeModel::Flag f ) const return mFlags.testFlag( f ); } -const QIcon& QgsLayerTreeModel::iconGroup() +QIcon QgsLayerTreeModel::iconGroup() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mActionFolder.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mActionFolder.svg" ) ); } QList QgsLayerTreeModel::filterLegendNodes( const QList& nodes ) diff --git a/src/core/layertree/qgslayertreemodel.h b/src/core/layertree/qgslayertreemodel.h index ad6ada9bf3ba..68d0486c310d 100644 --- a/src/core/layertree/qgslayertreemodel.h +++ b/src/core/layertree/qgslayertreemodel.h @@ -255,7 +255,7 @@ class CORE_EXPORT QgsLayerTreeModel : public QAbstractItemModel */ void refreshScaleBasedLayers( const QModelIndex& index = QModelIndex() ); - static const QIcon& iconGroup(); + static QIcon iconGroup(); //! Filter nodes from QgsMapLayerLegend according to the current filtering rules QList filterLegendNodes( const QList& nodes ); diff --git a/src/core/layertree/qgslayertreemodellegendnode.cpp b/src/core/layertree/qgslayertreemodellegendnode.cpp index 7e746e644956..0905d86eee29 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.cpp +++ b/src/core/layertree/qgslayertreemodellegendnode.cpp @@ -585,7 +585,7 @@ QgsWmsLegendNode::QgsWmsLegendNode( QgsLayerTreeLayer* nodeLayer, QObject* paren { } -const QImage& QgsWmsLegendNode::getLegendGraphic() const +QImage QgsWmsLegendNode::getLegendGraphic() const { if ( ! mValid && ! mFetcher ) { diff --git a/src/core/layertree/qgslayertreemodellegendnode.h b/src/core/layertree/qgslayertreemodellegendnode.h index 0128525a5328..05cb2d5c5799 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.h +++ b/src/core/layertree/qgslayertreemodellegendnode.h @@ -334,7 +334,7 @@ class CORE_EXPORT QgsWmsLegendNode : public QgsLayerTreeModelLegendNode private: // Lazily initializes mImage - const QImage& getLegendGraphic() const; + QImage getLegendGraphic() const; QImage renderMessage( const QString& msg ) const; diff --git a/src/core/layertree/qgslayertreenode.h b/src/core/layertree/qgslayertreenode.h index f50d4f1dbd35..fb381146c48d 100644 --- a/src/core/layertree/qgslayertreenode.h +++ b/src/core/layertree/qgslayertreenode.h @@ -84,7 +84,7 @@ class CORE_EXPORT QgsLayerTreeNode : public QObject //! Get list of children of the node. Children are owned by the parent QList children() { return mChildren; } //! Get list of children of the node. Children are owned by the parent - const QList& children() const { return mChildren; } + QList children() const { return mChildren; } //! Return name of the node //! @note added in 3.0 diff --git a/src/core/qgsdataitem.cpp b/src/core/qgsdataitem.cpp index f6044780561f..606e294a9da3 100644 --- a/src/core/qgsdataitem.cpp +++ b/src/core/qgsdataitem.cpp @@ -96,77 +96,42 @@ void QgsAnimatedIcon::disconnectFrameChanged( const QObject * receiver, const ch } // shared icons -const QIcon &QgsLayerItem::iconPoint() +QIcon QgsLayerItem::iconPoint() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconPointLayer.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconPointLayer.svg" ) ); } -const QIcon &QgsLayerItem::iconLine() +QIcon QgsLayerItem::iconLine() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconLineLayer.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconLineLayer.svg" ) ); } -const QIcon &QgsLayerItem::iconPolygon() +QIcon QgsLayerItem::iconPolygon() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconPolygonLayer.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconPolygonLayer.svg" ) ); } -const QIcon &QgsLayerItem::iconTable() +QIcon QgsLayerItem::iconTable() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconTableLayer.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconTableLayer.svg" ) ); } -const QIcon &QgsLayerItem::iconRaster() +QIcon QgsLayerItem::iconRaster() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconRaster.svg" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconRaster.svg" ) ); } -const QIcon &QgsLayerItem::iconDefault() +QIcon QgsLayerItem::iconDefault() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconLayer.png" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconLayer.png" ) ); } -const QIcon &QgsDataCollectionItem::iconDataCollection() +QIcon QgsDataCollectionItem::iconDataCollection() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconDbSchema.png" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconDbSchema.png" ) ); } -const QIcon &QgsDataCollectionItem::iconDir() +QIcon QgsDataCollectionItem::iconDir() { static QIcon icon; @@ -182,25 +147,15 @@ const QIcon &QgsDataCollectionItem::iconDir() return icon; } -const QIcon &QgsFavoritesItem::iconFavorites() +QIcon QgsFavoritesItem::iconFavorites() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconFavourites.png" ) ); - - return icon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconFavourites.png" ) ); } -const QIcon &QgsZipItem::iconZip() +QIcon QgsZipItem::iconZip() { - static QIcon icon; - - if ( icon.isNull() ) - icon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconZip.png" ) ); + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconZip.png" ) ); // icon from http://www.softicons.com/free-icons/application-icons/mega-pack-icons-1-by-nikolay-verin/winzip-folder-icon - - return icon; } QgsAnimatedIcon * QgsDataItem::mPopulatingIcon = nullptr; @@ -1501,7 +1456,7 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, const QString& fileP return nullptr; } -const QStringList &QgsZipItem::getZipFileList() +QStringList QgsZipItem::getZipFileList() { if ( ! mZipFileList.isEmpty() ) return mZipFileList; diff --git a/src/core/qgsdataitem.h b/src/core/qgsdataitem.h index 65f6c4f5b1bd..88249dce1e2a 100644 --- a/src/core/qgsdataitem.h +++ b/src/core/qgsdataitem.h @@ -387,12 +387,12 @@ class CORE_EXPORT QgsLayerItem : public QgsDataItem QStringList mSupportFormats; public: - static const QIcon &iconPoint(); - static const QIcon &iconLine(); - static const QIcon &iconPolygon(); - static const QIcon &iconTable(); - static const QIcon &iconRaster(); - static const QIcon &iconDefault(); + static QIcon iconPoint(); + static QIcon iconLine(); + static QIcon iconPolygon(); + static QIcon iconTable(); + static QIcon iconRaster(); + static QIcon iconDefault(); //! @return the layer name virtual QString layerName() const { return name(); } @@ -411,8 +411,8 @@ class CORE_EXPORT QgsDataCollectionItem : public QgsDataItem void addChild( QgsDataItem *item ) { mChildren.append( item ); } - static const QIcon &iconDir(); // shared icon: open/closed directory - static const QIcon &iconDataCollection(); // default icon for data collection + static QIcon iconDir(); // shared icon: open/closed directory + static QIcon iconDataCollection(); // default icon for data collection }; /** \ingroup core @@ -549,7 +549,7 @@ class CORE_EXPORT QgsFavoritesItem : public QgsDataCollectionItem void removeDirectory( QgsDirectoryItem *item ); //! Icon for favorites group - static const QIcon &iconFavorites(); + static QIcon iconFavorites(); private: QVector createChildren( const QString& favDir ); @@ -572,7 +572,7 @@ class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem QgsZipItem( QgsDataItem* parent, const QString& name, const QString& filePath, const QString& path ); QVector createChildren() override; - const QStringList & getZipFileList(); + QStringList getZipFileList(); //! @note not available via python bindings static QVector mDataItemPtr; @@ -591,7 +591,7 @@ class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem */ static QgsDataItem* itemFromPath( QgsDataItem* parent, const QString& filePath, const QString& name, const QString& path ); - static const QIcon &iconZip(); + static QIcon iconZip(); private: void init(); diff --git a/src/core/qgsexpressionfieldbuffer.h b/src/core/qgsexpressionfieldbuffer.h index 626ab84fc45d..8ac133dc45aa 100644 --- a/src/core/qgsexpressionfieldbuffer.h +++ b/src/core/qgsexpressionfieldbuffer.h @@ -99,7 +99,7 @@ class CORE_EXPORT QgsExpressionFieldBuffer */ void updateFields( QgsFields& flds ); - const QList& expressions() const { return mExpressions; } + QList expressions() const { return mExpressions; } private: QList mExpressions; diff --git a/src/core/qgsgml.h b/src/core/qgsgml.h index 9d8a57ae6f39..5dd8590d5407 100644 --- a/src/core/qgsgml.h +++ b/src/core/qgsgml.h @@ -112,7 +112,7 @@ class CORE_EXPORT QgsGmlStreamingParser int getEPSGCode() const { return mEpsg; } //! Return the value of the srsName attribute - const QString& srsName() const { return mSrsName; } + QString srsName() const { return mSrsName; } //! Return layer bounding box const QgsRectangle& layerExtent() const { return mLayerExtent; } @@ -130,7 +130,7 @@ class CORE_EXPORT QgsGmlStreamingParser bool isException() const { return mIsException; } //! Return the exception text. - const QString& exceptionText() const { return mExceptionText; } + QString exceptionText() const { return mExceptionText; } //! Return whether a "truncatedResponse" element is found bool isTruncatedResponse() const { return mTruncatedResponse; } diff --git a/src/core/qgsnetworkaccessmanager.cpp b/src/core/qgsnetworkaccessmanager.cpp index d41e480e186c..07628fab7ba8 100644 --- a/src/core/qgsnetworkaccessmanager.cpp +++ b/src/core/qgsnetworkaccessmanager.cpp @@ -136,7 +136,7 @@ const QList QgsNetworkAccessManager::proxyFactories() co return mProxyFactories; } -const QStringList &QgsNetworkAccessManager::excludeList() const +QStringList QgsNetworkAccessManager::excludeList() const { return mExcludedURLs; } diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index a95b958935cc..3448630b8771 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -67,7 +67,7 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager const QNetworkProxy &fallbackProxy() const; //! retrieve exclude list (urls shouldn't use the fallback proxy) - const QStringList &excludeList() const; + QStringList excludeList() const; //! set fallback proxy and URL that shouldn't use it. void setFallbackProxyAndExcludes( const QNetworkProxy &proxy, const QStringList &excludes ); diff --git a/src/core/qgsogcutils.h b/src/core/qgsogcutils.h index 5b3014bb9676..cf3b67e16923 100644 --- a/src/core/qgsogcutils.h +++ b/src/core/qgsogcutils.h @@ -313,7 +313,7 @@ class QgsOgcUtilsExprToFilter bool GMLNamespaceUsed() const { return mGMLUsed; } //! Return the error message. - const QString& errorMessage() const { return mErrorMessage; } + QString errorMessage() const { return mErrorMessage; } private: QDomDocument& mDoc; @@ -359,7 +359,7 @@ class QgsOgcUtilsSQLStatementToFilter bool GMLNamespaceUsed() const { return mGMLUsed; } //! Return the error message. - const QString& errorMessage() const { return mErrorMessage; } + QString errorMessage() const { return mErrorMessage; } private: QDomDocument& mDoc; diff --git a/src/core/qgsproviderregistry.cpp b/src/core/qgsproviderregistry.cpp index 88aeb8d7e988..d1c92c994e01 100644 --- a/src/core/qgsproviderregistry.cpp +++ b/src/core/qgsproviderregistry.cpp @@ -328,7 +328,7 @@ void QgsProviderRegistry::setLibraryDirectory( QDir const & path ) init(); } -QDir const & QgsProviderRegistry::libraryDirectory() const +QDir QgsProviderRegistry::libraryDirectory() const { return mLibraryDirectory; } diff --git a/src/core/qgsproviderregistry.h b/src/core/qgsproviderregistry.h index a723d45cf908..f532693ac15a 100644 --- a/src/core/qgsproviderregistry.h +++ b/src/core/qgsproviderregistry.h @@ -62,7 +62,7 @@ class CORE_EXPORT QgsProviderRegistry QString pluginList( bool asHtml = false ) const; //! Return library directory where plugins are found - const QDir & libraryDirectory() const; + QDir libraryDirectory() const; //! Set library directory where to search for plugins void setLibraryDirectory( const QDir & path ); diff --git a/src/core/qgsrelationmanager.cpp b/src/core/qgsrelationmanager.cpp index b8404ccb394d..c877f08040b0 100644 --- a/src/core/qgsrelationmanager.cpp +++ b/src/core/qgsrelationmanager.cpp @@ -40,7 +40,7 @@ void QgsRelationManager::setRelations( const QList& relations ) emit changed(); } -const QMap& QgsRelationManager::relations() const +QMap QgsRelationManager::relations() const { return mRelations; } diff --git a/src/core/qgsrelationmanager.h b/src/core/qgsrelationmanager.h index 23e9f09a04bd..8c67ae84617a 100644 --- a/src/core/qgsrelationmanager.h +++ b/src/core/qgsrelationmanager.h @@ -53,7 +53,7 @@ class CORE_EXPORT QgsRelationManager : public QObject * * @return A QMap where the key is the relation id, the value the relation object. */ - const QMap& relations() const; + QMap relations() const; /** * Add a relation. diff --git a/src/core/qgsvectordataprovider.cpp b/src/core/qgsvectordataprovider.cpp index b383efe57db6..aad903b7d0e6 100644 --- a/src/core/qgsvectordataprovider.cpp +++ b/src/core/qgsvectordataprovider.cpp @@ -318,7 +318,7 @@ QgsAttributeList QgsVectorDataProvider::pkAttributeIndexes() const return QgsAttributeList(); } -const QList< QgsVectorDataProvider::NativeType > &QgsVectorDataProvider::nativeTypes() const +QList QgsVectorDataProvider::nativeTypes() const { return mNativeTypes; } diff --git a/src/core/qgsvectordataprovider.h b/src/core/qgsvectordataprovider.h index c48c877a3ab3..099721d82788 100644 --- a/src/core/qgsvectordataprovider.h +++ b/src/core/qgsvectordataprovider.h @@ -438,7 +438,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider /** * Returns the names of the supported types */ - const QList< NativeType > &nativeTypes() const; + QList< NativeType > nativeTypes() const; /** * Returns true if the provider is strict about the type of inserted features diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index 9da9abb20f04..f5c6bd75d431 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -1245,7 +1245,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * A set of attributes that are not advertised in WMS requests with QGIS server. */ - const QSet& excludeAttributesWms() const { return mExcludeAttributesWMS; } + QSet excludeAttributesWms() const { return mExcludeAttributesWMS; } /** * A set of attributes that are not advertised in WMS requests with QGIS server. @@ -1255,7 +1255,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte /** * A set of attributes that are not advertised in WFS requests with QGIS server. */ - const QSet& excludeAttributesWfs() const { return mExcludeAttributesWFS; } + QSet excludeAttributesWfs() const { return mExcludeAttributesWFS; } /** * A set of attributes that are not advertised in WFS requests with QGIS server. diff --git a/src/core/symbology-ng/qgssvgcache.cpp b/src/core/symbology-ng/qgssvgcache.cpp index 5bafaa1e38f3..450fd2cea986 100644 --- a/src/core/symbology-ng/qgssvgcache.cpp +++ b/src/core/symbology-ng/qgssvgcache.cpp @@ -109,8 +109,8 @@ QgsSvgCache::~QgsSvgCache() } -const QImage& QgsSvgCache::svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ) +QImage QgsSvgCache::svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ) { QMutexLocker locker( &mMutex ); @@ -154,8 +154,8 @@ const QImage& QgsSvgCache::svgAsImage( const QString& file, double size, const Q return *( currentEntry->image ); } -const QPicture& QgsSvgCache::svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput ) +QPicture QgsSvgCache::svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput ) { QMutexLocker locker( &mMutex ); @@ -172,8 +172,8 @@ const QPicture& QgsSvgCache::svgAsPicture( const QString& file, double size, con return *( currentEntry->picture ); } -const QByteArray& QgsSvgCache::svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ) +QByteArray QgsSvgCache::svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor ) { QMutexLocker locker( &mMutex ); diff --git a/src/core/symbology-ng/qgssvgcache.h b/src/core/symbology-ng/qgssvgcache.h index 5fb4c214b224..1c8ab4041272 100644 --- a/src/core/symbology-ng/qgssvgcache.h +++ b/src/core/symbology-ng/qgssvgcache.h @@ -122,8 +122,8 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param rasterScaleFactor raster scale factor * @param fitsInCache */ - const QImage& svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ); + QImage svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ); /** Get SVG as QPicture&. * @param file Absolute or relative path to SVG file. @@ -135,8 +135,8 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param rasterScaleFactor raster scale factor * @param forceVectorOutput */ - const QPicture& svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput = false ); + QPicture svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput = false ); /** Calculates the viewbox size of a (possibly cached) SVG file. * @param file Absolute or relative path to SVG file. @@ -188,8 +188,8 @@ class CORE_EXPORT QgsSvgCache : public QObject QByteArray getImageData( const QString &path ) const; //! Get SVG content - const QByteArray& svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + QByteArray svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, + double widthScaleFactor, double rasterScaleFactor ); signals: //! Emit a signal to be caught by qgisapp and display a msg on status bar diff --git a/src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp b/src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp index af644c244e2b..6c61aaed6ec6 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp +++ b/src/gui/editorwidgets/core/qgseditorwidgetregistry.cpp @@ -179,7 +179,7 @@ QString QgsEditorWidgetRegistry::name( const QString& widgetId ) return QString(); } -const QMap& QgsEditorWidgetRegistry::factories() +QMap QgsEditorWidgetRegistry::factories() { return mWidgetFactories; } diff --git a/src/gui/editorwidgets/core/qgseditorwidgetregistry.h b/src/gui/editorwidgets/core/qgseditorwidgetregistry.h index 3f8936587efe..ce2b257402ad 100644 --- a/src/gui/editorwidgets/core/qgseditorwidgetregistry.h +++ b/src/gui/editorwidgets/core/qgseditorwidgetregistry.h @@ -152,7 +152,7 @@ class GUI_EXPORT QgsEditorWidgetRegistry : public QObject * * @return All ids and factories */ - const QMap& factories(); + QMap factories(); /** * Get a factory for the given widget type id. diff --git a/src/gui/qgsadvanceddigitizingdockwidget.h b/src/gui/qgsadvanceddigitizingdockwidget.h index 63af6ffee66a..156d0a3073ff 100644 --- a/src/gui/qgsadvanceddigitizingdockwidget.h +++ b/src/gui/qgsadvanceddigitizingdockwidget.h @@ -315,7 +315,7 @@ class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private /** * Snapped to a segment */ - const QList& snappedSegment() const { return mSnappedSegment; } + QList snappedSegment() const { return mSnappedSegment; } //! return the action used to enable/disable the tools QAction* enableAction() { return mEnableAction; } diff --git a/src/gui/qgscolorschemelist.cpp b/src/gui/qgscolorschemelist.cpp index e74a841d8c67..8aef744aa5bf 100644 --- a/src/gui/qgscolorschemelist.cpp +++ b/src/gui/qgscolorschemelist.cpp @@ -724,7 +724,7 @@ void QgsColorSwatchDelegate::paint( QPainter *painter, const QStyleOptionViewIte painter->restore(); } -const QPixmap& QgsColorSwatchDelegate::transparentBackground() const +QPixmap QgsColorSwatchDelegate::transparentBackground() const { static QPixmap transpBkgrd; diff --git a/src/gui/qgscolorschemelist.h b/src/gui/qgscolorschemelist.h index 13f0afe4840b..e5972cbe02dd 100644 --- a/src/gui/qgscolorschemelist.h +++ b/src/gui/qgscolorschemelist.h @@ -51,7 +51,7 @@ class GUI_EXPORT QgsColorSwatchDelegate : public QAbstractItemDelegate /** Generates a checkboard pattern for transparent color backgrounds * @returns checkboard pixmap */ - const QPixmap &transparentBackground() const; + QPixmap transparentBackground() const; }; diff --git a/src/gui/qgscolorswatchgrid.cpp b/src/gui/qgscolorswatchgrid.cpp index ae0060edc8c2..ddeac6d83d2d 100644 --- a/src/gui/qgscolorswatchgrid.cpp +++ b/src/gui/qgscolorswatchgrid.cpp @@ -320,7 +320,7 @@ void QgsColorSwatchGrid::draw( QPainter &painter ) } } -const QPixmap& QgsColorSwatchGrid::transparentBackground() +QPixmap QgsColorSwatchGrid::transparentBackground() { static QPixmap transpBkgrd; diff --git a/src/gui/qgscolorswatchgrid.h b/src/gui/qgscolorswatchgrid.h index ac9f00213343..3bd1d9cbd3fd 100644 --- a/src/gui/qgscolorswatchgrid.h +++ b/src/gui/qgscolorswatchgrid.h @@ -143,7 +143,7 @@ class GUI_EXPORT QgsColorSwatchGrid : public QWidget /** Generates a checkboard pattern for transparent color backgrounds * @returns checkboard pixmap */ - const QPixmap &transparentBackground(); + QPixmap transparentBackground(); }; diff --git a/src/gui/qgsgradientstopeditor.cpp b/src/gui/qgsgradientstopeditor.cpp index 3fa46cab0e52..677cf689d8fe 100644 --- a/src/gui/qgsgradientstopeditor.cpp +++ b/src/gui/qgsgradientstopeditor.cpp @@ -376,7 +376,7 @@ void QgsGradientStopEditor::keyPressEvent( QKeyEvent *e ) QWidget::keyPressEvent( e ); } -const QPixmap& QgsGradientStopEditor::transparentBackground() +QPixmap QgsGradientStopEditor::transparentBackground() { static QPixmap transpBkgrd; diff --git a/src/gui/qgsgradientstopeditor.h b/src/gui/qgsgradientstopeditor.h index b56a7dfe5083..c9a54f194206 100644 --- a/src/gui/qgsgradientstopeditor.h +++ b/src/gui/qgsgradientstopeditor.h @@ -139,7 +139,7 @@ class GUI_EXPORT QgsGradientStopEditor : public QWidget /** Generates a checkboard pattern pixmap for use as a background to transparent colors * @returns checkerboard pixmap */ - const QPixmap& transparentBackground(); + QPixmap transparentBackground(); /** Draws a stop marker on the specified painter. * @param painter destination painter diff --git a/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp index 0adb4a41283f..2994b00bcf93 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.cpp @@ -145,7 +145,7 @@ void QgsGeometryAngleCheck::fixError( QgsGeometryCheckError* error, int method, } } -const QStringList& QgsGeometryAngleCheck::getResolutionMethods() const +QStringList QgsGeometryAngleCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Delete node with small angle" ) << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.h b/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.h index 2a51c82c4e54..8ab8c7a30eb0 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryanglecheck.h @@ -29,7 +29,7 @@ class QgsGeometryAngleCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList& messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Minimal angle" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryAngleCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp index 6675a4313dce..a2aa0731cb28 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryareacheck.cpp @@ -217,7 +217,7 @@ bool QgsGeometryAreaCheck::mergeWithNeighbor( QgsFeature& feature, int partIdx, return true; } -const QStringList& QgsGeometryAreaCheck::getResolutionMethods() const +QStringList QgsGeometryAreaCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Merge with neighboring polygon with longest shared edge" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometryareacheck.h b/src/plugins/geometry_checker/checks/qgsgeometryareacheck.h index 67f010f6c986..efeb931d4b9d 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryareacheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryareacheck.h @@ -31,7 +31,7 @@ class QgsGeometryAreaCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList& messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Minimal area" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryAreaCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometrycheck.h b/src/plugins/geometry_checker/checks/qgsgeometrycheck.h index 8520fa4b1647..a40b818df740 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrycheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrycheck.h @@ -77,7 +77,7 @@ class QgsGeometryCheck : public QObject {} virtual void collectErrors( QList& errors, QStringList& messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const = 0; virtual void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const = 0; - virtual const QStringList& getResolutionMethods() const = 0; + virtual QStringList getResolutionMethods() const = 0; virtual QString errorDescription() const = 0; virtual QString errorName() const = 0; CheckType getCheckType() const { return mCheckType; } @@ -115,11 +115,11 @@ class QgsGeometryCheckError virtual QgsRectangle affectedAreaBBox() { return geometry() ? geometry()->boundingBox() : QgsRectangle(); } virtual QString description() const { return mCheck->errorDescription(); } const QgsPointV2& location() const { return mErrorLocation; } - const QVariant& value() const { return mValue; } + QVariant value() const { return mValue; } ValueType valueType() const { return mValueType; } QgsVertexId vidx() const { return mVidx; } Status status() const { return mStatus; } - const QString& resolutionMessage() const { return mResolutionMessage; } + QString resolutionMessage() const { return mResolutionMessage; } void setFixed( int method ) { mStatus = StatusFixed; diff --git a/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp index f732fc892d81..559008bacf68 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.cpp @@ -101,7 +101,7 @@ void QgsGeometryContainedCheck::fixError( QgsGeometryCheckError* error, int meth } } -const QStringList& QgsGeometryContainedCheck::getResolutionMethods() const +QStringList QgsGeometryContainedCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Delete feature" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h b/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h index 5449ad1a07b7..58825f38005d 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrycontainedcheck.h @@ -52,7 +52,7 @@ class QgsGeometryContainedCheck : public QgsGeometryCheck explicit QgsGeometryContainedCheck( QgsFeaturePool* featurePool ) : QgsGeometryCheck( FeatureCheck, featurePool ) {} void collectErrors( QList& errors, QStringList& messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Within" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryContainedCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp index 05ed20558ce5..ec0764b4354d 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.cpp @@ -84,7 +84,7 @@ void QgsGeometryDegeneratePolygonCheck::fixError( QgsGeometryCheckError* error, } } -const QStringList& QgsGeometryDegeneratePolygonCheck::getResolutionMethods() const +QStringList QgsGeometryDegeneratePolygonCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Delete feature" ) << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h b/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h index f5290e471d86..ae976a54e459 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrydegeneratepolygoncheck.h @@ -27,7 +27,7 @@ class QgsGeometryDegeneratePolygonCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureNodeCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Polygon with less than three nodes" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryDegeneratePolygonCheck" ); } diff --git a/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp index bfc7a87d8af7..e51707695253 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.cpp @@ -112,7 +112,7 @@ void QgsGeometryDuplicateCheck::fixError( QgsGeometryCheckError* error, int meth } } -const QStringList& QgsGeometryDuplicateCheck::getResolutionMethods() const +QStringList QgsGeometryDuplicateCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "No action" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h b/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h index bf16e77fba61..c4b2f9e9b11d 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryduplicatecheck.h @@ -28,7 +28,7 @@ class QgsGeometryDuplicateCheckError : public QgsGeometryCheckError : QgsGeometryCheckError( check, featureId, errorLocation, QgsVertexId(), duplicatesString( duplicates ) ) , mDuplicates( duplicates ) { } - const QList& duplicates() const { return mDuplicates; } + QList duplicates() const { return mDuplicates; } bool isEqual( QgsGeometryCheckError* other ) const override { @@ -61,7 +61,7 @@ class QgsGeometryDuplicateCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Duplicate" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryDuplicateCheck" ); } diff --git a/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp index 2d5f10314705..b7b2fee02bd3 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.cpp @@ -110,7 +110,7 @@ void QgsGeometryDuplicateNodesCheck::fixError( QgsGeometryCheckError* error, int } } -const QStringList& QgsGeometryDuplicateNodesCheck::getResolutionMethods() const +QStringList QgsGeometryDuplicateNodesCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Delete duplicate node" ) << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h b/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h index bb83997c4cd2..a4f7c0664c68 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryduplicatenodescheck.h @@ -27,7 +27,7 @@ class QgsGeometryDuplicateNodesCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureNodeCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Duplicate node" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryDuplicateNodesCheck" ); } diff --git a/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp index 1681c7fd4442..e5dad438c0e4 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.cpp @@ -213,7 +213,7 @@ bool QgsGeometryGapCheck::mergeWithNeighbor( QgsGeometryGapCheckError* err, Chan } -const QStringList& QgsGeometryGapCheck::getResolutionMethods() const +QStringList QgsGeometryGapCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Add gap area to neighboring polygon with longest shared edge" ) << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.h b/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.h index fd103d35637d..da5b1bd97a84 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrygapcheck.h @@ -91,7 +91,7 @@ class QgsGeometryGapCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Gap" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryGapCheck" ); } diff --git a/src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp index a5b8813ada27..4a028153c80b 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryholecheck.cpp @@ -76,7 +76,7 @@ void QgsGeometryHoleCheck::fixError( QgsGeometryCheckError* error, int method, i } } -const QStringList& QgsGeometryHoleCheck::getResolutionMethods() const +QStringList QgsGeometryHoleCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Remove hole" ) << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometryholecheck.h b/src/plugins/geometry_checker/checks/qgsgeometryholecheck.h index e151a586d6c4..d10101f0c1b8 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryholecheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryholecheck.h @@ -27,7 +27,7 @@ class QgsGeometryHoleCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Polygon with hole" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryHoleCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp index 1cdc4d4c6984..ccba07896931 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.cpp @@ -80,7 +80,7 @@ void QgsGeometryMultipartCheck::fixError( QgsGeometryCheckError* error, int meth } } -const QStringList& QgsGeometryMultipartCheck::getResolutionMethods() const +QStringList QgsGeometryMultipartCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Convert to single part feature" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h b/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h index 8282bb113c07..51748bbe6b9e 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrymultipartcheck.h @@ -27,7 +27,7 @@ class QgsGeometryMultipartCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Multipart object with only one feature" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryMultipartCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp index 09813549b655..384e9dbb571e 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.cpp @@ -194,7 +194,7 @@ void QgsGeometryOverlapCheck::fixError( QgsGeometryCheckError* error, int method delete interGeom; } -const QStringList& QgsGeometryOverlapCheck::getResolutionMethods() const +QStringList QgsGeometryOverlapCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Remove overlapping area from neighboring polygon with shortest shared edge" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h b/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h index 018d230c525d..ff6aa2b4c31b 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryoverlapcheck.h @@ -64,7 +64,7 @@ class QgsGeometryOverlapCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Overlap" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryOverlapCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp index b1a1ab944167..b71042110999 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.cpp @@ -99,7 +99,7 @@ void QgsGeometrySegmentLengthCheck::fixError( QgsGeometryCheckError* error, int } } -const QStringList& QgsGeometrySegmentLengthCheck::getResolutionMethods() const +QStringList QgsGeometrySegmentLengthCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "No action" ); return methods; diff --git a/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.h b/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.h index 392e948fce35..4b2f82ba88e7 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrysegmentlengthcheck.h @@ -29,7 +29,7 @@ class QgsGeometrySegmentLengthCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Minimal segment length" ); } QString errorName() const override { return QStringLiteral( "QgsGeometrySegmentLengthCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp index 364b458b7aab..a701b78748c3 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.cpp @@ -324,7 +324,7 @@ void QgsGeometrySelfIntersectionCheck::fixError( QgsGeometryCheckError* error, i } } -const QStringList& QgsGeometrySelfIntersectionCheck::getResolutionMethods() const +QStringList QgsGeometrySelfIntersectionCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Split feature into a multi-object feature" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h index 945aab4a25e4..0c23ce263b17 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometryselfintersectioncheck.h @@ -54,7 +54,7 @@ class QgsGeometrySelfIntersectionCheck : public QgsGeometryCheck : QgsGeometryCheck( FeatureNodeCheck, featurePool ) {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Self intersection" ); } QString errorName() const override { return QStringLiteral( "QgsGeometrySelfIntersectionCheck" ); } private: diff --git a/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp index 81f8c091da2f..f061df6b0b3a 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.cpp @@ -155,7 +155,7 @@ void QgsGeometryTypeCheck::fixError( QgsGeometryCheckError* error, int method, i } } -const QStringList& QgsGeometryTypeCheck::getResolutionMethods() const +QStringList QgsGeometryTypeCheck::getResolutionMethods() const { static QStringList methods = QStringList() << tr( "Convert to corresponding multi or single type if possible, otherwise delete feature" ) diff --git a/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h b/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h index e7d978b02f02..6a4ba23fd9a4 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h +++ b/src/plugins/geometry_checker/checks/qgsgeometrytypecheck.h @@ -53,7 +53,7 @@ class QgsGeometryTypeCheck : public QgsGeometryCheck {} void collectErrors( QList& errors, QStringList &messages, QAtomicInt* progressCounter = nullptr, const QgsFeatureIds& ids = QgsFeatureIds() ) const override; void fixError( QgsGeometryCheckError* error, int method, int mergeAttributeIndex, Changes& changes ) const override; - const QStringList& getResolutionMethods() const override; + QStringList getResolutionMethods() const override; QString errorDescription() const override { return tr( "Geometry type" ); } QString errorName() const override { return QStringLiteral( "QgsGeometryTypeCheck" ); } private: diff --git a/src/plugins/geometry_checker/qgsgeometrychecker.h b/src/plugins/geometry_checker/qgsgeometrychecker.h index 695017bdf37c..03db5f18bdcf 100644 --- a/src/plugins/geometry_checker/qgsgeometrychecker.h +++ b/src/plugins/geometry_checker/qgsgeometrychecker.h @@ -41,7 +41,7 @@ class QgsGeometryChecker : public QObject bool fixError( QgsGeometryCheckError *error, int method ); QgsMapLayer* getLayer() const; const QList getChecks() const { return mChecks; } - const QStringList& getMessages() const { return mMessages; } + QStringList getMessages() const { return mMessages; } public slots: void setMergeAttributeIndex( int mergeAttributeIndex ) { mMergeAttributeIndex = mergeAttributeIndex; } diff --git a/src/plugins/gps_importer/qgsbabelformat.cpp b/src/plugins/gps_importer/qgsbabelformat.cpp index f86960b45847..94d0085a3c7d 100644 --- a/src/plugins/gps_importer/qgsbabelformat.cpp +++ b/src/plugins/gps_importer/qgsbabelformat.cpp @@ -33,7 +33,7 @@ QgsBabelFormat::QgsBabelFormat( const QString& name ) } -const QString& QgsBabelFormat::name() const +QString QgsBabelFormat::name() const { return mName; } diff --git a/src/plugins/gps_importer/qgsbabelformat.h b/src/plugins/gps_importer/qgsbabelformat.h index 70df06926bd6..6f6b8d859563 100644 --- a/src/plugins/gps_importer/qgsbabelformat.h +++ b/src/plugins/gps_importer/qgsbabelformat.h @@ -29,7 +29,7 @@ class QgsBabelFormat explicit QgsBabelFormat( const QString& name = "" ); virtual ~QgsBabelFormat() { } - const QString& name() const; + QString name() const; virtual QStringList importCommand( const QString& babel, const QString& featuretype, const QString& input, diff --git a/src/providers/arcgisrest/qgsamsprovider.h b/src/providers/arcgisrest/qgsamsprovider.h index 171b12f9ca2b..5fc85fa4da33 100644 --- a/src/providers/arcgisrest/qgsamsprovider.h +++ b/src/providers/arcgisrest/qgsamsprovider.h @@ -32,7 +32,7 @@ class QgsAmsLegendFetcher : public QgsImageFetcher QgsAmsLegendFetcher( QgsAmsProvider* provider ); void start() override; bool haveImage() const { return mLegendImage.isNull(); } - const QImage& getImage() const { return mLegendImage; } + QImage getImage() const { return mLegendImage; } const QString& errorTitle() const { return mErrorTitle; } const QString& errorMessage() const { return mError; } diff --git a/src/providers/wfs/qgswfsrequest.h b/src/providers/wfs/qgswfsrequest.h index 6dfe312fcd5e..5ea008993dce 100644 --- a/src/providers/wfs/qgswfsrequest.h +++ b/src/providers/wfs/qgswfsrequest.h @@ -49,10 +49,10 @@ class QgsWfsRequest : public QObject ErrorCode errorCode() const { return mErrorCode; } //! \brief Return error message (after download/post) - const QString& errorMessage() const { return mErrorMessage; } + QString errorMessage() const { return mErrorMessage; } //! \brief Return server response (after download/post) - const QByteArray& response() const { return mResponse; } + QByteArray response() const { return mResponse; } public slots: //! Abort network request immediately diff --git a/src/server/qgsbufferserverresponse.h b/src/server/qgsbufferserverresponse.h index 3e4fc8ff32c6..04f82ae26d22 100644 --- a/src/server/qgsbufferserverresponse.h +++ b/src/server/qgsbufferserverresponse.h @@ -63,12 +63,12 @@ class QgsBufferServerResponse: public QgsServerResponse /** * Return body */ - const QByteArray& body() const { return mBody; } + QByteArray body() const { return mBody; } /** * Return header's map */ - const QMap& headers() const { return mHeaders; } + QMap headers() const { return mHeaders; } /** * Return the status code diff --git a/src/server/qgsserverprojectparser.h b/src/server/qgsserverprojectparser.h index 462bab1da94a..25096834886a 100644 --- a/src/server/qgsserverprojectparser.h +++ b/src/server/qgsserverprojectparser.h @@ -74,9 +74,9 @@ class SERVER_EXPORT QgsServerProjectParser QStringList supportedOutputCrsList() const; - const QList& projectLayerElements() const { return mProjectLayerElements; } + QList projectLayerElements() const { return mProjectLayerElements; } - const QList& legendGroupElements() const { return mLegendGroupElements; } + QList legendGroupElements() const { return mLegendGroupElements; } QString projectTitle() const; @@ -84,11 +84,11 @@ class SERVER_EXPORT QgsServerProjectParser QDomElement propertiesElem() const; - const QSet& restrictedLayers() const { return mRestrictedLayers; } + QSet restrictedLayers() const { return mRestrictedLayers; } bool useLayerIds() const { return mUseLayerIDs; } - const QHash< QString, QDomElement >& projectLayerElementsByName() const { return mProjectLayerElementsByName; } - const QHash< QString, QDomElement >& projectLayerElementsById() const { return mProjectLayerElementsById; } + QHash< QString, QDomElement > projectLayerElementsByName() const { return mProjectLayerElementsByName; } + QHash< QString, QDomElement > projectLayerElementsById() const { return mProjectLayerElementsById; } void layerFromLegendLayer( const QDomElement& legendLayerElem, QMap< int, QgsMapLayer*>& layers, bool useCache = true ) const; diff --git a/src/server/qgssldconfigparser.cpp b/src/server/qgssldconfigparser.cpp index 005f6e774a65..cb04cafa92fe 100644 --- a/src/server/qgssldconfigparser.cpp +++ b/src/server/qgssldconfigparser.cpp @@ -655,7 +655,7 @@ double QgsSLDConfigParser::legendSymbolHeight() const return 0; } -const QFont& QgsSLDConfigParser::legendLayerFont() const +QFont QgsSLDConfigParser::legendLayerFont() const { if ( mFallbackParser ) { @@ -664,7 +664,7 @@ const QFont& QgsSLDConfigParser::legendLayerFont() const return mLegendLayerFont; } -const QFont& QgsSLDConfigParser::legendItemFont() const +QFont QgsSLDConfigParser::legendItemFont() const { if ( mFallbackParser ) { diff --git a/src/server/qgssldconfigparser.h b/src/server/qgssldconfigparser.h index 7c0682ac2731..2a1449f9c698 100644 --- a/src/server/qgssldconfigparser.h +++ b/src/server/qgssldconfigparser.h @@ -100,8 +100,8 @@ class SERVER_EXPORT QgsSLDConfigParser : public QgsWmsConfigParser double legendIconLabelSpace() const override; double legendSymbolWidth() const override; double legendSymbolHeight() const override; - const QFont& legendLayerFont() const override; - const QFont& legendItemFont() const override; + QFont legendLayerFont() const override; + QFont legendItemFont() const override; double maxWidth() const override; double maxHeight() const override; diff --git a/src/server/qgswmsconfigparser.h b/src/server/qgswmsconfigparser.h index 6c3e2dfab2cb..71ed7eadb7c1 100644 --- a/src/server/qgswmsconfigparser.h +++ b/src/server/qgswmsconfigparser.h @@ -105,8 +105,8 @@ class SERVER_EXPORT QgsWmsConfigParser virtual double legendIconLabelSpace() const = 0; virtual double legendSymbolWidth() const = 0; virtual double legendSymbolHeight() const = 0; - virtual const QFont& legendLayerFont() const = 0; - virtual const QFont& legendItemFont() const = 0; + virtual QFont legendLayerFont() const = 0; + virtual QFont legendItemFont() const = 0; virtual double maxWidth() const = 0; virtual double maxHeight() const = 0; diff --git a/src/server/qgswmsprojectparser.cpp b/src/server/qgswmsprojectparser.cpp index ed06b8ce4a29..75fb6a2bf67e 100644 --- a/src/server/qgswmsprojectparser.cpp +++ b/src/server/qgswmsprojectparser.cpp @@ -379,12 +379,12 @@ double QgsWmsProjectParser::legendSymbolHeight() const return legendElem.isNull() ? 4.0 : legendElem.attribute( QStringLiteral( "symbolHeight" ) ).toDouble(); } -const QFont& QgsWmsProjectParser::legendLayerFont() const +QFont QgsWmsProjectParser::legendLayerFont() const { return mLegendLayerFont; } -const QFont& QgsWmsProjectParser::legendItemFont() const +QFont QgsWmsProjectParser::legendItemFont() const { return mLegendItemFont; } diff --git a/src/server/qgswmsprojectparser.h b/src/server/qgswmsprojectparser.h index baa30cf34dfb..781322a9734a 100644 --- a/src/server/qgswmsprojectparser.h +++ b/src/server/qgswmsprojectparser.h @@ -62,8 +62,8 @@ class SERVER_EXPORT QgsWmsProjectParser : public QgsWmsConfigParser double legendIconLabelSpace() const override; double legendSymbolWidth() const override; double legendSymbolHeight() const override; - const QFont& legendLayerFont() const override; - const QFont& legendItemFont() const override; + QFont legendLayerFont() const override; + QFont legendItemFont() const override; double maxWidth() const override; double maxHeight() const override; From b5480633e40684c9c8b3ec4c48953849fea76f02 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Jan 2017 12:52:30 +1000 Subject: [PATCH 041/332] Standardise names for static variables All non-const variables are prefixed with "s", all const statics are ALL_CAPS --- doc/api_break.dox | 30 ++ python/core/__init__.py | 4 +- python/core/qgis.sip | 10 +- python/core/qgsdataitem.sip | 2 +- python/core/qgsfeaturerequest.sip | 2 +- .../symbology-ng/qgscolorbrewerpalette.sip | 2 +- .../qgsgraduatedsymbolrenderer.sip | 4 +- .../qgsfeaturelistviewdelegate.sip | 2 +- python/gui/qgsexpressionbuilderwidget.sip | 4 +- python/sip_helpers/qgissiphelper.cpp | 8 +- scripts/process_contexthelp.py | 6 +- scripts/process_function_template.py | 8 +- .../interpolation/DualEdgeTriangulation.cc | 4 +- .../interpolation/DualEdgeTriangulation.h | 10 +- src/analysis/interpolation/NormVecDecorator.h | 6 +- src/app/main.cpp | 26 +- src/app/nodetool/qgsnodeeditor.cpp | 10 +- src/app/nodetool/qgsselectedfeature.h | 2 +- src/app/qgisapp.cpp | 66 ++--- src/app/qgisapp.h | 4 +- src/app/qgscustomization.cpp | 14 +- src/app/qgscustomization.h | 4 +- src/app/qgsmergeattributesdialog.cpp | 4 +- src/app/qgsmergeattributesdialog.h | 2 +- src/app/qgsoptions.h | 4 +- src/app/qgspluginregistry.cpp | 8 +- src/app/qgspluginregistry.h | 2 +- src/app/qgsstatisticalsummarydockwidget.cpp | 18 +- src/app/qgsstatisticalsummarydockwidget.h | 6 +- src/auth/basic/qgsauthbasicmethod.cpp | 12 +- src/auth/basic/qgsauthbasicmethod.h | 2 +- src/auth/identcert/qgsauthidentcertmethod.cpp | 16 +- src/auth/identcert/qgsauthidentcertmethod.h | 2 +- src/auth/pkipaths/qgsauthpkipathsmethod.cpp | 16 +- src/auth/pkipaths/qgsauthpkipathsmethod.h | 2 +- src/auth/pkipkcs12/qgsauthpkcs12method.cpp | 16 +- src/auth/pkipkcs12/qgsauthpkcs12method.h | 2 +- src/core/auth/qgsauthconfig.cpp | 28 +- src/core/auth/qgsauthconfig.h | 10 +- src/core/auth/qgsauthmanager.cpp | 28 +- src/core/auth/qgsauthmanager.h | 40 +-- src/core/composer/qgscomposermodel.cpp | 11 +- src/core/dxf/qgsdxfexport.cpp | 12 +- src/core/dxf/qgsdxfexport.h | 2 +- .../qgsdatetimefieldformatter.cpp | 12 +- .../qgsdatetimefieldformatter.h | 6 +- .../qgsvaluemapfieldformatter.cpp | 4 +- .../qgsvaluemapfieldformatter.h | 2 +- src/core/geometry/qgsgeos.h | 2 +- src/core/geometry/qgswkbtypes.cpp | 10 +- src/core/geometry/qgswkbtypes.h | 2 +- src/core/gps/parse.c | 14 +- .../layertree/qgslayertreemodellegendnode.cpp | 6 +- .../layertree/qgslayertreemodellegendnode.h | 2 +- src/core/qgis.cpp | 10 +- src/core/qgis.h | 14 +- src/core/qgsconnectionpool.h | 2 +- src/core/qgscontexthelp.cpp | 14 +- src/core/qgscontexthelp.h | 4 +- src/core/qgscoordinatereferencesystem.cpp | 192 ++++++------- src/core/qgscoordinatereferencesystem.h | 24 +- src/core/qgscredentials.cpp | 10 +- src/core/qgscredentials.h | 2 +- src/core/qgscrscache.cpp | 4 +- src/core/qgsdataitem.cpp | 54 ++-- src/core/qgsdataitem.h | 6 +- src/core/qgsexpression.cpp | 212 +++++++------- src/core/qgsexpression.h | 16 +- src/core/qgsfeaturerequest.cpp | 6 +- src/core/qgsfeaturerequest.h | 2 +- src/core/qgsnetworkaccessmanager.cpp | 16 +- src/core/qgsnetworkaccessmanager.h | 2 +- src/core/qgsnetworkdiskcache.cpp | 60 ++-- src/core/qgsnetworkdiskcache.h | 4 +- src/core/qgsogcutils.cpp | 20 +- src/core/qgspallabeling.cpp | 2 +- src/core/qgspallabeling.h | 2 +- src/core/qgsproject.cpp | 22 +- src/core/qgspythonrunner.cpp | 16 +- src/core/qgspythonrunner.h | 2 +- src/core/qgsscalecalculator.cpp | 10 +- src/core/qgsslconnect.cpp | 14 +- src/core/qgsslconnect.h | 2 +- src/core/qgssqliteexpressioncompiler.cpp | 4 +- src/core/qgssqlstatement.cpp | 22 +- src/core/qgssqlstatement.h | 6 +- src/core/qgsvectordataprovider.cpp | 10 +- src/core/qgsvectordataprovider.h | 2 +- src/core/raster/qgsrasterblock.cpp | 8 +- src/core/raster/qgsrasterblock.h | 2 +- src/core/raster/qgsrasterdataprovider.h | 3 - .../symbology-ng/qgscolorbrewerpalette.cpp | 2 +- src/core/symbology-ng/qgscolorbrewerpalette.h | 8 +- src/core/symbology-ng/qgscptcityarchive.cpp | 36 +-- src/core/symbology-ng/qgscptcityarchive.h | 6 +- src/core/symbology-ng/qgsfillsymbollayer.cpp | 12 +- .../qgsgraduatedsymbolrenderer.cpp | 6 +- .../symbology-ng/qgsgraduatedsymbolrenderer.h | 4 +- src/core/symbology-ng/qgslinesymbollayer.cpp | 2 +- .../symbology-ng/qgsmarkersymbollayer.cpp | 2 +- src/core/symbology-ng/qgsmarkersymbollayer.h | 2 +- src/core/symbology-ng/qgsstyle.cpp | 16 +- src/core/symbology-ng/qgsstyle.h | 2 +- src/core/symbology-ng/qgssvgcache.cpp | 4 +- src/core/symbology-ng/qgssvgcache.h | 4 +- src/core/symbology-ng/qgssymbollayer.h | 9 +- .../qgsfeaturelistviewdelegate.cpp | 20 +- .../qgsfeaturelistviewdelegate.h | 2 +- .../editorwidgets/qgsdatetimeeditconfig.cpp | 12 +- .../editorwidgets/qgsvaluemapconfigdlg.cpp | 10 +- .../qgsvaluemapsearchwidgetwrapper.cpp | 2 +- .../qgsvaluemapwidgetwrapper.cpp | 4 +- .../qgseffectstackpropertieswidget.cpp | 4 +- src/gui/qgsadvanceddigitizingdockwidget.cpp | 4 +- src/gui/qgsadvanceddigitizingdockwidget.h | 4 +- src/gui/qgscolorbutton.cpp | 8 +- src/gui/qgscolorschemelist.cpp | 8 +- src/gui/qgscolorswatchgrid.cpp | 8 +- src/gui/qgscolorwidgets.cpp | 8 +- src/gui/qgscomposerruler.cpp | 10 +- src/gui/qgscomposerruler.h | 4 +- src/gui/qgsexpressionbuilderwidget.cpp | 12 +- src/gui/qgsexpressionbuilderwidget.h | 8 +- src/gui/qgsgradientstopeditor.cpp | 8 +- src/gui/qgsmaplayeractionregistry.cpp | 8 +- src/gui/qgsmaplayeractionregistry.h | 2 +- src/gui/qgsrasterformatsaveoptionswidget.cpp | 36 +-- src/gui/qgsrasterformatsaveoptionswidget.h | 2 +- src/gui/qgsshortcutsmanager.cpp | 8 +- src/gui/qgsshortcutsmanager.h | 2 +- .../qgsgraduatedsymbolrendererwidget.cpp | 4 +- .../symbology-ng/qgssymbolselectordialog.cpp | 4 +- .../checks/qgsgeometrycheck.cpp | 4 +- .../qgsgeometrycheckfactory.h | 4 +- .../geometry_checker/utils/qgsfeaturepool.cpp | 2 +- .../geometry_checker/utils/qgsfeaturepool.h | 2 +- src/plugins/grass/qgsgrassplugin.cpp | 2 +- src/plugins/grass/qgsgrassselect.cpp | 62 ++-- src/plugins/grass/qgsgrassselect.h | 14 +- .../spatialquery/qgsspatialquerydialog.cpp | 6 +- .../qgsdelimitedtextprovider.cpp | 10 +- .../delimitedtext/qgsdelimitedtextprovider.h | 4 +- .../qgsdelimitedtextsourceselect.cpp | 4 +- src/providers/gdal/qgsgdaldataitems.cpp | 30 +- src/providers/gpx/qgsgpxprovider.cpp | 8 +- src/providers/gpx/qgsgpxprovider.h | 4 +- src/providers/grass/qgis.v.in.cpp | 16 +- src/providers/grass/qgsgrass.cpp | 158 +++++------ src/providers/grass/qgsgrass.h | 24 +- src/providers/grass/qgsgrassprovider.cpp | 4 +- src/providers/grass/qgsgrassprovider.h | 2 +- .../grass/qgsgrassprovidermodule.cpp | 30 +- src/providers/grass/qgsgrassprovidermodule.h | 4 +- src/providers/grass/qgsgrassvectormap.cpp | 10 +- src/providers/grass/qgsgrassvectormap.h | 4 +- src/providers/ogr/qgsogrconnpool.cpp | 10 +- src/providers/ogr/qgsogrconnpool.h | 2 +- src/providers/ogr/qgsogrprovider.cpp | 268 +++++++++--------- src/providers/postgres/qgspostgresconn.cpp | 4 +- src/providers/postgres/qgspostgresconn.h | 2 +- .../qgspostgresexpressioncompiler.cpp | 4 +- .../postgres/qgspostgresfeatureiterator.cpp | 4 +- .../postgres/qgspostgresfeatureiterator.h | 2 +- src/providers/postgres/qgspostgresprovider.h | 6 +- .../spatialite/qgsspatialiteconnection.cpp | 18 +- .../spatialite/qgsspatialiteconnection.h | 2 +- src/providers/virtual/qgsvirtuallayerblob.cpp | 8 +- src/providers/virtual/qgsvirtuallayerblob.h | 2 +- .../virtual/qgsvirtuallayersqlitemodule.cpp | 8 +- src/providers/wcs/qgswcsdataitems.cpp | 4 - src/providers/wfs/qgswfsshareddata.cpp | 12 +- src/providers/wfs/qgswfsutils.cpp | 24 +- src/providers/wfs/qgswfsutils.h | 4 +- src/server/qgsconfigcache.cpp | 8 +- src/server/qgsmslayercache.cpp | 8 +- src/server/qgsserverlogger.cpp | 8 +- src/server/qgsserverlogger.h | 2 +- src/server/services/DummyService/dummy.cpp | 4 +- src/server/services/wms/qgswms.cpp | 4 +- tests/bench/main.cpp | 8 +- tests/src/core/testqgsauthconfig.cpp | 18 +- tests/src/core/testqgsauthcrypto.cpp | 58 ++-- .../core/testqgscoordinatereferencesystem.cpp | 36 +-- tests/src/core/testqgsexpression.cpp | 6 +- tests/src/core/testqgslegendrenderer.cpp | 4 +- tests/src/python/test_qgsexpression.py | 2 +- .../python/test_qgsgraduatedsymbolrenderer.py | 4 +- 187 files changed, 1307 insertions(+), 1304 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index bd72c52f8715..cfd8c0cbf617 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -475,6 +475,11 @@ QgsColorBrewerColorRampDialog {#qgis_api_break_3_0_QgsColorBrewerColorRam and the new ramp can be retrieved after executing the dialog by calling ramp(). - Some internal methods which were previously public or protected were made private. +QgsColorBrewerPalette {#qgis_api_break_3_0_QgsColorBrewerPalette} +--------------------- + +- brewerString was renamed to BREWER_STRING + QgsColorButton {#qgis_api_break_3_0_QgsColorButton} -------------- @@ -902,6 +907,11 @@ QgsExpression::Function {#qgis_api_break_3_0_QgsExpression_Function} - `QStringList QgsExpression::Function::referencedColumns()` has been changed to `QSet QgsExpression::Function::referencedColumns( const NodeFunction* node )` - `QgsExpression::Function::helptext()` has been renamed to `helpText()` +QgsExpressionItem {#qgis_api_break_3_0_QgsExpressionItem} +----------------- + +- CustomSortRole was renamed to CUSTOM_SORT_ROLE +- ItemTypeRole was renamed to ITEM_TYPE_ROLE QgsExpressionContextUtils {#qgis_api_break_3_0_QgsExpressionContextUtils} ------------------------- @@ -924,6 +934,11 @@ None will need to be modified, as the method will return an empty geometry if th - fields() no longer returns a pointer, but instead a QgsFields value. - The duplicate method setFeatureId() was removed. Use setId() instead. +QgsFeatureListViewDelegate {#qgis_api_break_3_0_QgsFeatureListViewDelegate} +-------------------------- + +- sIconSize was rename to ICON_SIZE + QgsFeatureRendererV2 {#qgis_api_break_3_0_QgsFeatureRendererV2} -------------------- @@ -940,6 +955,10 @@ QgsFeatureRendererV2 {#qgis_api_break_3_0_QgsFeatureRendererV2} - originalSymbolsForFeature( QgsFeature& feat ) has been removed. The originalSymbolsForFeature( QgsFeature& feat, QgsRenderContext& context ) method should be used instead (previously available as originalSymbolsForFeature2 in PyQGIS bindings). - copyPaintEffect() was removed. copyRendererData() should be used instead. +QgsFeatureRequest {#qgis_api_break_3_0_QgsFeatureRequest} +----------------- + +- AllAttributes was renamed to ALL_ATTRIBUTES QgsFieldCombobox {#qgis_api_break_3_0_QgsFieldCombobox} ---------------- @@ -1512,6 +1531,12 @@ QgsRenderContext {#qgis_api_break_3_0_QgsRenderContext} be returned instead of a null pointer if no transformation is required. - setCoordinateTransform() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required. +QgsRendererRangeLabelFormat {#qgis_api_break_3_0_QgsRendererRangeLabelFormat} +--------------------------- + +- MaxPrecision was renamed to MAX_PRECISION +- MinPrecision was renamed to MIN_PRECISION + QgsRendererRegistry {#qgis_api_break_3_0_QgsRendererRegistry} ---------------------- @@ -1830,6 +1855,11 @@ QgsWMSLegendNode {#qgis_api_break_3_0_QgsWMSLegendNode} - QgsWMSLegendNode has been renamed to QgsWmsLegendNode +QgsZipItem {#qgis_api_break_3_0_QgsZipItem} +---------- + +- mProviderNames was rename to sProviderNames + QgsRenderer {#qgis_api_break_3_0_QgsRenderer} ----------- diff --git a/python/core/__init__.py b/python/core/__init__.py index c93d67c2d6e1..5a489af6fe6e 100644 --- a/python/core/__init__.py +++ b/python/core/__init__.py @@ -42,7 +42,7 @@ def _geometryNonZero(self): QgsGeometry.__bool__ = _geometryNonZero -def register_function(function, arg_count, group, usesgeometry=False, referenced_columns=[QgsFeatureRequest.AllAttributes], **kwargs): +def register_function(function, arg_count, group, usesgeometry=False, referenced_columns=[QgsFeatureRequest.ALL_ATTRIBUTES], **kwargs): """ Register a Python function to be used as a expression function. @@ -71,7 +71,7 @@ def myfunc(values, *args): """ class QgsExpressionFunction(QgsExpression.Function): - def __init__(self, func, name, args, group, helptext='', usesGeometry=True, referencedColumns=QgsFeatureRequest.AllAttributes, expandargs=False): + def __init__(self, func, name, args, group, helptext='', usesGeometry=True, referencedColumns=QgsFeatureRequest.ALL_ATTRIBUTES, expandargs=False): QgsExpression.Function.__init__(self, name, args, group, helptext) self.function = func self.expandargs = expandargs diff --git a/python/core/qgis.sip b/python/core/qgis.sip index e7523b616cf5..2278bda92314 100644 --- a/python/core/qgis.sip +++ b/python/core/qgis.sip @@ -31,11 +31,11 @@ class Qgis // Version constants // // Version string - static QString QGIS_VERSION; + static const QString QGIS_VERSION; // Version number used for comparing versions using the "Check QGIS Version" function static const int QGIS_VERSION_INT; // Release name - static QString QGIS_RELEASE_NAME; + static const QString QGIS_RELEASE_NAME; // The development version static const char* QGIS_DEV_VERSION; @@ -91,17 +91,17 @@ class Qgis /** Default highlight buffer in mm. * @note added in 2.3 */ - static double DEFAULT_HIGHLIGHT_BUFFER_MM; + static const double DEFAULT_HIGHLIGHT_BUFFER_MM; /** Default highlight line/outline minimum width in mm. * @note added in 2.3 */ - static double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM; + static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM; /** Fudge factor used to compare two scales. The code is often going from scale to scale * denominator. So it looses precision and, when a limit is inclusive, can lead to errors. * To avoid that, use this factor instead of using <= or >=. * @note added in 2.15*/ - static double SCALE_PRECISION; + static const double SCALE_PRECISION; }; /** Converts a string to a double in a permissive way, e.g., allowing for incorrect diff --git a/python/core/qgsdataitem.sip b/python/core/qgsdataitem.sip index 817db82cfc1a..3802817aab57 100644 --- a/python/core/qgsdataitem.sip +++ b/python/core/qgsdataitem.sip @@ -496,7 +496,7 @@ class QgsZipItem : QgsDataCollectionItem //! @note not available via python bindings // static QVector mDataItemPtr; - static QStringList mProviderNames; + static QStringList sProviderNames; static QString vsiPrefix( const QString& uri ); diff --git a/python/core/qgsfeaturerequest.sip b/python/core/qgsfeaturerequest.sip index 40d7f50e305f..b82ec2a8ab36 100644 --- a/python/core/qgsfeaturerequest.sip +++ b/python/core/qgsfeaturerequest.sip @@ -155,7 +155,7 @@ class QgsFeatureRequest /** * A special attribute that if set matches all attributes */ - static const QString AllAttributes; + static const QString ALL_ATTRIBUTES; //! construct a default request: for all features get attributes and geometries QgsFeatureRequest(); diff --git a/python/core/symbology-ng/qgscolorbrewerpalette.sip b/python/core/symbology-ng/qgscolorbrewerpalette.sip index 9780f6520515..6624852c9f1b 100644 --- a/python/core/symbology-ng/qgscolorbrewerpalette.sip +++ b/python/core/symbology-ng/qgscolorbrewerpalette.sip @@ -11,5 +11,5 @@ class QgsColorBrewerPalette static QList listSchemeVariants( const QString& schemeName ); // extracted ColorBrewer data - static const char *brewerString; + static const char * BREWER_STRING; }; diff --git a/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip b/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip index 6015562b2157..30eedbd47d0e 100644 --- a/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip +++ b/python/core/symbology-ng/qgsgraduatedsymbolrenderer.sip @@ -76,8 +76,8 @@ class QgsRendererRangeLabelFormat void setFromDomElement( QDomElement &element ); void saveToDomElement( QDomElement &element ); - static const int MaxPrecision; - static const int MinPrecision; + static const int MAX_PRECISION; + static const int MIN_PRECISION; }; diff --git a/python/gui/attributetable/qgsfeaturelistviewdelegate.sip b/python/gui/attributetable/qgsfeaturelistviewdelegate.sip index c68e94fdab04..d3e1196ccb29 100644 --- a/python/gui/attributetable/qgsfeaturelistviewdelegate.sip +++ b/python/gui/attributetable/qgsfeaturelistviewdelegate.sip @@ -4,7 +4,7 @@ class QgsFeatureListViewDelegate : QItemDelegate #include %End public: - static const int sIconSize; + static const int ICON_SIZE; enum Element { diff --git a/python/gui/qgsexpressionbuilderwidget.sip b/python/gui/qgsexpressionbuilderwidget.sip index d1e2f86d1e35..b48d42b09b26 100644 --- a/python/gui/qgsexpressionbuilderwidget.sip +++ b/python/gui/qgsexpressionbuilderwidget.sip @@ -43,9 +43,9 @@ class QgsExpressionItem : QStandardItem QgsExpressionItem::ItemType getItemType() const; //! Custom sort order role - static const int CustomSortRole; + static const int CUSTOM_SORT_ROLE; //! Item type role - static const int ItemTypeRole; + static const int ITEM_TYPE_ROLE; }; /** Search proxy used to filter the QgsExpressionBuilderWidget tree. diff --git a/python/sip_helpers/qgissiphelper.cpp b/python/sip_helpers/qgissiphelper.cpp index 1058fe89139c..734a9fbeb76a 100644 --- a/python/sip_helpers/qgissiphelper.cpp +++ b/python/sip_helpers/qgissiphelper.cpp @@ -24,9 +24,9 @@ bool null_from_qvariant_converter( const QVariant *varp, PyObject **objp ) { - static bool watchdog = false; + static bool sWatchDog = false; - if ( watchdog ) + if ( sWatchDog ) return false; // If we deal with a NULL QVariant (and it's not a QByteArray which properly @@ -35,10 +35,10 @@ bool null_from_qvariant_converter( const QVariant *varp, PyObject **objp ) // instead of a blacklist. if ( varp->isNull() && varp->type() != QVariant::ByteArray ) { - watchdog = true; + sWatchDog = true; PyObject* vartype = sipConvertFromEnum( varp->type(), sipType_QVariant_Type ); *objp = PyObject_Call(( PyObject * )sipTypeAsPyTypeObject( sipType_QVariant ), PyTuple_Pack( 1, vartype ), nullptr ); - watchdog = false; + sWatchDog = false; return true; } else diff --git a/scripts/process_contexthelp.py b/scripts/process_contexthelp.py index 221e5d7d8d3d..322ef204ffe3 100644 --- a/scripts/process_contexthelp.py +++ b/scripts/process_contexthelp.py @@ -6,11 +6,11 @@ cpp.write( "#include \"qgscontexthelp.h\"\n" "#include \n\n" - "QHash QgsContextHelp::gContextHelpTexts;\n" + "QHash QgsContextHelp::sContextHelpTexts;\n" "\n" "void QgsContextHelp::init()\n" "{\n" - " if( !gContextHelpTexts.isEmpty() )\n" + " if( !sContextHelpTexts.isEmpty() )\n" " return;\n" ) @@ -20,7 +20,7 @@ # Protect from IOError: [Errno 21] Is a directory continue with open(f) as content: - cpp.write("\n gContextHelpTexts.insert( \"{0}\", QCoreApplication::translate( \"context_help\", \"{1}\") );".format( + cpp.write("\n sContextHelpTexts.insert( \"{0}\", QCoreApplication::translate( \"context_help\", \"{1}\") );".format( n, content.read().replace("\\", "\").replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n"\n\"'))) cpp.write("\n}\n") diff --git a/scripts/process_function_template.py b/scripts/process_function_template.py index 92e885dce1c1..093f9aeb4828 100644 --- a/scripts/process_function_template.py +++ b/scripts/process_function_template.py @@ -14,11 +14,11 @@ cpp.write( "#include \"qgsexpression.h\"\n" "\n" - "QHash QgsExpression::gFunctionHelpTexts;\n" + "QHash QgsExpression::sFunctionHelpTexts;\n" "\n" "void QgsExpression::initFunctionHelp()\n" "{\n" - " if( !gFunctionHelpTexts.isEmpty() )\n" + " if( !sFunctionHelpTexts.isEmpty() )\n" " return;" ) @@ -76,7 +76,7 @@ def quote(v): if len(list(v['arguments'])) < 1 or len(list(v['arguments'])) > 2: raise BaseException("%s: 1 or 2 arguments expected for operator") - cpp.write("\n\n gFunctionHelpTexts.insert( {0},\n Help( {0}, tr( \"{1}\" ), tr( \"{2}\" ),\n QList()".format( + cpp.write("\n\n sFunctionHelpTexts.insert( {0},\n Help( {0}, tr( \"{1}\" ), tr( \"{2}\" ),\n QList()".format( name, json_params['type'], json_params['description']) ) @@ -119,7 +119,7 @@ def quote(v): n = os.path.basename(f) with open(f) as content: - cpp.write("\n\n gFunctionHelpTexts.insert( \"{0}\",\n Help( tr( \"{0}\" ), tr( \"group\" ), tr( \"{1}\" ), QList() ) );\n".format( + cpp.write("\n\n sFunctionHelpTexts.insert( \"{0}\",\n Help( tr( \"{0}\" ), tr( \"group\" ), tr( \"{1}\" ), QList() ) );\n".format( n, content.read().replace("\\", "\").replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n'))) cpp.write("\n}\n") diff --git a/src/analysis/interpolation/DualEdgeTriangulation.cc b/src/analysis/interpolation/DualEdgeTriangulation.cc index bff234b2d98c..c4c22a821055 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.cc +++ b/src/analysis/interpolation/DualEdgeTriangulation.cc @@ -487,7 +487,7 @@ int DualEdgeTriangulation::baseEdgeOfTriangle( Point3D* point ) while ( true ) { - if ( runs > sNumBaseOfRuns )//prevents endless loops + if ( runs > MAX_BASE_ITERATIONS )//prevents endless loops { // QgsDebugMsg("warning, probable endless loop detected"); return -100; @@ -2606,7 +2606,7 @@ bool DualEdgeTriangulation::pointInside( double x, double y ) while ( true ) { - if ( runs > sNumBaseOfRuns )//prevents endless loops + if ( runs > MAX_BASE_ITERATIONS )//prevents endless loops { QgsDebugMsg( QString( "warning, instability detected: Point coordinates: %1//%2" ).arg( x ).arg( y ) ); return false; diff --git a/src/analysis/interpolation/DualEdgeTriangulation.h b/src/analysis/interpolation/DualEdgeTriangulation.h index 5ef41fd88cd0..e09d189075cb 100644 --- a/src/analysis/interpolation/DualEdgeTriangulation.h +++ b/src/analysis/interpolation/DualEdgeTriangulation.h @@ -114,11 +114,11 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation //! Y-coordinate of the lower left corner of the bounding box double yMin; //! Default value for the number of storable points at the beginning - const static unsigned int mDefaultStorageForPoints = 100000; + static const unsigned int DEFAULT_STORAGE_FOR_POINTS = 100000; //! Stores pointers to all points in the triangulations (including the points contained in the lines) QVector mPointVector; //! Default value for the number of storable HalfEdges at the beginning - const static unsigned int mDefaultStorageForHalfEdges = 300006; + static const unsigned int DEFAULT_STORAGE_FOR_HALF_EDGES = 300006; //! Stores pointers to the HalfEdges QVector mHalfEdge; //! Association to an interpolator object @@ -140,7 +140,7 @@ class ANALYSIS_EXPORT DualEdgeTriangulation: public Triangulation //! Threshold for the leftOfTest to handle numerical instabilities //const static double leftOfTresh=0.00001; //! Security to prevent endless loops in 'baseEdgeOfTriangle'. It there are more iteration then this number, the point will not be inserted - const static int sNumBaseOfRuns = 300000; + static const int MAX_BASE_ITERATIONS = 300000; //! Returns the number of an edge which points to the point with number 'point' or -1 if there is an error int baseEdgeOfPoint( int point ); //! Returns the number of a HalfEdge from a triangle in which 'point' is in. If the number -10 is returned, this means, that 'point' is outside the convex hull. If -5 is returned, then numerical problems with the leftOfTest occurred (and the value of the possible edge is stored in the variable 'mUnstableEdge'. -20 means, that the inserted point is exactly on an edge (the number is stored in the variable 'mEdgeWithPoint'). -25 means, that the point is already in the triangulation (the number of the point is stored in the member 'mTwiceInsPoint'. If -100 is returned, this means that something else went wrong @@ -194,8 +194,8 @@ inline DualEdgeTriangulation::DualEdgeTriangulation() , mUnstableEdge( 0 ) , mTwiceInsPoint( 0 ) { - mPointVector.reserve( mDefaultStorageForPoints ); - mHalfEdge.reserve( mDefaultStorageForHalfEdges ); + mPointVector.reserve( DEFAULT_STORAGE_FOR_POINTS ); + mHalfEdge.reserve( DEFAULT_STORAGE_FOR_HALF_EDGES ); } inline DualEdgeTriangulation::DualEdgeTriangulation( int nop, Triangulation* decorator ) diff --git a/src/analysis/interpolation/NormVecDecorator.h b/src/analysis/interpolation/NormVecDecorator.h index f94db7d5bb85..47a46d1b653d 100644 --- a/src/analysis/interpolation/NormVecDecorator.h +++ b/src/analysis/interpolation/NormVecDecorator.h @@ -72,7 +72,7 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator protected: //! Is true, if the normals already have been estimated bool alreadyestimated; - const static unsigned int mDefaultStorageForNormals = 100000; + static const unsigned int DEFAULT_STORAGE_FOR_NORMALS = 100000; //! Association with an interpolator object TriangleInterpolator* mInterpolator; //! Vector that stores the normals for the points. If 'estimateFirstDerivatives()' was called and there is a null pointer, this means, that the triangle point is on a breakline @@ -83,12 +83,12 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator void setState( int pointno, PointState s ); }; -inline NormVecDecorator::NormVecDecorator(): TriDecorator(), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) +inline NormVecDecorator::NormVecDecorator(): TriDecorator(), mInterpolator( nullptr ), mNormVec( new QVector( DEFAULT_STORAGE_FOR_NORMALS ) ), mPointState( new QVector( DEFAULT_STORAGE_FOR_NORMALS ) ) { alreadyestimated = false; } -inline NormVecDecorator::NormVecDecorator( Triangulation* tin ): TriDecorator( tin ), mInterpolator( nullptr ), mNormVec( new QVector( mDefaultStorageForNormals ) ), mPointState( new QVector( mDefaultStorageForNormals ) ) +inline NormVecDecorator::NormVecDecorator( Triangulation* tin ): TriDecorator( tin ), mInterpolator( nullptr ), mNormVec( new QVector( DEFAULT_STORAGE_FOR_NORMALS ) ), mPointState( new QVector( DEFAULT_STORAGE_FOR_NORMALS ) ) { alreadyestimated = false; } diff --git a/src/app/main.cpp b/src/app/main.cpp index 9b311a9317a8..8865de9e6fb0 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -166,10 +166,10 @@ void usage( const QString& appName ) // AppleEvent handler as well as by the main routine argv processing // This behavior will cause QGIS to autoload a project -static QString myProjectFileName = QLatin1String( "" ); +static QString sProjectFileName = QLatin1String( "" ); // This is the 'leftover' arguments collection -static QStringList myFileList; +static QStringList sFileList; /* Test to determine if this program was started on Mac OS X by double-clicking @@ -207,8 +207,8 @@ static void dumpBacktrace( unsigned int depth ) // Maybe some problems could be resolved with dup2() and waitpid(), but it seems // that if the operations on descriptors are not serialized, things will get nasty. // That's why there's this lovely mutex here... - static QMutex mutex; - QMutexLocker locker( &mutex ); + static QMutex sMutex; + QMutexLocker locker( &sMutex ); int stderr_fd = -1; if ( access( "/usr/bin/c++filt", X_OK ) < 0 ) @@ -614,7 +614,7 @@ int main( int argc, char *argv[] ) } else if ( i + 1 < argc && ( arg == QLatin1String( "--project" ) || arg == QLatin1String( "-p" ) ) ) { - myProjectFileName = QDir::toNativeSeparators( QFileInfo( args[++i] ).absoluteFilePath() ); + sProjectFileName = QDir::toNativeSeparators( QFileInfo( args[++i] ).absoluteFilePath() ); } else if ( i + 1 < argc && ( arg == QLatin1String( "--extent" ) || arg == QLatin1String( "-e" ) ) ) { @@ -732,11 +732,11 @@ int main( int argc, char *argv[] ) else if ( arg == QLatin1String( "--" ) ) { for ( i++; i < args.size(); ++i ) - myFileList.append( QDir::toNativeSeparators( QFileInfo( args[i] ).absoluteFilePath() ) ); + sFileList.append( QDir::toNativeSeparators( QFileInfo( args[i] ).absoluteFilePath() ) ); } else { - myFileList.append( QDir::toNativeSeparators( QFileInfo( args[i] ).absoluteFilePath() ) ); + sFileList.append( QDir::toNativeSeparators( QFileInfo( args[i] ).absoluteFilePath() ) ); } } } @@ -747,7 +747,7 @@ int main( int argc, char *argv[] ) // of a project file by clicking on it in various desktop managers // // where an appropriate mime-type has been set up. // ///////////////////////////////////////////////////////////////////// - if ( myProjectFileName.isEmpty() ) + if ( sProjectFileName.isEmpty() ) { // check for a .qgs for ( int i = 0; i < args.size(); i++ ) @@ -755,7 +755,7 @@ int main( int argc, char *argv[] ) QString arg = QDir::toNativeSeparators( QFileInfo( args[i] ).absoluteFilePath() ); if ( arg.contains( QLatin1String( ".qgs" ) ) ) { - myProjectFileName = arg; + sProjectFileName = arg; break; } } @@ -1083,16 +1083,16 @@ int main( int argc, char *argv[] ) ///////////////////////////////////////////////////////////////////// // Load a project file if one was specified ///////////////////////////////////////////////////////////////////// - if ( ! myProjectFileName.isEmpty() ) + if ( ! sProjectFileName.isEmpty() ) { - qgis->openProject( myProjectFileName ); + qgis->openProject( sProjectFileName ); } ///////////////////////////////////////////////////////////////////// // autoload any file names that were passed in on the command line ///////////////////////////////////////////////////////////////////// - QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( myFileList.count() ) ); - for ( QStringList::Iterator myIterator = myFileList.begin(); myIterator != myFileList.end(); ++myIterator ) + QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( sFileList.count() ) ); + for ( QStringList::Iterator myIterator = sFileList.begin(); myIterator != sFileList.end(); ++myIterator ) { QgsDebugMsg( QString( "Trying to load file : %1" ).arg(( *myIterator ) ) ); QString myLayerName = *myIterator; diff --git a/src/app/nodetool/qgsnodeeditor.cpp b/src/app/nodetool/qgsnodeeditor.cpp index 1017716caec3..c0e97ea3c18a 100644 --- a/src/app/nodetool/qgsnodeeditor.cpp +++ b/src/app/nodetool/qgsnodeeditor.cpp @@ -31,7 +31,7 @@ #include #include -static const int MinRadiusRole = Qt::UserRole + 1; +static const int MIN_RADIUS_ROLE = Qt::UserRole + 1; QgsNodeEditorModel::QgsNodeEditorModel( QgsVectorLayer* layer, QgsSelectedFeature* selectedFeature, QgsMapCanvas* canvas, QObject* parent ) @@ -88,7 +88,7 @@ int QgsNodeEditorModel::columnCount( const QModelIndex& parent ) const QVariant QgsNodeEditorModel::data( const QModelIndex& index, int role ) const { if ( !index.isValid() || - ( role != Qt::DisplayRole && role != Qt::EditRole && role != MinRadiusRole && role != Qt::FontRole ) ) + ( role != Qt::DisplayRole && role != Qt::EditRole && role != MIN_RADIUS_ROLE && role != Qt::FontRole ) ) return QVariant(); if ( index.row() >= mSelectedFeature->vertexMap().count() ) @@ -120,7 +120,7 @@ QVariant QgsNodeEditorModel::data( const QModelIndex& index, int role ) const } } - if ( role == MinRadiusRole ) + if ( role == MIN_RADIUS_ROLE ) { if ( index.column() == mRCol ) { @@ -406,8 +406,8 @@ QWidget*CoordinateItemDelegate::createEditor( QWidget* parent, const QStyleOptio { QLineEdit* lineEdit = new QLineEdit( parent ); QDoubleValidator* validator = new QDoubleValidator(); - if ( !index.data( MinRadiusRole ).isNull() ) - validator->setBottom( index.data( MinRadiusRole ).toDouble() ); + if ( !index.data( MIN_RADIUS_ROLE ).isNull() ) + validator->setBottom( index.data( MIN_RADIUS_ROLE ).toDouble() ); lineEdit->setValidator( validator ); return lineEdit; } diff --git a/src/app/nodetool/qgsselectedfeature.h b/src/app/nodetool/qgsselectedfeature.h index 6118df3cefd0..e9bab8f0c144 100644 --- a/src/app/nodetool/qgsselectedfeature.h +++ b/src/app/nodetool/qgsselectedfeature.h @@ -33,7 +33,7 @@ class QgsVertexEntry; /** * Constant representing zero value for distance. It's 0 because of error in double counting. */ -const static double ZERO_TOLERANCE = 0.000000001; +static const double ZERO_TOLERANCE = 0.000000001; /** * Class that keeps the selected feature diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 354a5ebb2a8b..c0ebfaaae917 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -501,7 +501,7 @@ void QgisApp::activeLayerChanged( QgsMapLayer* layer ) */ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) { - static QString authid = QString::null; + static QString sAuthId = QString::null; QSettings mySettings; QString myDefaultProjectionOption = mySettings.value( QStringLiteral( "/Projections/defaultBehavior" ), "prompt" ).toString(); if ( myDefaultProjectionOption == QLatin1String( "prompt" ) ) @@ -511,10 +511,10 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) QgsGenericProjectionSelector *mySelector = new QgsGenericProjectionSelector(); mySelector->setMessage( srs.validationHint() ); //shows a generic message, if not specified - if ( authid.isNull() ) - authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid(); + if ( sAuthId.isNull() ) + sAuthId = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid(); - QgsCoordinateReferenceSystem defaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( authid ); + QgsCoordinateReferenceSystem defaultCrs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( sAuthId ); if ( defaultCrs.isValid() ) { mySelector->setSelectedCrsId( defaultCrs.srsid() ); @@ -527,7 +527,7 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) if ( mySelector->exec() ) { QgsDebugMsg( "Layer srs set from dialog: " + QString::number( mySelector->selectedCrsId() ) ); - authid = mySelector->selectedAuthId(); + sAuthId = mySelector->selectedAuthId(); srs.createFromOgcWmsCrs( mySelector->selectedAuthId() ); } @@ -539,17 +539,17 @@ void QgisApp::validateCrs( QgsCoordinateReferenceSystem &srs ) else if ( myDefaultProjectionOption == QLatin1String( "useProject" ) ) { // XXX TODO: Change project to store selected CS as 'projectCRS' not 'selectedWkt' - authid = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid(); - srs.createFromOgcWmsCrs( authid ); - QgsDebugMsg( "Layer srs set from project: " + authid ); - messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( authid, srs.description() ), QgsMessageBar::WARNING, messageTimeout() ); + sAuthId = QgisApp::instance()->mapCanvas()->mapSettings().destinationCrs().authid(); + srs.createFromOgcWmsCrs( sAuthId ); + QgsDebugMsg( "Layer srs set from project: " + sAuthId ); + messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to project CRS %1 - %2" ).arg( sAuthId, srs.description() ), QgsMessageBar::WARNING, messageTimeout() ); } else ///Projections/defaultBehavior==useGlobal { - authid = mySettings.value( QStringLiteral( "/Projections/layerDefaultCrs" ), GEO_EPSG_CRS_AUTHID ).toString(); - srs.createFromOgcWmsCrs( authid ); - QgsDebugMsg( "Layer srs set from default: " + authid ); - messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to CRS %1 - %2" ).arg( authid, srs.description() ), QgsMessageBar::WARNING, messageTimeout() ); + sAuthId = mySettings.value( QStringLiteral( "/Projections/layerDefaultCrs" ), GEO_EPSG_CRS_AUTHID ).toString(); + srs.createFromOgcWmsCrs( sAuthId ); + QgsDebugMsg( "Layer srs set from default: " + sAuthId ); + messageBar()->pushMessage( tr( "CRS was undefined" ), tr( "defaulting to CRS %1 - %2" ).arg( sAuthId, srs.description() ), QgsMessageBar::WARNING, messageTimeout() ); } } @@ -559,7 +559,7 @@ static bool cmpByText_( QAction* a, QAction* b ) } -QgisApp *QgisApp::smInstance = nullptr; +QgisApp *QgisApp::sInstance = nullptr; // constructor starts here QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCheck, QWidget * parent, Qt::WindowFlags fl ) @@ -598,7 +598,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh , mWelcomePage( nullptr ) , mCentralContainer( nullptr ) { - if ( smInstance ) + if ( sInstance ) { QMessageBox::critical( this, @@ -607,7 +607,7 @@ QgisApp::QgisApp( QSplashScreen *splash, bool restorePlugins, bool skipVersionCh abort(); } - smInstance = this; + sInstance = this; QgsRuntimeProfiler* profiler = QgsApplication::profiler(); namSetup(); @@ -1209,7 +1209,7 @@ QgisApp::QgisApp() , mCentralContainer( nullptr ) , mProjOpen( 0 ) { - smInstance = this; + sInstance = this; setupUi( this ); mInternalClipboard = new QgsClipboard; mMapCanvas = new QgsMapCanvas(); @@ -3467,11 +3467,11 @@ void QgisApp::sponsors() void QgisApp::about() { - static QgsAbout *abt = nullptr; - if ( !abt ) + static QgsAbout *sAbt = nullptr; + if ( !sAbt ) { QApplication::setOverrideCursor( Qt::WaitCursor ); - abt = new QgsAbout( this ); + sAbt = new QgsAbout( this ); QString versionString = QStringLiteral( "

    " ); versionString += QLatin1String( "" ); @@ -3532,13 +3532,13 @@ void QgisApp::about() versionString += QLatin1String( "
    " ); - abt->setVersion( versionString ); + sAbt->setVersion( versionString ); QApplication::restoreOverrideCursor(); } - abt->show(); - abt->raise(); - abt->activateWindow(); + sAbt->show(); + sAbt->raise(); + sAbt->activateWindow(); } void QgisApp::addLayerDefinition() @@ -11358,7 +11358,7 @@ QgsPluginLayer* QgisApp::addPluginLayer( const QString& uri, const QString& base #ifdef ANDROID void QgisApp::keyReleaseEvent( QKeyEvent *event ) { - static bool accepted = true; + static bool sAccepted = true; if ( event->key() == Qt::Key_Close ) { // do something useful here @@ -11374,8 +11374,8 @@ void QgisApp::keyReleaseEvent( QKeyEvent *event ) case QMessageBox::No: break; } - event->setAccepted( accepted ); // don't close my Top Level Widget ! - accepted = false;// close the app next time when the user press back button + event->setAccepted( sAccepted ); // don't close my Top Level Widget ! + sAccepted = false;// close the app next time when the user press back button } else { @@ -11520,21 +11520,21 @@ void QgisApp::projectChanged( const QDomDocument &doc ) if ( !fi.exists() ) return; - static QString prevProjectDir = QString::null; + static QString sPrevProjectDir = QString::null; - if ( prevProjectDir == fi.canonicalPath() ) + if ( sPrevProjectDir == fi.canonicalPath() ) return; QString expr; - if ( !prevProjectDir.isNull() ) + if ( !sPrevProjectDir.isNull() ) { - QString prev = prevProjectDir; + QString prev = sPrevProjectDir; expr = QStringLiteral( "sys.path.remove(u'%1'); " ).arg( prev.replace( '\'', QLatin1String( "\\'" ) ) ); } - prevProjectDir = fi.canonicalPath(); + sPrevProjectDir = fi.canonicalPath(); - QString prev = prevProjectDir; + QString prev = sPrevProjectDir; expr += QStringLiteral( "sys.path.append(u'%1')" ).arg( prev.replace( '\'', QLatin1String( "\\'" ) ) ); QgsPythonRunner::run( expr ); diff --git a/src/app/qgisapp.h b/src/app/qgisapp.h index 1b7ff79b08a7..c12c033be28b 100644 --- a/src/app/qgisapp.h +++ b/src/app/qgisapp.h @@ -252,7 +252,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow //! Returns a pointer to the internal clipboard QgsClipboard *clipboard(); - static QgisApp *instance() { return smInstance; } + static QgisApp *instance() { return sInstance; } //! initialize network manager void namSetup(); @@ -1786,7 +1786,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow QgsPythonUtils *mPythonUtils; - static QgisApp *smInstance; + static QgisApp *sInstance; QgsUndoWidget *mUndoWidget; QgsDockWidget *mUndoDock; diff --git a/src/app/qgscustomization.cpp b/src/app/qgscustomization.cpp index d6b1f57f7e00..fb29c838da39 100644 --- a/src/app/qgscustomization.cpp +++ b/src/app/qgscustomization.cpp @@ -451,7 +451,7 @@ QString QgsCustomizationDialog::widgetPath( QWidget * theWidget, const QString& QString path = thePath; - if ( !QgsCustomization::mInternalWidgets.contains( name ) ) + if ( !QgsCustomization::sInternalWidgets.contains( name ) ) { if ( !path.isEmpty() ) { @@ -615,16 +615,16 @@ void QgsCustomization::createTreeItemStatus() mMainWindowItems << topItem; } -QStringList QgsCustomization::mInternalWidgets = QStringList() << QStringLiteral( "qt_tabwidget_stackedwidget" ) << QStringLiteral( "qt_tabwidget_tabbar" ); +QStringList QgsCustomization::sInternalWidgets = QStringList() << QStringLiteral( "qt_tabwidget_stackedwidget" ) << QStringLiteral( "qt_tabwidget_tabbar" ); -QgsCustomization *QgsCustomization::pinstance = nullptr; +QgsCustomization *QgsCustomization::sInstance = nullptr; QgsCustomization *QgsCustomization::instance() { - if ( !pinstance ) + if ( !sInstance ) { - pinstance = new QgsCustomization(); + sInstance = new QgsCustomization(); } - return pinstance; + return sInstance; } QgsCustomization::QgsCustomization() @@ -823,7 +823,7 @@ void QgsCustomization::customizeWidget( const QString& thePath, QWidget * theWid // qt_tabwidget_stackedwidget, such widgets do not appear in the tree generated // from ui files and do not have sense from user poin of view -> skip - if ( !QgsCustomization::mInternalWidgets.contains( name ) ) + if ( !QgsCustomization::sInternalWidgets.contains( name ) ) { myPath = thePath + '/' + name; } diff --git a/src/app/qgscustomization.h b/src/app/qgscustomization.h index f146c22960ed..c9c1b7b86b44 100644 --- a/src/app/qgscustomization.h +++ b/src/app/qgscustomization.h @@ -136,7 +136,7 @@ class APP_EXPORT QgsCustomization : public QObject void loadDefault(); // Internal Qt widget which has to bes kipped in paths - static QStringList mInternalWidgets; + static QStringList sInternalWidgets; QString statusPath() { return mStatusPath; } @@ -165,7 +165,7 @@ class APP_EXPORT QgsCustomization : public QObject private slots: private: - static QgsCustomization* pinstance; + static QgsCustomization* sInstance; }; #endif // QGSCUSTOMIZATION_H diff --git a/src/app/qgsmergeattributesdialog.cpp b/src/app/qgsmergeattributesdialog.cpp index a0fe17d79590..9f93ec879156 100644 --- a/src/app/qgsmergeattributesdialog.cpp +++ b/src/app/qgsmergeattributesdialog.cpp @@ -33,7 +33,7 @@ #include #include -QList< QgsStatisticalSummary::Statistic > QgsMergeAttributesDialog::mDisplayStats = +const QList< QgsStatisticalSummary::Statistic > QgsMergeAttributesDialog::DISPLAY_STATS = QList< QgsStatisticalSummary::Statistic > () << QgsStatisticalSummary::Count << QgsStatisticalSummary::Sum << QgsStatisticalSummary::Mean @@ -192,7 +192,7 @@ QComboBox *QgsMergeAttributesDialog::createMergeComboBox( QVariant::Type columnT case QVariant::Int: case QVariant::LongLong: { - Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats ) + Q_FOREACH ( QgsStatisticalSummary::Statistic stat, DISPLAY_STATS ) { newComboBox->addItem( QgsStatisticalSummary::displayName( stat ) , stat ); } diff --git a/src/app/qgsmergeattributesdialog.h b/src/app/qgsmergeattributesdialog.h index 8ce17b2e1c6f..1376d444fb8d 100644 --- a/src/app/qgsmergeattributesdialog.h +++ b/src/app/qgsmergeattributesdialog.h @@ -99,7 +99,7 @@ class APP_EXPORT QgsMergeAttributesDialog: public QDialog, private Ui::QgsMergeA QgsFields mFields; QSet mHiddenAttributes; - static QList< QgsStatisticalSummary::Statistic > mDisplayStats; + static const QList< QgsStatisticalSummary::Statistic > DISPLAY_STATS; }; diff --git a/src/app/qgsoptions.h b/src/app/qgsoptions.h index 884f2a32af12..995464fdc588 100644 --- a/src/app/qgsoptions.h +++ b/src/app/qgsoptions.h @@ -242,8 +242,8 @@ class APP_EXPORT QgsOptions : public QgsOptionsDialogBase, private Ui::QgsOption QMap mStyleSheetNewOpts; QMap mStyleSheetOldOpts; - static const int PaletteColorRole = Qt::UserRole + 1; - static const int PaletteLabelRole = Qt::UserRole + 2; + static const int PALETTE_COLOR_ROLE = Qt::UserRole + 1; + static const int PALETTE_LABEL_ROLE = Qt::UserRole + 2; }; diff --git a/src/app/qgspluginregistry.cpp b/src/app/qgspluginregistry.cpp index 95e6591f5020..b68dcd3ecb67 100644 --- a/src/app/qgspluginregistry.cpp +++ b/src/app/qgspluginregistry.cpp @@ -41,14 +41,14 @@ typedef QString category_t(); typedef int type_t(); -QgsPluginRegistry *QgsPluginRegistry::_instance = nullptr; +QgsPluginRegistry *QgsPluginRegistry::sInstance = nullptr; QgsPluginRegistry *QgsPluginRegistry::instance() { - if ( !_instance ) + if ( !sInstance ) { - _instance = new QgsPluginRegistry(); + sInstance = new QgsPluginRegistry(); } - return _instance; + return sInstance; } QgsPluginRegistry::QgsPluginRegistry() diff --git a/src/app/qgspluginregistry.h b/src/app/qgspluginregistry.h index 78414b2b9c98..4ba895a73de3 100644 --- a/src/app/qgspluginregistry.h +++ b/src/app/qgspluginregistry.h @@ -108,7 +108,7 @@ class APP_EXPORT QgsPluginRegistry bool checkQgisVersion( const QString& minVersion, const QString& maxVersion = "" ) const; private: - static QgsPluginRegistry* _instance; + static QgsPluginRegistry* sInstance; QMap mPlugins; QgsPythonUtils* mPythonUtils; QgisInterface* mQgisInterface; diff --git a/src/app/qgsstatisticalsummarydockwidget.cpp b/src/app/qgsstatisticalsummarydockwidget.cpp index b9b561ed20f0..ef1db3bfaf05 100644 --- a/src/app/qgsstatisticalsummarydockwidget.cpp +++ b/src/app/qgsstatisticalsummarydockwidget.cpp @@ -22,7 +22,7 @@ #include #include -QList< QgsStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::mDisplayStats = +QList< QgsStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::sDisplayStats = QList< QgsStatisticalSummary::Statistic > () << QgsStatisticalSummary::Count << QgsStatisticalSummary::Sum << QgsStatisticalSummary::Mean @@ -39,7 +39,7 @@ QList< QgsStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::mDisp << QgsStatisticalSummary::ThirdQuartile << QgsStatisticalSummary::InterQuartileRange; -QList< QgsStringStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::mDisplayStringStats = +QList< QgsStringStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::sDisplayStringStats = QList< QgsStringStatisticalSummary::Statistic > () << QgsStringStatisticalSummary::Count << QgsStringStatisticalSummary::CountDistinct << QgsStringStatisticalSummary::CountMissing @@ -48,7 +48,7 @@ QList< QgsStringStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget: << QgsStringStatisticalSummary::MinimumLength << QgsStringStatisticalSummary::MaximumLength; -QList< QgsDateTimeStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::mDisplayDateTimeStats = +QList< QgsDateTimeStatisticalSummary::Statistic > QgsStatisticalSummaryDockWidget::sDisplayDateTimeStats = QList< QgsDateTimeStatisticalSummary::Statistic > () << QgsDateTimeStatisticalSummary::Count << QgsDateTimeStatisticalSummary::CountDistinct << QgsDateTimeStatisticalSummary::CountMissing @@ -92,7 +92,7 @@ QgsStatisticalSummaryDockWidget::QgsStatisticalSummaryDockWidget( QWidget *paren connect( QgsProject::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ), this, SLOT( layersRemoved( QStringList ) ) ); QSettings settings; - Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats ) + Q_FOREACH ( QgsStatisticalSummary::Statistic stat, sDisplayStats ) { QAction* action = new QAction( QgsStatisticalSummary::displayName( stat ), mOptionsToolButton ); action->setCheckable( true ); @@ -179,7 +179,7 @@ void QgsStatisticalSummaryDockWidget::updateNumericStatistics( bool selectedOnly QList< QgsStatisticalSummary::Statistic > statsToDisplay; QgsStatisticalSummary::Statistics statsToCalc = 0; - Q_FOREACH ( QgsStatisticalSummary::Statistic stat, mDisplayStats ) + Q_FOREACH ( QgsStatisticalSummary::Statistic stat, sDisplayStats ) { if ( mStatsActions.value( stat )->isChecked() ) { @@ -234,11 +234,11 @@ void QgsStatisticalSummaryDockWidget::updateStringStatistics( bool selectedOnly stats.setStatistics( QgsStringStatisticalSummary::All ); stats.calculateFromVariants( values ); - mStatisticsTable->setRowCount( mDisplayStringStats.count() ); + mStatisticsTable->setRowCount( sDisplayStringStats.count() ); mStatisticsTable->setColumnCount( 2 ); int row = 0; - Q_FOREACH ( QgsStringStatisticalSummary::Statistic stat, mDisplayStringStats ) + Q_FOREACH ( QgsStringStatisticalSummary::Statistic stat, sDisplayStringStats ) { addRow( row, QgsStringStatisticalSummary::displayName( stat ), stats.statistic( stat ).toString(), @@ -322,11 +322,11 @@ void QgsStatisticalSummaryDockWidget::updateDateTimeStatistics( bool selectedOnl stats.setStatistics( QgsDateTimeStatisticalSummary::All ); stats.calculate( values ); - mStatisticsTable->setRowCount( mDisplayDateTimeStats.count() ); + mStatisticsTable->setRowCount( sDisplayDateTimeStats.count() ); mStatisticsTable->setColumnCount( 2 ); int row = 0; - Q_FOREACH ( QgsDateTimeStatisticalSummary::Statistic stat, mDisplayDateTimeStats ) + Q_FOREACH ( QgsDateTimeStatisticalSummary::Statistic stat, sDisplayDateTimeStats ) { QString value = ( stat == QgsDateTimeStatisticalSummary::Range ? tr( "%1 seconds" ).arg( stats.range().seconds() ) diff --git a/src/app/qgsstatisticalsummarydockwidget.h b/src/app/qgsstatisticalsummarydockwidget.h index 6e3f22df2893..648dbb59f131 100644 --- a/src/app/qgsstatisticalsummarydockwidget.h +++ b/src/app/qgsstatisticalsummarydockwidget.h @@ -64,9 +64,9 @@ class APP_EXPORT QgsStatisticalSummaryDockWidget : public QgsDockWidget, private QgsVectorLayer* mLayer; QMap< int, QAction* > mStatsActions; - static QList< QgsStatisticalSummary::Statistic > mDisplayStats; - static QList< QgsStringStatisticalSummary::Statistic > mDisplayStringStats; - static QList< QgsDateTimeStatisticalSummary::Statistic > mDisplayDateTimeStats; + static QList< QgsStatisticalSummary::Statistic > sDisplayStats; + static QList< QgsStringStatisticalSummary::Statistic > sDisplayStringStats; + static QList< QgsDateTimeStatisticalSummary::Statistic > sDisplayDateTimeStats; void updateNumericStatistics( bool selectedOnly ); void updateStringStatistics( bool selectedOnly ); diff --git a/src/auth/basic/qgsauthbasicmethod.cpp b/src/auth/basic/qgsauthbasicmethod.cpp index 069b413f6fb7..1210d30f055a 100644 --- a/src/auth/basic/qgsauthbasicmethod.cpp +++ b/src/auth/basic/qgsauthbasicmethod.cpp @@ -23,7 +23,7 @@ static const QString AUTH_METHOD_KEY = QStringLiteral( "Basic" ); static const QString AUTH_METHOD_DESCRIPTION = QStringLiteral( "Basic authentication" ); -QMap QgsAuthBasicMethod::mAuthConfigCache = QMap(); +QMap QgsAuthBasicMethod::sAuthConfigCache = QMap(); QgsAuthBasicMethod::QgsAuthBasicMethod() @@ -152,9 +152,9 @@ QgsAuthMethodConfig QgsAuthBasicMethod::getMethodConfig( const QString &authcfg, QgsAuthMethodConfig mconfig; // check if it is cached - if ( mAuthConfigCache.contains( authcfg ) ) + if ( sAuthConfigCache.contains( authcfg ) ) { - mconfig = mAuthConfigCache.value( authcfg ); + mconfig = sAuthConfigCache.value( authcfg ); QgsDebugMsg( QString( "Retrieved config for authcfg: %1" ).arg( authcfg ) ); return mconfig; } @@ -175,14 +175,14 @@ QgsAuthMethodConfig QgsAuthBasicMethod::getMethodConfig( const QString &authcfg, void QgsAuthBasicMethod::putMethodConfig( const QString &authcfg, const QgsAuthMethodConfig& mconfig ) { QgsDebugMsg( QString( "Putting basic config for authcfg: %1" ).arg( authcfg ) ); - mAuthConfigCache.insert( authcfg, mconfig ); + sAuthConfigCache.insert( authcfg, mconfig ); } void QgsAuthBasicMethod::removeMethodConfig( const QString &authcfg ) { - if ( mAuthConfigCache.contains( authcfg ) ) + if ( sAuthConfigCache.contains( authcfg ) ) { - mAuthConfigCache.remove( authcfg ); + sAuthConfigCache.remove( authcfg ); QgsDebugMsg( QString( "Removed basic config for authcfg: %1" ).arg( authcfg ) ); } } diff --git a/src/auth/basic/qgsauthbasicmethod.h b/src/auth/basic/qgsauthbasicmethod.h index ce7e19a02948..81615cdf4887 100644 --- a/src/auth/basic/qgsauthbasicmethod.h +++ b/src/auth/basic/qgsauthbasicmethod.h @@ -57,7 +57,7 @@ class QgsAuthBasicMethod : public QgsAuthMethod QString escapeUserPass( const QString &theVal, QChar delim = '\'' ) const; - static QMap mAuthConfigCache; + static QMap sAuthConfigCache; }; #endif // QGSAUTHBASICMETHOD_H diff --git a/src/auth/identcert/qgsauthidentcertmethod.cpp b/src/auth/identcert/qgsauthidentcertmethod.cpp index 25865e7567ab..3250d8be85ce 100644 --- a/src/auth/identcert/qgsauthidentcertmethod.cpp +++ b/src/auth/identcert/qgsauthidentcertmethod.cpp @@ -33,7 +33,7 @@ static const QString AUTH_METHOD_KEY = QStringLiteral( "Identity-Cert" ); static const QString AUTH_METHOD_DESCRIPTION = QStringLiteral( "Identity certificate authentication" ); -QMap QgsAuthIdentCertMethod::mPkiConfigBundleCache = QMap(); +QMap QgsAuthIdentCertMethod::sPkiConfigBundleCache = QMap(); QgsAuthIdentCertMethod::QgsAuthIdentCertMethod() @@ -51,8 +51,8 @@ QgsAuthIdentCertMethod::QgsAuthIdentCertMethod() QgsAuthIdentCertMethod::~QgsAuthIdentCertMethod() { - qDeleteAll( mPkiConfigBundleCache ); - mPkiConfigBundleCache.clear(); + qDeleteAll( sPkiConfigBundleCache ); + sPkiConfigBundleCache.clear(); } QString QgsAuthIdentCertMethod::key() const @@ -223,9 +223,9 @@ QgsPkiConfigBundle *QgsAuthIdentCertMethod::getPkiConfigBundle( const QString &a QgsPkiConfigBundle * bundle = nullptr; // check if it is cached - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - bundle = mPkiConfigBundleCache.value( authcfg ); + bundle = sPkiConfigBundleCache.value( authcfg ); if ( bundle ) { QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) ); @@ -273,14 +273,14 @@ QgsPkiConfigBundle *QgsAuthIdentCertMethod::getPkiConfigBundle( const QString &a void QgsAuthIdentCertMethod::putPkiConfigBundle( const QString &authcfg, QgsPkiConfigBundle *pkibundle ) { QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) ); - mPkiConfigBundleCache.insert( authcfg, pkibundle ); + sPkiConfigBundleCache.insert( authcfg, pkibundle ); } void QgsAuthIdentCertMethod::removePkiConfigBundle( const QString &authcfg ) { - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg ); + QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg ); delete pkibundle; pkibundle = nullptr; QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) ); diff --git a/src/auth/identcert/qgsauthidentcertmethod.h b/src/auth/identcert/qgsauthidentcertmethod.h index 1e9e6b7a9ccd..e258d88a4a18 100644 --- a/src/auth/identcert/qgsauthidentcertmethod.h +++ b/src/auth/identcert/qgsauthidentcertmethod.h @@ -56,7 +56,7 @@ class QgsAuthIdentCertMethod : public QgsAuthMethod void removePkiConfigBundle( const QString &authcfg ); - static QMap mPkiConfigBundleCache; + static QMap sPkiConfigBundleCache; }; #endif // QGSAUTHIDENTCERTMETHOD_H diff --git a/src/auth/pkipaths/qgsauthpkipathsmethod.cpp b/src/auth/pkipaths/qgsauthpkipathsmethod.cpp index 1676a0656c90..8227b01aac3d 100644 --- a/src/auth/pkipaths/qgsauthpkipathsmethod.cpp +++ b/src/auth/pkipaths/qgsauthpkipathsmethod.cpp @@ -34,7 +34,7 @@ static const QString AUTH_METHOD_KEY = QStringLiteral( "PKI-Paths" ); static const QString AUTH_METHOD_DESCRIPTION = QStringLiteral( "PKI paths authentication" ); -QMap QgsAuthPkiPathsMethod::mPkiConfigBundleCache = QMap(); +QMap QgsAuthPkiPathsMethod::sPkiConfigBundleCache = QMap(); QgsAuthPkiPathsMethod::QgsAuthPkiPathsMethod() @@ -52,8 +52,8 @@ QgsAuthPkiPathsMethod::QgsAuthPkiPathsMethod() QgsAuthPkiPathsMethod::~QgsAuthPkiPathsMethod() { - qDeleteAll( mPkiConfigBundleCache ); - mPkiConfigBundleCache.clear(); + qDeleteAll( sPkiConfigBundleCache ); + sPkiConfigBundleCache.clear(); } QString QgsAuthPkiPathsMethod::key() const @@ -227,9 +227,9 @@ QgsPkiConfigBundle *QgsAuthPkiPathsMethod::getPkiConfigBundle( const QString &au QgsPkiConfigBundle * bundle = nullptr; // check if it is cached - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - bundle = mPkiConfigBundleCache.value( authcfg ); + bundle = sPkiConfigBundleCache.value( authcfg ); if ( bundle ) { QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) ); @@ -275,14 +275,14 @@ QgsPkiConfigBundle *QgsAuthPkiPathsMethod::getPkiConfigBundle( const QString &au void QgsAuthPkiPathsMethod::putPkiConfigBundle( const QString &authcfg, QgsPkiConfigBundle *pkibundle ) { QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) ); - mPkiConfigBundleCache.insert( authcfg, pkibundle ); + sPkiConfigBundleCache.insert( authcfg, pkibundle ); } void QgsAuthPkiPathsMethod::removePkiConfigBundle( const QString &authcfg ) { - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg ); + QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg ); delete pkibundle; pkibundle = nullptr; QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) ); diff --git a/src/auth/pkipaths/qgsauthpkipathsmethod.h b/src/auth/pkipaths/qgsauthpkipathsmethod.h index c274b64a1b28..6fa95e70299c 100644 --- a/src/auth/pkipaths/qgsauthpkipathsmethod.h +++ b/src/auth/pkipaths/qgsauthpkipathsmethod.h @@ -56,7 +56,7 @@ class QgsAuthPkiPathsMethod : public QgsAuthMethod void removePkiConfigBundle( const QString &authcfg ); - static QMap mPkiConfigBundleCache; + static QMap sPkiConfigBundleCache; }; #endif // QGSAUTHPKIPATHSMETHOD_H diff --git a/src/auth/pkipkcs12/qgsauthpkcs12method.cpp b/src/auth/pkipkcs12/qgsauthpkcs12method.cpp index ca1a73671c49..b958e84860f6 100644 --- a/src/auth/pkipkcs12/qgsauthpkcs12method.cpp +++ b/src/auth/pkipkcs12/qgsauthpkcs12method.cpp @@ -34,7 +34,7 @@ static const QString AUTH_METHOD_KEY = QStringLiteral( "PKI-PKCS#12" ); static const QString AUTH_METHOD_DESCRIPTION = QStringLiteral( "PKI PKCS#12 authentication" ); -QMap QgsAuthPkcs12Method::mPkiConfigBundleCache = QMap(); +QMap QgsAuthPkcs12Method::sPkiConfigBundleCache = QMap(); QgsAuthPkcs12Method::QgsAuthPkcs12Method() @@ -52,8 +52,8 @@ QgsAuthPkcs12Method::QgsAuthPkcs12Method() QgsAuthPkcs12Method::~QgsAuthPkcs12Method() { - qDeleteAll( mPkiConfigBundleCache ); - mPkiConfigBundleCache.clear(); + qDeleteAll( sPkiConfigBundleCache ); + sPkiConfigBundleCache.clear(); } QString QgsAuthPkcs12Method::key() const @@ -225,9 +225,9 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth QgsPkiConfigBundle * bundle = nullptr; // check if it is cached - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - bundle = mPkiConfigBundleCache.value( authcfg ); + bundle = sPkiConfigBundleCache.value( authcfg ); if ( bundle ) { QgsDebugMsg( QString( "Retrieved PKI bundle for authcfg %1" ).arg( authcfg ) ); @@ -281,14 +281,14 @@ QgsPkiConfigBundle *QgsAuthPkcs12Method::getPkiConfigBundle( const QString &auth void QgsAuthPkcs12Method::putPkiConfigBundle( const QString &authcfg, QgsPkiConfigBundle *pkibundle ) { QgsDebugMsg( QString( "Putting PKI bundle for authcfg %1" ).arg( authcfg ) ); - mPkiConfigBundleCache.insert( authcfg, pkibundle ); + sPkiConfigBundleCache.insert( authcfg, pkibundle ); } void QgsAuthPkcs12Method::removePkiConfigBundle( const QString &authcfg ) { - if ( mPkiConfigBundleCache.contains( authcfg ) ) + if ( sPkiConfigBundleCache.contains( authcfg ) ) { - QgsPkiConfigBundle * pkibundle = mPkiConfigBundleCache.take( authcfg ); + QgsPkiConfigBundle * pkibundle = sPkiConfigBundleCache.take( authcfg ); delete pkibundle; pkibundle = nullptr; QgsDebugMsg( QString( "Removed PKI bundle for authcfg: %1" ).arg( authcfg ) ); diff --git a/src/auth/pkipkcs12/qgsauthpkcs12method.h b/src/auth/pkipkcs12/qgsauthpkcs12method.h index d957d9130c6c..9e19f7ca3508 100644 --- a/src/auth/pkipkcs12/qgsauthpkcs12method.h +++ b/src/auth/pkipkcs12/qgsauthpkcs12method.h @@ -57,7 +57,7 @@ class QgsAuthPkcs12Method : public QgsAuthMethod void removePkiConfigBundle( const QString &authcfg ); - static QMap mPkiConfigBundleCache; + static QMap sPkiConfigBundleCache; }; #endif // QGSAUTHPKCS12METHOD_H diff --git a/src/core/auth/qgsauthconfig.cpp b/src/core/auth/qgsauthconfig.cpp index c35df90e790e..d67de9eacf4b 100644 --- a/src/core/auth/qgsauthconfig.cpp +++ b/src/core/auth/qgsauthconfig.cpp @@ -28,11 +28,11 @@ // QgsAuthMethodConfig ////////////////////////////////////////////// -const QString QgsAuthMethodConfig::mConfigSep = QStringLiteral( "|||" ); -const QString QgsAuthMethodConfig::mConfigKeySep = QStringLiteral( ":::" ); -const QString QgsAuthMethodConfig::mConfigListSep = QStringLiteral( "```" ); +const QString QgsAuthMethodConfig::CONFIG_SEP = QStringLiteral( "|||" ); +const QString QgsAuthMethodConfig::CONFIG_KEY_SEP = QStringLiteral( ":::" ); +const QString QgsAuthMethodConfig::CONFIG_LIST_SEP = QStringLiteral( "```" ); -const int QgsAuthMethodConfig::sConfigVersion = 1; +const int QgsAuthMethodConfig::CONFIG_VERSION = 1; // get uniqueConfigId only on save QgsAuthMethodConfig::QgsAuthMethodConfig( const QString& method, int version ) @@ -77,10 +77,10 @@ const QString QgsAuthMethodConfig::configString() const QgsStringMap::const_iterator i = mConfigMap.constBegin(); while ( i != mConfigMap.constEnd() ) { - confstrs << i.key() + mConfigKeySep + i.value(); + confstrs << i.key() + CONFIG_KEY_SEP + i.value(); ++i; } - return confstrs.join( mConfigSep ); + return confstrs.join( CONFIG_SEP ); } void QgsAuthMethodConfig::loadConfigString( const QString &configstr ) @@ -91,13 +91,13 @@ void QgsAuthMethodConfig::loadConfigString( const QString &configstr ) return; } - QStringList confs( configstr.split( mConfigSep ) ); + QStringList confs( configstr.split( CONFIG_SEP ) ); Q_FOREACH ( const QString& conf, confs ) { - if ( conf.contains( mConfigKeySep ) ) + if ( conf.contains( CONFIG_KEY_SEP ) ) { - QStringList keyval( conf.split( mConfigKeySep ) ); + QStringList keyval( conf.split( CONFIG_KEY_SEP ) ); setConfig( keyval.at( 0 ), keyval.at( 1 ) ); } } @@ -115,7 +115,7 @@ void QgsAuthMethodConfig::setConfig( const QString &key, const QString &value ) void QgsAuthMethodConfig::setConfigList( const QString &key, const QStringList &value ) { - setConfig( key, value.join( mConfigListSep ) ); + setConfig( key, value.join( CONFIG_LIST_SEP ) ); } int QgsAuthMethodConfig::removeConfig( const QString &key ) @@ -130,7 +130,7 @@ QString QgsAuthMethodConfig::config( const QString &key, const QString& defaultv QStringList QgsAuthMethodConfig::configList( const QString &key ) const { - return config( key ).split( mConfigListSep ); + return config( key ).split( CONFIG_LIST_SEP ); } bool QgsAuthMethodConfig::hasConfig( const QString &key ) const @@ -346,7 +346,7 @@ bool QgsPkiConfigBundle::isValid() // QgsAuthConfigSslServer ////////////////////////////////////////////// -const QString QgsAuthConfigSslServer::mConfSep = QStringLiteral( "|||" ); +const QString QgsAuthConfigSslServer::CONF_SEP = QStringLiteral( "|||" ); QgsAuthConfigSslServer::QgsAuthConfigSslServer() : mSslHostPort( QString() ) @@ -389,7 +389,7 @@ const QString QgsAuthConfigSslServer::configString() const configlist << QStringLiteral( "%1~~%2" ).arg( static_cast< int >( mSslPeerVerifyMode ) ).arg( mSslPeerVerifyDepth ); - return configlist.join( mConfSep ); + return configlist.join( CONF_SEP ); } void QgsAuthConfigSslServer::loadConfigString( const QString &config ) @@ -398,7 +398,7 @@ void QgsAuthConfigSslServer::loadConfigString( const QString &config ) { return; } - QStringList configlist( config.split( mConfSep ) ); + QStringList configlist( config.split( CONF_SEP ) ); mVersion = configlist.at( 0 ).toInt(); mQtVersion = configlist.at( 1 ).toInt(); diff --git a/src/core/auth/qgsauthconfig.h b/src/core/auth/qgsauthconfig.h index 053885e3bdad..3bb47af0bee7 100644 --- a/src/core/auth/qgsauthconfig.h +++ b/src/core/auth/qgsauthconfig.h @@ -168,11 +168,11 @@ class CORE_EXPORT QgsAuthMethodConfig QgsStringMap mConfigMap; - static const QString mConfigSep; - static const QString mConfigKeySep; - static const QString mConfigListSep; + static const QString CONFIG_SEP; + static const QString CONFIG_KEY_SEP; + static const QString CONFIG_LIST_SEP; - static const int sConfigVersion; + static const int CONFIG_VERSION; }; typedef QHash QgsAuthMethodConfigsMap; @@ -367,7 +367,7 @@ class CORE_EXPORT QgsAuthConfigSslServer int mSslPeerVerifyDepth; int mVersion; - static const QString mConfSep; + static const QString CONF_SEP; }; #endif diff --git a/src/core/auth/qgsauthmanager.cpp b/src/core/auth/qgsauthmanager.cpp index ccbb5148e3ff..36aa5f8892a2 100644 --- a/src/core/auth/qgsauthmanager.cpp +++ b/src/core/auth/qgsauthmanager.cpp @@ -46,26 +46,26 @@ #include "qgscredentials.h" #include "qgslogger.h" -QgsAuthManager *QgsAuthManager::smInstance = nullptr; +QgsAuthManager *QgsAuthManager::sInstance = nullptr; -const QString QgsAuthManager::smAuthConfigTable = QStringLiteral( "auth_configs" ); -const QString QgsAuthManager::smAuthPassTable = QStringLiteral( "auth_pass" ); -const QString QgsAuthManager::smAuthSettingsTable = QStringLiteral( "auth_settings" ); -const QString QgsAuthManager::smAuthIdentitiesTable = QStringLiteral( "auth_identities" ); -const QString QgsAuthManager::smAuthServersTable = QStringLiteral( "auth_servers" ); -const QString QgsAuthManager::smAuthAuthoritiesTable = QStringLiteral( "auth_authorities" ); -const QString QgsAuthManager::smAuthTrustTable = QStringLiteral( "auth_trust" ); -const QString QgsAuthManager::smAuthManTag = QObject::tr( "Authentication Manager" ); -const QString QgsAuthManager::smAuthCfgRegex = QStringLiteral( "authcfg=([a-z]|[A-Z]|[0-9]){7}" ); +const QString QgsAuthManager::AUTH_CONFIG_TABLE = QStringLiteral( "auth_configs" ); +const QString QgsAuthManager::AUTH_PASS_TABLE = QStringLiteral( "auth_pass" ); +const QString QgsAuthManager::AUTH_SETTINGS_TABLE = QStringLiteral( "auth_settings" ); +const QString QgsAuthManager::AUTH_IDENTITIES_TABLE = QStringLiteral( "auth_identities" ); +const QString QgsAuthManager::AUTH_SERVERS_TABLE = QStringLiteral( "auth_servers" ); +const QString QgsAuthManager::AUTH_AUTHORITIES_TABLE = QStringLiteral( "auth_authorities" ); +const QString QgsAuthManager::AUTH_TRUST_TABLE = QStringLiteral( "auth_trust" ); +const QString QgsAuthManager::AUTH_MAN_TAG = QObject::tr( "Authentication Manager" ); +const QString QgsAuthManager::AUTH_CFG_REGEX = QStringLiteral( "authcfg=([a-z]|[A-Z]|[0-9]){7}" ); QgsAuthManager *QgsAuthManager::instance() { - if ( !smInstance ) + if ( !sInstance ) { - smInstance = new QgsAuthManager(); + sInstance = new QgsAuthManager(); } - return smInstance; + return sInstance; } QSqlDatabase QgsAuthManager::authDbConnection() const @@ -819,7 +819,7 @@ bool QgsAuthManager::configIdUnique( const QString& id ) const bool QgsAuthManager::hasConfigId( const QString &txt ) const { - QRegExp rx( smAuthCfgRegex ); + QRegExp rx( AUTH_CFG_REGEX ); return rx.indexIn( txt ) != -1; } diff --git a/src/core/auth/qgsauthmanager.h b/src/core/auth/qgsauthmanager.h index e4f47473c1e2..83fb9c5a6b41 100644 --- a/src/core/auth/qgsauthmanager.h +++ b/src/core/auth/qgsauthmanager.h @@ -77,10 +77,10 @@ class CORE_EXPORT QgsAuthManager : public QObject QSqlDatabase authDbConnection() const; //! Name of the authentication database table that stores configs - const QString authDbConfigTable() const { return smAuthConfigTable; } + const QString authDbConfigTable() const { return AUTH_CONFIG_TABLE; } //! Name of the authentication database table that stores server exceptions/configs - const QString authDbServersTable() const { return smAuthServersTable; } + const QString authDbServersTable() const { return AUTH_SERVERS_TABLE; } //! Initialize QCA, prioritize qca-ossl plugin and optionally set up the authentication database bool init( const QString& pluginPath = QString::null ); @@ -168,7 +168,7 @@ class CORE_EXPORT QgsAuthManager : public QObject void setScheduledAuthDbEraseRequestEmitted( bool emitted ) { mScheduledDbEraseRequestEmitted = emitted; } //! Simple text tag describing authentication system for message logs - QString authManTag() const { return smAuthManTag; } + QString authManTag() const { return AUTH_MAN_TAG; } //! Instantiate and register existing C++ core authentication methods from plugins bool registerCoreAuthMethods(); @@ -238,7 +238,7 @@ class CORE_EXPORT QgsAuthManager : public QObject bool hasConfigId( const QString &txt ) const; //! Return regular expression for authcfg=.{7} key/value token for authentication ids - QString configIdRegex() const { return smAuthCfgRegex;} + QString configIdRegex() const { return AUTH_CFG_REGEX;} //! Get list of authentication ids from database QStringList configIds() const; @@ -505,7 +505,7 @@ class CORE_EXPORT QgsAuthManager : public QObject * @param tag Associated tag (title) * @param level Message log level */ - void messageOut( const QString& message, const QString& tag = smAuthManTag, QgsAuthManager::MessageLevel level = INFO ) const; + void messageOut( const QString& message, const QString& tag = AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = INFO ) const; /** * Emitted when a password has been verify (or not) @@ -586,26 +586,26 @@ class CORE_EXPORT QgsAuthManager : public QObject void insertCaCertInCache( QgsAuthCertUtils::CaCertSource source, const QList &certs ); #endif - const QString authDbPassTable() const { return smAuthPassTable; } + const QString authDbPassTable() const { return AUTH_PASS_TABLE; } - const QString authDbSettingsTable() const { return smAuthSettingsTable; } + const QString authDbSettingsTable() const { return AUTH_SETTINGS_TABLE; } - const QString authDbIdentitiesTable() const { return smAuthIdentitiesTable; } + const QString authDbIdentitiesTable() const { return AUTH_IDENTITIES_TABLE; } - const QString authDbAuthoritiesTable() const { return smAuthAuthoritiesTable; } + const QString authDbAuthoritiesTable() const { return AUTH_AUTHORITIES_TABLE; } - const QString authDbTrustTable() const { return smAuthTrustTable; } + const QString authDbTrustTable() const { return AUTH_TRUST_TABLE; } - static QgsAuthManager* smInstance; - static const QString smAuthConfigTable; - static const QString smAuthPassTable; - static const QString smAuthSettingsTable; - static const QString smAuthIdentitiesTable; - static const QString smAuthServersTable; - static const QString smAuthAuthoritiesTable; - static const QString smAuthTrustTable; - static const QString smAuthManTag; - static const QString smAuthCfgRegex; + static QgsAuthManager* sInstance; + static const QString AUTH_CONFIG_TABLE; + static const QString AUTH_PASS_TABLE; + static const QString AUTH_SETTINGS_TABLE; + static const QString AUTH_IDENTITIES_TABLE; + static const QString AUTH_SERVERS_TABLE; + static const QString AUTH_AUTHORITIES_TABLE; + static const QString AUTH_TRUST_TABLE; + static const QString AUTH_MAN_TAG; + static const QString AUTH_CFG_REGEX; bool mAuthInit; QString mAuthDbPath; diff --git a/src/core/composer/qgscomposermodel.cpp b/src/core/composer/qgscomposermodel.cpp index 659168a4ee4f..b241affc5a31 100644 --- a/src/core/composer/qgscomposermodel.cpp +++ b/src/core/composer/qgscomposermodel.cpp @@ -224,13 +224,6 @@ bool QgsComposerModel::setData( const QModelIndex & index, const QVariant & valu QVariant QgsComposerModel::headerData( int section, Qt::Orientation orientation, int role ) const { - static QIcon lockIcon; - if ( lockIcon.isNull() ) - lockIcon = QgsApplication::getThemeIcon( QStringLiteral( "/locked.svg" ) ); - static QIcon showIcon; - if ( showIcon.isNull() ) - showIcon = QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowAllLayers.svg" ) ); - switch ( role ) { case Qt::DisplayRole: @@ -246,11 +239,11 @@ QVariant QgsComposerModel::headerData( int section, Qt::Orientation orientation, { if ( section == Visibility ) { - return qVariantFromValue( showIcon ); + return qVariantFromValue( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowAllLayers.svg" ) ) ); } else if ( section == LockStatus ) { - return qVariantFromValue( lockIcon ); + return qVariantFromValue( QgsApplication::getThemeIcon( QStringLiteral( "/locked.svg" ) ) ); } return QVariant(); diff --git a/src/core/dxf/qgsdxfexport.cpp b/src/core/dxf/qgsdxfexport.cpp index 497d223ab6fe..0246034000cb 100644 --- a/src/core/dxf/qgsdxfexport.cpp +++ b/src/core/dxf/qgsdxfexport.cpp @@ -316,7 +316,7 @@ int QgsDxfExport::sDxfColors[][3] = { 255, 255, 255 }, }; -const char *QgsDxfExport::sDxfEncodings[][2] = +const char *QgsDxfExport::DXF_ENCODINGS[][2] = { { "ASCII", "" }, { "8859_1", "ISO-8859-1" }, @@ -4211,13 +4211,13 @@ QString QgsDxfExport::dxfEncoding( const QString &name ) continue; int i; - for ( i = 0; i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) && name != sDxfEncodings[i][1]; ++i ) + for ( i = 0; i < static_cast< int >( sizeof( DXF_ENCODINGS ) / sizeof( *DXF_ENCODINGS ) ) && name != DXF_ENCODINGS[i][1]; ++i ) ; - if ( i == static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) ) + if ( i == static_cast< int >( sizeof( DXF_ENCODINGS ) / sizeof( *DXF_ENCODINGS ) ) ) continue; - return sDxfEncodings[i][0]; + return DXF_ENCODINGS[i][0]; } return QString::null; @@ -4229,10 +4229,10 @@ QStringList QgsDxfExport::encodings() Q_FOREACH ( QByteArray codec, QTextCodec::availableCodecs() ) { int i; - for ( i = 0; i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) && strcmp( codec.data(), sDxfEncodings[i][1] ) != 0; ++i ) + for ( i = 0; i < static_cast< int >( sizeof( DXF_ENCODINGS ) / sizeof( *DXF_ENCODINGS ) ) && strcmp( codec.data(), DXF_ENCODINGS[i][1] ) != 0; ++i ) ; - if ( i < static_cast< int >( sizeof( sDxfEncodings ) / sizeof( *sDxfEncodings ) ) ) + if ( i < static_cast< int >( sizeof( DXF_ENCODINGS ) / sizeof( *DXF_ENCODINGS ) ) ) encodings << codec.data(); } return encodings; diff --git a/src/core/dxf/qgsdxfexport.h b/src/core/dxf/qgsdxfexport.h index c760d907779e..3a26a1bd29d9 100644 --- a/src/core/dxf/qgsdxfexport.h +++ b/src/core/dxf/qgsdxfexport.h @@ -341,7 +341,7 @@ class CORE_EXPORT QgsDxfExport QTextStream mTextStream; static int sDxfColors[][3]; - static const char *sDxfEncodings[][2]; + static const char *DXF_ENCODINGS[][2]; int mSymbolLayerCounter; //internal counter int mNextHandleId; diff --git a/src/core/fieldformatter/qgsdatetimefieldformatter.cpp b/src/core/fieldformatter/qgsdatetimefieldformatter.cpp index f597230c9147..7633f8b6c39b 100644 --- a/src/core/fieldformatter/qgsdatetimefieldformatter.cpp +++ b/src/core/fieldformatter/qgsdatetimefieldformatter.cpp @@ -20,9 +20,9 @@ #include "qgsfield.h" #include "qgsvectorlayer.h" -const QString QgsDateTimeFieldFormatter::DefaultDateFormat = QStringLiteral( "yyyy-MM-dd" ); -const QString QgsDateTimeFieldFormatter::DefaultTimeFormat = QStringLiteral( "HH:mm:ss" ); -const QString QgsDateTimeFieldFormatter::DefaultDateTimeFormat = QStringLiteral( "yyyy-MM-dd HH:mm:ss" ); +const QString QgsDateTimeFieldFormatter::DEFAULT_DATE_FORMAT = QStringLiteral( "yyyy-MM-dd" ); +const QString QgsDateTimeFieldFormatter::DEFAULT_TIME_FORMAT = QStringLiteral( "HH:mm:ss" ); +const QString QgsDateTimeFieldFormatter::DEFAULT_DATETIME_FORMAT = QStringLiteral( "yyyy-MM-dd HH:mm:ss" ); QString QgsDateTimeFieldFormatter::id() const @@ -65,12 +65,12 @@ QString QgsDateTimeFieldFormatter::defaultFormat( QVariant::Type type ) switch ( type ) { case QVariant::DateTime: - return QgsDateTimeFieldFormatter::DefaultDateTimeFormat; + return QgsDateTimeFieldFormatter::DEFAULT_DATETIME_FORMAT; break; case QVariant::Time: - return QgsDateTimeFieldFormatter::DefaultTimeFormat; + return QgsDateTimeFieldFormatter::DEFAULT_TIME_FORMAT; break; default: - return QgsDateTimeFieldFormatter::DefaultDateFormat; + return QgsDateTimeFieldFormatter::DEFAULT_DATE_FORMAT; } } diff --git a/src/core/fieldformatter/qgsdatetimefieldformatter.h b/src/core/fieldformatter/qgsdatetimefieldformatter.h index 6a6caa9d3d08..702c90d6842b 100644 --- a/src/core/fieldformatter/qgsdatetimefieldformatter.h +++ b/src/core/fieldformatter/qgsdatetimefieldformatter.h @@ -30,9 +30,9 @@ class CORE_EXPORT QgsDateTimeFieldFormatter : public QgsFieldFormatter { public: - static const QString DefaultDateFormat; - static const QString DefaultTimeFormat; - static const QString DefaultDateTimeFormat; + static const QString DEFAULT_DATE_FORMAT; + static const QString DEFAULT_TIME_FORMAT; + static const QString DEFAULT_DATETIME_FORMAT; virtual QString id() const override; diff --git a/src/core/fieldformatter/qgsvaluemapfieldformatter.cpp b/src/core/fieldformatter/qgsvaluemapfieldformatter.cpp index f66d7050d86c..cb0d40def1ff 100644 --- a/src/core/fieldformatter/qgsvaluemapfieldformatter.cpp +++ b/src/core/fieldformatter/qgsvaluemapfieldformatter.cpp @@ -17,7 +17,7 @@ #include "qgsvectorlayer.h" -const QString QgsValueMapFieldFormatter::NullValue = QStringLiteral( "{2839923C-8B7D-419E-B84B-CA2FE9B80EC7}" ); +const QString QgsValueMapFieldFormatter::NULL_VALUE = QStringLiteral( "{2839923C-8B7D-419E-B84B-CA2FE9B80EC7}" ); QString QgsValueMapFieldFormatter::id() const { @@ -30,7 +30,7 @@ QString QgsValueMapFieldFormatter::representValue( QgsVectorLayer* layer, int fi QString valueInternalText; if ( value.isNull() ) - valueInternalText = NullValue; + valueInternalText = NULL_VALUE; else valueInternalText = value.toString(); diff --git a/src/core/fieldformatter/qgsvaluemapfieldformatter.h b/src/core/fieldformatter/qgsvaluemapfieldformatter.h index 6fe94b3379b9..a046b23849c0 100644 --- a/src/core/fieldformatter/qgsvaluemapfieldformatter.h +++ b/src/core/fieldformatter/qgsvaluemapfieldformatter.h @@ -44,7 +44,7 @@ class CORE_EXPORT QgsValueMapFieldFormatter : public QgsFieldFormatter * Will be saved in the configuration when a value is NULL. * It's the magic UUID {2839923C-8B7D-419E-B84B-CA2FE9B80EC7} */ - static const QString NullValue; + static const QString NULL_VALUE; virtual QString id() const override; diff --git a/src/core/geometry/qgsgeos.h b/src/core/geometry/qgsgeos.h index 68dfa038b8c7..846bc2d5f068 100644 --- a/src/core/geometry/qgsgeos.h +++ b/src/core/geometry/qgsgeos.h @@ -244,7 +244,7 @@ class GEOSException // clazy:exclude=rule-of-three private: QString msg; - static QString& lastMsg() { static QString _lastMsg; return _lastMsg; } + static QString& lastMsg() { static QString sLastMsg; return sLastMsg; } }; /// @endcond diff --git a/src/core/geometry/qgswkbtypes.cpp b/src/core/geometry/qgswkbtypes.cpp index b8bdb307d616..d499611fb5c1 100644 --- a/src/core/geometry/qgswkbtypes.cpp +++ b/src/core/geometry/qgswkbtypes.cpp @@ -23,7 +23,7 @@ * See details in QEP #17 ****************************************************************************/ -const QMap QgsWkbTypes::sEntries +const QMap QgsWkbTypes::ENTRIES { //register the known wkb types { Unknown, wkbEntry( QStringLiteral( "Unknown" ), false, Unknown, Unknown, Unknown, UnknownGeometry, false, false ) }, @@ -100,8 +100,8 @@ QgsWkbTypes::Type QgsWkbTypes::parseType( const QString &wktStr ) { QString typestr = wktStr.left( wktStr.indexOf( '(' ) ).simplified().remove( ' ' ); - QMap::const_iterator it = sEntries.constBegin(); - for ( ; it != sEntries.constEnd(); ++it ) + QMap::const_iterator it = ENTRIES.constBegin(); + for ( ; it != ENTRIES.constEnd(); ++it ) { if ( it.value().mName.compare( typestr, Qt::CaseInsensitive ) == 0 ) { @@ -113,8 +113,8 @@ QgsWkbTypes::Type QgsWkbTypes::parseType( const QString &wktStr ) QString QgsWkbTypes::displayString( Type type ) { - QMap< Type, wkbEntry >::const_iterator it = sEntries.constFind( type ); - if ( it == sEntries.constEnd() ) + QMap< Type, wkbEntry >::const_iterator it = ENTRIES.constFind( type ); + if ( it == ENTRIES.constEnd() ) { return QString::null; } diff --git a/src/core/geometry/qgswkbtypes.h b/src/core/geometry/qgswkbtypes.h index 45ae71cf2a7d..a72ba962b354 100644 --- a/src/core/geometry/qgswkbtypes.h +++ b/src/core/geometry/qgswkbtypes.h @@ -926,7 +926,7 @@ class CORE_EXPORT QgsWkbTypes bool mHasM; }; - static const QMap sEntries; + static const QMap ENTRIES; }; #endif // QGSWKBTYPES_H diff --git a/src/core/gps/parse.c b/src/core/gps/parse.c index a2d2dbf713e6..aca07ffc5f74 100644 --- a/src/core/gps/parse.c +++ b/src/core/gps/parse.c @@ -126,7 +126,7 @@ int _nmea_parse_time( const char *buff, int buff_sz, nmeaTIME *res ) */ int nmea_pack_type( const char *buff, int buff_sz ) { - static const char *pheads[] = + static const char *P_HEADS[] = { "GPGGA", "GPGSA", @@ -140,17 +140,17 @@ int nmea_pack_type( const char *buff, int buff_sz ) if ( buff_sz < 5 ) return GPNON; - else if ( 0 == memcmp( buff, pheads[0], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[0], 5 ) ) return GPGGA; - else if ( 0 == memcmp( buff, pheads[1], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[1], 5 ) ) return GPGSA; - else if ( 0 == memcmp( buff, pheads[2], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[2], 5 ) ) return GPGSV; - else if ( 0 == memcmp( buff, pheads[3], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[3], 5 ) ) return GPRMC; - else if ( 0 == memcmp( buff, pheads[4], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[4], 5 ) ) return GPVTG; - else if ( 0 == memcmp( buff, pheads[5], 5 ) ) + else if ( 0 == memcmp( buff, P_HEADS[5], 5 ) ) return GPRMC; return GPNON; diff --git a/src/core/layertree/qgslayertreemodellegendnode.cpp b/src/core/layertree/qgslayertreemodellegendnode.cpp index 0905d86eee29..ba92098d4b07 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.cpp +++ b/src/core/layertree/qgslayertreemodellegendnode.cpp @@ -176,7 +176,7 @@ QSize QgsSymbolLegendNode::minimumIconSize( QgsRenderContext* context ) const } if ( mItem.level() != 0 && !( model() && model()->testFlag( QgsLayerTreeModel::ShowLegendAsTree ) ) ) - minSz.setWidth( mItem.level() * sIndentSize + minSz.width() ); + minSz.setWidth( mItem.level() * INDENT_SIZE + minSz.width() ); return minSz; } @@ -279,10 +279,10 @@ QVariant QgsSymbolLegendNode::data( int role ) const else { // ident the symbol icon to make it look like a tree structure - QPixmap pix2( pix.width() + mItem.level() * sIndentSize, pix.height() ); + QPixmap pix2( pix.width() + mItem.level() * INDENT_SIZE, pix.height() ); pix2.fill( Qt::transparent ); QPainter p( &pix2 ); - p.drawPixmap( mItem.level() * sIndentSize, 0, pix ); + p.drawPixmap( mItem.level() * INDENT_SIZE, 0, pix ); p.end(); mPixmap = pix2; } diff --git a/src/core/layertree/qgslayertreemodellegendnode.h b/src/core/layertree/qgslayertreemodellegendnode.h index 05cb2d5c5799..44a1af2a0849 100644 --- a/src/core/layertree/qgslayertreemodellegendnode.h +++ b/src/core/layertree/qgslayertreemodellegendnode.h @@ -225,7 +225,7 @@ class CORE_EXPORT QgsSymbolLegendNode : public QgsLayerTreeModelLegendNode QSize mIconSize; // ident the symbol icon to make it look like a tree structure - static const int sIndentSize = 20; + static const int INDENT_SIZE = 20; // return a temporary context or null if legendMapViewData are not valid QgsRenderContext * createTemporaryRenderContext() const; diff --git a/src/core/qgis.cpp b/src/core/qgis.cpp index 4233b2de4e89..8a33cc0f8664 100644 --- a/src/core/qgis.cpp +++ b/src/core/qgis.cpp @@ -35,7 +35,7 @@ // // Version string -QString Qgis::QGIS_VERSION( QStringLiteral( VERSION ) ); +const QString Qgis::QGIS_VERSION( QStringLiteral( VERSION ) ); // development version const char* Qgis::QGIS_DEV_VERSION = QGSVERSION; @@ -45,7 +45,7 @@ const char* Qgis::QGIS_DEV_VERSION = QGSVERSION; const int Qgis::QGIS_VERSION_INT = VERSION_INT; // Release name -QString Qgis::QGIS_RELEASE_NAME( QStringLiteral( RELEASE_NAME ) ); +const QString Qgis::QGIS_RELEASE_NAME( QStringLiteral( RELEASE_NAME ) ); const QString GEOPROJ4 = QStringLiteral( "+proj=longlat +datum=WGS84 +no_defs" ); @@ -77,11 +77,11 @@ const float Qgis::DEFAULT_MAPTOPIXEL_THRESHOLD = 1.0f; const QColor Qgis::DEFAULT_HIGHLIGHT_COLOR = QColor( 255, 0, 0, 128 ); -double Qgis::DEFAULT_HIGHLIGHT_BUFFER_MM = 0.5; +const double Qgis::DEFAULT_HIGHLIGHT_BUFFER_MM = 0.5; -double Qgis::DEFAULT_HIGHLIGHT_MIN_WIDTH_MM = 1.0; +const double Qgis::DEFAULT_HIGHLIGHT_MIN_WIDTH_MM = 1.0; -double Qgis::SCALE_PRECISION = 0.9999999999; +const double Qgis::SCALE_PRECISION = 0.9999999999; double qgsPermissiveToDouble( QString string, bool &ok ) diff --git a/src/core/qgis.h b/src/core/qgis.h index 0be7beb05d7a..6faf70d98815 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -44,11 +44,11 @@ class CORE_EXPORT Qgis // Version constants // //! Version string - static QString QGIS_VERSION; + static const QString QGIS_VERSION; //! Version number used for comparing versions using the "Check QGIS Version" function static const int QGIS_VERSION_INT; //! Release name - static QString QGIS_RELEASE_NAME; + static const QString QGIS_RELEASE_NAME; //! The development version static const char* QGIS_DEV_VERSION; @@ -102,21 +102,17 @@ class CORE_EXPORT Qgis /** Default highlight buffer in mm. * @note added in 2.3 */ - static double DEFAULT_HIGHLIGHT_BUFFER_MM; + static const double DEFAULT_HIGHLIGHT_BUFFER_MM; /** Default highlight line/outline minimum width in mm. * @note added in 2.3 */ - static double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM; + static const double DEFAULT_HIGHLIGHT_MIN_WIDTH_MM; /** Fudge factor used to compare two scales. The code is often going from scale to scale * denominator. So it looses precision and, when a limit is inclusive, can lead to errors. * To avoid that, use this factor instead of using <= or >=. * @note added in 2.15*/ - static double SCALE_PRECISION; - - private: - // String representation of unit types (set in qgis.cpp) - static const char *qgisUnitTypes[]; + static const double SCALE_PRECISION; }; diff --git a/src/core/qgsconnectionpool.h b/src/core/qgsconnectionpool.h index 09fb14efa9d7..6ecdbb094ae3 100644 --- a/src/core/qgsconnectionpool.h +++ b/src/core/qgsconnectionpool.h @@ -55,7 +55,7 @@ class QgsConnectionPoolGroup { public: - static const int sMaxConcurrentConnections; + static const int MAX_CONCURRENT_CONNECTIONS; struct Item { diff --git a/src/core/qgscontexthelp.cpp b/src/core/qgscontexthelp.cpp index 2b73bd3fd4e0..a8f22e7dbe46 100644 --- a/src/core/qgscontexthelp.cpp +++ b/src/core/qgscontexthelp.cpp @@ -26,17 +26,17 @@ #include "qgslogger.h" -QgsContextHelp *QgsContextHelp::gContextHelp = nullptr; // Singleton instance +QgsContextHelp *QgsContextHelp::sContextHelp = nullptr; // Singleton instance void QgsContextHelp::run( const QString& context ) { - if ( !gContextHelp ) + if ( !sContextHelp ) { // Create singleton instance if it does not exist - gContextHelp = new QgsContextHelp(); + sContextHelp = new QgsContextHelp(); } - gContextHelp->showContext( context ); + sContextHelp->showContext( context ); } QgsContextHelp::QgsContextHelp() @@ -83,7 +83,7 @@ void QgsContextHelp::showContext( const QString& context ) { init(); - QString helpContents = gContextHelpTexts.value( context, + QString helpContents = sContextHelpTexts.value( context, tr( "

    Oops! QGIS can't find help for this form.

    " "The help file for %1 was not found for your language
    " "If you would like to create it, contact the QGIS development team" @@ -98,6 +98,6 @@ void QgsContextHelp::showContext( const QString& context ) void QgsContextHelp::processExited() { // Delete this object if the process terminates - delete gContextHelp; - gContextHelp = nullptr; + delete sContextHelp; + sContextHelp = nullptr; } diff --git a/src/core/qgscontexthelp.h b/src/core/qgscontexthelp.h index 0210843967f9..609e3be67e1c 100644 --- a/src/core/qgscontexthelp.h +++ b/src/core/qgscontexthelp.h @@ -53,10 +53,10 @@ class CORE_EXPORT QgsContextHelp : public QObject QProcess *start(); void showContext( const QString& context ); - static QgsContextHelp *gContextHelp; // Singleton instance + static QgsContextHelp *sContextHelp; // Singleton instance QProcess *mProcess; - static QHash gContextHelpTexts; + static QHash sContextHelpTexts; void init(); }; diff --git a/src/core/qgscoordinatereferencesystem.cpp b/src/core/qgscoordinatereferencesystem.cpp index e0610defcdaf..0b4eae37d783 100644 --- a/src/core/qgscoordinatereferencesystem.cpp +++ b/src/core/qgscoordinatereferencesystem.cpp @@ -47,18 +47,18 @@ CUSTOM_CRS_VALIDATION QgsCoordinateReferenceSystem::mCustomSrsValidation = nullptr; -QReadWriteLock QgsCoordinateReferenceSystem::mSrIdCacheLock; -QHash< long, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mSrIdCache; -QReadWriteLock QgsCoordinateReferenceSystem::mOgcLock; -QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mOgcCache; -QReadWriteLock QgsCoordinateReferenceSystem::mProj4CacheLock; -QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mProj4Cache; -QReadWriteLock QgsCoordinateReferenceSystem::mCRSWktLock; -QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mWktCache; -QReadWriteLock QgsCoordinateReferenceSystem::mCRSSrsIdLock; -QHash< long, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mSrsIdCache; -QReadWriteLock QgsCoordinateReferenceSystem::mCrsStringLock; -QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::mStringCache; +QReadWriteLock QgsCoordinateReferenceSystem::sSrIdCacheLock; +QHash< long, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sSrIdCache; +QReadWriteLock QgsCoordinateReferenceSystem::sOgcLock; +QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sOgcCache; +QReadWriteLock QgsCoordinateReferenceSystem::sProj4CacheLock; +QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sProj4Cache; +QReadWriteLock QgsCoordinateReferenceSystem::sCRSWktLock; +QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sWktCache; +QReadWriteLock QgsCoordinateReferenceSystem::sCRSSrsIdLock; +QHash< long, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sSrsIdCache; +QReadWriteLock QgsCoordinateReferenceSystem::sCrsStringLock; +QHash< QString, QgsCoordinateReferenceSystem > QgsCoordinateReferenceSystem::sStringCache; //-------------------------- @@ -150,16 +150,16 @@ bool QgsCoordinateReferenceSystem::createFromId( const long theId, CrsType theTy bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinition ) { - mCrsStringLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = mStringCache.constFind( theDefinition ); - if ( crsIt != mStringCache.constEnd() ) + sCrsStringLock.lockForRead(); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sStringCache.constFind( theDefinition ); + if ( crsIt != sStringCache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mCrsStringLock.unlock(); + sCrsStringLock.unlock(); return true; } - mCrsStringLock.unlock(); + sCrsStringLock.unlock(); bool result = false; QRegExp reCrsId( "^(epsg|postgis|internal)\\:(\\d+)$", Qt::CaseInsensitive ); @@ -201,9 +201,9 @@ bool QgsCoordinateReferenceSystem::createFromString( const QString &theDefinitio } } - mCrsStringLock.lockForWrite(); - mStringCache.insert( theDefinition, *this ); - mCrsStringLock.unlock(); + sCrsStringLock.lockForWrite(); + sStringCache.insert( theDefinition, *this ); + sCrsStringLock.unlock(); return result; } @@ -255,16 +255,16 @@ void QgsCoordinateReferenceSystem::setupESRIWktFix() bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) { - mOgcLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = mOgcCache.constFind( theCrs ); - if ( crsIt != mOgcCache.constEnd() ) + sOgcLock.lockForRead(); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sOgcCache.constFind( theCrs ); + if ( crsIt != sOgcCache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mOgcLock.unlock(); + sOgcLock.unlock(); return true; } - mOgcLock.unlock(); + sOgcLock.unlock(); QString wmsCrs = theCrs; @@ -278,18 +278,18 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) re.setPattern( QStringLiteral( "(user|custom|qgis):(\\d+)" ) ); if ( re.exactMatch( wmsCrs ) && createFromSrsId( re.cap( 2 ).toInt() ) ) { - mOgcLock.lockForWrite(); - mOgcCache.insert( theCrs, *this ); - mOgcLock.unlock(); + sOgcLock.lockForWrite(); + sOgcCache.insert( theCrs, *this ); + sOgcLock.unlock(); return true; } } if ( loadFromDb( QgsApplication::srsDbFilePath(), QStringLiteral( "lower(auth_name||':'||auth_id)" ), wmsCrs.toLower() ) ) { - mOgcLock.lockForWrite(); - mOgcCache.insert( theCrs, *this ); - mOgcLock.unlock(); + sOgcLock.lockForWrite(); + sOgcCache.insert( theCrs, *this ); + sOgcLock.unlock(); return true; } @@ -319,16 +319,16 @@ bool QgsCoordinateReferenceSystem::createFromOgcWmsCrs( const QString& theCrs ) d->mAxisInverted = false; d->mAxisInvertedDirty = false; - mOgcLock.lockForWrite(); - mOgcCache.insert( theCrs, *this ); - mOgcLock.unlock(); + sOgcLock.lockForWrite(); + sOgcCache.insert( theCrs, *this ); + sOgcLock.unlock(); return d->mIsValid; } - mOgcLock.lockForWrite(); - mOgcCache.insert( theCrs, QgsCoordinateReferenceSystem() ); - mOgcLock.unlock(); + sOgcLock.lockForWrite(); + sOgcCache.insert( theCrs, QgsCoordinateReferenceSystem() ); + sOgcLock.unlock(); return false; } @@ -354,46 +354,46 @@ void QgsCoordinateReferenceSystem::validate() bool QgsCoordinateReferenceSystem::createFromSrid( long id ) { - mSrIdCacheLock.lockForRead(); - QHash< long, QgsCoordinateReferenceSystem >::const_iterator crsIt = mSrIdCache.constFind( id ); - if ( crsIt != mSrIdCache.constEnd() ) + sSrIdCacheLock.lockForRead(); + QHash< long, QgsCoordinateReferenceSystem >::const_iterator crsIt = sSrIdCache.constFind( id ); + if ( crsIt != sSrIdCache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mSrIdCacheLock.unlock(); + sSrIdCacheLock.unlock(); return true; } - mSrIdCacheLock.unlock(); + sSrIdCacheLock.unlock(); bool result = loadFromDb( QgsApplication::srsDbFilePath(), QStringLiteral( "srid" ), QString::number( id ) ); - mSrIdCacheLock.lockForWrite(); - mSrIdCache.insert( id, *this ); - mSrIdCacheLock.unlock(); + sSrIdCacheLock.lockForWrite(); + sSrIdCache.insert( id, *this ); + sSrIdCacheLock.unlock(); return result; } bool QgsCoordinateReferenceSystem::createFromSrsId( long id ) { - mCRSSrsIdLock.lockForRead(); - QHash< long, QgsCoordinateReferenceSystem >::const_iterator crsIt = mSrsIdCache.constFind( id ); - if ( crsIt != mSrsIdCache.constEnd() ) + sCRSSrsIdLock.lockForRead(); + QHash< long, QgsCoordinateReferenceSystem >::const_iterator crsIt = sSrsIdCache.constFind( id ); + if ( crsIt != sSrsIdCache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mCRSSrsIdLock.unlock(); + sCRSSrsIdLock.unlock(); return true; } - mCRSSrsIdLock.unlock(); + sCRSSrsIdLock.unlock(); bool result = loadFromDb( id < USER_CRS_START_ID ? QgsApplication::srsDbFilePath() : QgsApplication::qgisUserDbFilePath(), QStringLiteral( "srs_id" ), QString::number( id ) ); - mCRSSrsIdLock.lockForWrite(); - mSrsIdCache.insert( id, *this ); - mCRSSrsIdLock.unlock(); + sCRSSrsIdLock.lockForWrite(); + sSrsIdCache.insert( id, *this ); + sCRSSrsIdLock.unlock(); return result; } @@ -515,16 +515,16 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) { d.detach(); - mCRSWktLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = mWktCache.constFind( theWkt ); - if ( crsIt != mWktCache.constEnd() ) + sCRSWktLock.lockForRead(); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sWktCache.constFind( theWkt ); + if ( crsIt != sWktCache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mCRSWktLock.unlock(); + sCRSWktLock.unlock(); return true; } - mCRSWktLock.unlock(); + sCRSWktLock.unlock(); d->mIsValid = false; d->mWkt.clear(); @@ -549,9 +549,9 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) QgsDebugMsg( QString( "UNUSED WKT: %1" ).arg( pWkt ) ); QgsDebugMsg( "---------------------------------------------------------------\n" ); - mCRSWktLock.lockForWrite(); - mWktCache.insert( theWkt, *this ); - mCRSWktLock.unlock(); + sCRSWktLock.lockForWrite(); + sWktCache.insert( theWkt, *this ); + sCRSWktLock.unlock(); return d->mIsValid; } @@ -562,9 +562,9 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) OSRGetAuthorityCode( d->mCRS, nullptr ) ); QgsDebugMsg( "authid recognized as " + authid ); bool result = createFromOgcWmsCrs( authid ); - mCRSWktLock.lockForWrite(); - mWktCache.insert( theWkt, *this ); - mCRSWktLock.unlock(); + sCRSWktLock.lockForWrite(); + sWktCache.insert( theWkt, *this ); + sCRSWktLock.unlock(); return result; } @@ -604,9 +604,9 @@ bool QgsCoordinateReferenceSystem::createFromWkt( const QString &theWkt ) CPLFree( proj4src ); - mCRSWktLock.lockForWrite(); - mWktCache.insert( theWkt, *this ); - mCRSWktLock.unlock(); + sCRSWktLock.lockForWrite(); + sWktCache.insert( theWkt, *this ); + sCRSWktLock.unlock(); return d->mIsValid; //setMapunits will be called by createfromproj above @@ -621,16 +621,16 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin { d.detach(); - mProj4CacheLock.lockForRead(); - QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = mProj4Cache.constFind( theProj4String ); - if ( crsIt != mProj4Cache.constEnd() ) + sProj4CacheLock.lockForRead(); + QHash< QString, QgsCoordinateReferenceSystem >::const_iterator crsIt = sProj4Cache.constFind( theProj4String ); + if ( crsIt != sProj4Cache.constEnd() ) { // found a match in the cache *this = crsIt.value(); - mProj4CacheLock.unlock(); + sProj4CacheLock.unlock(); return true; } - mProj4CacheLock.unlock(); + sProj4CacheLock.unlock(); // // Examples: @@ -651,9 +651,9 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin { QgsDebugMsg( "proj string supplied has no +proj argument" ); - mProj4CacheLock.lockForWrite(); - mProj4Cache.insert( theProj4String, *this ); - mProj4CacheLock.unlock(); + sProj4CacheLock.lockForWrite(); + sProj4Cache.insert( theProj4String, *this ); + sProj4CacheLock.unlock(); return d->mIsValid; } @@ -820,9 +820,9 @@ bool QgsCoordinateReferenceSystem::createFromProj4( const QString &theProj4Strin setProj4String( myProj4String ); } - mProj4CacheLock.lockForWrite(); - mProj4Cache.insert( theProj4String, *this ); - mProj4CacheLock.unlock(); + sProj4CacheLock.lockForWrite(); + sProj4Cache.insert( theProj4String, *this ); + sProj4CacheLock.unlock(); return d->mIsValid; } @@ -2348,22 +2348,22 @@ QStringList QgsCoordinateReferenceSystem::recentProjections() void QgsCoordinateReferenceSystem::invalidateCache() { - mSrIdCacheLock.lockForWrite(); - mSrIdCache.clear(); - mSrIdCacheLock.unlock(); - mOgcLock.lockForWrite(); - mOgcCache.clear(); - mOgcLock.unlock(); - mProj4CacheLock.lockForWrite(); - mProj4Cache.clear(); - mProj4CacheLock.unlock(); - mCRSWktLock.lockForWrite(); - mWktCache.clear(); - mCRSWktLock.unlock(); - mCRSSrsIdLock.lockForWrite(); - mSrsIdCache.clear(); - mCRSSrsIdLock.unlock(); - mCrsStringLock.lockForWrite(); - mStringCache.clear(); - mCrsStringLock.unlock(); + sSrIdCacheLock.lockForWrite(); + sSrIdCache.clear(); + sSrIdCacheLock.unlock(); + sOgcLock.lockForWrite(); + sOgcCache.clear(); + sOgcLock.unlock(); + sProj4CacheLock.lockForWrite(); + sProj4Cache.clear(); + sProj4CacheLock.unlock(); + sCRSWktLock.lockForWrite(); + sWktCache.clear(); + sCRSWktLock.unlock(); + sCRSSrsIdLock.lockForWrite(); + sSrsIdCache.clear(); + sCRSSrsIdLock.unlock(); + sCrsStringLock.lockForWrite(); + sStringCache.clear(); + sCrsStringLock.unlock(); } diff --git a/src/core/qgscoordinatereferencesystem.h b/src/core/qgscoordinatereferencesystem.h index 9bf6f45bcfa0..3300d3fbe8d6 100644 --- a/src/core/qgscoordinatereferencesystem.h +++ b/src/core/qgscoordinatereferencesystem.h @@ -687,18 +687,18 @@ class CORE_EXPORT QgsCoordinateReferenceSystem // cache - static QReadWriteLock mSrIdCacheLock; - static QHash< long, QgsCoordinateReferenceSystem > mSrIdCache; - static QReadWriteLock mOgcLock; - static QHash< QString, QgsCoordinateReferenceSystem > mOgcCache; - static QReadWriteLock mProj4CacheLock; - static QHash< QString, QgsCoordinateReferenceSystem > mProj4Cache; - static QReadWriteLock mCRSWktLock; - static QHash< QString, QgsCoordinateReferenceSystem > mWktCache; - static QReadWriteLock mCRSSrsIdLock; - static QHash< long, QgsCoordinateReferenceSystem > mSrsIdCache; - static QReadWriteLock mCrsStringLock; - static QHash< QString, QgsCoordinateReferenceSystem > mStringCache; + static QReadWriteLock sSrIdCacheLock; + static QHash< long, QgsCoordinateReferenceSystem > sSrIdCache; + static QReadWriteLock sOgcLock; + static QHash< QString, QgsCoordinateReferenceSystem > sOgcCache; + static QReadWriteLock sProj4CacheLock; + static QHash< QString, QgsCoordinateReferenceSystem > sProj4Cache; + static QReadWriteLock sCRSWktLock; + static QHash< QString, QgsCoordinateReferenceSystem > sWktCache; + static QReadWriteLock sCRSSrsIdLock; + static QHash< long, QgsCoordinateReferenceSystem > sSrsIdCache; + static QReadWriteLock sCrsStringLock; + static QHash< QString, QgsCoordinateReferenceSystem > sStringCache; friend class TestQgsCoordinateReferenceSystem; }; diff --git a/src/core/qgscredentials.cpp b/src/core/qgscredentials.cpp index 546835c0075e..662468125217 100644 --- a/src/core/qgscredentials.cpp +++ b/src/core/qgscredentials.cpp @@ -18,22 +18,22 @@ #include -QgsCredentials *QgsCredentials::smInstance = nullptr; +QgsCredentials *QgsCredentials::sInstance = nullptr; void QgsCredentials::setInstance( QgsCredentials *theInstance ) { - if ( smInstance ) + if ( sInstance ) { QgsDebugMsg( "already registered an instance of QgsCredentials" ); } - smInstance = theInstance; + sInstance = theInstance; } QgsCredentials *QgsCredentials::instance() { - if ( smInstance ) - return smInstance; + if ( sInstance ) + return sInstance; return new QgsCredentialsNone(); } diff --git a/src/core/qgscredentials.h b/src/core/qgscredentials.h index 7ef653f60f06..7b9a5d7f073b 100644 --- a/src/core/qgscredentials.h +++ b/src/core/qgscredentials.h @@ -89,7 +89,7 @@ class CORE_EXPORT QgsCredentials QMap< QString, QPair > mCredentialCache; //! Pointer to the credential instance - static QgsCredentials *smInstance; + static QgsCredentials *sInstance; QMutex mMutex; }; diff --git a/src/core/qgscrscache.cpp b/src/core/qgscrscache.cpp index e2cba367954d..02c7dc3d8d30 100644 --- a/src/core/qgscrscache.cpp +++ b/src/core/qgscrscache.cpp @@ -21,8 +21,8 @@ QgsCoordinateTransformCache* QgsCoordinateTransformCache::instance() { - static QgsCoordinateTransformCache mInstance; - return &mInstance; + static QgsCoordinateTransformCache sInstance; + return &sInstance; } QgsCoordinateTransformCache::QgsCoordinateTransformCache() diff --git a/src/core/qgsdataitem.cpp b/src/core/qgsdataitem.cpp index 606e294a9da3..7571aa14d101 100644 --- a/src/core/qgsdataitem.cpp +++ b/src/core/qgsdataitem.cpp @@ -133,18 +133,18 @@ QIcon QgsDataCollectionItem::iconDataCollection() QIcon QgsDataCollectionItem::iconDir() { - static QIcon icon; + static QIcon sIcon; - if ( icon.isNull() ) + if ( sIcon.isNull() ) { // initialize shared icons QStyle *style = QApplication::style(); - icon = QIcon( style->standardPixmap( QStyle::SP_DirClosedIcon ) ); - icon.addPixmap( style->standardPixmap( QStyle::SP_DirOpenIcon ), - QIcon::Normal, QIcon::On ); + sIcon = QIcon( style->standardPixmap( QStyle::SP_DirClosedIcon ) ); + sIcon.addPixmap( style->standardPixmap( QStyle::SP_DirOpenIcon ), + QIcon::Normal, QIcon::On ); } - return icon; + return sIcon; } QIcon QgsFavoritesItem::iconFavorites() @@ -158,7 +158,7 @@ QIcon QgsZipItem::iconZip() // icon from http://www.softicons.com/free-icons/application-icons/mega-pack-icons-1-by-nikolay-verin/winzip-folder-icon } -QgsAnimatedIcon * QgsDataItem::mPopulatingIcon = nullptr; +QgsAnimatedIcon * QgsDataItem::sPopulatingIcon = nullptr; QgsDataItem::QgsDataItem( QgsDataItem::Type type, QgsDataItem* parent, const QString& name, const QString& path ) // Do not pass parent to QObject, Qt would delete this when parent is deleted @@ -251,8 +251,8 @@ void QgsDataItem::moveToThread( QThread * targetThread ) QIcon QgsDataItem::icon() { - if ( state() == Populating && mPopulatingIcon ) - return mPopulatingIcon->icon(); + if ( state() == Populating && sPopulatingIcon ) + return sPopulatingIcon->icon(); if ( !mIcon.isNull() ) return mIcon; @@ -571,16 +571,16 @@ void QgsDataItem::setState( State state ) if ( state == Populating ) // start loading { - if ( !mPopulatingIcon ) + if ( !sPopulatingIcon ) { // TODO: ensure that QgsAnimatedIcon is created on UI thread only - mPopulatingIcon = new QgsAnimatedIcon( QgsApplication::iconPath( QStringLiteral( "/mIconLoading.gif" ) ) ); + sPopulatingIcon = new QgsAnimatedIcon( QgsApplication::iconPath( QStringLiteral( "/mIconLoading.gif" ) ) ); } - mPopulatingIcon->connectFrameChanged( this, SLOT( emitDataChanged() ) ); + sPopulatingIcon->connectFrameChanged( this, SLOT( emitDataChanged() ) ); } - else if ( mState == Populating && mPopulatingIcon ) // stop loading + else if ( mState == Populating && sPopulatingIcon ) // stop loading { - mPopulatingIcon->disconnectFrameChanged( this, SLOT( emitDataChanged() ) ); + sPopulatingIcon->disconnectFrameChanged( this, SLOT( emitDataChanged() ) ); } mState = state; @@ -1136,8 +1136,8 @@ QVector QgsFavoritesItem::createChildren( const QString& favDir ) } //----------------------------------------------------------------------- -QStringList QgsZipItem::mProviderNames = QStringList(); -QVector QgsZipItem::mDataItemPtr = QVector(); +QStringList QgsZipItem::sProviderNames = QStringList(); +QVector QgsZipItem::sDataItemPtr = QVector(); QgsZipItem::QgsZipItem( QgsDataItem* parent, const QString& name, const QString& path ) @@ -1160,7 +1160,7 @@ void QgsZipItem::init() mIconName = QStringLiteral( "/mIconZip.png" ); mVsiPrefix = vsiPrefix( mFilePath ); - if ( mProviderNames.isEmpty() ) + if ( sProviderNames.isEmpty() ) { // QStringList keys = QgsProviderRegistry::instance()->providerList(); // only use GDAL and OGR providers as we use the VSIFILE mechanism @@ -1199,8 +1199,8 @@ void QgsZipItem::init() } // mLibraries.append( library ); - mDataItemPtr.append( dataItem ); - mProviderNames.append( k ); + sDataItemPtr.append( dataItem ); + sProviderNames.append( k ); } else { @@ -1310,10 +1310,10 @@ QVector QgsZipItem::createChildren() QgsDebugMsgLevel( "tmpPath = " + tmpPath, 3 ); // Q_FOREACH( dataItem_t *dataItem, mDataItemPtr ) - for ( int i = 0; i < mProviderNames.size(); i++ ) + for ( int i = 0; i < sProviderNames.size(); i++ ) { // ugly hack to remove .dbf file if there is a .shp file - if ( mProviderNames[i] == QLatin1String( "ogr" ) ) + if ( sProviderNames[i] == QLatin1String( "ogr" ) ) { if ( info.suffix().toLower() == QLatin1String( "dbf" ) ) { @@ -1327,10 +1327,10 @@ QVector QgsZipItem::createChildren() } // try to get data item from provider - dataItem_t *dataItem = mDataItemPtr.at( i ); + dataItem_t *dataItem = sDataItemPtr.at( i ); if ( dataItem ) { - QgsDebugMsgLevel( QString( "trying to load item %1 with %2" ).arg( tmpPath, mProviderNames.at( i ) ), 3 ); + QgsDebugMsgLevel( QString( "trying to load item %1 with %2" ).arg( tmpPath, sProviderNames.at( i ) ), 3 ); QgsDataItem * item = dataItem( tmpPath, this ); if ( item ) { @@ -1432,17 +1432,17 @@ QgsDataItem* QgsZipItem::itemFromPath( QgsDataItem* parent, const QString& fileP QgsDebugMsgLevel( QString( "will try to create a normal dataItem from filePath= %2 or vsiPath = %3" ).arg( filePath, vsiPath ), 3 ); // try to open using registered providers (gdal and ogr) - for ( int i = 0; i < mProviderNames.size(); i++ ) + for ( int i = 0; i < sProviderNames.size(); i++ ) { - dataItem_t *dataItem = mDataItemPtr.at( i ); + dataItem_t *dataItem = sDataItemPtr.at( i ); if ( dataItem ) { QgsDataItem *item = nullptr; // try first with normal path (Passthru) // this is to simplify .qml handling, and without this some tests will fail // (e.g. testZipItemVectorTransparency(), second test) - if (( mProviderNames.at( i ) == QLatin1String( "ogr" ) ) || - ( mProviderNames.at( i ) == QLatin1String( "gdal" ) && zipFileCount == 1 ) ) + if (( sProviderNames.at( i ) == QLatin1String( "ogr" ) ) || + ( sProviderNames.at( i ) == QLatin1String( "gdal" ) && zipFileCount == 1 ) ) item = dataItem( filePath, parent ); // try with /vsizip/ if ( ! item ) diff --git a/src/core/qgsdataitem.h b/src/core/qgsdataitem.h index 88249dce1e2a..ca0684d95a16 100644 --- a/src/core/qgsdataitem.h +++ b/src/core/qgsdataitem.h @@ -311,7 +311,7 @@ class CORE_EXPORT QgsDataItem : public QObject bool mDeferredDelete; QFutureWatcher< QVector > *mFutureWatcher; // number of items currently in loading (populating) state - static QgsAnimatedIcon * mPopulatingIcon; + static QgsAnimatedIcon * sPopulatingIcon; }; Q_DECLARE_OPERATORS_FOR_FLAGS( QgsDataItem::Capabilities ) @@ -575,8 +575,8 @@ class CORE_EXPORT QgsZipItem : public QgsDataCollectionItem QStringList getZipFileList(); //! @note not available via python bindings - static QVector mDataItemPtr; - static QStringList mProviderNames; + static QVector sDataItemPtr; + static QStringList sProviderNames; static QString vsiPrefix( const QString& uri ) { return qgsVsiPrefix( uri ); } diff --git a/src/core/qgsexpression.cpp b/src/core/qgsexpression.cpp index 801abca3a0e8..55ad3db63278 100644 --- a/src/core/qgsexpression.cpp +++ b/src/core/qgsexpression.cpp @@ -184,7 +184,7 @@ inline bool isNull( const QVariant& v ) /////////////////////////////////////////////// // operators -const char* QgsExpression::BinaryOperatorText[] = +const char* QgsExpression::BINARY_OPERATOR_TEXT[] = { // this must correspond (number and order of element) to the declaration of the enum BinaryOperator "OR", "AND", @@ -193,7 +193,7 @@ const char* QgsExpression::BinaryOperatorText[] = "||" }; -const char* QgsExpression::UnaryOperatorText[] = +const char* QgsExpression::UNARY_OPERATOR_TEXT[] = { // this must correspond (number and order of element) to the declaration of the enum UnaryOperator "NOT", "-" @@ -3703,9 +3703,9 @@ bool QgsExpression::registerFunction( QgsExpression::Function* function, bool tr { return false; } - QgsExpression::gmFunctions.append( function ); + QgsExpression::sFunctions.append( function ); if ( transferOwnership ) - QgsExpression::gmOwnedFunctions.append( function ); + QgsExpression::sOwnedFunctions.append( function ); return true; } @@ -3719,7 +3719,7 @@ bool QgsExpression::unregisterFunction( const QString& name ) int fnIdx = functionIndex( name ); if ( fnIdx != -1 ) { - QgsExpression::gmFunctions.removeAt( fnIdx ); + QgsExpression::sFunctions.removeAt( fnIdx ); return true; } return false; @@ -3727,23 +3727,23 @@ bool QgsExpression::unregisterFunction( const QString& name ) void QgsExpression::cleanRegisteredFunctions() { - qDeleteAll( QgsExpression::gmOwnedFunctions ); - QgsExpression::gmOwnedFunctions.clear(); + qDeleteAll( QgsExpression::sOwnedFunctions ); + QgsExpression::sOwnedFunctions.clear(); } -QStringList QgsExpression::gmBuiltinFunctions; +QStringList QgsExpression::sBuiltinFunctions; const QStringList& QgsExpression::BuiltinFunctions() { - if ( gmBuiltinFunctions.isEmpty() ) + if ( sBuiltinFunctions.isEmpty() ) { Functions(); // this method builds the gmBuiltinFunctions as well } - return gmBuiltinFunctions; + return sBuiltinFunctions; } -QList QgsExpression::gmFunctions; -QList QgsExpression::gmOwnedFunctions; +QList QgsExpression::sFunctions; +QList QgsExpression::sOwnedFunctions; const QList& QgsExpression::Functions() { @@ -3754,13 +3754,13 @@ const QList& QgsExpression::Functions() static QMutex sFunctionsMutex( QMutex::Recursive ); QMutexLocker locker( &sFunctionsMutex ); - if ( gmFunctions.isEmpty() ) + if ( sFunctions.isEmpty() ) { ParameterList aggParams = ParameterList() << Parameter( QStringLiteral( "expression" ) ) << Parameter( QStringLiteral( "group_by" ), true ) << Parameter( QStringLiteral( "filter" ), true ); - gmFunctions + sFunctions << new StaticFunction( QStringLiteral( "sqrt" ), ParameterList() << Parameter( QStringLiteral( "value" ) ), fcnSqrt, QStringLiteral( "Math" ) ) << new StaticFunction( QStringLiteral( "radians" ), ParameterList() << Parameter( QStringLiteral( "degrees" ) ), fcnRadians, QStringLiteral( "Math" ) ) << new StaticFunction( QStringLiteral( "degrees" ), ParameterList() << Parameter( QStringLiteral( "radians" ) ), fcnDegrees, QStringLiteral( "Math" ) ) @@ -3838,7 +3838,7 @@ const QList& QgsExpression::Functions() // referencedColumns callback: return AllAttributes if @parent variable is referenced if ( !node ) - return QSet() << QgsFeatureRequest::AllAttributes; + return QSet() << QgsFeatureRequest::ALL_ATTRIBUTES; if ( !node->args() ) return QSet(); @@ -3860,7 +3860,7 @@ const QList& QgsExpression::Functions() } if ( referencedVars.contains( "parent" ) || referencedVars.contains( QString() ) ) - return QSet() << QgsFeatureRequest::AllAttributes; + return QSet() << QgsFeatureRequest::ALL_ATTRIBUTES; else return referencedCols; }, @@ -3868,7 +3868,7 @@ const QList& QgsExpression::Functions() ) << new StaticFunction( QStringLiteral( "relation_aggregate" ), ParameterList() << Parameter( QStringLiteral( "relation" ) ) << Parameter( QStringLiteral( "aggregate" ) ) << Parameter( QStringLiteral( "expression" ) ) << Parameter( QStringLiteral( "concatenator" ), true ), - fcnAggregateRelation, QStringLiteral( "Aggregates" ), QString(), False, QSet() << QgsFeatureRequest::AllAttributes, true ) + fcnAggregateRelation, QStringLiteral( "Aggregates" ), QString(), False, QSet() << QgsFeatureRequest::ALL_ATTRIBUTES, true ) << new StaticFunction( QStringLiteral( "count" ), aggParams, fcnAggregateCount, QStringLiteral( "Aggregates" ), QString(), False, QSet(), true ) << new StaticFunction( QStringLiteral( "count_distinct" ), aggParams, fcnAggregateCountDistinct, QStringLiteral( "Aggregates" ), QString(), False, QSet(), true ) @@ -4085,8 +4085,8 @@ const QList& QgsExpression::Functions() //return all attributes string for referencedColumns - this is caught by // QgsFeatureRequest::setSubsetOfAttributes and causes all attributes to be fetched by the // feature request - << new StaticFunction( QStringLiteral( "eval" ), 1, fcnEval, QStringLiteral( "General" ), QString(), true, QSet() << QgsFeatureRequest::AllAttributes ) - << new StaticFunction( QStringLiteral( "attribute" ), 2, fcnAttribute, QStringLiteral( "Record" ), QString(), false, QSet() << QgsFeatureRequest::AllAttributes ) + << new StaticFunction( QStringLiteral( "eval" ), 1, fcnEval, QStringLiteral( "General" ), QString(), true, QSet() << QgsFeatureRequest::ALL_ATTRIBUTES ) + << new StaticFunction( QStringLiteral( "attribute" ), 2, fcnAttribute, QStringLiteral( "Record" ), QString(), false, QSet() << QgsFeatureRequest::ALL_ATTRIBUTES ) // functions for arrays << new StaticFunction( QStringLiteral( "array" ), -1, fcnArray, QStringLiteral( "Arrays" ) ) @@ -4119,14 +4119,14 @@ const QList& QgsExpression::Functions() QgsExpressionContextUtils::registerContextFunctions(); //QgsExpression has ownership of all built-in functions - Q_FOREACH ( QgsExpression::Function* func, gmFunctions ) + Q_FOREACH ( QgsExpression::Function* func, sFunctions ) { - gmOwnedFunctions << func; - gmBuiltinFunctions << func->name(); - gmBuiltinFunctions.append( func->aliases() ); + sOwnedFunctions << func; + sBuiltinFunctions << func->name(); + sBuiltinFunctions.append( func->aliases() ); } } - return gmFunctions; + return sFunctions; } bool QgsExpression::checkExpression( const QString &text, const QgsExpressionContext *context, QString &errorMessage ) @@ -4304,7 +4304,7 @@ QSet QgsExpression::referencedAttributeIndexes( const QgsFields& fields ) c for ( const QString& fieldName : referencedFields ) { - if ( fieldName == QgsFeatureRequest::AllAttributes ) + if ( fieldName == QgsFeatureRequest::ALL_ATTRIBUTES ) { referencedIndexes = fields.allAttributesList().toSet(); break; @@ -4595,7 +4595,7 @@ bool QgsExpression::NodeUnaryOperator::prepare( QgsExpression *parent, const Qgs QString QgsExpression::NodeUnaryOperator::dump() const { - return QStringLiteral( "%1 %2" ).arg( UnaryOperatorText[mOp], mOperand->dump() ); + return QStringLiteral( "%1 %2" ).arg( UNARY_OPERATOR_TEXT[mOp], mOperand->dump() ); } QSet QgsExpression::NodeUnaryOperator::referencedColumns() const @@ -5087,7 +5087,7 @@ QString QgsExpression::NodeBinaryOperator::dump() const fmt += rOp && ( rOp->precedence() < precedence() ) ? "(%3)" : "%3"; } - return fmt.arg( mOpLeft->dump(), BinaryOperatorText[mOp], rdump ); + return fmt.arg( mOpLeft->dump(), BINARY_OPERATOR_TEXT[mOp], rdump ); } QSet QgsExpression::NodeBinaryOperator::referencedColumns() const @@ -5654,10 +5654,10 @@ QString QgsExpression::helpText( QString name ) { QgsExpression::initFunctionHelp(); - if ( !gFunctionHelpTexts.contains( name ) ) + if ( !sFunctionHelpTexts.contains( name ) ) return tr( "function help for %1 missing" ).arg( name ); - const Help &f = gFunctionHelpTexts[ name ]; + const Help &f = sFunctionHelpTexts[ name ]; name = f.mName; if ( f.mType == tr( "group" ) ) @@ -5764,93 +5764,93 @@ QString QgsExpression::helpText( QString name ) return helpContents; } -QHash QgsExpression::gVariableHelpTexts; +QHash QgsExpression::sVariableHelpTexts; void QgsExpression::initVariableHelp() { - if ( !gVariableHelpTexts.isEmpty() ) + if ( !sVariableHelpTexts.isEmpty() ) return; //global variables - gVariableHelpTexts.insert( QStringLiteral( "qgis_version" ), QCoreApplication::translate( "variable_help", "Current QGIS version string." ) ); - gVariableHelpTexts.insert( QStringLiteral( "qgis_version_no" ), QCoreApplication::translate( "variable_help", "Current QGIS version number." ) ); - gVariableHelpTexts.insert( QStringLiteral( "qgis_release_name" ), QCoreApplication::translate( "variable_help", "Current QGIS release name." ) ); - gVariableHelpTexts.insert( QStringLiteral( "qgis_os_name" ), QCoreApplication::translate( "variable_help", "Operating system name, e.g., 'windows', 'linux' or 'osx'." ) ); - gVariableHelpTexts.insert( QStringLiteral( "qgis_platform" ), QCoreApplication::translate( "variable_help", "QGIS platform, e.g., 'desktop' or 'server'." ) ); - gVariableHelpTexts.insert( QStringLiteral( "user_account_name" ), QCoreApplication::translate( "variable_help", "Current user's operating system account name." ) ); - gVariableHelpTexts.insert( QStringLiteral( "user_full_name" ), QCoreApplication::translate( "variable_help", "Current user's operating system user name (if available)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "qgis_version" ), QCoreApplication::translate( "variable_help", "Current QGIS version string." ) ); + sVariableHelpTexts.insert( QStringLiteral( "qgis_version_no" ), QCoreApplication::translate( "variable_help", "Current QGIS version number." ) ); + sVariableHelpTexts.insert( QStringLiteral( "qgis_release_name" ), QCoreApplication::translate( "variable_help", "Current QGIS release name." ) ); + sVariableHelpTexts.insert( QStringLiteral( "qgis_os_name" ), QCoreApplication::translate( "variable_help", "Operating system name, e.g., 'windows', 'linux' or 'osx'." ) ); + sVariableHelpTexts.insert( QStringLiteral( "qgis_platform" ), QCoreApplication::translate( "variable_help", "QGIS platform, e.g., 'desktop' or 'server'." ) ); + sVariableHelpTexts.insert( QStringLiteral( "user_account_name" ), QCoreApplication::translate( "variable_help", "Current user's operating system account name." ) ); + sVariableHelpTexts.insert( QStringLiteral( "user_full_name" ), QCoreApplication::translate( "variable_help", "Current user's operating system user name (if available)." ) ); //project variables - gVariableHelpTexts.insert( QStringLiteral( "project_title" ), QCoreApplication::translate( "variable_help", "Title of current project." ) ); - gVariableHelpTexts.insert( QStringLiteral( "project_path" ), QCoreApplication::translate( "variable_help", "Full path (including file name) of current project." ) ); - gVariableHelpTexts.insert( QStringLiteral( "project_folder" ), QCoreApplication::translate( "variable_help", "Folder for current project." ) ); - gVariableHelpTexts.insert( QStringLiteral( "project_filename" ), QCoreApplication::translate( "variable_help", "Filename of current project." ) ); - gVariableHelpTexts.insert( QStringLiteral( "project_crs" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of project (e.g., 'EPSG:4326')." ) ); - gVariableHelpTexts.insert( QStringLiteral( "project_crs_definition" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of project (full definition)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_title" ), QCoreApplication::translate( "variable_help", "Title of current project." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_path" ), QCoreApplication::translate( "variable_help", "Full path (including file name) of current project." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_folder" ), QCoreApplication::translate( "variable_help", "Folder for current project." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_filename" ), QCoreApplication::translate( "variable_help", "Filename of current project." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_crs" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of project (e.g., 'EPSG:4326')." ) ); + sVariableHelpTexts.insert( QStringLiteral( "project_crs_definition" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of project (full definition)." ) ); //layer variables - gVariableHelpTexts.insert( QStringLiteral( "layer_name" ), QCoreApplication::translate( "variable_help", "Name of current layer." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layer_id" ), QCoreApplication::translate( "variable_help", "ID of current layer." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layer" ), QCoreApplication::translate( "variable_help", "The current layer." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layer_name" ), QCoreApplication::translate( "variable_help", "Name of current layer." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layer_id" ), QCoreApplication::translate( "variable_help", "ID of current layer." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layer" ), QCoreApplication::translate( "variable_help", "The current layer." ) ); //composition variables - gVariableHelpTexts.insert( QStringLiteral( "layout_numpages" ), QCoreApplication::translate( "variable_help", "Number of pages in composition." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layout_page" ), QCoreApplication::translate( "variable_help", "Current page number in composition." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layout_pageheight" ), QCoreApplication::translate( "variable_help", "Composition page height in mm." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layout_pagewidth" ), QCoreApplication::translate( "variable_help", "Composition page width in mm." ) ); - gVariableHelpTexts.insert( QStringLiteral( "layout_dpi" ), QCoreApplication::translate( "variable_help", "Composition resolution (DPI)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layout_numpages" ), QCoreApplication::translate( "variable_help", "Number of pages in composition." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layout_page" ), QCoreApplication::translate( "variable_help", "Current page number in composition." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layout_pageheight" ), QCoreApplication::translate( "variable_help", "Composition page height in mm." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layout_pagewidth" ), QCoreApplication::translate( "variable_help", "Composition page width in mm." ) ); + sVariableHelpTexts.insert( QStringLiteral( "layout_dpi" ), QCoreApplication::translate( "variable_help", "Composition resolution (DPI)." ) ); //atlas variables - gVariableHelpTexts.insert( QStringLiteral( "atlas_totalfeatures" ), QCoreApplication::translate( "variable_help", "Total number of features in atlas." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_featurenumber" ), QCoreApplication::translate( "variable_help", "Current atlas feature number." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_filename" ), QCoreApplication::translate( "variable_help", "Current atlas file name." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_pagename" ), QCoreApplication::translate( "variable_help", "Current atlas page name." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_feature" ), QCoreApplication::translate( "variable_help", "Current atlas feature (as feature object)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_featureid" ), QCoreApplication::translate( "variable_help", "Current atlas feature ID." ) ); - gVariableHelpTexts.insert( QStringLiteral( "atlas_geometry" ), QCoreApplication::translate( "variable_help", "Current atlas feature geometry." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_totalfeatures" ), QCoreApplication::translate( "variable_help", "Total number of features in atlas." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_featurenumber" ), QCoreApplication::translate( "variable_help", "Current atlas feature number." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_filename" ), QCoreApplication::translate( "variable_help", "Current atlas file name." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_pagename" ), QCoreApplication::translate( "variable_help", "Current atlas page name." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_feature" ), QCoreApplication::translate( "variable_help", "Current atlas feature (as feature object)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_featureid" ), QCoreApplication::translate( "variable_help", "Current atlas feature ID." ) ); + sVariableHelpTexts.insert( QStringLiteral( "atlas_geometry" ), QCoreApplication::translate( "variable_help", "Current atlas feature geometry." ) ); //composer item variables - gVariableHelpTexts.insert( QStringLiteral( "item_id" ), QCoreApplication::translate( "variable_help", "Composer item user ID (not necessarily unique)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "item_uuid" ), QCoreApplication::translate( "variable_help", "Composer item unique ID." ) ); - gVariableHelpTexts.insert( QStringLiteral( "item_left" ), QCoreApplication::translate( "variable_help", "Left position of composer item (in mm)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "item_top" ), QCoreApplication::translate( "variable_help", "Top position of composer item (in mm)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "item_width" ), QCoreApplication::translate( "variable_help", "Width of composer item (in mm)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "item_height" ), QCoreApplication::translate( "variable_help", "Height of composer item (in mm)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_id" ), QCoreApplication::translate( "variable_help", "Composer item user ID (not necessarily unique)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_uuid" ), QCoreApplication::translate( "variable_help", "Composer item unique ID." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_left" ), QCoreApplication::translate( "variable_help", "Left position of composer item (in mm)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_top" ), QCoreApplication::translate( "variable_help", "Top position of composer item (in mm)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_width" ), QCoreApplication::translate( "variable_help", "Width of composer item (in mm)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "item_height" ), QCoreApplication::translate( "variable_help", "Height of composer item (in mm)." ) ); //map settings item variables - gVariableHelpTexts.insert( QStringLiteral( "map_id" ), QCoreApplication::translate( "variable_help", "ID of current map destination. This will be 'canvas' for canvas renders, and the item ID for composer map renders." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_rotation" ), QCoreApplication::translate( "variable_help", "Current rotation of map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_scale" ), QCoreApplication::translate( "variable_help", "Current scale of map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_extent" ), QCoreApplication::translate( "variable_help", "Geometry representing the current extent of the map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_extent_center" ), QCoreApplication::translate( "variable_help", "Center of map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_extent_width" ), QCoreApplication::translate( "variable_help", "Width of map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_extent_height" ), QCoreApplication::translate( "variable_help", "Height of map." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_crs" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of map (e.g., 'EPSG:4326')." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_crs_definition" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of map (full definition)." ) ); - gVariableHelpTexts.insert( QStringLiteral( "map_units" ), QCoreApplication::translate( "variable_help", "Units for map measurements." ) ); - - gVariableHelpTexts.insert( QStringLiteral( "row_number" ), QCoreApplication::translate( "variable_help", "Stores the number of the current row." ) ); - gVariableHelpTexts.insert( QStringLiteral( "grid_number" ), QCoreApplication::translate( "variable_help", "Current grid annotation value." ) ); - gVariableHelpTexts.insert( QStringLiteral( "grid_axis" ), QCoreApplication::translate( "variable_help", "Current grid annotation axis (e.g., 'x' for longitude, 'y' for latitude)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_id" ), QCoreApplication::translate( "variable_help", "ID of current map destination. This will be 'canvas' for canvas renders, and the item ID for composer map renders." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_rotation" ), QCoreApplication::translate( "variable_help", "Current rotation of map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_scale" ), QCoreApplication::translate( "variable_help", "Current scale of map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_extent" ), QCoreApplication::translate( "variable_help", "Geometry representing the current extent of the map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_extent_center" ), QCoreApplication::translate( "variable_help", "Center of map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_extent_width" ), QCoreApplication::translate( "variable_help", "Width of map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_extent_height" ), QCoreApplication::translate( "variable_help", "Height of map." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_crs" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of map (e.g., 'EPSG:4326')." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_crs_definition" ), QCoreApplication::translate( "variable_help", "Coordinate reference system of map (full definition)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "map_units" ), QCoreApplication::translate( "variable_help", "Units for map measurements." ) ); + + sVariableHelpTexts.insert( QStringLiteral( "row_number" ), QCoreApplication::translate( "variable_help", "Stores the number of the current row." ) ); + sVariableHelpTexts.insert( QStringLiteral( "grid_number" ), QCoreApplication::translate( "variable_help", "Current grid annotation value." ) ); + sVariableHelpTexts.insert( QStringLiteral( "grid_axis" ), QCoreApplication::translate( "variable_help", "Current grid annotation axis (e.g., 'x' for longitude, 'y' for latitude)." ) ); //symbol variables - gVariableHelpTexts.insert( QStringLiteral( "geometry_part_count" ), QCoreApplication::translate( "variable_help", "Number of parts in rendered feature's geometry." ) ); - gVariableHelpTexts.insert( QStringLiteral( "geometry_part_num" ), QCoreApplication::translate( "variable_help", "Current geometry part number for feature being rendered." ) ); - gVariableHelpTexts.insert( QStringLiteral( "geometry_point_count" ), QCoreApplication::translate( "variable_help", "Number of points in the rendered geometry's part. It is only meaningful for line geometries and for symbol layers that set this variable." ) ); - gVariableHelpTexts.insert( QStringLiteral( "geometry_point_num" ), QCoreApplication::translate( "variable_help", "Current point number in the rendered geometry's part. It is only meaningful for line geometries and for symbol layers that set this variable." ) ); + sVariableHelpTexts.insert( QStringLiteral( "geometry_part_count" ), QCoreApplication::translate( "variable_help", "Number of parts in rendered feature's geometry." ) ); + sVariableHelpTexts.insert( QStringLiteral( "geometry_part_num" ), QCoreApplication::translate( "variable_help", "Current geometry part number for feature being rendered." ) ); + sVariableHelpTexts.insert( QStringLiteral( "geometry_point_count" ), QCoreApplication::translate( "variable_help", "Number of points in the rendered geometry's part. It is only meaningful for line geometries and for symbol layers that set this variable." ) ); + sVariableHelpTexts.insert( QStringLiteral( "geometry_point_num" ), QCoreApplication::translate( "variable_help", "Current point number in the rendered geometry's part. It is only meaningful for line geometries and for symbol layers that set this variable." ) ); - gVariableHelpTexts.insert( QStringLiteral( "symbol_color" ), QCoreApplication::translate( "symbol_color", "Color of symbol used to render the feature." ) ); - gVariableHelpTexts.insert( QStringLiteral( "symbol_angle" ), QCoreApplication::translate( "symbol_angle", "Angle of symbol used to render the feature (valid for marker symbols only)." ) ); + sVariableHelpTexts.insert( QStringLiteral( "symbol_color" ), QCoreApplication::translate( "symbol_color", "Color of symbol used to render the feature." ) ); + sVariableHelpTexts.insert( QStringLiteral( "symbol_angle" ), QCoreApplication::translate( "symbol_angle", "Angle of symbol used to render the feature (valid for marker symbols only)." ) ); //cluster variables - gVariableHelpTexts.insert( QStringLiteral( "cluster_color" ), QCoreApplication::translate( "cluster_color", "Color of symbols within a cluster, or NULL if symbols have mixed colors." ) ); - gVariableHelpTexts.insert( QStringLiteral( "cluster_size" ), QCoreApplication::translate( "cluster_size", "Number of symbols contained within a cluster." ) ); + sVariableHelpTexts.insert( QStringLiteral( "cluster_color" ), QCoreApplication::translate( "cluster_color", "Color of symbols within a cluster, or NULL if symbols have mixed colors." ) ); + sVariableHelpTexts.insert( QStringLiteral( "cluster_size" ), QCoreApplication::translate( "cluster_size", "Number of symbols contained within a cluster." ) ); } QString QgsExpression::variableHelpText( const QString &variableName, bool showValue, const QVariant &value ) { QgsExpression::initVariableHelp(); - QString text = gVariableHelpTexts.contains( variableName ) ? QStringLiteral( "

    %1

    " ).arg( gVariableHelpTexts.value( variableName ) ) : QString(); + QString text = sVariableHelpTexts.contains( variableName ) ? QStringLiteral( "

    %1

    " ).arg( sVariableHelpTexts.value( variableName ) ) : QString(); if ( showValue ) { QString valueString; @@ -5867,32 +5867,32 @@ QString QgsExpression::variableHelpText( const QString &variableName, bool showV return text; } -QHash QgsExpression::gGroups; +QHash QgsExpression::sGroups; QString QgsExpression::group( const QString& name ) { - if ( gGroups.isEmpty() ) + if ( sGroups.isEmpty() ) { - gGroups.insert( QStringLiteral( "General" ), tr( "General" ) ); - gGroups.insert( QStringLiteral( "Operators" ), tr( "Operators" ) ); - gGroups.insert( QStringLiteral( "Conditionals" ), tr( "Conditionals" ) ); - gGroups.insert( QStringLiteral( "Fields and Values" ), tr( "Fields and Values" ) ); - gGroups.insert( QStringLiteral( "Math" ), tr( "Math" ) ); - gGroups.insert( QStringLiteral( "Conversions" ), tr( "Conversions" ) ); - gGroups.insert( QStringLiteral( "Date and Time" ), tr( "Date and Time" ) ); - gGroups.insert( QStringLiteral( "String" ), tr( "String" ) ); - gGroups.insert( QStringLiteral( "Color" ), tr( "Color" ) ); - gGroups.insert( QStringLiteral( "GeometryGroup" ), tr( "Geometry" ) ); - gGroups.insert( QStringLiteral( "Record" ), tr( "Record" ) ); - gGroups.insert( QStringLiteral( "Variables" ), tr( "Variables" ) ); - gGroups.insert( QStringLiteral( "Fuzzy Matching" ), tr( "Fuzzy Matching" ) ); - gGroups.insert( QStringLiteral( "Recent (%1)" ), tr( "Recent (%1)" ) ); + sGroups.insert( QStringLiteral( "General" ), tr( "General" ) ); + sGroups.insert( QStringLiteral( "Operators" ), tr( "Operators" ) ); + sGroups.insert( QStringLiteral( "Conditionals" ), tr( "Conditionals" ) ); + sGroups.insert( QStringLiteral( "Fields and Values" ), tr( "Fields and Values" ) ); + sGroups.insert( QStringLiteral( "Math" ), tr( "Math" ) ); + sGroups.insert( QStringLiteral( "Conversions" ), tr( "Conversions" ) ); + sGroups.insert( QStringLiteral( "Date and Time" ), tr( "Date and Time" ) ); + sGroups.insert( QStringLiteral( "String" ), tr( "String" ) ); + sGroups.insert( QStringLiteral( "Color" ), tr( "Color" ) ); + sGroups.insert( QStringLiteral( "GeometryGroup" ), tr( "Geometry" ) ); + sGroups.insert( QStringLiteral( "Record" ), tr( "Record" ) ); + sGroups.insert( QStringLiteral( "Variables" ), tr( "Variables" ) ); + sGroups.insert( QStringLiteral( "Fuzzy Matching" ), tr( "Fuzzy Matching" ) ); + sGroups.insert( QStringLiteral( "Recent (%1)" ), tr( "Recent (%1)" ) ); } //return the translated name for this group. If group does not //have a translated name in the gGroups hash, return the name //unchanged - return gGroups.value( name, name ); + return sGroups.value( name, name ); } QString QgsExpression::formatPreviewString( const QVariant& value ) @@ -6019,7 +6019,7 @@ bool QgsExpression::Function::usesGeometry( const QgsExpression::NodeFunction* n QSet QgsExpression::Function::referencedColumns( const NodeFunction* node ) const { Q_UNUSED( node ) - return QSet() << QgsFeatureRequest::AllAttributes; + return QSet() << QgsFeatureRequest::ALL_ATTRIBUTES; } bool QgsExpression::Function::operator==( const QgsExpression::Function& other ) const diff --git a/src/core/qgsexpression.h b/src/core/qgsexpression.h index 5335e433d442..7e40194ba7b2 100644 --- a/src/core/qgsexpression.h +++ b/src/core/qgsexpression.h @@ -395,10 +395,10 @@ class CORE_EXPORT QgsExpression }; //! @note not available in Python bindings - static const char* BinaryOperatorText[]; + static const char* BINARY_OPERATOR_TEXT[]; //! @note not available in Python bindings - static const char* UnaryOperatorText[]; + static const char* UNARY_OPERATOR_TEXT[]; /** \ingroup core * Represents a single parameter passed to a function. @@ -751,11 +751,11 @@ class CORE_EXPORT QgsExpression }; //! @note not available in Python bindings - static QList gmFunctions; + static QList sFunctions; static const QList& Functions(); //! @note not available in Python bindings - static QStringList gmBuiltinFunctions; + static QStringList sBuiltinFunctions; static const QStringList& BuiltinFunctions(); /** Registers a function to the expression engine. This is required to allow expressions to utilise the function. @@ -774,7 +774,7 @@ class CORE_EXPORT QgsExpression //! List of functions owned by the expression engine //! @note not available in Python bindings - static QList gmOwnedFunctions; + static QList sOwnedFunctions; /** Deletes all registered functions whose ownership have been transferred to the expression engine. * @note added in QGIS 2.12 @@ -1344,9 +1344,9 @@ class CORE_EXPORT QgsExpression QgsExpressionPrivate* d; - static QHash gFunctionHelpTexts; - static QHash gVariableHelpTexts; - static QHash gGroups; + static QHash sFunctionHelpTexts; + static QHash sVariableHelpTexts; + static QHash sGroups; //! @note not available in Python bindings static void initFunctionHelp(); diff --git a/src/core/qgsfeaturerequest.cpp b/src/core/qgsfeaturerequest.cpp index 796be15dc517..4567746b3fed 100644 --- a/src/core/qgsfeaturerequest.cpp +++ b/src/core/qgsfeaturerequest.cpp @@ -20,7 +20,7 @@ #include //constants -const QString QgsFeatureRequest::AllAttributes = QStringLiteral( "#!allattributes!#" ); +const QString QgsFeatureRequest::ALL_ATTRIBUTES = QStringLiteral( "#!allattributes!#" ); QgsFeatureRequest::QgsFeatureRequest() : mFilter( FilterNone ) @@ -197,7 +197,7 @@ QgsFeatureRequest& QgsFeatureRequest::setSubsetOfAttributes( const QgsAttributeL QgsFeatureRequest& QgsFeatureRequest::setSubsetOfAttributes( const QStringList& attrNames, const QgsFields& fields ) { - if ( attrNames.contains( QgsFeatureRequest::AllAttributes ) ) + if ( attrNames.contains( QgsFeatureRequest::ALL_ATTRIBUTES ) ) { //attribute string list contains the all attributes flag, so we must fetch all attributes return *this; @@ -218,7 +218,7 @@ QgsFeatureRequest& QgsFeatureRequest::setSubsetOfAttributes( const QStringList& QgsFeatureRequest& QgsFeatureRequest::setSubsetOfAttributes( const QSet& attrNames, const QgsFields& fields ) { - if ( attrNames.contains( QgsFeatureRequest::AllAttributes ) ) + if ( attrNames.contains( QgsFeatureRequest::ALL_ATTRIBUTES ) ) { //attribute string list contains the all attributes flag, so we must fetch all attributes return *this; diff --git a/src/core/qgsfeaturerequest.h b/src/core/qgsfeaturerequest.h index 761c795bc4e6..640d12fab32a 100644 --- a/src/core/qgsfeaturerequest.h +++ b/src/core/qgsfeaturerequest.h @@ -225,7 +225,7 @@ class CORE_EXPORT QgsFeatureRequest /** * A special attribute that if set matches all attributes */ - static const QString AllAttributes; + static const QString ALL_ATTRIBUTES; //! construct a default request: for all features get attributes and geometries QgsFeatureRequest(); diff --git a/src/core/qgsnetworkaccessmanager.cpp b/src/core/qgsnetworkaccessmanager.cpp index 07628fab7ba8..46857b2773fd 100644 --- a/src/core/qgsnetworkaccessmanager.cpp +++ b/src/core/qgsnetworkaccessmanager.cpp @@ -39,7 +39,7 @@ #include "qgsnetworkdiskcache.h" #include "qgsauthmanager.h" -QgsNetworkAccessManager *QgsNetworkAccessManager::smMainNAM = 0; +QgsNetworkAccessManager *QgsNetworkAccessManager::sMainNAM = 0; /// @cond PRIVATE class QgsNetworkProxyFactory : public QNetworkProxyFactory @@ -105,7 +105,7 @@ QgsNetworkAccessManager* QgsNetworkAccessManager::instance() QgsNetworkAccessManager *nam = &sInstances.localData(); if ( nam->thread() == qApp->thread() ) - smMainNAM = nam; + sMainNAM = nam; if ( !nam->mInitialized ) nam->setupDefaultProxyAndCache(); @@ -285,24 +285,24 @@ void QgsNetworkAccessManager::setupDefaultProxyAndCache() mInitialized = true; mUseSystemProxy = false; - Q_ASSERT( smMainNAM ); + Q_ASSERT( sMainNAM ); - if ( smMainNAM != this ) + if ( sMainNAM != this ) { connect( this, SIGNAL( authenticationRequired( QNetworkReply *, QAuthenticator * ) ), - smMainNAM, SIGNAL( authenticationRequired( QNetworkReply *, QAuthenticator * ) ), + sMainNAM, SIGNAL( authenticationRequired( QNetworkReply *, QAuthenticator * ) ), Qt::BlockingQueuedConnection ); connect( this, SIGNAL( proxyAuthenticationRequired( const QNetworkProxy &, QAuthenticator * ) ), - smMainNAM, SIGNAL( proxyAuthenticationRequired( const QNetworkProxy &, QAuthenticator * ) ), + sMainNAM, SIGNAL( proxyAuthenticationRequired( const QNetworkProxy &, QAuthenticator * ) ), Qt::BlockingQueuedConnection ); connect( this, SIGNAL( requestTimedOut( QNetworkReply* ) ), - smMainNAM, SIGNAL( requestTimedOut( QNetworkReply* ) ) ); + sMainNAM, SIGNAL( requestTimedOut( QNetworkReply* ) ) ); #ifndef QT_NO_SSL connect( this, SIGNAL( sslErrors( QNetworkReply *, const QList & ) ), - smMainNAM, SIGNAL( sslErrors( QNetworkReply *, const QList & ) ), + sMainNAM, SIGNAL( sslErrors( QNetworkReply *, const QList & ) ), Qt::BlockingQueuedConnection ); #endif } diff --git a/src/core/qgsnetworkaccessmanager.h b/src/core/qgsnetworkaccessmanager.h index 3448630b8771..06b499fd1c63 100644 --- a/src/core/qgsnetworkaccessmanager.h +++ b/src/core/qgsnetworkaccessmanager.h @@ -101,7 +101,7 @@ class CORE_EXPORT QgsNetworkAccessManager : public QNetworkAccessManager QStringList mExcludedURLs; bool mUseSystemProxy; bool mInitialized; - static QgsNetworkAccessManager *smMainNAM; + static QgsNetworkAccessManager *sMainNAM; }; #endif // QGSNETWORKACCESSMANAGER_H diff --git a/src/core/qgsnetworkdiskcache.cpp b/src/core/qgsnetworkdiskcache.cpp index 0eac8364abe1..97c20aed6655 100644 --- a/src/core/qgsnetworkdiskcache.cpp +++ b/src/core/qgsnetworkdiskcache.cpp @@ -18,8 +18,8 @@ #include "qgsnetworkdiskcache.h" -QgsNetworkDiskCache::ExpirableNetworkDiskCache QgsNetworkDiskCache::smDiskCache; -QMutex QgsNetworkDiskCache::smDiskCacheMutex; +QgsNetworkDiskCache::ExpirableNetworkDiskCache QgsNetworkDiskCache::sDiskCache; +QMutex QgsNetworkDiskCache::sDiskCacheMutex; QgsNetworkDiskCache::QgsNetworkDiskCache( QObject *parent ) : QNetworkDiskCache( parent ) @@ -28,84 +28,84 @@ QgsNetworkDiskCache::QgsNetworkDiskCache( QObject *parent ) QString QgsNetworkDiskCache::cacheDirectory() const { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.cacheDirectory(); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.cacheDirectory(); } void QgsNetworkDiskCache::setCacheDirectory( const QString &cacheDir ) { - QMutexLocker lock( &smDiskCacheMutex ); - smDiskCache.setCacheDirectory( cacheDir ); + QMutexLocker lock( &sDiskCacheMutex ); + sDiskCache.setCacheDirectory( cacheDir ); } qint64 QgsNetworkDiskCache::maximumCacheSize() const { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.maximumCacheSize(); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.maximumCacheSize(); } void QgsNetworkDiskCache::setMaximumCacheSize( qint64 size ) { - QMutexLocker lock( &smDiskCacheMutex ); - smDiskCache.setMaximumCacheSize( size ); + QMutexLocker lock( &sDiskCacheMutex ); + sDiskCache.setMaximumCacheSize( size ); } qint64 QgsNetworkDiskCache::cacheSize() const { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.cacheSize(); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.cacheSize(); } QNetworkCacheMetaData QgsNetworkDiskCache::metaData( const QUrl &url ) { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.metaData( url ); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.metaData( url ); } void QgsNetworkDiskCache::updateMetaData( const QNetworkCacheMetaData &metaData ) { - QMutexLocker lock( &smDiskCacheMutex ); - smDiskCache.updateMetaData( metaData ); + QMutexLocker lock( &sDiskCacheMutex ); + sDiskCache.updateMetaData( metaData ); } QIODevice *QgsNetworkDiskCache::data( const QUrl &url ) { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.data( url ); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.data( url ); } bool QgsNetworkDiskCache::remove( const QUrl &url ) { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.remove( url ); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.remove( url ); } QIODevice *QgsNetworkDiskCache::prepare( const QNetworkCacheMetaData &metaData ) { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.prepare( metaData ); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.prepare( metaData ); } void QgsNetworkDiskCache::insert( QIODevice *device ) { - QMutexLocker lock( &smDiskCacheMutex ); - smDiskCache.insert( device ); + QMutexLocker lock( &sDiskCacheMutex ); + sDiskCache.insert( device ); } QNetworkCacheMetaData QgsNetworkDiskCache::fileMetaData( const QString &fileName ) const { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.fileMetaData( fileName ); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.fileMetaData( fileName ); } qint64 QgsNetworkDiskCache::expire() { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.runExpire(); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.runExpire(); } void QgsNetworkDiskCache::clear() { - QMutexLocker lock( &smDiskCacheMutex ); - return smDiskCache.clear(); + QMutexLocker lock( &sDiskCacheMutex ); + return sDiskCache.clear(); } diff --git a/src/core/qgsnetworkdiskcache.h b/src/core/qgsnetworkdiskcache.h index af3c9bc2024a..90d417530109 100644 --- a/src/core/qgsnetworkdiskcache.h +++ b/src/core/qgsnetworkdiskcache.h @@ -90,8 +90,8 @@ class QgsNetworkDiskCache : public QNetworkDiskCache qint64 runExpire() { return QNetworkDiskCache::expire(); } }; - static ExpirableNetworkDiskCache smDiskCache; - static QMutex smDiskCacheMutex; + static ExpirableNetworkDiskCache sDiskCache; + static QMutex sDiskCacheMutex; friend class QgsNetworkAccessManager; }; diff --git a/src/core/qgsogcutils.cpp b/src/core/qgsogcutils.cpp index 22ae5c8c2a84..7f8377ff0bdf 100644 --- a/src/core/qgsogcutils.cpp +++ b/src/core/qgsogcutils.cpp @@ -1635,7 +1635,7 @@ QgsExpression* QgsOgcUtils::expressionFromOgcFilter( const QDomElement& element } -static const QMap sBinaryOperatorsTagNamesMap +static const QMap BINARY_OPERATORS_TAG_NAMES_MAP { // logical { QStringLiteral( "Or" ), QgsExpression::boOr }, @@ -1658,7 +1658,7 @@ static const QMap sBinaryOperatorsTagNamesMap static int binaryOperatorFromTagName( const QString& tagName ) { - return sBinaryOperatorsTagNamesMap.value( tagName, -1 ); + return BINARY_OPERATORS_TAG_NAMES_MAP.value( tagName, -1 ); } static QString binaryOperatorToTagName( QgsExpression::BinaryOperator op ) @@ -1667,7 +1667,7 @@ static QString binaryOperatorToTagName( QgsExpression::BinaryOperator op ) { return QStringLiteral( "PropertyIsLike" ); } - return sBinaryOperatorsTagNamesMap.key( op, QString() ); + return BINARY_OPERATORS_TAG_NAMES_MAP.key( op, QString() ); } static bool isBinaryOperator( const QString& tagName ) @@ -2288,7 +2288,7 @@ QDomElement QgsOgcUtilsExprToFilter::expressionUnaryOperatorToOgcFilter( const Q break; default: - mErrorMessage = QObject::tr( "Unary operator %1 not implemented yet" ).arg( QgsExpression::UnaryOperatorText[node->op()] ); + mErrorMessage = QObject::tr( "Unary operator %1 not implemented yet" ).arg( QgsExpression::UNARY_OPERATOR_TEXT[node->op()] ); return QDomElement(); } @@ -2342,7 +2342,7 @@ QDomElement QgsOgcUtilsExprToFilter::expressionBinaryOperatorToOgcFilter( const { // not implemented binary operators // TODO: regex, % (mod), ^ (pow) are not supported yet - mErrorMessage = QObject::tr( "Binary operator %1 not implemented yet" ).arg( QgsExpression::BinaryOperatorText[op] ); + mErrorMessage = QObject::tr( "Binary operator %1 not implemented yet" ).arg( QgsExpression::BINARY_OPERATOR_TEXT[op] ); return QDomElement(); } @@ -2434,7 +2434,7 @@ QDomElement QgsOgcUtilsExprToFilter::expressionInOperatorToOgcFilter( const QgsE return orElem; } -static const QMap sBinarySpatialOpsMap +static const QMap BINARY_SPATIAL_OPS_MAP { { QStringLiteral( "disjoint" ), QStringLiteral( "Disjoint" ) }, { QStringLiteral( "intersects" ), QStringLiteral( "Intersects" )}, @@ -2447,12 +2447,12 @@ static const QMap sBinarySpatialOpsMap static bool isBinarySpatialOperator( const QString& fnName ) { - return sBinarySpatialOpsMap.contains( fnName ); + return BINARY_SPATIAL_OPS_MAP.contains( fnName ); } static QString tagNameForSpatialOperator( const QString& fnName ) { - return sBinarySpatialOpsMap.value( fnName ); + return BINARY_SPATIAL_OPS_MAP.value( fnName ); } static bool isGeometryColumn( const QgsExpression::Node* node ) @@ -2703,7 +2703,7 @@ QDomElement QgsOgcUtilsSQLStatementToFilter::toOgcFilter( const QgsSQLStatement: break; default: - mErrorMessage = QObject::tr( "Unary operator %1 not implemented yet" ).arg( QgsSQLStatement::UnaryOperatorText[node->op()] ); + mErrorMessage = QObject::tr( "Unary operator %1 not implemented yet" ).arg( QgsSQLStatement::UNARY_OPERATOR_TEXT[node->op()] ); return QDomElement(); } @@ -2777,7 +2777,7 @@ QDomElement QgsOgcUtilsSQLStatementToFilter::toOgcFilter( const QgsSQLStatement: if ( opText.isEmpty() ) { // not implemented binary operators - mErrorMessage = QObject::tr( "Binary operator %1 not implemented yet" ).arg( QgsSQLStatement::BinaryOperatorText[op] ); + mErrorMessage = QObject::tr( "Binary operator %1 not implemented yet" ).arg( QgsSQLStatement::BINARY_OPERATOR_TEXT[op] ); return QDomElement(); } diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 9e2e643b6803..60e6c04d9c48 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -73,7 +73,7 @@ using namespace pal; based on my preferences, and to follow Krygier and Wood's placements more closer. (I'm not going to disagree with Denis Wood on anything cartography related...!) */ -QVector< QgsPalLayerSettings::PredefinedPointPosition > QgsPalLayerSettings::DEFAULT_PLACEMENT_ORDER = QVector< QgsPalLayerSettings::PredefinedPointPosition >() +const QVector< QgsPalLayerSettings::PredefinedPointPosition > QgsPalLayerSettings::DEFAULT_PLACEMENT_ORDER = QVector< QgsPalLayerSettings::PredefinedPointPosition >() << QgsPalLayerSettings::TopRight << QgsPalLayerSettings::TopLeft << QgsPalLayerSettings::BottomRight diff --git a/src/core/qgspallabeling.h b/src/core/qgspallabeling.h index 2faa7c1c9d38..3549e3da5843 100644 --- a/src/core/qgspallabeling.h +++ b/src/core/qgspallabeling.h @@ -679,7 +679,7 @@ class CORE_EXPORT QgsPalLayerSettings QgsTextFormat mFormat; - static QVector< PredefinedPointPosition > DEFAULT_PLACEMENT_ORDER; + static const QVector< PredefinedPointPosition > DEFAULT_PLACEMENT_ORDER; }; /** \ingroup core diff --git a/src/core/qgsproject.cpp b/src/core/qgsproject.cpp index 620bb4c3000d..bda178924c1e 100644 --- a/src/core/qgsproject.cpp +++ b/src/core/qgsproject.cpp @@ -1801,15 +1801,15 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro { QgsDebugCall; - static QString prevProjectFilePath; - static QDateTime prevProjectFileTimestamp; - static QDomDocument projectDocument; + static QString sPrevProjectFilePath; + static QDateTime sPrevProjectFileTimestamp; + static QDomDocument sProjectDocument; QDateTime projectFileTimestamp = QFileInfo( projectFilePath ).lastModified(); - if ( projectFilePath != prevProjectFilePath || projectFileTimestamp != prevProjectFileTimestamp ) + if ( projectFilePath != sPrevProjectFilePath || projectFileTimestamp != sPrevProjectFileTimestamp ) { - prevProjectFilePath.clear(); + sPrevProjectFilePath.clear(); QFile projectFile( projectFilePath ); if ( !projectFile.open( QIODevice::ReadOnly ) ) @@ -1817,19 +1817,19 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro return false; } - if ( !projectDocument.setContent( &projectFile ) ) + if ( !sProjectDocument.setContent( &projectFile ) ) { return false; } - prevProjectFilePath = projectFilePath; - prevProjectFileTimestamp = projectFileTimestamp; + sPrevProjectFilePath = projectFilePath; + sPrevProjectFileTimestamp = projectFileTimestamp; } // does project store pathes absolute or relative? bool useAbsolutePathes = true; - QDomElement propertiesElem = projectDocument.documentElement().firstChildElement( QStringLiteral( "properties" ) ); + QDomElement propertiesElem = sProjectDocument.documentElement().firstChildElement( QStringLiteral( "properties" ) ); if ( !propertiesElem.isNull() ) { QDomElement absElem = propertiesElem.firstChildElement( QStringLiteral( "Paths" ) ).firstChildElement( QStringLiteral( "Absolute" ) ); @@ -1839,7 +1839,7 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro } } - QDomElement projectLayersElem = projectDocument.documentElement().firstChildElement( QStringLiteral( "projectlayers" ) ); + QDomElement projectLayersElem = sProjectDocument.documentElement().firstChildElement( QStringLiteral( "projectlayers" ) ); if ( projectLayersElem.isNull() ) { return false; @@ -1927,7 +1927,7 @@ bool QgsProject::createEmbeddedLayer( const QString &layerId, const QString &pro } dsElem.removeChild( dsElem.childNodes().at( 0 ) ); - dsElem.appendChild( projectDocument.createTextNode( datasource ) ); + dsElem.appendChild( sProjectDocument.createTextNode( datasource ) ); } if ( addLayer( mapLayerElem, brokenNodes, vectorLayerList ) ) diff --git a/src/core/qgspythonrunner.cpp b/src/core/qgspythonrunner.cpp index 9a48b6fcab2c..0a0614afefcb 100644 --- a/src/core/qgspythonrunner.cpp +++ b/src/core/qgspythonrunner.cpp @@ -15,22 +15,22 @@ #include "qgspythonrunner.h" #include "qgslogger.h" -QgsPythonRunner* QgsPythonRunner::mInstance = nullptr; +QgsPythonRunner* QgsPythonRunner::sInstance = nullptr; /////////////////////////// // static methods bool QgsPythonRunner::isValid() { - return nullptr != mInstance; + return nullptr != sInstance; } bool QgsPythonRunner::run( const QString& command, const QString& messageOnError ) { - if ( mInstance ) + if ( sInstance ) { QgsDebugMsg( "Running " + command ); - return mInstance->runCommand( command, messageOnError ); + return sInstance->runCommand( command, messageOnError ); } else { @@ -41,9 +41,9 @@ bool QgsPythonRunner::run( const QString& command, const QString& messageOnError bool QgsPythonRunner::eval( const QString& command, QString& result ) { - if ( mInstance ) + if ( sInstance ) { - return mInstance->evalCommand( command, result ); + return sInstance->evalCommand( command, result ); } else { @@ -54,8 +54,8 @@ bool QgsPythonRunner::eval( const QString& command, QString& result ) void QgsPythonRunner::setInstance( QgsPythonRunner* runner ) { - delete mInstance; - mInstance = runner; + delete sInstance; + sInstance = runner; } /////////////////////////// diff --git a/src/core/qgspythonrunner.h b/src/core/qgspythonrunner.h index 9bfa6edc5b1f..75979f87246b 100644 --- a/src/core/qgspythonrunner.h +++ b/src/core/qgspythonrunner.h @@ -56,7 +56,7 @@ class CORE_EXPORT QgsPythonRunner virtual bool evalCommand( QString command, QString& result ) = 0; - static QgsPythonRunner* mInstance; + static QgsPythonRunner* sInstance; }; #endif // QGSPYTHONRUNNER_H diff --git a/src/core/qgsscalecalculator.cpp b/src/core/qgsscalecalculator.cpp index d8a9ace6ef2c..c05771849274 100644 --- a/src/core/qgsscalecalculator.cpp +++ b/src/core/qgsscalecalculator.cpp @@ -115,15 +115,15 @@ double QgsScaleCalculator::calculateGeographicDistance( const QgsRectangle &mapE // For a longitude change of 180 degrees double lat = ( mapExtent.yMaximum() + mapExtent.yMinimum() ) * 0.5; - const static double rads = ( 4.0 * atan( 1.0 ) ) / 180.0; - double a = pow( cos( lat * rads ), 2 ); + static const double RADS = ( 4.0 * atan( 1.0 ) ) / 180.0; + double a = pow( cos( lat * RADS ), 2 ); double c = 2.0 * atan2( sqrt( a ), sqrt( 1.0 - a ) ); - const static double RA = 6378000; // [m] + static const double RA = 6378000; // [m] // The eccentricity. This comes from sqrt(1.0 - rb*rb/(ra*ra)) with rb set // to 6357000 m. - const static double E = 0.0810820288; + static const double E = 0.0810820288; double radius = RA * ( 1.0 - E * E ) / - pow( 1.0 - E * E * sin( lat * rads ) * sin( lat * rads ), 1.5 ); + pow( 1.0 - E * E * sin( lat * RADS ) * sin( lat * RADS ), 1.5 ); double meters = ( mapExtent.xMaximum() - mapExtent.xMinimum() ) / 180.0 * radius * c; QgsDebugMsg( "Distance across map extent (m): " + QString::number( meters ) ); diff --git a/src/core/qgsslconnect.cpp b/src/core/qgsslconnect.cpp index b3b8951a2931..f0b8e0daca7c 100644 --- a/src/core/qgsslconnect.cpp +++ b/src/core/qgsslconnect.cpp @@ -20,7 +20,7 @@ #include #if defined(SPATIALITE_HAS_INIT_EX) -QHash QgsSLConnect::mSLconns; +QHash QgsSLConnect::sSLconns; #endif int QgsSLConnect::sqlite3_open( const char *filename, sqlite3 **ppDb ) @@ -37,7 +37,7 @@ int QgsSLConnect::sqlite3_open( const char *filename, sqlite3 **ppDb ) if ( res == SQLITE_OK ) { spatialite_init_ex( *ppDb, conn, 0 ); - mSLconns.insert( *ppDb, conn ); + sSLconns.insert( *ppDb, conn ); } #endif @@ -49,8 +49,8 @@ int QgsSLConnect::sqlite3_close( sqlite3 *db ) int res = ::sqlite3_close( db ); #if defined(SPATIALITE_HAS_INIT_EX) - if ( mSLconns.contains( db ) ) - spatialite_cleanup_ex( mSLconns.take( db ) ); + if ( sSLconns.contains( db ) ) + spatialite_cleanup_ex( sSLconns.take( db ) ); #endif if ( res != SQLITE_OK ) @@ -75,7 +75,7 @@ int QgsSLConnect::sqlite3_open_v2( const char *filename, sqlite3 **ppDb, int fla if ( res == SQLITE_OK ) { spatialite_init_ex( *ppDb, conn, 0 ); - mSLconns.insert( *ppDb, conn ); + sSLconns.insert( *ppDb, conn ); } #endif @@ -87,8 +87,8 @@ int QgsSLConnect::sqlite3_close_v2( sqlite3 *db ) int res = ::sqlite3_close( db ); #if defined(SPATIALITE_HAS_INIT_EX) - if ( mSLconns.contains( db ) ) - spatialite_cleanup_ex( mSLconns.take( db ) ); + if ( sSLconns.contains( db ) ) + spatialite_cleanup_ex( sSLconns.take( db ) ); #endif if ( res != SQLITE_OK ) diff --git a/src/core/qgsslconnect.h b/src/core/qgsslconnect.h index 5b4db206250f..e49c3949087c 100644 --- a/src/core/qgsslconnect.h +++ b/src/core/qgsslconnect.h @@ -37,7 +37,7 @@ class CORE_EXPORT QgsSLConnect #if defined(SPATIALITE_HAS_INIT_EX) private: - static QHash mSLconns; + static QHash sSLconns; #endif }; diff --git a/src/core/qgssqliteexpressioncompiler.cpp b/src/core/qgssqliteexpressioncompiler.cpp index 3d2f6f3d338d..de46cbae20e7 100644 --- a/src/core/qgssqliteexpressioncompiler.cpp +++ b/src/core/qgssqliteexpressioncompiler.cpp @@ -86,7 +86,7 @@ QString QgsSQLiteExpressionCompiler::quotedValue( const QVariant& value, bool& o QString QgsSQLiteExpressionCompiler::sqlFunctionFromFunctionName( const QString& fnName ) const { - static const QMap sFnNames + static const QMap FN_NAMES { { "abs", "abs" }, { "char", "char" }, @@ -97,7 +97,7 @@ QString QgsSQLiteExpressionCompiler::sqlFunctionFromFunctionName( const QString& { "upper", "upper" }, }; - return sFnNames.value( fnName, QString() ); + return FN_NAMES.value( fnName, QString() ); } QString QgsSQLiteExpressionCompiler::castToReal( const QString& value ) const diff --git a/src/core/qgssqlstatement.cpp b/src/core/qgssqlstatement.cpp index bfad00b357e5..3dbe6e357c87 100644 --- a/src/core/qgssqlstatement.cpp +++ b/src/core/qgssqlstatement.cpp @@ -19,7 +19,7 @@ #include #include -static const QRegExp identifierRE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" ); +static const QRegExp IDENTIFIER_RE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" ); // from parser extern QgsSQLStatement::Node* parse( const QString& str, QString& parserErrorMsg ); @@ -27,7 +27,7 @@ extern QgsSQLStatement::Node* parse( const QString& str, QString& parserErrorMsg /////////////////////////////////////////////// // operators -const char* QgsSQLStatement::BinaryOperatorText[] = +const char* QgsSQLStatement::BINARY_OPERATOR_TEXT[] = { // this must correspond (number and order of element) to the declaration of the enum BinaryOperator "OR", "AND", @@ -36,13 +36,13 @@ const char* QgsSQLStatement::BinaryOperatorText[] = "||" }; -const char* QgsSQLStatement::UnaryOperatorText[] = +const char* QgsSQLStatement::UNARY_OPERATOR_TEXT[] = { // this must correspond (number and order of element) to the declaration of the enum UnaryOperator "NOT", "-" }; -const char* QgsSQLStatement::JoinTypeText[] = +const char* QgsSQLStatement::JOIN_TYPE_TEXT[] = { // this must correspond (number and order of element) to the declaration of the enum JoinType "", "LEFT", "LEFT OUTER", "RIGHT", "RIGHT OUTER", "CROSS", "INNER", "FULL" @@ -74,7 +74,7 @@ QString QgsSQLStatement::quotedIdentifier( QString name ) QString QgsSQLStatement::quotedIdentifierIfNeeded( const QString& name ) { // This might not be complete, but it must be at least what we recognize - static const char* const reservedKeyWords[] = + static const char* const RESERVED_KEYWORDS[] = { "AND", "OR", "NOT", "LIKE", "IN", "IS", "BETWEEN", "NULL", "SELECT", "ALL", "DISTINCT", "CAST", "AS", "FROM", "JOIN", "ON", "USING", "WHERE", "ORDER", "BY", "ASC", "DESC", @@ -82,14 +82,14 @@ QString QgsSQLStatement::quotedIdentifierIfNeeded( const QString& name ) "OFFSET", "LIMIT", "GROUP", "HAVING" }; - for ( size_t i = 0; i < sizeof( reservedKeyWords ) / sizeof( reservedKeyWords[0] ); ++i ) + for ( size_t i = 0; i < sizeof( RESERVED_KEYWORDS ) / sizeof( RESERVED_KEYWORDS[0] ); ++i ) { - if ( name.compare( QString( reservedKeyWords[i] ), Qt::CaseInsensitive ) == 0 ) + if ( name.compare( QString( RESERVED_KEYWORDS[i] ), Qt::CaseInsensitive ) == 0 ) { return quotedIdentifier( name ); } } - return identifierRE.exactMatch( name ) ? name : quotedIdentifier( name ); + return IDENTIFIER_RE.exactMatch( name ) ? name : quotedIdentifier( name ); } QString QgsSQLStatement::stripQuotedIdentifier( QString text ) @@ -276,7 +276,7 @@ QString QgsSQLStatement::NodeList::dump() const QString QgsSQLStatement::NodeUnaryOperator::dump() const { - return QStringLiteral( "%1 %2" ).arg( UnaryOperatorText[mOp], mOperand->dump() ); + return QStringLiteral( "%1 %2" ).arg( UNARY_OPERATOR_TEXT[mOp], mOperand->dump() ); } QgsSQLStatement::Node*QgsSQLStatement::NodeUnaryOperator::clone() const @@ -394,7 +394,7 @@ QString QgsSQLStatement::NodeBinaryOperator::dump() const fmt += rOp && ( rOp->precedence() < precedence() ) ? "(%3)" : "%3"; } - return fmt.arg( mOpLeft->dump(), BinaryOperatorText[mOp], rdump ); + return fmt.arg( mOpLeft->dump(), BINARY_OPERATOR_TEXT[mOp], rdump ); } QgsSQLStatement::Node* QgsSQLStatement::NodeBinaryOperator::clone() const @@ -630,7 +630,7 @@ QString QgsSQLStatement::NodeJoin::dump() const QString ret; if ( mType != jtDefault ) { - ret += JoinTypeText[mType]; + ret += JOIN_TYPE_TEXT[mType]; ret += QLatin1String( " " ); } ret += QLatin1String( "JOIN " ); diff --git a/src/core/qgssqlstatement.h b/src/core/qgssqlstatement.h index 98e6979c583f..b4b477bebd83 100644 --- a/src/core/qgssqlstatement.h +++ b/src/core/qgssqlstatement.h @@ -163,13 +163,13 @@ class CORE_EXPORT QgsSQLStatement }; //! @note not available in Python bindings - static const char* BinaryOperatorText[]; + static const char* BINARY_OPERATOR_TEXT[]; //! @note not available in Python bindings - static const char* UnaryOperatorText[]; + static const char* UNARY_OPERATOR_TEXT[]; //! @note not available in Python bindings - static const char* JoinTypeText[]; + static const char* JOIN_TYPE_TEXT[]; ////// diff --git a/src/core/qgsvectordataprovider.cpp b/src/core/qgsvectordataprovider.cpp index aad903b7d0e6..0fcff273ee63 100644 --- a/src/core/qgsvectordataprovider.cpp +++ b/src/core/qgsvectordataprovider.cpp @@ -614,11 +614,11 @@ static bool _compareEncodings( const QString& s1, const QString& s2 ) QStringList QgsVectorDataProvider::availableEncodings() { - if ( smEncodings.isEmpty() ) + if ( sEncodings.isEmpty() ) { Q_FOREACH ( const QString& codec, QTextCodec::availableCodecs() ) { - smEncodings << codec; + sEncodings << codec; } #if 0 smEncodings << "BIG5"; @@ -670,9 +670,9 @@ QStringList QgsVectorDataProvider::availableEncodings() } // Do case-insensitive sorting of encodings - qSort( smEncodings.begin(), smEncodings.end(), _compareEncodings ); + qSort( sEncodings.begin(), sEncodings.end(), _compareEncodings ); - return smEncodings; + return sEncodings; } void QgsVectorDataProvider::clearErrors() @@ -816,7 +816,7 @@ QTextCodec* QgsVectorDataProvider::textEncoding() const return mEncoding; } -QStringList QgsVectorDataProvider::smEncodings; +QStringList QgsVectorDataProvider::sEncodings; QList QgsVectorDataProvider::discoverRelations( const QgsVectorLayer*, const QList& ) const { diff --git a/src/core/qgsvectordataprovider.h b/src/core/qgsvectordataprovider.h index 099721d82788..7d5f40709ebc 100644 --- a/src/core/qgsvectordataprovider.h +++ b/src/core/qgsvectordataprovider.h @@ -594,7 +594,7 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider //! List of errors mutable QStringList mErrors; - static QStringList smEncodings; + static QStringList sEncodings; /** * Includes this data provider in the specified transaction. Ownership of transaction is not transferred. diff --git a/src/core/raster/qgsrasterblock.cpp b/src/core/raster/qgsrasterblock.cpp index 99e2649ab46f..39ce6c7a1b88 100644 --- a/src/core/raster/qgsrasterblock.cpp +++ b/src/core/raster/qgsrasterblock.cpp @@ -25,7 +25,7 @@ #include "qgsrectangle.h" // See #9101 before any change of NODATA_COLOR! -const QRgb QgsRasterBlock::mNoDataColor = qRgba( 0, 0, 0, 0 ); +const QRgb QgsRasterBlock::NO_DATA_COLOR = qRgba( 0, 0, 0, 0 ); QgsRasterBlock::QgsRasterBlock() : mValid( true ) @@ -305,7 +305,7 @@ QRgb QgsRasterBlock::color( qgssize index ) const QRgb QgsRasterBlock::color( int row, int column ) const { - if ( !mImage ) return mNoDataColor; + if ( !mImage ) return NO_DATA_COLOR; return mImage->pixel( column, row ); } @@ -470,7 +470,7 @@ bool QgsRasterBlock::setIsNoData() return false; } QgsDebugMsgLevel( "Fill image", 4 ); - mImage->fill( mNoDataColor ); + mImage->fill( NO_DATA_COLOR ); return true; } } @@ -601,7 +601,7 @@ bool QgsRasterBlock::setIsNoDataExcept( QRect theExceptRect ) return false; } - QRgb nodataRgba = mNoDataColor; + QRgb nodataRgba = NO_DATA_COLOR; QRgb *nodataRow = new QRgb[mWidth]; // full row of no data int rgbSize = sizeof( QRgb ); for ( int c = 0; c < mWidth; c ++ ) diff --git a/src/core/raster/qgsrasterblock.h b/src/core/raster/qgsrasterblock.h index 6e6035041457..63f58800bc54 100644 --- a/src/core/raster/qgsrasterblock.h +++ b/src/core/raster/qgsrasterblock.h @@ -404,7 +404,7 @@ class CORE_EXPORT QgsRasterBlock // No data value double mNoDataValue; - static const QRgb mNoDataColor; + static const QRgb NO_DATA_COLOR; // Data block for numerical data types, not used with image data types // QByteArray does not seem to be intended for large data blocks, does it? diff --git a/src/core/raster/qgsrasterdataprovider.h b/src/core/raster/qgsrasterdataprovider.h index 334b2e396aed..666a7fc37609 100644 --- a/src/core/raster/qgsrasterdataprovider.h +++ b/src/core/raster/qgsrasterdataprovider.h @@ -478,8 +478,5 @@ class CORE_EXPORT QgsRasterDataProvider : public QgsDataProvider, public QgsRast mutable QgsRectangle mExtent; - static QStringList mPyramidResamplingListGdal; - static QgsStringMap mPyramidResamplingMapGdal; - }; #endif diff --git a/src/core/symbology-ng/qgscolorbrewerpalette.cpp b/src/core/symbology-ng/qgscolorbrewerpalette.cpp index 70621e96e4a6..be286d878ab5 100644 --- a/src/core/symbology-ng/qgscolorbrewerpalette.cpp +++ b/src/core/symbology-ng/qgscolorbrewerpalette.cpp @@ -25,7 +25,7 @@ You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2 */ // extracted ColorBrewer data -const char *QgsColorBrewerPalette::brewerString = +const char *QgsColorBrewerPalette::BREWER_STRING = "Spectral-3-252,141,89 255,255,191 153,213,148\n" "Spectral-4-215,25,28 253,174,97 171,221,164 43,131,186\n" "Spectral-5-215,25,28 253,174,97 255,255,191 171,221,164 43,131,186\n" diff --git a/src/core/symbology-ng/qgscolorbrewerpalette.h b/src/core/symbology-ng/qgscolorbrewerpalette.h index 508b2f26277c..b932d0b0a18f 100644 --- a/src/core/symbology-ng/qgscolorbrewerpalette.h +++ b/src/core/symbology-ng/qgscolorbrewerpalette.h @@ -30,7 +30,7 @@ class CORE_EXPORT QgsColorBrewerPalette static QList listSchemeColors( const QString& schemeName, int colors ) { QList pal; - QString palette( brewerString ); + QString palette( BREWER_STRING ); QStringList list = palette.split( QChar( '\n' ) ); Q_FOREACH ( const QString& entry, list ) { @@ -50,7 +50,7 @@ class CORE_EXPORT QgsColorBrewerPalette { QStringList schemes; - QString palette( brewerString ); + QString palette( BREWER_STRING ); QStringList list = palette.split( QChar( '\n' ) ); Q_FOREACH ( const QString& entry, list ) { @@ -67,7 +67,7 @@ class CORE_EXPORT QgsColorBrewerPalette { QList variants; - QString palette( brewerString ); + QString palette( BREWER_STRING ); QStringList list = palette.split( QChar( '\n' ) ); Q_FOREACH ( const QString& entry, list ) { @@ -81,7 +81,7 @@ class CORE_EXPORT QgsColorBrewerPalette } // extracted ColorBrewer data - static const char *brewerString; + static const char *BREWER_STRING; }; #endif // QGSCOLORBREWERPALETTE_H diff --git a/src/core/symbology-ng/qgscptcityarchive.cpp b/src/core/symbology-ng/qgscptcityarchive.cpp index 6be7ca64a6c0..45a3b9f76b25 100644 --- a/src/core/symbology-ng/qgscptcityarchive.cpp +++ b/src/core/symbology-ng/qgscptcityarchive.cpp @@ -39,10 +39,10 @@ #include "qgsapplication.h" #include "qgssymbollayerutils.h" -QString QgsCptCityArchive::mDefaultArchiveName; -QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::mArchiveRegistry; -QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::archiveRegistry() { return mArchiveRegistry; } -QMap< QString, QMap< QString, QString > > QgsCptCityArchive::mCopyingInfoMap; +QString QgsCptCityArchive::sDefaultArchiveName; +QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::sArchiveRegistry; +QMap< QString, QgsCptCityArchive* > QgsCptCityArchive::archiveRegistry() { return sArchiveRegistry; } +QMap< QString, QMap< QString, QString > > QgsCptCityArchive::sCopyingInfoMap; QgsCptCityArchive::QgsCptCityArchive( const QString& archiveName, const QString& baseDir ) : mArchiveName( archiveName ) @@ -115,7 +115,7 @@ QString QgsCptCityArchive::baseDir( QString archiveName ) // search for matching archive in the registry if ( archiveName.isNull() ) archiveName = DEFAULT_CPTCITY_ARCHIVE; - if ( QgsCptCityArchive* archive = mArchiveRegistry.value( archiveName, nullptr ) ) + if ( QgsCptCityArchive* archive = sArchiveRegistry.value( archiveName, nullptr ) ) return archive->baseDir(); else return defaultBaseDir(); @@ -176,10 +176,10 @@ QgsStringMap QgsCptCityArchive::copyingInfo( const QString& fileName ) if ( fileName.isNull() ) return copyingMap; - if ( QgsCptCityArchive::mCopyingInfoMap.contains( fileName ) ) + if ( QgsCptCityArchive::sCopyingInfoMap.contains( fileName ) ) { QgsDebugMsg( "found copying info in copyingInfoMap, file = " + fileName ); - return QgsCptCityArchive::mCopyingInfoMap.value( fileName ); + return QgsCptCityArchive::sCopyingInfoMap.value( fileName ); } QgsDebugMsg( "fileName = " + fileName ); @@ -266,7 +266,7 @@ QgsStringMap QgsCptCityArchive::copyingInfo( const QString& fileName ) } // save copyingMap for further access - QgsCptCityArchive::mCopyingInfoMap[ fileName ] = copyingMap; + QgsCptCityArchive::sCopyingInfoMap[ fileName ] = copyingMap; return copyingMap; } @@ -416,9 +416,9 @@ bool QgsCptCityArchive::isEmpty() QgsCptCityArchive* QgsCptCityArchive::defaultArchive() { QSettings settings; - mDefaultArchiveName = settings.value( QStringLiteral( "CptCity/archiveName" ), DEFAULT_CPTCITY_ARCHIVE ).toString(); - if ( QgsCptCityArchive::mArchiveRegistry.contains( mDefaultArchiveName ) ) - return QgsCptCityArchive::mArchiveRegistry.value( mDefaultArchiveName ); + sDefaultArchiveName = settings.value( QStringLiteral( "CptCity/archiveName" ), DEFAULT_CPTCITY_ARCHIVE ).toString(); + if ( QgsCptCityArchive::sArchiveRegistry.contains( sDefaultArchiveName ) ) + return QgsCptCityArchive::sArchiveRegistry.value( sDefaultArchiveName ); else return nullptr; } @@ -427,9 +427,9 @@ void QgsCptCityArchive::initArchive( const QString& archiveName, const QString& { QgsDebugMsg( "archiveName = " + archiveName + " archiveBaseDir = " + archiveBaseDir ); QgsCptCityArchive *archive = new QgsCptCityArchive( archiveName, archiveBaseDir ); - if ( mArchiveRegistry.contains( archiveName ) ) - delete mArchiveRegistry[ archiveName ]; - mArchiveRegistry[ archiveName ] = archive; + if ( sArchiveRegistry.contains( archiveName ) ) + delete sArchiveRegistry[ archiveName ]; + sArchiveRegistry[ archiveName ] = archive; } void QgsCptCityArchive::initDefaultArchive() @@ -441,7 +441,7 @@ void QgsCptCityArchive::initDefaultArchive() // sub-dir defaults to QString defArchiveName = settings.value( QStringLiteral( "CptCity/archiveName" ), DEFAULT_CPTCITY_ARCHIVE ).toString(); - if ( ! mArchiveRegistry.contains( defArchiveName ) ) + if ( ! sArchiveRegistry.contains( defArchiveName ) ) initArchive( defArchiveName, baseDir + '/' + defArchiveName ); } @@ -482,13 +482,13 @@ void QgsCptCityArchive::initArchives( bool loadAll ) QgsDebugMsg( QString( "not loading archive [%1] because dir %2 does not exist " ).arg( it.key(), it.value() ) ); } } - mDefaultArchiveName = defArchiveName; + sDefaultArchiveName = defArchiveName; } void QgsCptCityArchive::clearArchives() { - qDeleteAll( mArchiveRegistry ); - mArchiveRegistry.clear(); + qDeleteAll( sArchiveRegistry ); + sArchiveRegistry.clear(); } diff --git a/src/core/symbology-ng/qgscptcityarchive.h b/src/core/symbology-ng/qgscptcityarchive.h index e5d58d0c61e1..b11d2bebd4f7 100644 --- a/src/core/symbology-ng/qgscptcityarchive.h +++ b/src/core/symbology-ng/qgscptcityarchive.h @@ -80,13 +80,13 @@ class CORE_EXPORT QgsCptCityArchive QString mArchiveName; QString mBaseDir; - static QString mDefaultArchiveName; - static QMap< QString, QgsCptCityArchive* > mArchiveRegistry; + static QString sDefaultArchiveName; + static QMap< QString, QgsCptCityArchive* > sArchiveRegistry; // root items, namely directories at root of archive QVector< QgsCptCityDataItem* > mRootItems; QVector mSelectionItems; // mapping of copyinginfo, key is fileName - static QMap< QString, QMap< QString, QString > > mCopyingInfoMap; + static QMap< QString, QMap< QString, QString > > sCopyingInfoMap; }; diff --git a/src/core/symbology-ng/qgsfillsymbollayer.cpp b/src/core/symbology-ng/qgsfillsymbollayer.cpp index e6a469be30db..61530020904f 100644 --- a/src/core/symbology-ng/qgsfillsymbollayer.cpp +++ b/src/core/symbology-ng/qgsfillsymbollayer.cpp @@ -244,11 +244,11 @@ void QgsSimpleFillSymbolLayer::startRender( QgsSymbolRenderContext& context ) QColor selColor = context.renderContext().selectionColor(); QColor selPenColor = selColor == mColor ? selColor : mBorderColor; - if ( ! selectionIsOpaque ) selColor.setAlphaF( context.alpha() ); + if ( ! SELECTION_IS_OPAQUE ) selColor.setAlphaF( context.alpha() ); mSelBrush = QBrush( selColor ); // N.B. unless a "selection line color" is implemented in addition to the "selection color" option // this would mean symbols with "no fill" look the same whether or not they are selected - if ( selectFillStyle ) + if ( SELECT_FILL_STYLE ) mSelBrush.setStyle( mBrushStyle ); QColor borderColor = mBorderColor; @@ -844,7 +844,7 @@ void QgsGradientFillSymbolLayer::applyGradient( const QgsSymbolRenderContext &co void QgsGradientFillSymbolLayer::startRender( QgsSymbolRenderContext& context ) { QColor selColor = context.renderContext().selectionColor(); - if ( ! selectionIsOpaque ) selColor.setAlphaF( context.alpha() ); + if ( ! SELECTION_IS_OPAQUE ) selColor.setAlphaF( context.alpha() ); mSelBrush = QBrush( selColor ); } @@ -1143,7 +1143,7 @@ void QgsShapeburstFillSymbolLayer::startRender( QgsSymbolRenderContext& context { //TODO - check this QColor selColor = context.renderContext().selectionColor(); - if ( ! selectionIsOpaque ) selColor.setAlphaF( context.alpha() ); + if ( ! SELECTION_IS_OPAQUE ) selColor.setAlphaF( context.alpha() ); mSelBrush = QBrush( selColor ); } @@ -1624,13 +1624,13 @@ void QgsImageFillSymbolLayer::renderPolygon( const QPolygonF& points, QListrenderPolyline( points, context.feature(), context.renderContext(), -1, selectFillBorder && context.selected() ); + mOutline->renderPolyline( points, context.feature(), context.renderContext(), -1, SELECT_FILL_BORDER && context.selected() ); if ( rings ) { QList::const_iterator ringIt = rings->constBegin(); for ( ; ringIt != rings->constEnd(); ++ringIt ) { - mOutline->renderPolyline( *ringIt, context.feature(), context.renderContext(), -1, selectFillBorder && context.selected() ); + mOutline->renderPolyline( *ringIt, context.feature(), context.renderContext(), -1, SELECT_FILL_BORDER && context.selected() ); } } } diff --git a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp index 040b64499f19..a29b61469f2d 100644 --- a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp +++ b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.cpp @@ -176,8 +176,8 @@ void QgsRendererRange::toSld( QDomDocument &doc, QDomElement &element, QgsString /////////// -const int QgsRendererRangeLabelFormat::MaxPrecision = 15; -const int QgsRendererRangeLabelFormat::MinPrecision = -6; +const int QgsRendererRangeLabelFormat::MAX_PRECISION = 15; +const int QgsRendererRangeLabelFormat::MIN_PRECISION = -6; QgsRendererRangeLabelFormat::QgsRendererRangeLabelFormat() : mFormat( QStringLiteral( " %1 - %2 " ) ) @@ -216,7 +216,7 @@ bool QgsRendererRangeLabelFormat::operator!=( const QgsRendererRangeLabelFormat void QgsRendererRangeLabelFormat::setPrecision( int precision ) { // Limit the range of decimal places to a reasonable range - precision = qBound( MinPrecision, precision, MaxPrecision ); + precision = qBound( MIN_PRECISION, precision, MAX_PRECISION ); mPrecision = precision; mNumberScale = 1.0; mNumberSuffix = QLatin1String( "" ); diff --git a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h index 10819689352b..ccaf726d0d0d 100644 --- a/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h +++ b/src/core/symbology-ng/qgsgraduatedsymbolrenderer.h @@ -107,8 +107,8 @@ class CORE_EXPORT QgsRendererRangeLabelFormat void setFromDomElement( QDomElement &element ); void saveToDomElement( QDomElement &element ); - static const int MaxPrecision; - static const int MinPrecision; + static const int MAX_PRECISION; + static const int MIN_PRECISION; protected: QString mFormat; diff --git a/src/core/symbology-ng/qgslinesymbollayer.cpp b/src/core/symbology-ng/qgslinesymbollayer.cpp index d466afee3392..6d591bf65b79 100644 --- a/src/core/symbology-ng/qgslinesymbollayer.cpp +++ b/src/core/symbology-ng/qgslinesymbollayer.cpp @@ -225,7 +225,7 @@ void QgsSimpleLineSymbolLayer::startRender( QgsSymbolRenderContext& context ) mSelPen = mPen; QColor selColor = context.renderContext().selectionColor(); - if ( ! selectionIsOpaque ) + if ( ! SELECTION_IS_OPAQUE ) selColor.setAlphaF( context.alpha() ); mSelPen.setColor( selColor ); } diff --git a/src/core/symbology-ng/qgsmarkersymbollayer.cpp b/src/core/symbology-ng/qgsmarkersymbollayer.cpp index c6abee3bcb4d..9f84b3a0383f 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayer.cpp +++ b/src/core/symbology-ng/qgsmarkersymbollayer.cpp @@ -874,7 +874,7 @@ bool QgsSimpleMarkerSymbolLayer::prepareCache( QgsSymbolRenderContext& context ) int imageSize = ( static_cast< int >( scaledSize ) + pw ) / 2 * 2 + 1; // make image width, height odd; account for pen width double center = imageSize / 2.0; - if ( imageSize > mMaximumCacheWidth ) + if ( imageSize > MAXIMUM_CACHE_WIDTH ) { return false; } diff --git a/src/core/symbology-ng/qgsmarkersymbollayer.h b/src/core/symbology-ng/qgsmarkersymbollayer.h index c8e928cf3c2a..a438efc800ad 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayer.h +++ b/src/core/symbology-ng/qgsmarkersymbollayer.h @@ -379,7 +379,7 @@ class CORE_EXPORT QgsSimpleMarkerSymbolLayer : public QgsSimpleMarkerSymbolLayer //! be used when data defined properties are present bool mUsingCache; //! Maximum width/height of cache image - static const int mMaximumCacheWidth = 3000; + static const int MAXIMUM_CACHE_WIDTH = 3000; private: diff --git a/src/core/symbology-ng/qgsstyle.cpp b/src/core/symbology-ng/qgsstyle.cpp index 627fcfe8e2b8..8d74d4519eac 100644 --- a/src/core/symbology-ng/qgsstyle.cpp +++ b/src/core/symbology-ng/qgsstyle.cpp @@ -36,7 +36,7 @@ #define STYLE_CURRENT_VERSION "1" -QgsStyle *QgsStyle::mDefaultStyle = nullptr; +QgsStyle *QgsStyle::sDefaultStyle = nullptr; QgsStyle::QgsStyle() : QObject() @@ -51,27 +51,27 @@ QgsStyle::~QgsStyle() QgsStyle* QgsStyle::defaultStyle() // static { - if ( !mDefaultStyle ) + if ( !sDefaultStyle ) { QString styleFilename = QgsApplication::userStylePath(); // copy default style if user style doesn't exist if ( !QFile::exists( styleFilename ) ) { - mDefaultStyle = new QgsStyle; - mDefaultStyle->createDb( styleFilename ); + sDefaultStyle = new QgsStyle; + sDefaultStyle->createDb( styleFilename ); if ( QFile::exists( QgsApplication::defaultStylePath() ) ) { - mDefaultStyle->importXml( QgsApplication::defaultStylePath() ); + sDefaultStyle->importXml( QgsApplication::defaultStylePath() ); } } else { - mDefaultStyle = new QgsStyle; - mDefaultStyle->load( styleFilename ); + sDefaultStyle = new QgsStyle; + sDefaultStyle->load( styleFilename ); } } - return mDefaultStyle; + return sDefaultStyle; } diff --git a/src/core/symbology-ng/qgsstyle.h b/src/core/symbology-ng/qgsstyle.h index cea214b5ab14..491e70eb52e4 100644 --- a/src/core/symbology-ng/qgsstyle.h +++ b/src/core/symbology-ng/qgsstyle.h @@ -385,7 +385,7 @@ class CORE_EXPORT QgsStyle : public QObject sqlite3* mCurrentDB; - static QgsStyle* mDefaultStyle; + static QgsStyle* sDefaultStyle; //! Convenience function to open the DB and return a sqlite3 object bool openDB( const QString& filename ); diff --git a/src/core/symbology-ng/qgssvgcache.cpp b/src/core/symbology-ng/qgssvgcache.cpp index 450fd2cea986..8bce57524bf5 100644 --- a/src/core/symbology-ng/qgssvgcache.cpp +++ b/src/core/symbology-ng/qgssvgcache.cpp @@ -131,7 +131,7 @@ QImage QgsSvgCache::svgAsImage( const QString& file, double size, const QColor& long cachedDataSize = 0; cachedDataSize += currentEntry->svgContent.size(); cachedDataSize += static_cast< int >( currentEntry->size * currentEntry->size * hwRatio * 32 ); - if ( cachedDataSize > mMaximumSize / 2 ) + if ( cachedDataSize > MAXIMUM_SIZE / 2 ) { fitsInCache = false; delete currentEntry->image; @@ -908,7 +908,7 @@ void QgsSvgCache::trimToMaximumSize() return; } QgsSvgCacheEntry* entry = mLeastRecentEntry; - while ( entry && ( mTotalSize > mMaximumSize ) ) + while ( entry && ( mTotalSize > MAXIMUM_SIZE ) ) { QgsSvgCacheEntry* bkEntry = entry; entry = entry->nextEntry; diff --git a/src/core/symbology-ng/qgssvgcache.h b/src/core/symbology-ng/qgssvgcache.h index 1c8ab4041272..5b9e85a83178 100644 --- a/src/core/symbology-ng/qgssvgcache.h +++ b/src/core/symbology-ng/qgssvgcache.h @@ -237,8 +237,8 @@ class CORE_EXPORT QgsSvgCache : public QObject QgsSvgCacheEntry* mLeastRecentEntry; QgsSvgCacheEntry* mMostRecentEntry; - //Maximum cache size - static const long mMaximumSize = 20000000; + //! Maximum cache size + static const long MAXIMUM_SIZE = 20000000; //! Replaces parameters in elements of a dom node and calls method for all child nodes void replaceElemParams( QDomElement& elem, const QColor& fill, const QColor& outline, double outlineWidth ); diff --git a/src/core/symbology-ng/qgssymbollayer.h b/src/core/symbology-ng/qgssymbollayer.h index d538f8bd5aac..598473c66f2c 100644 --- a/src/core/symbology-ng/qgssymbollayer.h +++ b/src/core/symbology-ng/qgssymbollayer.h @@ -307,9 +307,12 @@ class CORE_EXPORT QgsSymbolLayer QgsFields mFields; // Configuration of selected symbology implementation - static const bool selectionIsOpaque = true; // Selection ignores symbol alpha - static const bool selectFillBorder = false; // Fill symbol layer also selects border symbology - static const bool selectFillStyle = false; // Fill symbol uses symbol layer style.. + //! Whether styles for selected features ignore symbol alpha + static const bool SELECTION_IS_OPAQUE = true; + //! Whether fill styles for selected features also highlight symbol border + static const bool SELECT_FILL_BORDER = false; + //! Whether fill styles for selected features uses symbol layer style + static const bool SELECT_FILL_STYLE = false; /** Saves all data defined properties to a string map. * @param stringMap destination string map diff --git a/src/gui/attributetable/qgsfeaturelistviewdelegate.cpp b/src/gui/attributetable/qgsfeaturelistviewdelegate.cpp index 5c3799c93429..b0ac9c59a80c 100644 --- a/src/gui/attributetable/qgsfeaturelistviewdelegate.cpp +++ b/src/gui/attributetable/qgsfeaturelistviewdelegate.cpp @@ -38,7 +38,7 @@ QgsFeatureListViewDelegate::QgsFeatureListViewDelegate( QgsFeatureListModel *lis QgsFeatureListViewDelegate::Element QgsFeatureListViewDelegate::positionToElement( QPoint pos ) { - if ( pos.x() > sIconSize ) + if ( pos.x() > ICON_SIZE ) { return EditElement; } @@ -66,18 +66,18 @@ void QgsFeatureListViewDelegate::setEditSelectionModel( QItemSelectionModel* edi QSize QgsFeatureListViewDelegate::sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const { Q_UNUSED( index ) - int height = sIconSize; + int height = ICON_SIZE; return QSize( option.rect.width(), qMax( height, option.fontMetrics.height() ) ); } void QgsFeatureListViewDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const { - static QPixmap selectedIcon; - if ( selectedIcon.isNull() ) - selectedIcon = QgsApplication::getThemePixmap( QStringLiteral( "/mIconSelected.svg" ) ); - static QPixmap deselectedIcon; - if ( deselectedIcon.isNull() ) - deselectedIcon = QgsApplication::getThemePixmap( QStringLiteral( "/mIconDeselected.svg" ) ); + static QPixmap sSelectedIcon; + if ( sSelectedIcon.isNull() ) + sSelectedIcon = QgsApplication::getThemePixmap( QStringLiteral( "/mIconSelected.svg" ) ); + static QPixmap sDeselectedIcon; + if ( sDeselectedIcon.isNull() ) + sDeselectedIcon = QgsApplication::getThemePixmap( QStringLiteral( "/mIconDeselected.svg" ) ); QString text = index.model()->data( index, Qt::EditRole ).toString(); QgsFeatureListModel::FeatureInfo featInfo = index.model()->data( index, Qt::UserRole ).value(); @@ -89,10 +89,10 @@ void QgsFeatureListViewDelegate::paint( QPainter *painter, const QStyleOptionVie QRect iconLayoutBounds( option.rect.x(), option.rect.y(), option.rect.height(), option.rect.height() ); - QPixmap icon = mFeatureSelectionModel->isSelected( index ) ? selectedIcon : deselectedIcon; + QPixmap icon = mFeatureSelectionModel->isSelected( index ) ? sSelectedIcon : sDeselectedIcon; // Scale up the icon if needed - if ( option.rect.height() > sIconSize ) + if ( option.rect.height() > ICON_SIZE ) { icon = icon.scaledToHeight( option.rect.height(), Qt::SmoothTransformation ); } diff --git a/src/gui/attributetable/qgsfeaturelistviewdelegate.h b/src/gui/attributetable/qgsfeaturelistviewdelegate.h index 92c5e700819b..64de57103126 100644 --- a/src/gui/attributetable/qgsfeaturelistviewdelegate.h +++ b/src/gui/attributetable/qgsfeaturelistviewdelegate.h @@ -32,7 +32,7 @@ class GUI_EXPORT QgsFeatureListViewDelegate : public QItemDelegate Q_OBJECT public: - static int const sIconSize = 24; + static int const ICON_SIZE = 24; enum Element { diff --git a/src/gui/editorwidgets/qgsdatetimeeditconfig.cpp b/src/gui/editorwidgets/qgsdatetimeeditconfig.cpp index c38d4ed7ffc1..4cca42b30d97 100644 --- a/src/gui/editorwidgets/qgsdatetimeeditconfig.cpp +++ b/src/gui/editorwidgets/qgsdatetimeeditconfig.cpp @@ -57,15 +57,15 @@ void QgsDateTimeEditConfig::updateFieldFormat( int idx ) { if ( idx == 0 ) { - mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DefaultDateFormat ); + mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DEFAULT_DATE_FORMAT ); } else if ( idx == 1 ) { - mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DefaultTimeFormat ); + mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DEFAULT_TIME_FORMAT ); } else if ( idx == 2 ) { - mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DefaultDateTimeFormat ); + mFieldFormatEdit->setText( QgsDateTimeFieldFormatter::DEFAULT_DATETIME_FORMAT ); } mFieldFormatEdit->setVisible( idx == 3 ); @@ -126,11 +126,11 @@ void QgsDateTimeEditConfig::setConfig( const QVariantMap &config ) const QString fieldFormat = config.value( QStringLiteral( "field_format" ), QgsDateTimeFieldFormatter::defaultFormat( fieldDef.type() ) ).toString(); mFieldFormatEdit->setText( fieldFormat ); - if ( fieldFormat == QgsDateTimeFieldFormatter::DefaultDateFormat ) + if ( fieldFormat == QgsDateTimeFieldFormatter::DEFAULT_DATE_FORMAT ) mFieldFormatComboBox->setCurrentIndex( 0 ); - else if ( fieldFormat == QgsDateTimeFieldFormatter::DefaultTimeFormat ) + else if ( fieldFormat == QgsDateTimeFieldFormatter::DEFAULT_TIME_FORMAT ) mFieldFormatComboBox->setCurrentIndex( 1 ); - else if ( fieldFormat == QgsDateTimeFieldFormatter::DefaultDateTimeFormat ) + else if ( fieldFormat == QgsDateTimeFieldFormatter::DEFAULT_DATETIME_FORMAT ) mFieldFormatComboBox->setCurrentIndex( 2 ); else mFieldFormatComboBox->setCurrentIndex( 3 ); diff --git a/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp b/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp index 6bf3fac23699..33eb826538b8 100644 --- a/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp +++ b/src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp @@ -54,7 +54,7 @@ QVariantMap QgsValueMapConfigDlg::config() QString ks = ki->text(); if (( ks == QgsApplication::nullRepresentation() ) && !( ki->flags() & Qt::ItemIsEditable ) ) - ks = QgsValueMapFieldFormatter::NullValue; + ks = QgsValueMapFieldFormatter::NULL_VALUE; if ( !vi || vi->text().isNull() ) { @@ -137,7 +137,7 @@ void QgsValueMapConfigDlg::updateMap( const QMap &map, bool i if ( insertNull ) { - setRow( row, QgsValueMapFieldFormatter::NullValue, QStringLiteral( "" ) ); + setRow( row, QgsValueMapFieldFormatter::NULL_VALUE, QStringLiteral( "" ) ); ++row; } @@ -156,7 +156,7 @@ void QgsValueMapConfigDlg::setRow( int row, const QString& value, const QString& QTableWidgetItem* valueCell; QTableWidgetItem* descriptionCell = new QTableWidgetItem( description ); tableWidget->insertRow( row ); - if ( value == QgsValueMapFieldFormatter::NullValue ) + if ( value == QgsValueMapFieldFormatter::NULL_VALUE ) { QFont cellFont; cellFont.setItalic( true ); @@ -175,7 +175,7 @@ void QgsValueMapConfigDlg::setRow( int row, const QString& value, const QString& void QgsValueMapConfigDlg::addNullButtonPushed() { - setRow( tableWidget->rowCount() - 1, QgsValueMapFieldFormatter::NullValue, QStringLiteral( "" ) ); + setRow( tableWidget->rowCount() - 1, QgsValueMapFieldFormatter::NULL_VALUE, QStringLiteral( "" ) ); } void QgsValueMapConfigDlg::loadFromLayerButtonPushed() @@ -248,7 +248,7 @@ void QgsValueMapConfigDlg::loadFromCSVButtonPushed() } if ( key == QgsApplication::nullRepresentation() ) - key = QgsValueMapFieldFormatter::NullValue; + key = QgsValueMapFieldFormatter::NULL_VALUE; map[ key ] = val; } diff --git a/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp b/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp index f5fc35c13049..703b1849069b 100644 --- a/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp +++ b/src/gui/editorwidgets/qgsvaluemapsearchwidgetwrapper.cpp @@ -147,7 +147,7 @@ void QgsValueMapSearchWidgetWrapper::initWidget( QWidget* editor ) while ( it != cfg.constEnd() ) { - if ( it.value() != QgsValueMapFieldFormatter::NullValue ) + if ( it.value() != QgsValueMapFieldFormatter::NULL_VALUE ) mComboBox->addItem( it.key(), it.value() ); ++it; } diff --git a/src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp b/src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp index bc597d3e1afd..ed55c1ecf312 100644 --- a/src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp +++ b/src/gui/editorwidgets/qgsvaluemapwidgetwrapper.cpp @@ -33,7 +33,7 @@ QVariant QgsValueMapWidgetWrapper::value() const if ( mComboBox ) v = mComboBox->currentData(); - if ( v == QgsValueMapFieldFormatter::NullValue ) + if ( v == QgsValueMapFieldFormatter::NULL_VALUE ) v = QVariant( field().type() ); return v; @@ -79,7 +79,7 @@ void QgsValueMapWidgetWrapper::setValue( const QVariant& value ) { QString v; if ( value.isNull() ) - v = QgsValueMapFieldFormatter::NullValue; + v = QgsValueMapFieldFormatter::NULL_VALUE; else v = value.toString(); diff --git a/src/gui/effects/qgseffectstackpropertieswidget.cpp b/src/gui/effects/qgseffectstackpropertieswidget.cpp index 636efea25aca..fb3f2b09fc00 100644 --- a/src/gui/effects/qgseffectstackpropertieswidget.cpp +++ b/src/gui/effects/qgseffectstackpropertieswidget.cpp @@ -32,7 +32,7 @@ ///@cond PRIVATE -static const int EffectItemType = QStandardItem::UserType + 1; +static const int EFFECT_ITEM_TYPE = QStandardItem::UserType + 1; class EffectItem : public QStandardItem { @@ -50,7 +50,7 @@ class EffectItem : public QStandardItem emitDataChanged(); } - int type() const override { return EffectItemType; } + int type() const override { return EFFECT_ITEM_TYPE; } QgsPaintEffect* effect() { diff --git a/src/gui/qgsadvanceddigitizingdockwidget.cpp b/src/gui/qgsadvanceddigitizingdockwidget.cpp index 60f4e3f6a85c..da0843ea02e1 100644 --- a/src/gui/qgsadvanceddigitizingdockwidget.cpp +++ b/src/gui/qgsadvanceddigitizingdockwidget.cpp @@ -644,7 +644,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e ) softAngle -= deltaAngle; } int quo = qRound( softAngle / commonAngle ); - if ( qAbs( softAngle - quo * commonAngle ) * 180.0 * M_1_PI <= SoftConstraintToleranceDegrees ) + if ( qAbs( softAngle - quo * commonAngle ) * 180.0 * M_1_PI <= SOFT_CONSTRAINT_TOLERANCE_DEGREES ) { // also check the distance in pixel to the line, otherwise it's too sticky at long ranges softAngle = quo * commonAngle ; @@ -652,7 +652,7 @@ bool QgsAdvancedDigitizingDockWidget::applyConstraints( QgsMapMouseEvent* e ) // use the direction vector (cos(a),sin(a)) from previous point. |x2-x1|=1 since sin2+cos2=1 const double dist = qAbs( qCos( softAngle + deltaAngle ) * ( previousPt.y() - point.y() ) - qSin( softAngle + deltaAngle ) * ( previousPt.x() - point.x() ) ); - if ( dist / mMapCanvas->mapSettings().mapUnitsPerPixel() < SoftConstraintTolerancePixel ) + if ( dist / mMapCanvas->mapSettings().mapUnitsPerPixel() < SOFT_CONSTRAINT_TOLERANCE_PIXEL ) { mAngleConstraint->setLockMode( CadConstraint::SoftLock ); mAngleConstraint->setValue( 180.0 / M_PI * softAngle ); diff --git a/src/gui/qgsadvanceddigitizingdockwidget.h b/src/gui/qgsadvanceddigitizingdockwidget.h index 156d0a3073ff..75dada283578 100644 --- a/src/gui/qgsadvanceddigitizingdockwidget.h +++ b/src/gui/qgsadvanceddigitizingdockwidget.h @@ -32,8 +32,8 @@ class QgsPoint; // tolerances for soft constraints (last values, and common angles) // for angles, both tolerance in pixels and degrees are used for better performance -static const double SoftConstraintTolerancePixel = 15; -static const double SoftConstraintToleranceDegrees = 10; +static const double SOFT_CONSTRAINT_TOLERANCE_PIXEL = 15; +static const double SOFT_CONSTRAINT_TOLERANCE_DEGREES = 10; /** \ingroup gui * @brief The QgsAdvancedDigitizingDockWidget class is a dockable widget diff --git a/src/gui/qgscolorbutton.cpp b/src/gui/qgscolorbutton.cpp index 9a530d728a71..0df1c407ec62 100644 --- a/src/gui/qgscolorbutton.cpp +++ b/src/gui/qgscolorbutton.cpp @@ -80,12 +80,12 @@ QSize QgsColorButton::sizeHint() const const QPixmap& QgsColorButton::transparentBackground() { - static QPixmap transpBkgrd; + static QPixmap sTranspBkgrd; - if ( transpBkgrd.isNull() ) - transpBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); + if ( sTranspBkgrd.isNull() ) + sTranspBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); - return transpBkgrd; + return sTranspBkgrd; } void QgsColorButton::showColorDialog() diff --git a/src/gui/qgscolorschemelist.cpp b/src/gui/qgscolorschemelist.cpp index 8aef744aa5bf..842f23da8e83 100644 --- a/src/gui/qgscolorschemelist.cpp +++ b/src/gui/qgscolorschemelist.cpp @@ -726,12 +726,12 @@ void QgsColorSwatchDelegate::paint( QPainter *painter, const QStyleOptionViewIte QPixmap QgsColorSwatchDelegate::transparentBackground() const { - static QPixmap transpBkgrd; + static QPixmap sTranspBkgrd; - if ( transpBkgrd.isNull() ) - transpBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); + if ( sTranspBkgrd.isNull() ) + sTranspBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); - return transpBkgrd; + return sTranspBkgrd; } QSize QgsColorSwatchDelegate::sizeHint( const QStyleOptionViewItem &option, const QModelIndex &index ) const diff --git a/src/gui/qgscolorswatchgrid.cpp b/src/gui/qgscolorswatchgrid.cpp index ddeac6d83d2d..44b50919ee26 100644 --- a/src/gui/qgscolorswatchgrid.cpp +++ b/src/gui/qgscolorswatchgrid.cpp @@ -322,12 +322,12 @@ void QgsColorSwatchGrid::draw( QPainter &painter ) QPixmap QgsColorSwatchGrid::transparentBackground() { - static QPixmap transpBkgrd; + static QPixmap sTranspBkgrd; - if ( transpBkgrd.isNull() ) - transpBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); + if ( sTranspBkgrd.isNull() ) + sTranspBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); - return transpBkgrd; + return sTranspBkgrd; } int QgsColorSwatchGrid::swatchForPosition( QPoint position ) const diff --git a/src/gui/qgscolorwidgets.cpp b/src/gui/qgscolorwidgets.cpp index 2d7c8aaf249e..680c299945fd 100644 --- a/src/gui/qgscolorwidgets.cpp +++ b/src/gui/qgscolorwidgets.cpp @@ -172,12 +172,12 @@ void QgsColorWidget::alterColor( QColor& color, const QgsColorWidget::ColorCompo const QPixmap &QgsColorWidget::transparentBackground() { - static QPixmap transpBkgrd; + static QPixmap sTranspBkgrd; - if ( transpBkgrd.isNull() ) - transpBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); + if ( sTranspBkgrd.isNull() ) + sTranspBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); - return transpBkgrd; + return sTranspBkgrd; } void QgsColorWidget::dragEnterEvent( QDragEnterEvent *e ) diff --git a/src/gui/qgscomposerruler.cpp b/src/gui/qgscomposerruler.cpp index 458431781b64..81a291aae84a 100644 --- a/src/gui/qgscomposerruler.cpp +++ b/src/gui/qgscomposerruler.cpp @@ -23,8 +23,8 @@ const int RULER_FONT_SIZE = 8; const unsigned int COUNT_VALID_MULTIPLES = 3; const unsigned int COUNT_VALID_MAGNITUDES = 5; -const int QgsComposerRuler::validScaleMultiples[] = {1, 2, 5}; -const int QgsComposerRuler::validScaleMagnitudes[] = {1, 10, 100, 1000, 10000}; +const int QgsComposerRuler::VALID_SCALE_MULTIPLES[] = {1, 2, 5}; +const int QgsComposerRuler::VALID_SCALE_MAGNITUDES[] = {1, 10, 100, 1000, 10000}; QgsComposerRuler::QgsComposerRuler( QgsComposerRuler::Direction d ) : QWidget( nullptr ) @@ -312,14 +312,14 @@ int QgsComposerRuler::optimumScale( double minPixelDiff, int &magnitude, int &mu { for ( unsigned int multipleCandidate = 0; multipleCandidate < COUNT_VALID_MULTIPLES; ++multipleCandidate ) { - int candidateScale = validScaleMultiples[multipleCandidate] * validScaleMagnitudes[magnitudeCandidate]; + int candidateScale = VALID_SCALE_MULTIPLES[multipleCandidate] * VALID_SCALE_MAGNITUDES[magnitudeCandidate]; //find pixel size for each step using this candidate scale double pixelDiff = mTransform.map( QPointF( candidateScale, 0 ) ).x() - mTransform.map( QPointF( 0, 0 ) ).x(); if ( pixelDiff > minPixelDiff ) { //found the optimum major scale - magnitude = validScaleMagnitudes[magnitudeCandidate]; - multiple = validScaleMultiples[multipleCandidate]; + magnitude = VALID_SCALE_MAGNITUDES[magnitudeCandidate]; + multiple = VALID_SCALE_MULTIPLES[multipleCandidate]; return candidateScale; } } diff --git a/src/gui/qgscomposerruler.h b/src/gui/qgscomposerruler.h index 2a5a521405ba..d830bc1c0009 100644 --- a/src/gui/qgscomposerruler.h +++ b/src/gui/qgscomposerruler.h @@ -55,8 +55,8 @@ class GUI_EXPORT QgsComposerRuler: public QWidget void mousePressEvent( QMouseEvent* event ) override; private: - static const int validScaleMultiples[]; - static const int validScaleMagnitudes[]; + static const int VALID_SCALE_MULTIPLES[]; + static const int VALID_SCALE_MAGNITUDES[]; Direction mDirection; QTransform mTransform; diff --git a/src/gui/qgsexpressionbuilderwidget.cpp b/src/gui/qgsexpressionbuilderwidget.cpp index 73993c31fdf3..bf878bb090ee 100644 --- a/src/gui/qgsexpressionbuilderwidget.cpp +++ b/src/gui/qgsexpressionbuilderwidget.cpp @@ -362,7 +362,7 @@ void QgsExpressionBuilderWidget::registerItem( const QString& group, { QgsExpressionItem* item = new QgsExpressionItem( label, expressionText, helpText, type ); item->setData( label, Qt::UserRole ); - item->setData( sortOrder, QgsExpressionItem::CustomSortRole ); + item->setData( sortOrder, QgsExpressionItem::CUSTOM_SORT_ROLE ); // Look up the group and insert the new function. if ( mExpressionGroups.contains( group ) ) @@ -376,7 +376,7 @@ void QgsExpressionBuilderWidget::registerItem( const QString& group, QgsExpressionItem *newgroupNode = new QgsExpressionItem( QgsExpression::group( group ), QLatin1String( "" ), QgsExpressionItem::Header ); newgroupNode->setData( group, Qt::UserRole ); //Recent group should always be last group - newgroupNode->setData( group.startsWith( QLatin1String( "Recent (" ) ) ? 2 : 1, QgsExpressionItem::CustomSortRole ); + newgroupNode->setData( group.startsWith( QLatin1String( "Recent (" ) ) ? 2 : 1, QgsExpressionItem::CUSTOM_SORT_ROLE ); newgroupNode->appendRow( item ); newgroupNode->setBackground( QBrush( QColor( "#eee" ) ) ); mModel->appendRow( newgroupNode ); @@ -388,7 +388,7 @@ void QgsExpressionBuilderWidget::registerItem( const QString& group, //insert a copy as a top level item QgsExpressionItem* topLevelItem = new QgsExpressionItem( label, expressionText, helpText, type ); topLevelItem->setData( label, Qt::UserRole ); - item->setData( 0, QgsExpressionItem::CustomSortRole ); + item->setData( 0, QgsExpressionItem::CUSTOM_SORT_ROLE ); QFont font = topLevelItem->font(); font.setBold( true ); topLevelItem->setFont( font ); @@ -795,7 +795,7 @@ QgsExpressionItemSearchProxy::QgsExpressionItemSearchProxy() bool QgsExpressionItemSearchProxy::filterAcceptsRow( int source_row, const QModelIndex& source_parent ) const { QModelIndex index = sourceModel()->index( source_row, 0, source_parent ); - QgsExpressionItem::ItemType itemType = QgsExpressionItem::ItemType( sourceModel()->data( index, QgsExpressionItem::ItemTypeRole ).toInt() ); + QgsExpressionItem::ItemType itemType = QgsExpressionItem::ItemType( sourceModel()->data( index, QgsExpressionItem::ITEM_TYPE_ROLE ).toInt() ); int count = sourceModel()->rowCount( index ); bool matchchild = false; @@ -819,8 +819,8 @@ bool QgsExpressionItemSearchProxy::filterAcceptsRow( int source_row, const QMode bool QgsExpressionItemSearchProxy::lessThan( const QModelIndex& left, const QModelIndex& right ) const { - int leftSort = sourceModel()->data( left, QgsExpressionItem::CustomSortRole ).toInt(); - int rightSort = sourceModel()->data( right, QgsExpressionItem::CustomSortRole ).toInt(); + int leftSort = sourceModel()->data( left, QgsExpressionItem::CUSTOM_SORT_ROLE ).toInt(); + int rightSort = sourceModel()->data( right, QgsExpressionItem::CUSTOM_SORT_ROLE ).toInt(); if ( leftSort != rightSort ) return leftSort < rightSort; diff --git a/src/gui/qgsexpressionbuilderwidget.h b/src/gui/qgsexpressionbuilderwidget.h index f434c9d480e9..e99c11a60933 100644 --- a/src/gui/qgsexpressionbuilderwidget.h +++ b/src/gui/qgsexpressionbuilderwidget.h @@ -53,7 +53,7 @@ class QgsExpressionItem : public QStandardItem mExpressionText = expressionText; mHelpText = helpText; mType = itemType; - setData( itemType, ItemTypeRole ); + setData( itemType, ITEM_TYPE_ROLE ); } QgsExpressionItem( const QString& label, @@ -63,7 +63,7 @@ class QgsExpressionItem : public QStandardItem { mExpressionText = expressionText; mType = itemType; - setData( itemType, ItemTypeRole ); + setData( itemType, ITEM_TYPE_ROLE ); } QString getExpressionText() const { return mExpressionText; } @@ -87,9 +87,9 @@ class QgsExpressionItem : public QStandardItem QgsExpressionItem::ItemType getItemType() const { return mType; } //! Custom sort order role - static const int CustomSortRole = Qt::UserRole + 1; + static const int CUSTOM_SORT_ROLE = Qt::UserRole + 1; //! Item type role - static const int ItemTypeRole = Qt::UserRole + 2; + static const int ITEM_TYPE_ROLE = Qt::UserRole + 2; private: QString mExpressionText; diff --git a/src/gui/qgsgradientstopeditor.cpp b/src/gui/qgsgradientstopeditor.cpp index 677cf689d8fe..6735c709bf62 100644 --- a/src/gui/qgsgradientstopeditor.cpp +++ b/src/gui/qgsgradientstopeditor.cpp @@ -378,12 +378,12 @@ void QgsGradientStopEditor::keyPressEvent( QKeyEvent *e ) QPixmap QgsGradientStopEditor::transparentBackground() { - static QPixmap transpBkgrd; + static QPixmap sTranspBkgrd; - if ( transpBkgrd.isNull() ) - transpBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); + if ( sTranspBkgrd.isNull() ) + sTranspBkgrd = QgsApplication::getThemePixmap( QStringLiteral( "/transp-background_8x8.png" ) ); - return transpBkgrd; + return sTranspBkgrd; } void QgsGradientStopEditor::drawStopMarker( QPainter& painter, QPoint topMiddle, const QColor &color, bool selected ) diff --git a/src/gui/qgsmaplayeractionregistry.cpp b/src/gui/qgsmaplayeractionregistry.cpp index 67977e9cd73d..ac08c740a1a2 100644 --- a/src/gui/qgsmaplayeractionregistry.cpp +++ b/src/gui/qgsmaplayeractionregistry.cpp @@ -95,14 +95,14 @@ void QgsMapLayerAction::triggerForLayer( QgsMapLayer* layer ) // // Static calls to enforce singleton behavior // -QgsMapLayerActionRegistry *QgsMapLayerActionRegistry::mInstance = nullptr; +QgsMapLayerActionRegistry *QgsMapLayerActionRegistry::sInstance = nullptr; QgsMapLayerActionRegistry *QgsMapLayerActionRegistry::instance() { - if ( !mInstance ) + if ( !sInstance ) { - mInstance = new QgsMapLayerActionRegistry(); + sInstance = new QgsMapLayerActionRegistry(); } - return mInstance; + return sInstance; } // diff --git a/src/gui/qgsmaplayeractionregistry.h b/src/gui/qgsmaplayeractionregistry.h index 5d87f5514fe4..d48fef3475c9 100644 --- a/src/gui/qgsmaplayeractionregistry.h +++ b/src/gui/qgsmaplayeractionregistry.h @@ -138,7 +138,7 @@ class GUI_EXPORT QgsMapLayerActionRegistry : public QObject private: - static QgsMapLayerActionRegistry *mInstance; + static QgsMapLayerActionRegistry *sInstance; QMap< QgsMapLayer*, QgsMapLayerAction* > mDefaultLayerActionMap; diff --git a/src/gui/qgsrasterformatsaveoptionswidget.cpp b/src/gui/qgsrasterformatsaveoptionswidget.cpp index 65a77991aafc..7ca7b2bf3608 100644 --- a/src/gui/qgsrasterformatsaveoptionswidget.cpp +++ b/src/gui/qgsrasterformatsaveoptionswidget.cpp @@ -30,7 +30,7 @@ #include -QMap< QString, QStringList > QgsRasterFormatSaveOptionsWidget::mBuiltinProfiles; +QMap< QString, QStringList > QgsRasterFormatSaveOptionsWidget::sBuiltinProfiles; static const QString PYRAMID_JPEG_YCBCR_COMPRESSION( QStringLiteral( "JPEG_QUALITY_OVERVIEW=75 COMPRESS_OVERVIEW=JPEG PHOTOMETRIC_OVERVIEW=YCBCR INTERLEAVE_OVERVIEW=PIXEL" ) ); static const QString PYRAMID_JPEG_COMPRESSION( QStringLiteral( "JPEG_QUALITY_OVERVIEW=75 COMPRESS_OVERVIEW=JPEG INTERLEAVE_OVERVIEW=PIXEL" ) ); @@ -50,40 +50,40 @@ QgsRasterFormatSaveOptionsWidget::QgsRasterFormatSaveOptionsWidget( QWidget* par setType( type ); - if ( mBuiltinProfiles.isEmpty() ) + if ( sBuiltinProfiles.isEmpty() ) { // key=profileKey values=format,profileName,options - mBuiltinProfiles[ QStringLiteral( "z_adefault" )] = ( QStringList() << QLatin1String( "" ) << tr( "Default" ) << QLatin1String( "" ) ); + sBuiltinProfiles[ QStringLiteral( "z_adefault" )] = ( QStringList() << QLatin1String( "" ) << tr( "Default" ) << QLatin1String( "" ) ); // these GTiff profiles are based on Tim's benchmarks at // http://linfiniti.com/2011/05/gdal-efficiency-of-various-compression-algorithms/ // big: no compression | medium: reasonable size/speed tradeoff | small: smallest size - mBuiltinProfiles[ QStringLiteral( "z_gtiff_1big" )] = + sBuiltinProfiles[ QStringLiteral( "z_gtiff_1big" )] = ( QStringList() << QStringLiteral( "GTiff" ) << tr( "No compression" ) << QStringLiteral( "COMPRESS=NONE BIGTIFF=IF_NEEDED" ) ); - mBuiltinProfiles[ QStringLiteral( "z_gtiff_2medium" )] = + sBuiltinProfiles[ QStringLiteral( "z_gtiff_2medium" )] = ( QStringList() << QStringLiteral( "GTiff" ) << tr( "Low compression" ) << QStringLiteral( "COMPRESS=PACKBITS" ) ); - mBuiltinProfiles[ QStringLiteral( "z_gtiff_3small" )] = + sBuiltinProfiles[ QStringLiteral( "z_gtiff_3small" )] = ( QStringList() << QStringLiteral( "GTiff" ) << tr( "High compression" ) << QStringLiteral( "COMPRESS=DEFLATE PREDICTOR=2 ZLEVEL=9" ) ); - mBuiltinProfiles[ QStringLiteral( "z_gtiff_4jpeg" )] = + sBuiltinProfiles[ QStringLiteral( "z_gtiff_4jpeg" )] = ( QStringList() << QStringLiteral( "GTiff" ) << tr( "JPEG compression" ) << QStringLiteral( "COMPRESS=JPEG JPEG_QUALITY=75" ) ); // overview compression schemes for GTiff format, see // http://www.gdal.org/gdaladdo.html and http://www.gdal.org/frmt_gtiff.html // TODO - should we offer GDAL_TIFF_OVR_BLOCKSIZE option here or in QgsRasterPyramidsOptionsWidget ? - mBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_1big" )] = + sBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_1big" )] = ( QStringList() << QStringLiteral( "_pyramids" ) << tr( "No compression" ) << QStringLiteral( "COMPRESS_OVERVIEW=NONE BIGTIFF_OVERVIEW=IF_NEEDED" ) ); - mBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_2medium" )] = + sBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_2medium" )] = ( QStringList() << QStringLiteral( "_pyramids" ) << tr( "Low compression" ) << QStringLiteral( "COMPRESS_OVERVIEW=PACKBITS" ) ); - mBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_3small" )] = + sBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_3small" )] = ( QStringList() << QStringLiteral( "_pyramids" ) << tr( "High compression" ) << QStringLiteral( "COMPRESS_OVERVIEW=DEFLATE PREDICTOR_OVERVIEW=2 ZLEVEL=9" ) ); // how to set zlevel? - mBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_4jpeg" )] = + sBuiltinProfiles[ QStringLiteral( "z__pyramids_gtiff_4jpeg" )] = ( QStringList() << QStringLiteral( "_pyramids" ) << tr( "JPEG compression" ) << PYRAMID_JPEG_YCBCR_COMPRESSION ); } @@ -161,7 +161,7 @@ void QgsRasterFormatSaveOptionsWidget::updateProfiles() // build profiles list = user + builtin(last) QString format = pseudoFormat(); QStringList profileKeys = profiles(); - QMapIterator it( mBuiltinProfiles ); + QMapIterator it( sBuiltinProfiles ); while ( it.hasNext() ) { it.next(); @@ -185,11 +185,11 @@ void QgsRasterFormatSaveOptionsWidget::updateProfiles() { QString profileName, profileOptions; profileOptions = createOptions( profileKey ); - if ( mBuiltinProfiles.contains( profileKey ) ) + if ( sBuiltinProfiles.contains( profileKey ) ) { - profileName = mBuiltinProfiles[ profileKey ][ 1 ]; + profileName = sBuiltinProfiles[ profileKey ][ 1 ]; if ( profileOptions.isEmpty() ) - profileOptions = mBuiltinProfiles[ profileKey ][ 2 ]; + profileOptions = sBuiltinProfiles[ profileKey ][ 2 ]; } else { @@ -443,7 +443,7 @@ void QgsRasterFormatSaveOptionsWidget::on_mProfileDeleteButton_clicked() { int index = mProfileComboBox->currentIndex(); QString profileKey = currentProfileKey(); - if ( index != -1 && ! mBuiltinProfiles.contains( profileKey ) ) + if ( index != -1 && ! sBuiltinProfiles.contains( profileKey ) ) { mOptionsMap.remove( profileKey ); mProfileComboBox->removeItem( index ); @@ -453,9 +453,9 @@ void QgsRasterFormatSaveOptionsWidget::on_mProfileDeleteButton_clicked() void QgsRasterFormatSaveOptionsWidget::on_mProfileResetButton_clicked() { QString profileKey = currentProfileKey(); - if ( mBuiltinProfiles.contains( profileKey ) ) + if ( sBuiltinProfiles.contains( profileKey ) ) { - mOptionsMap[ profileKey ] = mBuiltinProfiles[ profileKey ][ 2 ]; + mOptionsMap[ profileKey ] = sBuiltinProfiles[ profileKey ][ 2 ]; } else { diff --git a/src/gui/qgsrasterformatsaveoptionswidget.h b/src/gui/qgsrasterformatsaveoptionswidget.h index f7ed005eed5d..8a11d35ccc0e 100644 --- a/src/gui/qgsrasterformatsaveoptionswidget.h +++ b/src/gui/qgsrasterformatsaveoptionswidget.h @@ -141,7 +141,7 @@ class GUI_EXPORT QgsRasterFormatSaveOptionsWidget: public QWidget, QgsRasterLayer* mRasterLayer; QString mRasterFileName; QMap< QString, QString> mOptionsMap; - static QMap< QString, QStringList > mBuiltinProfiles; + static QMap< QString, QStringList > sBuiltinProfiles; bool mPyramids; QgsRaster::RasterPyramidsFormat mPyramidsFormat; diff --git a/src/gui/qgsshortcutsmanager.cpp b/src/gui/qgsshortcutsmanager.cpp index 1ce06178be70..2b98ce6d0c17 100644 --- a/src/gui/qgsshortcutsmanager.cpp +++ b/src/gui/qgsshortcutsmanager.cpp @@ -18,14 +18,14 @@ #include #include -QgsShortcutsManager* QgsShortcutsManager::mInstance = nullptr; +QgsShortcutsManager* QgsShortcutsManager::sInstance = nullptr; QgsShortcutsManager* QgsShortcutsManager::instance() { - if ( !mInstance ) - mInstance = new QgsShortcutsManager( nullptr ); - return mInstance; + if ( !sInstance ) + sInstance = new QgsShortcutsManager( nullptr ); + return sInstance; } QgsShortcutsManager::QgsShortcutsManager( QObject *parent, const QString& settingsRoot ) diff --git a/src/gui/qgsshortcutsmanager.h b/src/gui/qgsshortcutsmanager.h index f45df33d8054..9d2b07dc739a 100644 --- a/src/gui/qgsshortcutsmanager.h +++ b/src/gui/qgsshortcutsmanager.h @@ -230,7 +230,7 @@ class GUI_EXPORT QgsShortcutsManager : public QObject ActionsHash mActions; ShortcutsHash mShortcuts; QString mSettingsPath; - static QgsShortcutsManager* mInstance; + static QgsShortcutsManager* sInstance; }; #endif // QGSSHORTCUTSMANAGER_H diff --git a/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.cpp b/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.cpp index 9008bd3baa45..af7003fbbd57 100644 --- a/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.cpp +++ b/src/gui/symbology-ng/qgsgraduatedsymbolrendererwidget.cpp @@ -447,8 +447,8 @@ QgsGraduatedSymbolRendererWidget::QgsGraduatedSymbolRendererWidget( QgsVectorLay mSizeUnitWidget->setUnits( QgsUnitTypes::RenderUnitList() << QgsUnitTypes::RenderMillimeters << QgsUnitTypes::RenderMapUnits << QgsUnitTypes::RenderPixels ); - spinPrecision->setMinimum( QgsRendererRangeLabelFormat::MinPrecision ); - spinPrecision->setMaximum( QgsRendererRangeLabelFormat::MaxPrecision ); + spinPrecision->setMinimum( QgsRendererRangeLabelFormat::MIN_PRECISION ); + spinPrecision->setMaximum( QgsRendererRangeLabelFormat::MAX_PRECISION ); btnColorRamp->setShowRandomColorRamp( true ); diff --git a/src/gui/symbology-ng/qgssymbolselectordialog.cpp b/src/gui/symbology-ng/qgssymbolselectordialog.cpp index 368fd7340129..b3f6677868f0 100644 --- a/src/gui/symbology-ng/qgssymbolselectordialog.cpp +++ b/src/gui/symbology-ng/qgssymbolselectordialog.cpp @@ -46,7 +46,7 @@ /// @cond PRIVATE -static const int SymbolLayerItemType = QStandardItem::UserType + 1; +static const int SYMBOL_LAYER_ITEM_TYPE = QStandardItem::UserType + 1; DataDefinedRestorer::DataDefinedRestorer( QgsSymbol* symbol, const QgsSymbolLayer* symbolLayer ) : mMarker( nullptr ) @@ -156,7 +156,7 @@ class SymbolLayerItem : public QStandardItem static_cast( parent() )->updatePreview(); } - int type() const override { return SymbolLayerItemType; } + int type() const override { return SYMBOL_LAYER_ITEM_TYPE; } bool isLayer() { return mIsLayer; } // returns the symbol pointer; helpful in determining a layer's parent symbol diff --git a/src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp b/src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp index 10961faae696..d598b64306f0 100644 --- a/src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp +++ b/src/plugins/geometry_checker/checks/qgsgeometrycheck.cpp @@ -26,8 +26,8 @@ QgsGeometryCheckPrecision::QgsGeometryCheckPrecision() QgsGeometryCheckPrecision* QgsGeometryCheckPrecision::get() { - static QgsGeometryCheckPrecision instance; - return &instance; + static QgsGeometryCheckPrecision sInstance; + return &sInstance; } void QgsGeometryCheckPrecision::setPrecision( int tolerance ) diff --git a/src/plugins/geometry_checker/qgsgeometrycheckfactory.h b/src/plugins/geometry_checker/qgsgeometrycheckfactory.h index b0f869b30887..2c3777dad138 100644 --- a/src/plugins/geometry_checker/qgsgeometrycheckfactory.h +++ b/src/plugins/geometry_checker/qgsgeometrycheckfactory.h @@ -61,8 +61,8 @@ class QgsGeometryCheckFactoryRegistry static QgsGeometryCheckFactoryRegistry* instance() { - static QgsGeometryCheckFactoryRegistry reg; - return ® + static QgsGeometryCheckFactoryRegistry sReg; + return &sReg; } }; diff --git a/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp b/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp index 168120efbccb..d203cdabd302 100644 --- a/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp +++ b/src/plugins/geometry_checker/utils/qgsfeaturepool.cpp @@ -27,7 +27,7 @@ #include QgsFeaturePool::QgsFeaturePool( QgsVectorLayer *layer, bool selectedOnly ) - : mFeatureCache( sCacheSize ) + : mFeatureCache( CACHE_SIZE ) , mLayer( layer ) , mSelectedOnly( selectedOnly ) { diff --git a/src/plugins/geometry_checker/utils/qgsfeaturepool.h b/src/plugins/geometry_checker/utils/qgsfeaturepool.h index 42e1cb1ac3a5..812e6844fbfb 100644 --- a/src/plugins/geometry_checker/utils/qgsfeaturepool.h +++ b/src/plugins/geometry_checker/utils/qgsfeaturepool.h @@ -52,7 +52,7 @@ class QgsFeaturePool QLinkedList::iterator ageIt; }; - static const int sCacheSize = 1000; + static const int CACHE_SIZE = 1000; QCache mFeatureCache; QgsVectorLayer* mLayer; diff --git a/src/plugins/grass/qgsgrassplugin.cpp b/src/plugins/grass/qgsgrassplugin.cpp index 0f24786e42a1..3bc4a6076182 100644 --- a/src/plugins/grass/qgsgrassplugin.cpp +++ b/src/plugins/grass/qgsgrassplugin.cpp @@ -534,7 +534,7 @@ void QgsGrassPlugin::onSplitFeaturesTriggered( bool checked ) QgsDebugMsg( "grassProvider is null" ); return; } - grassProvider->setNewFeatureType( QgsGrassProvider::LAST_TYPE ); + grassProvider->setNewFeatureType( QgsGrassProvider::sLastType ); } } diff --git a/src/plugins/grass/qgsgrassselect.cpp b/src/plugins/grass/qgsgrassselect.cpp index f94642ef995d..78fd59064e62 100644 --- a/src/plugins/grass/qgsgrassselect.cpp +++ b/src/plugins/grass/qgsgrassselect.cpp @@ -49,21 +49,21 @@ QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ) { if ( QgsGrass::activeMode() ) { - lastGisdbase = QgsGrass::getDefaultGisdbase(); - lastLocation = QgsGrass::getDefaultLocation(); - lastMapset = QgsGrass::getDefaultMapset(); + sLastGisdbase = QgsGrass::getDefaultGisdbase(); + sLastLocation = QgsGrass::getDefaultLocation(); + sLastMapset = QgsGrass::getDefaultMapset(); } else { QSettings settings; - lastGisdbase = settings.value( QStringLiteral( "/GRASS/lastGisdbase" ) ).toString(); + sLastGisdbase = settings.value( QStringLiteral( "/GRASS/lastGisdbase" ) ).toString(); //check we got something from qsettings otherwise default to users home dir - if ( lastGisdbase.isEmpty() ) + if ( sLastGisdbase.isEmpty() ) { QDir home = QDir::home(); - lastGisdbase = QString( home.path() ); + sLastGisdbase = QString( home.path() ); } - lastMapset = settings.value( QStringLiteral( "/GRASS/lastMapset" ) ).toString(); + sLastMapset = settings.value( QStringLiteral( "/GRASS/lastMapset" ) ).toString(); } sFirst = false; } @@ -98,7 +98,7 @@ QgsGrassSelect::QgsGrassSelect( QWidget *parent, int type ) break; } - egisdbase->setText( lastGisdbase ); + egisdbase->setText( sLastGisdbase ); setLocations(); adjustSize(); @@ -109,13 +109,13 @@ QgsGrassSelect::~QgsGrassSelect() } bool QgsGrassSelect::sFirst = true; -QString QgsGrassSelect::lastGisdbase; -QString QgsGrassSelect::lastLocation; -QString QgsGrassSelect::lastMapset; -QString QgsGrassSelect::lastVectorMap; -QString QgsGrassSelect::lastRasterMap; -QString QgsGrassSelect::lastLayer; -QString QgsGrassSelect::lastMapcalc; +QString QgsGrassSelect::sLastGisdbase; +QString QgsGrassSelect::sLastLocation; +QString QgsGrassSelect::sLastMapset; +QString QgsGrassSelect::sLastVectorMap; +QString QgsGrassSelect::sLastRasterMap; +QString QgsGrassSelect::sLastLayer; +QString QgsGrassSelect::sLastMapcalc; void QgsGrassSelect::setLocations() { @@ -175,7 +175,7 @@ void QgsGrassSelect::setLocations() } elocation->addItem( QString( d[i] ) ); - if ( QString( d[i] ) == lastLocation ) + if ( QString( d[i] ) == sLastLocation ) { sel = idx; } @@ -216,7 +216,7 @@ void QgsGrassSelect::setMapsets() if ( QgsGrass::isMapset( ldpath + "/" + ld[i] ) ) { emapset->addItem( ld[i] ); - if ( ld[i] == lastMapset ) + if ( ld[i] == sLastMapset ) { sel = idx; } @@ -260,7 +260,7 @@ void QgsGrassSelect::setMaps() for ( int j = 0; j < list.count(); j++ ) { emap->addItem( list[j] ); - if ( list[j] == lastVectorMap ) + if ( list[j] == sLastVectorMap ) sel = idx; idx++; } @@ -275,7 +275,7 @@ void QgsGrassSelect::setMaps() for ( int j = 0; j < list.count(); j++ ) { emap->addItem( list[j] ); - if ( list[j] == lastRasterMap ) + if ( list[j] == sLastRasterMap ) sel = idx; idx++; } @@ -292,7 +292,7 @@ void QgsGrassSelect::setMaps() QString m = QString( md[j] + " (GROUP)" ); emap->addItem( m ); - if ( m == lastRasterMap ) + if ( m == sLastRasterMap ) { sel = idx; } @@ -308,7 +308,7 @@ void QgsGrassSelect::setMaps() { QString m = QString( md[j] ); emap->addItem( m ); - if ( m == lastMapcalc ) + if ( m == sLastMapcalc ) { sel = idx; } @@ -362,7 +362,7 @@ void QgsGrassSelect::setLayers() for ( int i = 0; i < layers.count(); i++ ) { elayer->addItem( layers[i] ); - if ( layers[i] == lastLayer ) + if ( layers[i] == sLastLayer ) sel = idx; idx++; } @@ -414,7 +414,7 @@ void QgsGrassSelect::on_GisdbaseBrowse_clicked() void QgsGrassSelect::accept() { gisdbase = egisdbase->text(); - lastGisdbase = QString( gisdbase ); + sLastGisdbase = QString( gisdbase ); if ( elocation->count() == 0 ) { @@ -425,15 +425,15 @@ void QgsGrassSelect::accept() //write to qgsettings as gisdbase seems to be valid QSettings settings; - settings.setValue( QStringLiteral( "/GRASS/lastGisdbase" ), lastGisdbase ); + settings.setValue( QStringLiteral( "/GRASS/lastGisdbase" ), sLastGisdbase ); location = elocation->currentText(); - lastLocation = location; + sLastLocation = location; mapset = emapset->currentText(); - lastMapset = mapset; + sLastMapset = mapset; - settings.setValue( QStringLiteral( "/GRASS/lastMapset" ), lastMapset ); + settings.setValue( QStringLiteral( "/GRASS/lastMapset" ), sLastMapset ); map = emap->currentText().trimmed(); @@ -452,13 +452,13 @@ void QgsGrassSelect::accept() tr( "No layers available in this map" ) ); return; } - lastVectorMap = map; + sLastVectorMap = map; layer = elayer->currentText().trimmed(); - lastLayer = layer; + sLastLayer = layer; } else if ( type == QgsGrassSelect::Raster ) { - lastRasterMap = map; + sLastRasterMap = map; if ( map.indexOf( QLatin1String( " (GROUP)" ) ) != -1 ) { map.remove( QStringLiteral( " (GROUP)" ) ); @@ -471,7 +471,7 @@ void QgsGrassSelect::accept() } else if ( type == QgsGrassSelect::MapCalc ) { - lastMapcalc = map; + sLastMapcalc = map; } QDialog::accept(); } diff --git a/src/plugins/grass/qgsgrassselect.h b/src/plugins/grass/qgsgrassselect.h index 768e2e95cff2..553e057e7b6d 100644 --- a/src/plugins/grass/qgsgrassselect.h +++ b/src/plugins/grass/qgsgrassselect.h @@ -73,13 +73,13 @@ class QgsGrassSelect: public QDialog, private Ui::QgsGrassSelectBase private: int type; // map type (mapset element) static bool sFirst; // called first time - static QString lastGisdbase; // Last selected values - static QString lastLocation; - static QString lastMapset; - static QString lastVectorMap; - static QString lastRasterMap; - static QString lastLayer; // vector layer - static QString lastMapcalc; + static QString sLastGisdbase; // Last selected values + static QString sLastLocation; + static QString sLastMapset; + static QString sLastVectorMap; + static QString sLastRasterMap; + static QString sLastLayer; // vector layer + static QString sLastMapcalc; }; diff --git a/src/plugins/spatialquery/qgsspatialquerydialog.cpp b/src/plugins/spatialquery/qgsspatialquerydialog.cpp index 0c89e6ddadc6..b8c85c20b65f 100644 --- a/src/plugins/spatialquery/qgsspatialquerydialog.cpp +++ b/src/plugins/spatialquery/qgsspatialquerydialog.cpp @@ -658,11 +658,11 @@ void QgsSpatialQueryDialog::changeLwFeature( QgsVectorLayer* lyr, QgsFeatureId f void QgsSpatialQueryDialog::zoomFeature( QgsVectorLayer* lyr, QgsFeatureId fid ) { - static QgsVectorLayer* lyrCheck = nullptr; + static QgsVectorLayer* sLyrCheck = nullptr; static bool sHasMsg = false; - if ( ! lyrCheck || lyrCheck != lyr ) + if ( ! sLyrCheck || sLyrCheck != lyr ) { - lyrCheck = lyr; + sLyrCheck = lyr; sHasMsg = true; } else diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp index 8bdffcd6ca3c..fdf13d658b46 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.cpp @@ -53,8 +53,8 @@ static const QString TEXT_PROVIDER_DESCRIPTION = QStringLiteral( "Delimited text static const int SUBSET_ID_THRESHOLD_FACTOR = 10; -QRegExp QgsDelimitedTextProvider::WktPrefixRegexp( "^\\s*(?:\\d+\\s+|SRID\\=\\d+\\;)", Qt::CaseInsensitive ); -QRegExp QgsDelimitedTextProvider::CrdDmsRegexp( "^\\s*(?:([-+nsew])\\s*)?(\\d{1,3})(?:[^0-9.]+([0-5]?\\d))?[^0-9.]+([0-5]?\\d(?:\\.\\d+)?)[^0-9.]*([-+nsew])?\\s*$", Qt::CaseInsensitive ); +QRegExp QgsDelimitedTextProvider::sWktPrefixRegexp( "^\\s*(?:\\d+\\s+|SRID\\=\\d+\\;)", Qt::CaseInsensitive ); +QRegExp QgsDelimitedTextProvider::sCrdDmsRegexp( "^\\s*(?:([-+nsew])\\s*)?(\\d{1,3})(?:[^0-9.]+([0-5]?\\d))?[^0-9.]+([0-5]?\\d(?:\\.\\d+)?)[^0-9.]*([-+nsew])?\\s*$", Qt::CaseInsensitive ); QgsDelimitedTextProvider::QgsDelimitedTextProvider( const QString& uri ) : QgsVectorDataProvider( uri ) @@ -444,7 +444,7 @@ void QgsDelimitedTextProvider::scanFile( bool buildIndexes ) QString sWkt = parts[mWktFieldIndex]; QgsGeometry geom; - if ( !mWktHasPrefix && sWkt.indexOf( WktPrefixRegexp ) >= 0 ) + if ( !mWktHasPrefix && sWkt.indexOf( sWktPrefixRegexp ) >= 0 ) mWktHasPrefix = true; geom = geomFromWkt( sWkt, mWktHasPrefix ); @@ -812,7 +812,7 @@ QgsGeometry QgsDelimitedTextProvider::geomFromWkt( QString &sWkt, bool wktHasPre { if ( wktHasPrefixRegexp ) { - sWkt.remove( WktPrefixRegexp ); + sWkt.remove( sWktPrefixRegexp ); } geom = QgsGeometry::fromWkt( sWkt ); @@ -827,7 +827,7 @@ QgsGeometry QgsDelimitedTextProvider::geomFromWkt( QString &sWkt, bool wktHasPre double QgsDelimitedTextProvider::dmsStringToDouble( const QString &sX, bool *xOk ) { static QString negative( QStringLiteral( "swSW-" ) ); - QRegExp re( CrdDmsRegexp ); + QRegExp re( sCrdDmsRegexp ); double x = 0.0; *xOk = re.indexIn( sX ) == 0; diff --git a/src/providers/delimitedtext/qgsdelimitedtextprovider.h b/src/providers/delimitedtext/qgsdelimitedtextprovider.h index 9aeb3939b23f..f7e2d6510b89 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextprovider.h +++ b/src/providers/delimitedtext/qgsdelimitedtextprovider.h @@ -65,8 +65,8 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider * Regular expression defining possible prefixes to WKT string, * (EWKT srid, Informix SRID) */ - static QRegExp WktPrefixRegexp; - static QRegExp CrdDmsRegexp; + static QRegExp sWktPrefixRegexp; + static QRegExp sCrdDmsRegexp; enum GeomRepresentationType { diff --git a/src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp b/src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp index 023dc7a02191..0ed457cdbd6a 100644 --- a/src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp +++ b/src/providers/delimitedtext/qgsdelimitedtextsourceselect.cpp @@ -464,7 +464,7 @@ void QgsDelimitedTextSourceSelect::updateFieldLists() } if ( xyDms ) { - ok = QgsDelimitedTextProvider::CrdDmsRegexp.indexIn( value ) == 0; + ok = QgsDelimitedTextProvider::sCrdDmsRegexp.indexIn( value ) == 0; } else { @@ -474,7 +474,7 @@ void QgsDelimitedTextSourceSelect::updateFieldLists() } if ( isValidWkt[i] ) { - value.remove( QgsDelimitedTextProvider::WktPrefixRegexp ); + value.remove( QgsDelimitedTextProvider::sWktPrefixRegexp ); isValidWkt[i] = value.contains( wktre ); } } diff --git a/src/providers/gdal/qgsgdaldataitems.cpp b/src/providers/gdal/qgsgdaldataitems.cpp index 9cbe34e45651..199214576f4f 100644 --- a/src/providers/gdal/qgsgdaldataitems.cpp +++ b/src/providers/gdal/qgsgdaldataitems.cpp @@ -117,10 +117,10 @@ QString QgsGdalLayerItem::layerName() const // --------------------------------------------------------------------------- -static QString filterString; -static QStringList extensions = QStringList(); -static QStringList wildcards = QStringList(); -static QMutex gBuildingFilters; +static QString sFilterString; +static QStringList sExtensions = QStringList(); +static QStringList sWildcards = QStringList(); +static QMutex sBuildingFilters; QGISEXTERN int dataCapabilities() { @@ -176,16 +176,16 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) return nullptr; // get supported extensions - if ( extensions.isEmpty() ) + if ( sExtensions.isEmpty() ) { // this code may be executed by more threads at once! // use a mutex to make sure this does not happen (so there's no crash on start) - QMutexLocker locker( &gBuildingFilters ); - if ( extensions.isEmpty() ) + QMutexLocker locker( &sBuildingFilters ); + if ( sExtensions.isEmpty() ) { - buildSupportedRasterFileFilterAndExtensions( filterString, extensions, wildcards ); - QgsDebugMsgLevel( "extensions: " + extensions.join( " " ), 2 ); - QgsDebugMsgLevel( "wildcards: " + wildcards.join( " " ), 2 ); + buildSupportedRasterFileFilterAndExtensions( sFilterString, sExtensions, sWildcards ); + QgsDebugMsgLevel( "extensions: " + sExtensions.join( " " ), 2 ); + QgsDebugMsgLevel( "wildcards: " + sWildcards.join( " " ), 2 ); } } @@ -193,20 +193,20 @@ QGISEXTERN QgsDataItem * dataItem( QString thePath, QgsDataItem* parentItem ) // *.shp.xml files (ESRI metadata) and *.tif.xml files (TIFF metadata) // unless that extension is in the list (*.xml might be though) if ( thePath.endsWith( QLatin1String( ".aux.xml" ), Qt::CaseInsensitive ) && - !extensions.contains( QStringLiteral( "aux.xml" ) ) ) + !sExtensions.contains( QStringLiteral( "aux.xml" ) ) ) return nullptr; if ( thePath.endsWith( QLatin1String( ".shp.xml" ), Qt::CaseInsensitive ) && - !extensions.contains( QStringLiteral( "shp.xml" ) ) ) + !sExtensions.contains( QStringLiteral( "shp.xml" ) ) ) return nullptr; if ( thePath.endsWith( QLatin1String( ".tif.xml" ), Qt::CaseInsensitive ) && - !extensions.contains( QStringLiteral( "tif.xml" ) ) ) + !sExtensions.contains( QStringLiteral( "tif.xml" ) ) ) return nullptr; // Filter files by extension - if ( !extensions.contains( suffix ) ) + if ( !sExtensions.contains( suffix ) ) { bool matches = false; - Q_FOREACH ( const QString& wildcard, wildcards ) + Q_FOREACH ( const QString& wildcard, sWildcards ) { QRegExp rx( wildcard, Qt::CaseInsensitive, QRegExp::Wildcard ); if ( rx.exactMatch( info.fileName() ) ) diff --git a/src/providers/gpx/qgsgpxprovider.cpp b/src/providers/gpx/qgsgpxprovider.cpp index 813a9bc6e591..401da674557f 100644 --- a/src/providers/gpx/qgsgpxprovider.cpp +++ b/src/providers/gpx/qgsgpxprovider.cpp @@ -45,7 +45,7 @@ #include "qgsgpxprovider.h" #include "gpsdata.h" -const char* QgsGPXProvider::attr[] = { "name", "elevation", "symbol", "number", +const char* QgsGPXProvider::ATTR[] = { "name", "elevation", "symbol", "number", "comment", "description", "source", "url", "url name" }; @@ -60,7 +60,7 @@ QgsGPXProvider::DataType QgsGPXProvider::attrUsed[] = QgsGPXProvider::AllType, QgsGPXProvider::AllType }; -const int QgsGPXProvider::sAttrCount = sizeof( QgsGPXProvider::attr ) / sizeof( const char* ); +const int QgsGPXProvider::ATTR_COUNT = sizeof( QgsGPXProvider::ATTR ) / sizeof( const char* ); const QString GPX_KEY = QStringLiteral( "gpx" ); @@ -88,12 +88,12 @@ QgsGPXProvider::QgsGPXProvider( const QString& uri ) ( typeStr == QLatin1String( "route" ) ? RouteType : TrackType ) ); // set up the attributes and the geometry type depending on the feature type - for ( int i = 0; i < sAttrCount; ++i ) + for ( int i = 0; i < ATTR_COUNT; ++i ) { if ( attrUsed[i] & mFeatureType ) { QString attrTypeName = ( attrType[i] == QVariant::Int ? "int" : ( attrType[i] == QVariant::Double ? "double" : "text" ) ); - attributeFields.append( QgsField( attr[i], attrType[i], attrTypeName ) ); + attributeFields.append( QgsField( ATTR[i], attrType[i], attrTypeName ) ); indexToAttr.append( i ); } } diff --git a/src/providers/gpx/qgsgpxprovider.h b/src/providers/gpx/qgsgpxprovider.h index 43b36d2fec12..91a5b750fdf7 100644 --- a/src/providers/gpx/qgsgpxprovider.h +++ b/src/providers/gpx/qgsgpxprovider.h @@ -107,10 +107,10 @@ class QgsGPXProvider : public QgsVectorDataProvider DataType mFeatureType; - static const char* attr[]; + static const char* ATTR[]; static QVariant::Type attrType[]; static DataType attrUsed[]; - static const int sAttrCount; + static const int ATTR_COUNT; bool mValid; diff --git a/src/providers/grass/qgis.v.in.cpp b/src/providers/grass/qgis.v.in.cpp index 8246e243309c..1a36907e34f0 100644 --- a/src/providers/grass/qgis.v.in.cpp +++ b/src/providers/grass/qgis.v.in.cpp @@ -69,8 +69,8 @@ void writePolyline( struct Map_info* map, int type, const QgsPolyline& polyline, static struct Map_info *finalMap = 0; static struct Map_info *tmpMap = 0; -static QString finalName; -static QString tmpName; +static QString sFinalName; +static QString sTmpName; dbDriver *driver = 0; void closeMaps() @@ -78,12 +78,12 @@ void closeMaps() if ( tmpMap ) { Vect_close( tmpMap ); - Vect_delete( tmpName.toUtf8().data() ); + Vect_delete( sTmpName.toUtf8().data() ); } if ( finalMap ) { Vect_close( finalMap ); - Vect_delete( finalName.toUtf8().data() ); + Vect_delete( sFinalName.toUtf8().data() ); } if ( driver ) { @@ -147,9 +147,9 @@ int main( int argc, char **argv ) QDataStream stdoutStream( &stdoutFile ); // global finalName, tmpName are used by checkStream() - finalName = QString( mapOption->answer ); + sFinalName = QString( mapOption->answer ); QDateTime now = QDateTime::currentDateTime(); - tmpName = QStringLiteral( "qgis_import_tmp_%1_%2" ).arg( mapOption->answer, now.toString( QStringLiteral( "yyyyMMddhhmmss" ) ) ); + sTmpName = QStringLiteral( "qgis_import_tmp_%1_%2" ).arg( mapOption->answer, now.toString( QStringLiteral( "yyyyMMddhhmmss" ) ) ); qint32 typeQint32; stdinStream >> typeQint32; @@ -166,7 +166,7 @@ int main( int argc, char **argv ) { tmpMap = QgsGrass::vectNewMapStruct(); // TODO: use Vect_open_tmp_new with GRASS 7 - Vect_open_new( tmpMap, tmpName.toUtf8().data(), 0 ); + Vect_open_new( tmpMap, sTmpName.toUtf8().data(), 0 ); map = tmpMap; } @@ -449,7 +449,7 @@ int main( int argc, char **argv ) G_message( "Copying lines from temporary map" ); Vect_copy_map_lines( tmpMap, finalMap ); Vect_close( tmpMap ); - Vect_delete( tmpName.toUtf8().data() ); + Vect_delete( sTmpName.toUtf8().data() ); int centroidsCount = centroids.size(); count = 0; diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index 43de531bbcce..9f78c2a00e85 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -344,9 +344,9 @@ bool QgsGrass::init( void ) G_TRY { // Store default values - defaultGisdbase = G_gisdbase(); - defaultLocation = G_location(); - defaultMapset = G_mapset(); + sDefaultGisdbase = G_gisdbase(); + sDefaultLocation = G_location(); + sDefaultMapset = G_mapset(); sActive = true; } G_CATCH( QgsGrass::Exception &e ) @@ -366,8 +366,8 @@ bool QgsGrass::init( void ) } G_CATCH( QgsGrass::Exception &e ) { - mInitError = tr( "Problem in GRASS initialization, GRASS provider and plugin will not work : %1" ).arg( e.what() ); - QgsDebugMsg( mInitError ); + sInitError = tr( "Problem in GRASS initialization, GRASS provider and plugin will not work : %1" ).arg( e.what() ); + QgsDebugMsg( sInitError ); sNonInitializable = true; unlock(); return false; @@ -391,8 +391,8 @@ bool QgsGrass::init( void ) if ( !isValidGrassBaseDir( gisbase() ) ) { sNonInitializable = true; - mInitError = tr( "GRASS was not found in '%1' (GISBASE), provider and plugin will not work." ).arg( gisbase() ); - QgsDebugMsg( mInitError ); + sInitError = tr( "GRASS was not found in '%1' (GISBASE), provider and plugin will not work." ).arg( gisbase() ); + QgsDebugMsg( sInitError ); #if 0 // TODO: how to emit message from provider (which does not know about QgisApp) QgisApp::instance()->messageBar()->pushMessage( tr( "GRASS error" ), @@ -412,11 +412,11 @@ bool QgsGrass::init( void ) // create a lot of confusion especially if both GRASS 6 and 7 are installed and path to one version // $GISBASE/bin somehow gets to PATH and another version plugin is loaded to QGIS, because if a module // is missing in one version, it could be found in another $GISBASE/bin and misleadin error could be reported - mGrassModulesPaths.clear(); - mGrassModulesPaths << gisbase() + "/bin"; - mGrassModulesPaths << gisbase() + "/scripts"; - mGrassModulesPaths << QgsApplication::pkgDataPath() + "/grass/scripts"; - mGrassModulesPaths << qgisGrassModulePath(); + sGrassModulesPaths.clear(); + sGrassModulesPaths << gisbase() + "/bin"; + sGrassModulesPaths << gisbase() + "/scripts"; + sGrassModulesPaths << QgsApplication::pkgDataPath() + "/grass/scripts"; + sGrassModulesPaths << qgisGrassModulePath(); // On windows the GRASS libraries are in // QgsApplication::prefixPath(), we have to add them @@ -439,7 +439,7 @@ bool QgsGrass::init( void ) //QString p = getenv( "PATH" ); //path.append( sep + p ); - QgsDebugMsg( "mGrassModulesPaths = " + mGrassModulesPaths.join( "," ) ); + QgsDebugMsg( "mGrassModulesPaths = " + sGrassModulesPaths.join( "," ) ); //putEnv( "PATH", path ); // TODO: move where it is required for QProcess @@ -555,17 +555,17 @@ bool QgsGrass::activeMode() QString QgsGrass::getDefaultGisdbase() { - return defaultGisdbase; + return sDefaultGisdbase; } QString QgsGrass::getDefaultLocation() { - return defaultLocation; + return sDefaultLocation; } QgsGrassObject QgsGrass::getDefaultLocationObject() { - return QgsGrassObject( defaultGisdbase, defaultLocation, QLatin1String( "" ), QLatin1String( "" ), QgsGrassObject::Location ); + return QgsGrassObject( sDefaultGisdbase, sDefaultLocation, QLatin1String( "" ), QLatin1String( "" ), QgsGrassObject::Location ); } QString QgsGrass::getDefaultLocationPath() @@ -574,22 +574,22 @@ QString QgsGrass::getDefaultLocationPath() { return QString(); } - return defaultGisdbase + "/" + defaultLocation; + return sDefaultGisdbase + "/" + sDefaultLocation; } QString QgsGrass::getDefaultMapset() { - return defaultMapset; + return sDefaultMapset; } QgsGrassObject QgsGrass::getDefaultMapsetObject() { - return QgsGrassObject( defaultGisdbase, defaultLocation, defaultMapset, QLatin1String( "" ), QgsGrassObject::Mapset ); + return QgsGrassObject( sDefaultGisdbase, sDefaultLocation, sDefaultMapset, QLatin1String( "" ), QgsGrassObject::Mapset ); } QString QgsGrass::getDefaultMapsetPath() { - return getDefaultLocationPath() + "/" + defaultMapset; + return getDefaultLocationPath() + "/" + sDefaultMapset; } void QgsGrass::setLocation( const QString& gisdbase, const QString& location ) @@ -805,19 +805,19 @@ int QgsGrass::sInitialized = 0; bool QgsGrass::sActive = 0; -QgsGrass::GError QgsGrass::lastError = QgsGrass::OK; +QgsGrass::GError QgsGrass::sLastError = QgsGrass::OK; -QString QgsGrass::error_message; -QString QgsGrass::mInitError; +QString QgsGrass::sErrorMessage; +QString QgsGrass::sInitError; -QStringList QgsGrass::mGrassModulesPaths; -QString QgsGrass::defaultGisdbase; -QString QgsGrass::defaultLocation; -QString QgsGrass::defaultMapset; +QStringList QgsGrass::sGrassModulesPaths; +QString QgsGrass::sDefaultGisdbase; +QString QgsGrass::sDefaultLocation; +QString QgsGrass::sDefaultMapset; -QString QgsGrass::mMapsetLock; -QString QgsGrass::mGisrc; -QString QgsGrass::mTmp; +QString QgsGrass::sMapsetLock; +QString QgsGrass::sGisrc; +QString QgsGrass::sTmp; QMutex QgsGrass::sMutex; @@ -839,14 +839,14 @@ int QgsGrass::error_routine( const char *msg, int fatal ) // https://trac.osgeo.org/grass/ticket/869 QgsDebugMsg( QString( "error_routine (fatal = %1): %2" ).arg( fatal ).arg( msg ) ); - error_message = msg; + sErrorMessage = msg; if ( fatal ) { QgsDebugMsg( "fatal -> longjmp" ); // Exceptions cannot be thrown from here if GRASS lib is not compiled with -fexceptions //throw QgsGrass::Exception( QString::fromUtf8( msg ) ); - lastError = Fatal; + sLastError = Fatal; #if (GRASS_VERSION_MAJOR < 7) // longjump() is called by G_fatal_error in GRASS >= 7 @@ -855,7 +855,7 @@ int QgsGrass::error_routine( const char *msg, int fatal ) } else { - lastError = Warning; + sLastError = Warning; } return 1; @@ -863,17 +863,17 @@ int QgsGrass::error_routine( const char *msg, int fatal ) void QgsGrass::resetError( void ) { - lastError = OK; + sLastError = OK; } int QgsGrass::error( void ) { - return lastError; + return sLastError; } QString QgsGrass::errorMessage( void ) { - return error_message; + return sErrorMessage; } bool QgsGrass::isOwner( const QString& gisdbase, const QString& location, const QString& mapset ) @@ -966,41 +966,41 @@ QString QgsGrass::openMapset( const QString& gisdbase, QFileInfo info( mapsetPath ); QString user = info.owner(); - mTmp = QDir::tempPath() + "/grass6-" + user + "-" + QString::number( pid ); - QDir dir( mTmp ); + sTmp = QDir::tempPath() + "/grass6-" + user + "-" + QString::number( pid ); + QDir dir( sTmp ); if ( dir.exists() ) { - QFileInfo dirInfo( mTmp ); + QFileInfo dirInfo( sTmp ); if ( !dirInfo.isWritable() ) { #ifndef Q_OS_WIN lockFile.remove(); #endif - return QObject::tr( "Temporary directory %1 exists but is not writable" ).arg( mTmp ); + return QObject::tr( "Temporary directory %1 exists but is not writable" ).arg( sTmp ); } } - else if ( !dir.mkdir( mTmp ) ) + else if ( !dir.mkdir( sTmp ) ) { #ifndef Q_OS_WIN lockFile.remove(); #endif - return QObject::tr( "Cannot create temporary directory %1" ).arg( mTmp ); + return QObject::tr( "Cannot create temporary directory %1" ).arg( sTmp ); } // Create GISRC file QString globalGisrc = QDir::home().path() + "/.grassrc6"; - mGisrc = mTmp + "/gisrc"; + sGisrc = sTmp + "/gisrc"; QgsDebugMsg( QString( "globalGisrc = %1" ).arg( globalGisrc ) ); - QgsDebugMsg( QString( "mGisrc = %1" ).arg( mGisrc ) ); + QgsDebugMsg( QString( "mGisrc = %1" ).arg( sGisrc ) ); - QFile out( mGisrc ); + QFile out( sGisrc ); if ( !out.open( QIODevice::WriteOnly ) ) { #ifndef Q_OS_WIN lockFile.remove(); #endif - return QObject::tr( "Cannot create %1" ).arg( mGisrc ); + return QObject::tr( "Cannot create %1" ).arg( sGisrc ); } QTextStream stream( &out ); @@ -1041,10 +1041,10 @@ QString QgsGrass::openMapset( const QString& gisdbase, // Set GISRC environment variable // Mapset must be set before Vect_close() /* _Correct_ putenv() implementation is not making copy! */ - putEnv( QStringLiteral( "GISRC" ), mGisrc ); + putEnv( QStringLiteral( "GISRC" ), sGisrc ); // Reinitialize GRASS - G__setenv( "GISRC", mGisrc.toUtf8().data() ); + G__setenv( "GISRC", sGisrc.toUtf8().data() ); #ifdef Q_OS_WIN G__setenv( "GISDBASE", shortPath( gisdbase ).toLocal8Bit().data() ); #else @@ -1052,9 +1052,9 @@ QString QgsGrass::openMapset( const QString& gisdbase, #endif G__setenv( "LOCATION_NAME", location.toLocal8Bit().data() ); G__setenv( "MAPSET", mapset.toLocal8Bit().data() ); - defaultGisdbase = gisdbase; - defaultLocation = location; - defaultMapset = mapset; + sDefaultGisdbase = gisdbase; + sDefaultLocation = location; + sDefaultMapset = mapset; sActive = true; @@ -1073,7 +1073,7 @@ QString QgsGrass::openMapset( const QString& gisdbase, #endif #endif - mMapsetLock = lock; + sMapsetLock = lock; emit QgsGrass::instance()->mapsetChanged(); return QString::null; @@ -1082,16 +1082,16 @@ QString QgsGrass::openMapset( const QString& gisdbase, QString QgsGrass::closeMapset() { - if ( mMapsetLock.length() > 0 ) + if ( sMapsetLock.length() > 0 ) { #ifndef Q_OS_WIN - QFile file( mMapsetLock ); + QFile file( sMapsetLock ); if ( !file.remove() ) { - return QObject::tr( "Cannot remove mapset lock: %1" ).arg( mMapsetLock ); + return QObject::tr( "Cannot remove mapset lock: %1" ).arg( sMapsetLock ); } #endif - mMapsetLock = QLatin1String( "" ); + sMapsetLock = QLatin1String( "" ); putenv(( char * ) "GISRC" ); @@ -1106,17 +1106,17 @@ QString QgsGrass::closeMapset() //G__setenv( "LOCATION_NAME", ( char * ) "" ); //G__setenv( "MAPSET", ( char * ) "" ); - defaultGisdbase = QLatin1String( "" ); - defaultLocation = QLatin1String( "" ); - defaultMapset = QLatin1String( "" ); + sDefaultGisdbase = QLatin1String( "" ); + sDefaultLocation = QLatin1String( "" ); + sDefaultMapset = QLatin1String( "" ); sActive = 0; // Delete temporary dir // To be sure that we don't delete '/' for example - if ( mTmp.left( 4 ) == QLatin1String( "/tmp" ) ) + if ( sTmp.left( 4 ) == QLatin1String( "/tmp" ) ) { - QDir dir( mTmp ); + QDir dir( sTmp ); for ( unsigned int i = 0; i < dir.count(); i++ ) { if ( dir[i] == QLatin1String( "." ) || dir[i] == QLatin1String( ".." ) ) @@ -1129,9 +1129,9 @@ QString QgsGrass::closeMapset() } } - if ( !dir.rmdir( mTmp ) ) + if ( !dir.rmdir( sTmp ) ) { - QgsDebugMsg( QString( "Cannot remove temporary directory %1" ).arg( mTmp ) ); + QgsDebugMsg( QString( "Cannot remove temporary directory %1" ).arg( sTmp ) ); } } } @@ -2620,24 +2620,24 @@ void QgsGrass::adjustCellHead( struct Cell_head *cellhd, int row_flag, int col_f QMap QgsGrass::vectorTypeMap() { - static QMap vectorTypes; + static QMap sVectorTypes; static QMutex sMutex; - if ( vectorTypes.isEmpty() ) + if ( sVectorTypes.isEmpty() ) { sMutex.lock(); - if ( vectorTypes.isEmpty() ) + if ( sVectorTypes.isEmpty() ) { - vectorTypes.insert( GV_POINT, QStringLiteral( "point" ) ); - vectorTypes.insert( GV_CENTROID, QStringLiteral( "centroid" ) ); - vectorTypes.insert( GV_LINE, QStringLiteral( "line" ) ); - vectorTypes.insert( GV_BOUNDARY, QStringLiteral( "boundary" ) ); - vectorTypes.insert( GV_AREA, QStringLiteral( "area" ) ); - vectorTypes.insert( GV_FACE, QStringLiteral( "face" ) ); - vectorTypes.insert( GV_KERNEL, QStringLiteral( "kernel" ) ); + sVectorTypes.insert( GV_POINT, QStringLiteral( "point" ) ); + sVectorTypes.insert( GV_CENTROID, QStringLiteral( "centroid" ) ); + sVectorTypes.insert( GV_LINE, QStringLiteral( "line" ) ); + sVectorTypes.insert( GV_BOUNDARY, QStringLiteral( "boundary" ) ); + sVectorTypes.insert( GV_AREA, QStringLiteral( "area" ) ); + sVectorTypes.insert( GV_FACE, QStringLiteral( "face" ) ); + sVectorTypes.insert( GV_KERNEL, QStringLiteral( "kernel" ) ); } sMutex.unlock(); } - return vectorTypes; + return sVectorTypes; } int QgsGrass::vectorType( const QString & typeName ) @@ -2707,12 +2707,12 @@ bool QgsGrass::isMapset( const QString& path ) QString QgsGrass::lockFilePath() { - return mMapsetLock; + return sMapsetLock; } QString QgsGrass::gisrcFilePath() { - if ( mGisrc.isEmpty() ) + if ( sGisrc.isEmpty() ) { // Started from GRASS shell if ( getenv( "GISRC" ) ) @@ -2720,7 +2720,7 @@ QString QgsGrass::gisrcFilePath() return QString( getenv( "GISRC" ) ); } } - return mGisrc; + return sGisrc; } void QgsGrass::putEnv( const QString& name, const QString& value ) @@ -2820,7 +2820,7 @@ void QgsGrass::setGisbase( bool custom, const QString &customDir ) { sNonInitializable = false; sInitialized = false; - mInitError.clear(); + sInitError.clear(); if ( !QgsGrass::init() ) { QgsDebugMsg( "cannot init : " + QgsGrass::initError() ); @@ -2919,7 +2919,7 @@ void QgsGrass::warning( const QString &message ) } else { - error_message = message; + sErrorMessage = message; QgsDebugMsg( message ); } } diff --git a/src/providers/grass/qgsgrass.h b/src/providers/grass/qgsgrass.h index 209c70895ceb..69d1a730f079 100644 --- a/src/providers/grass/qgsgrass.h +++ b/src/providers/grass/qgsgrass.h @@ -264,7 +264,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject static QString errorMessage( void ); //! Get initialization error - static QString initError() { return mInitError; } + static QString initError() { return sInitError; } //! Test is current user is owner of mapset static bool isOwner( const QString& gisdbase, const QString& location, const QString& mapset ); @@ -551,7 +551,7 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject // It does not contain paths from PATH environment variable static QStringList grassModulesPaths() { - return mGrassModulesPaths; + return sGrassModulesPaths; } // path to QGIS GRASS modules like qgis.g.info etc. @@ -670,20 +670,20 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject static bool sNonInitializable; static int sInitialized; // Set to 1 after initialization static bool sActive; // is active mode - static QStringList mGrassModulesPaths; - static QString defaultGisdbase; - static QString defaultLocation; - static QString defaultMapset; + static QStringList sGrassModulesPaths; + static QString sDefaultGisdbase; + static QString sDefaultLocation; + static QString sDefaultMapset; // Mapsets in current search path QStringList mMapsetSearchPath; QFileSystemWatcher *mMapsetSearchPathWatcher; /* last error in GRASS libraries */ - static GError lastError; // static, because used in constructor - static QString error_message; + static GError sLastError; // static, because used in constructor + static QString sErrorMessage; // error set in init() if it failed - static QString mInitError; + static QString sInitError; // G_set_error_routine has two versions of the function's first argument it expects: // - char* msg - older version @@ -693,11 +693,11 @@ class GRASS_LIB_EXPORT QgsGrass : public QObject static int error_routine( char *msg, int fatal ); // static because pointer to this function is set later // Current mapset lock file path - static QString mMapsetLock; + static QString sMapsetLock; // Current mapset GISRC file path - static QString mGisrc; + static QString sGisrc; // Temporary directory where GISRC and sockets are stored - static QString mTmp; + static QString sTmp; // Mutex for common locking when calling GRASS functions which are mostly non thread safe static QMutex sMutex; // Mute mode, do not show warning dialogs. diff --git a/src/providers/grass/qgsgrassprovider.cpp b/src/providers/grass/qgsgrassprovider.cpp index 2ddca8e8c5aa..2d582d201198 100644 --- a/src/providers/grass/qgsgrassprovider.cpp +++ b/src/providers/grass/qgsgrassprovider.cpp @@ -106,7 +106,7 @@ Vect_delete_line_function_type *Vect_delete_line_function_pointer = ( Vect_delet static QString GRASS_KEY = QStringLiteral( "grass" ); -int QgsGrassProvider::LAST_TYPE = -9999; +int QgsGrassProvider::sLastType = -9999; int QgsGrassProvider::sEditedCount = 0; QgsGrassProvider::QgsGrassProvider( const QString& uri ) @@ -1211,7 +1211,7 @@ void QgsGrassProvider::onFeatureAdded( QgsFeatureId fid ) if ( FID_IS_NEW( fid ) ) { - if ( mNewFeatureType == QgsGrassProvider::LAST_TYPE ) + if ( mNewFeatureType == QgsGrassProvider::sLastType ) { type = mLastType; QgsDebugMsg( QString( "use mLastType = %1" ).arg( mLastType ) ); diff --git a/src/providers/grass/qgsgrassprovider.h b/src/providers/grass/qgsgrassprovider.h index f4c85438b00d..25c86a36051b 100644 --- a/src/providers/grass/qgsgrassprovider.h +++ b/src/providers/grass/qgsgrassprovider.h @@ -57,7 +57,7 @@ class GRASS_LIB_EXPORT QgsGrassProvider : public QgsVectorDataProvider Q_OBJECT public: - static int LAST_TYPE; + static int sLastType; QgsGrassProvider( const QString &uri = QString() ); diff --git a/src/providers/grass/qgsgrassprovidermodule.cpp b/src/providers/grass/qgsgrassprovidermodule.cpp index 02589ed0735c..64b94bf99976 100644 --- a/src/providers/grass/qgsgrassprovidermodule.cpp +++ b/src/providers/grass/qgsgrassprovidermodule.cpp @@ -366,7 +366,7 @@ QVectorQgsGrassLocationItem::createChildren() //----------------------- QgsGrassMapsetItem ------------------------------ -QList QgsGrassMapsetItem::mImports; +QList QgsGrassMapsetItem::sImports; QgsGrassMapsetItem::QgsGrassMapsetItem( QgsDataItem* parent, QString dirPath, QString path ) : QgsDirectoryItem( parent, QLatin1String( "" ), dirPath, path ) @@ -436,7 +436,7 @@ void QgsGrassMapsetItem::setState( State state ) bool QgsGrassMapsetItem::objectInImports( const QgsGrassObject& grassObject ) { - Q_FOREACH ( QgsGrassImport* import, mImports ) + Q_FOREACH ( QgsGrassImport* import, sImports ) { if ( !import ) { @@ -628,7 +628,7 @@ QVector QgsGrassMapsetItem::createChildren() items.append( layer ); } - Q_FOREACH ( QgsGrassImport* import, mImports ) + Q_FOREACH ( QgsGrassImport* import, sImports ) { if ( mRefreshLater ) { @@ -670,7 +670,7 @@ bool QgsGrassMapsetItem::handleDrop( const QMimeData * data, Qt::DropAction ) QStringList existingRasters = QgsGrass::rasters( mGrassObject.mapsetPath() ); QStringList existingVectors = QgsGrass::vectors( mGrassObject.mapsetPath() ); // add currently being imported - Q_FOREACH ( QgsGrassImport* import, mImports ) + Q_FOREACH ( QgsGrassImport* import, sImports ) { if ( import && import->grassObject().type() == QgsGrassObject::Raster ) { @@ -884,7 +884,7 @@ bool QgsGrassMapsetItem::handleDrop( const QMimeData * data, Qt::DropAction ) } import->importInThread(); - mImports.append( import ); + sImports.append( import ); if ( u.layerType == QLatin1String( "raster" ) ) { existingRasters.append( import->names() ); @@ -918,7 +918,7 @@ void QgsGrassMapsetItem::onImportFinished( QgsGrassImport* import ) output->showMessage(); } - mImports.removeOne( import ); + sImports.removeOne( import ); import->deleteLater(); refresh(); } @@ -1078,15 +1078,9 @@ QgsGrassRasterItem::QgsGrassRasterItem( QgsDataItem* parent, QgsGrassObject gras QIcon QgsGrassRasterItem::icon() { - static QIcon linkIcon; - if ( mExternal ) { - if ( linkIcon.isNull() ) - { - linkIcon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconRasterLink.svg" ) ); - } - return linkIcon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconRasterLink.svg" ) ); } return QgsDataItem::icon(); } @@ -1107,13 +1101,7 @@ QgsGrassGroupItem::QgsGrassGroupItem( QgsDataItem* parent, QgsGrassObject grassO QIcon QgsGrassGroupItem::icon() { - static QIcon linkIcon; - - if ( linkIcon.isNull() ) - { - linkIcon = QgsApplication::getThemeIcon( QStringLiteral( "/mIconRasterGroup.svg" ) ); - } - return linkIcon; + return QgsApplication::getThemeIcon( QStringLiteral( "/mIconRasterGroup.svg" ) ); } //----------------------- QgsGrassImportItemWidget ------------------------------ @@ -1153,7 +1141,7 @@ void QgsGrassImportItemWidget::onProgressChanged( const QString &recentHtml, con //----------------------- QgsGrassImportItem ------------------------------ -QgsAnimatedIcon *QgsGrassImportItem::mImportIcon = 0; +QgsAnimatedIcon *QgsGrassImportItem::sImportIcon = 0; QgsGrassImportItem::QgsGrassImportItem( QgsDataItem* parent, const QString& name, const QString& path, QgsGrassImport* import ) : QgsDataItem( QgsDataItem::Layer, parent, name, path ) diff --git a/src/providers/grass/qgsgrassprovidermodule.h b/src/providers/grass/qgsgrassprovidermodule.h index dab641f2d0c5..349ebab027e7 100644 --- a/src/providers/grass/qgsgrassprovidermodule.h +++ b/src/providers/grass/qgsgrassprovidermodule.h @@ -111,7 +111,7 @@ class QgsGrassMapsetItem : public QgsDirectoryItem, public QgsGrassObjectItemBas QFileSystemWatcher *mMapsetFileSystemWatcher; bool mRefreshLater; // running imports - static QList mImports; + static QList sImports; }; class QgsGrassObjectItem : public QgsLayerItem, public QgsGrassObjectItemBase @@ -234,7 +234,7 @@ class QgsGrassImportItem : public QgsDataItem, public QgsGrassObjectItemBase QgsGrassImport* mImport; private: - static QgsAnimatedIcon *mImportIcon; + static QgsAnimatedIcon *sImportIcon; }; #endif // QGSGRASSPROVIDERMODULE_H diff --git a/src/providers/grass/qgsgrassvectormap.cpp b/src/providers/grass/qgsgrassvectormap.cpp index 68847b45d1a6..0ff88f5e57b9 100644 --- a/src/providers/grass/qgsgrassvectormap.cpp +++ b/src/providers/grass/qgsgrassvectormap.cpp @@ -731,7 +731,7 @@ void QgsGrassVectorMap::closeAllIterators() } //------------------------------------ QgsGrassVectorMapStore ------------------------------------ -QgsGrassVectorMapStore * QgsGrassVectorMapStore::mStore = 0; +QgsGrassVectorMapStore * QgsGrassVectorMapStore::sStore = 0; QgsGrassVectorMapStore::QgsGrassVectorMapStore() { @@ -739,12 +739,12 @@ QgsGrassVectorMapStore::QgsGrassVectorMapStore() QgsGrassVectorMapStore *QgsGrassVectorMapStore::instance() { - static QgsGrassVectorMapStore instance; - if ( mStore ) + static QgsGrassVectorMapStore sInstance; + if ( sStore ) { - return mStore; + return sStore; } - return &instance; + return &sInstance; } QgsGrassVectorMap * QgsGrassVectorMapStore::openMap( const QgsGrassObject & grassObject ) diff --git a/src/providers/grass/qgsgrassvectormap.h b/src/providers/grass/qgsgrassvectormap.h index 14010abfd4b5..41beec059542 100644 --- a/src/providers/grass/qgsgrassvectormap.h +++ b/src/providers/grass/qgsgrassvectormap.h @@ -224,7 +224,7 @@ class GRASS_LIB_EXPORT QgsGrassVectorMapStore // Default instance may be overridden explicitly to avoid (temporarily) to share maps by providers // This is only used for editing test to have an independent map - static void setStore( QgsGrassVectorMapStore * store ) { mStore = store; } + static void setStore( QgsGrassVectorMapStore * store ) { sStore = store; } /** Open map. * @param grassObject @@ -238,7 +238,7 @@ class GRASS_LIB_EXPORT QgsGrassVectorMapStore // Lock open/close map QMutex mMutex; - static QgsGrassVectorMapStore * mStore; + static QgsGrassVectorMapStore * sStore; }; #endif // QGSGRASSVECTORMAP_H diff --git a/src/providers/ogr/qgsogrconnpool.cpp b/src/providers/ogr/qgsogrconnpool.cpp index 058b5e717274..fe56ce8b8fa1 100644 --- a/src/providers/ogr/qgsogrconnpool.cpp +++ b/src/providers/ogr/qgsogrconnpool.cpp @@ -16,20 +16,20 @@ #include "qgsogrconnpool.h" #include "qgslogger.h" -QgsOgrConnPool* QgsOgrConnPool::mInstance = nullptr; +QgsOgrConnPool* QgsOgrConnPool::sInstance = nullptr; // static public QgsOgrConnPool* QgsOgrConnPool::instance() { - if ( ! mInstance ) mInstance = new QgsOgrConnPool(); - return mInstance; + if ( ! sInstance ) sInstance = new QgsOgrConnPool(); + return sInstance; } // static public void QgsOgrConnPool::cleanupInstance() { - delete mInstance; - mInstance = nullptr; + delete sInstance; + sInstance = nullptr; } QgsOgrConnPool::QgsOgrConnPool() : QgsConnectionPool() diff --git a/src/providers/ogr/qgsogrconnpool.h b/src/providers/ogr/qgsogrconnpool.h index 0aa84563cfb2..9425fcc66278 100644 --- a/src/providers/ogr/qgsogrconnpool.h +++ b/src/providers/ogr/qgsogrconnpool.h @@ -157,7 +157,7 @@ class QgsOgrConnPool : public QgsConnectionPool QgsPostgresConn::sConnectionsRO; QMap QgsPostgresConn::sConnectionsRW; -const int QgsPostgresConn::sGeomTypeSelectLimit = 100; +const int QgsPostgresConn::GEOM_TYPE_SELECT_LIMIT = 100; QgsPostgresConn *QgsPostgresConn::connectDb( const QString& conninfo, bool readonly, bool shared, bool transaction ) { @@ -1419,7 +1419,7 @@ void QgsPostgresConn::retrieveLayerTypes( QgsPostgresLayerProperty &layerPropert .arg( quotedIdentifier( layerProperty.geometryColName ), table, layerProperty.sql.isEmpty() ? QLatin1String( "" ) : QStringLiteral( " WHERE %1" ).arg( layerProperty.sql ) ) - .arg( sGeomTypeSelectLimit ); + .arg( GEOM_TYPE_SELECT_LIMIT ); } else if ( !layerProperty.sql.isEmpty() ) { diff --git a/src/providers/postgres/qgspostgresconn.h b/src/providers/postgres/qgspostgresconn.h index b031581a9340..fbe4695d0edc 100644 --- a/src/providers/postgres/qgspostgresconn.h +++ b/src/providers/postgres/qgspostgresconn.h @@ -310,7 +310,7 @@ class QgsPostgresConn : public QObject QString connInfo() const { return mConnInfo; } - static const int sGeomTypeSelectLimit; + static const int GEOM_TYPE_SELECT_LIMIT; static QString displayStringForWkbType( QgsWkbTypes::Type wkbType ); static QString displayStringForGeomType( QgsPostgresGeometryColumnType geomType ); diff --git a/src/providers/postgres/qgspostgresexpressioncompiler.cpp b/src/providers/postgres/qgspostgresexpressioncompiler.cpp index 83641381d96f..3c7c524a123b 100644 --- a/src/providers/postgres/qgspostgresexpressioncompiler.cpp +++ b/src/providers/postgres/qgspostgresexpressioncompiler.cpp @@ -38,7 +38,7 @@ QString QgsPostgresExpressionCompiler::quotedValue( const QVariant& value, bool& return QgsPostgresConn::quotedValue( value ); } -static const QMap sFunctionNamesSqlFunctionsMap +static const QMap FUNCTION_NAMES_SQL_FUNCTIONS_MAP { { "sqrt", "sqrt" }, { "radians", "radians" }, @@ -107,7 +107,7 @@ static const QMap sFunctionNamesSqlFunctionsMap QString QgsPostgresExpressionCompiler::sqlFunctionFromFunctionName( const QString& fnName ) const { - return sFunctionNamesSqlFunctionsMap.value( fnName, QString() ); + return FUNCTION_NAMES_SQL_FUNCTIONS_MAP.value( fnName, QString() ); } QStringList QgsPostgresExpressionCompiler::sqlArgumentsFromFunctionName( const QString& fnName, const QStringList& fnArgs ) const diff --git a/src/providers/postgres/qgspostgresfeatureiterator.cpp b/src/providers/postgres/qgspostgresfeatureiterator.cpp index d0012dd30cb2..b85fdaccefdc 100644 --- a/src/providers/postgres/qgspostgresfeatureiterator.cpp +++ b/src/providers/postgres/qgspostgresfeatureiterator.cpp @@ -26,12 +26,12 @@ #include -const int QgsPostgresFeatureIterator::sFeatureQueueSize = 2000; +const int QgsPostgresFeatureIterator::FEATURE_QUEUE_SIZE = 2000; QgsPostgresFeatureIterator::QgsPostgresFeatureIterator( QgsPostgresFeatureSource* source, bool ownSource, const QgsFeatureRequest& request ) : QgsAbstractFeatureIteratorFromSource( source, ownSource, request ) - , mFeatureQueueSize( sFeatureQueueSize ) + , mFeatureQueueSize( FEATURE_QUEUE_SIZE ) , mFetched( 0 ) , mFetchGeometry( false ) , mExpressionCompiled( false ) diff --git a/src/providers/postgres/qgspostgresfeatureiterator.h b/src/providers/postgres/qgspostgresfeatureiterator.h index e44abe1a5358..aeabe37af408 100644 --- a/src/providers/postgres/qgspostgresfeatureiterator.h +++ b/src/providers/postgres/qgspostgresfeatureiterator.h @@ -111,7 +111,7 @@ class QgsPostgresFeatureIterator : public QgsAbstractFeatureIteratorFromSource= 0 ? x : x + int32pk_offset; + return x >= 0 ? x : x + INT32PK_OFFSET; } static qint32 fid_to_int32pk( qint64 x ) { - return x <= (( int32pk_offset ) / 2.0 ) ? x : -( int32pk_offset - x ); + return x <= (( INT32PK_OFFSET ) / 2.0 ) ? x : -( INT32PK_OFFSET - x ); } }; diff --git a/src/providers/spatialite/qgsspatialiteconnection.cpp b/src/providers/spatialite/qgsspatialiteconnection.cpp index b0db367f5f8b..78b1a23de4b7 100644 --- a/src/providers/spatialite/qgsspatialiteconnection.cpp +++ b/src/providers/spatialite/qgsspatialiteconnection.cpp @@ -692,7 +692,7 @@ bool QgsSpatiaLiteConnection::isDeclaredHidden( sqlite3 * handle, const QString& -QMap < QString, QgsSqliteHandle * > QgsSqliteHandle::handles; +QMap < QString, QgsSqliteHandle * > QgsSqliteHandle::sHandles; bool QgsSqliteHandle::checkMetadata( sqlite3 *handle ) @@ -726,11 +726,11 @@ QgsSqliteHandle* QgsSqliteHandle::openDb( const QString & dbPath, bool shared ) //QMap < QString, QgsSqliteHandle* >&handles = QgsSqliteHandle::handles; - if ( shared && handles.contains( dbPath ) ) + if ( shared && sHandles.contains( dbPath ) ) { QgsDebugMsg( QString( "Using cached connection for %1" ).arg( dbPath ) ); - handles[dbPath]->ref++; - return handles[dbPath]; + sHandles[dbPath]->ref++; + return sHandles[dbPath]; } QgsDebugMsg( QString( "New sqlite connection for " ) + dbPath ); @@ -758,7 +758,7 @@ QgsSqliteHandle* QgsSqliteHandle::openDb( const QString & dbPath, bool shared ) QgsSqliteHandle *handle = new QgsSqliteHandle( sqlite_handle, dbPath, shared ); if ( shared ) - handles.insert( dbPath, handle ); + sHandles.insert( dbPath, handle ); return handle; } @@ -774,7 +774,7 @@ void QgsSqliteHandle::closeDb( QgsSqliteHandle * &handle ) else { QMap < QString, QgsSqliteHandle * >::iterator i; - for ( i = handles.begin(); i != handles.end() && i.value() != handle; ++i ) + for ( i = sHandles.begin(); i != sHandles.end() && i.value() != handle; ++i ) ; Q_ASSERT( i.value() == handle ); @@ -784,7 +784,7 @@ void QgsSqliteHandle::closeDb( QgsSqliteHandle * &handle ) { i.value()->sqliteClose(); delete i.value(); - handles.remove( i.key() ); + sHandles.remove( i.key() ); } } @@ -794,13 +794,13 @@ void QgsSqliteHandle::closeDb( QgsSqliteHandle * &handle ) void QgsSqliteHandle::closeAll() { QMap < QString, QgsSqliteHandle * >::iterator i; - for ( i = handles.begin(); i != handles.end(); ++i ) + for ( i = sHandles.begin(); i != sHandles.end(); ++i ) { i.value()->sqliteClose(); delete i.value(); } - handles.clear(); + sHandles.clear(); } void QgsSqliteHandle::sqliteClose() diff --git a/src/providers/spatialite/qgsspatialiteconnection.h b/src/providers/spatialite/qgsspatialiteconnection.h index 373d25e55df3..a7406e5b6e34 100644 --- a/src/providers/spatialite/qgsspatialiteconnection.h +++ b/src/providers/spatialite/qgsspatialiteconnection.h @@ -184,7 +184,7 @@ class QgsSqliteHandle QString mDbPath; bool mIsValid; - static QMap < QString, QgsSqliteHandle * > handles; + static QMap < QString, QgsSqliteHandle * > sHandles; }; diff --git a/src/providers/virtual/qgsvirtuallayerblob.cpp b/src/providers/virtual/qgsvirtuallayerblob.cpp index 2ae06217ab53..3163415bab19 100644 --- a/src/providers/virtual/qgsvirtuallayerblob.cpp +++ b/src/providers/virtual/qgsvirtuallayerblob.cpp @@ -76,7 +76,7 @@ void SpatialiteBlobHeader::writeTo( char* p ) const // Convert a QgsGeometry into a Spatialite geometry BLOB void qgsGeometryToSpatialiteBlob( const QgsGeometry &geom, int32_t srid, char *&blob, int &size ) { - const int header_len = SpatialiteBlobHeader::length; + const int header_len = SpatialiteBlobHeader::LENGTH; QByteArray wkb( geom.exportToWkb() ); @@ -219,7 +219,7 @@ void copySpatialiteCollectionWkbToQgsGeometry( const char* iwkb, char* owkb, uin QgsGeometry spatialiteBlobToQgsGeometry( const char* blob, size_t size ) { - const int header_size = SpatialiteBlobHeader::length; + const int header_size = SpatialiteBlobHeader::LENGTH; const int wkb_size = static_cast< const int >( size - header_size ); char* wkb = new char[wkb_size]; @@ -233,13 +233,13 @@ QgsGeometry spatialiteBlobToQgsGeometry( const char* blob, size_t size ) QPair spatialiteBlobGeometryType( const char* blob, size_t size ) { - if ( size < SpatialiteBlobHeader::length + 4 ) // the header + the type on 4 bytes + if ( size < SpatialiteBlobHeader::LENGTH + 4 ) // the header + the type on 4 bytes { return qMakePair( QgsWkbTypes::NoGeometry, long( 0 ) ); } uint32_t srid = *( reinterpret_cast< const uint32_t* >( blob + 2 ) ); - uint32_t type = *( reinterpret_cast< const uint32_t* >( blob + SpatialiteBlobHeader::length ) ); + uint32_t type = *( reinterpret_cast< const uint32_t* >( blob + SpatialiteBlobHeader::LENGTH ) ); return qMakePair( static_cast( type ), long( srid ) ); } diff --git a/src/providers/virtual/qgsvirtuallayerblob.h b/src/providers/virtual/qgsvirtuallayerblob.h index dd696f1d184f..35f668151c25 100644 --- a/src/providers/virtual/qgsvirtuallayerblob.h +++ b/src/providers/virtual/qgsvirtuallayerblob.h @@ -44,7 +44,7 @@ struct SpatialiteBlobHeader SpatialiteBlobHeader(); - static const size_t length = 39; + static const size_t LENGTH = 39; void readFrom( const char* p ); diff --git a/src/providers/virtual/qgsvirtuallayersqlitemodule.cpp b/src/providers/virtual/qgsvirtuallayersqlitemodule.cpp index 71f169a92a11..aa645d31f9cc 100644 --- a/src/providers/virtual/qgsvirtuallayersqlitemodule.cpp +++ b/src/providers/virtual/qgsvirtuallayersqlitemodule.cpp @@ -706,13 +706,13 @@ int vtableColumn( sqlite3_vtab_cursor *cursor, sqlite3_context* ctxt, int idx ) } -static QCoreApplication* coreApp = nullptr; +static QCoreApplication* sCoreApp = nullptr; void moduleDestroy( void* ) { - if ( coreApp ) + if ( sCoreApp ) { - delete coreApp; + delete sCoreApp; } } @@ -902,7 +902,7 @@ int qgsvlayerModuleInit( sqlite3 *db, char **pzErrMsg, void * unused /*const sql static int moduleArgc = 1; static char moduleName[] = "qgsvlayer_module"; static char* moduleArgv[] = { moduleName }; - coreApp = new QCoreApplication( moduleArgc, moduleArgv ); + sCoreApp = new QCoreApplication( moduleArgc, moduleArgv ); QgsApplication::init(); QgsApplication::initQgis(); } diff --git a/src/providers/wcs/qgswcsdataitems.cpp b/src/providers/wcs/qgswcsdataitems.cpp index 2226135a110d..7eae84e786a0 100644 --- a/src/providers/wcs/qgswcsdataitems.cpp +++ b/src/providers/wcs/qgswcsdataitems.cpp @@ -275,10 +275,6 @@ void QgsWCSRootItem::newConnection() // --------------------------------------------------------------------------- -static QString filterString; -static QStringList extensions = QStringList(); -static QStringList wildcards = QStringList(); - QGISEXTERN int dataCapabilities() { return QgsDataProvider::Net; diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp index a221030fbbfd..4ae5060b70cb 100644 --- a/src/providers/wfs/qgswfsshareddata.cpp +++ b/src/providers/wfs/qgswfsshareddata.cpp @@ -299,10 +299,10 @@ bool QgsWFSSharedData::createCache() #endif if ( !ogrWaySuccessful ) { - static QMutex mutexDBnameCreation; - static QByteArray cachedDBTemplate; - QMutexLocker mutexDBnameCreationHolder( &mutexDBnameCreation ); - if ( cachedDBTemplate.size() == 0 ) + static QMutex sMutexDBnameCreation; + static QByteArray sCachedDBTemplate; + QMutexLocker mutexDBnameCreationHolder( &sMutexDBnameCreation ); + if ( sCachedDBTemplate.size() == 0 ) { // Create a template Spatialite DB QTemporaryFile tempFile; @@ -335,7 +335,7 @@ bool QgsWFSSharedData::createCache() // Ingest it in a buffer QFile file( tempFile.fileName() ); if ( file.open( QIODevice::ReadOnly ) ) - cachedDBTemplate = file.readAll(); + sCachedDBTemplate = file.readAll(); file.close(); QFile::remove( tempFile.fileName() ); } @@ -347,7 +347,7 @@ bool QgsWFSSharedData::createCache() QgsMessageLog::logMessage( tr( "Cannot create temporary SpatiaLite cache" ), tr( "WFS" ) ); return false; } - if ( dbFile.write( cachedDBTemplate ) < 0 ) + if ( dbFile.write( sCachedDBTemplate ) < 0 ) { QgsMessageLog::logMessage( tr( "Cannot create temporary SpatiaLite cache" ), tr( "WFS" ) ); return false; diff --git a/src/providers/wfs/qgswfsutils.cpp b/src/providers/wfs/qgswfsutils.cpp index 54b0c978811c..8e320be28883 100644 --- a/src/providers/wfs/qgswfsutils.cpp +++ b/src/providers/wfs/qgswfsutils.cpp @@ -29,8 +29,8 @@ #include #include -QMutex QgsWFSUtils::gmMutex; -QThread* QgsWFSUtils::gmThread = nullptr; +QMutex QgsWFSUtils::sMutex; +QThread* QgsWFSUtils::sThread = nullptr; bool QgsWFSUtils::sKeepAliveWorks = false; int QgsWFSUtils::sCounter = 0; @@ -42,7 +42,7 @@ QString QgsWFSUtils::getBaseCacheDirectory( bool createIfNotExisting ) cacheDirectory = QgsApplication::qgisSettingsDirPath() + "cache"; if ( createIfNotExisting ) { - QMutexLocker locker( &gmMutex ); + QMutexLocker locker( &sMutex ); if ( !QDir( cacheDirectory ).exists( QStringLiteral( "wfsprovider" ) ) ) { QgsDebugMsg( QString( "Creating main cache dir %1/wfsprovider" ).arg( cacheDirectory ) ); @@ -58,7 +58,7 @@ QString QgsWFSUtils::getCacheDirectory( bool createIfNotExisting ) QString processPath( QStringLiteral( "pid_%1" ).arg( QCoreApplication::applicationPid() ) ); if ( createIfNotExisting ) { - QMutexLocker locker( &gmMutex ); + QMutexLocker locker( &sMutex ); if ( !QDir( baseDirectory ).exists( processPath ) ) { QgsDebugMsg( QString( "Creating our cache dir %1/%2" ).arg( baseDirectory, processPath ) ); @@ -66,8 +66,8 @@ QString QgsWFSUtils::getCacheDirectory( bool createIfNotExisting ) } if ( sCounter == 0 && sKeepAliveWorks ) { - gmThread = new QgsWFSUtilsKeepAlive(); - gmThread->start(); + sThread = new QgsWFSUtilsKeepAlive(); + sThread->start(); } sCounter ++; } @@ -81,16 +81,16 @@ QString QgsWFSUtils::acquireCacheDirectory() void QgsWFSUtils::releaseCacheDirectory() { - QMutexLocker locker( &gmMutex ); + QMutexLocker locker( &sMutex ); sCounter --; if ( sCounter == 0 ) { - if ( gmThread ) + if ( sThread ) { - gmThread->exit(); - gmThread->wait(); - delete gmThread; - gmThread = nullptr; + sThread->exit(); + sThread->wait(); + delete sThread; + sThread = nullptr; } // Destroys our cache directory, and the main cache directory if it is empty diff --git a/src/providers/wfs/qgswfsutils.h b/src/providers/wfs/qgswfsutils.h index f71035a98b6e..58960d365ab3 100644 --- a/src/providers/wfs/qgswfsutils.h +++ b/src/providers/wfs/qgswfsutils.h @@ -49,8 +49,8 @@ class QgsWFSUtils static QSharedMemory* createAndAttachSHM(); private: - static QMutex gmMutex; - static QThread* gmThread; + static QMutex sMutex; + static QThread* sThread; static bool sKeepAliveWorks; static int sCounter; diff --git a/src/server/qgsconfigcache.cpp b/src/server/qgsconfigcache.cpp index 0732c70a2894..73e3daa5013c 100644 --- a/src/server/qgsconfigcache.cpp +++ b/src/server/qgsconfigcache.cpp @@ -29,12 +29,12 @@ QgsConfigCache* QgsConfigCache::instance() { - static QgsConfigCache *instance = nullptr; + static QgsConfigCache *sInstance = nullptr; - if ( !instance ) - instance = new QgsConfigCache(); + if ( !sInstance ) + sInstance = new QgsConfigCache(); - return instance; + return sInstance; } QgsConfigCache::QgsConfigCache() diff --git a/src/server/qgsmslayercache.cpp b/src/server/qgsmslayercache.cpp index 4e40c6a07c91..a116b0d0a666 100644 --- a/src/server/qgsmslayercache.cpp +++ b/src/server/qgsmslayercache.cpp @@ -26,10 +26,10 @@ QgsMSLayerCache* QgsMSLayerCache::instance() { - static QgsMSLayerCache *mInstance = 0; - if ( !mInstance ) - mInstance = new QgsMSLayerCache(); - return mInstance; + static QgsMSLayerCache *sInstance = nullptr; + if ( !sInstance ) + sInstance = new QgsMSLayerCache(); + return sInstance; } QgsMSLayerCache::QgsMSLayerCache() diff --git a/src/server/qgsserverlogger.cpp b/src/server/qgsserverlogger.cpp index ea2828c82a86..9841a50286f8 100644 --- a/src/server/qgsserverlogger.cpp +++ b/src/server/qgsserverlogger.cpp @@ -24,15 +24,15 @@ #include -QgsServerLogger* QgsServerLogger::mInstance = nullptr; +QgsServerLogger* QgsServerLogger::sInstance = nullptr; QgsServerLogger* QgsServerLogger::instance() { - if ( !mInstance ) + if ( !sInstance ) { - mInstance = new QgsServerLogger(); + sInstance = new QgsServerLogger(); } - return mInstance; + return sInstance; } QgsServerLogger::QgsServerLogger() diff --git a/src/server/qgsserverlogger.h b/src/server/qgsserverlogger.h index 025ee1ba99f2..8a0c85b0c30b 100644 --- a/src/server/qgsserverlogger.h +++ b/src/server/qgsserverlogger.h @@ -70,7 +70,7 @@ class QgsServerLogger: public QObject QgsServerLogger(); private: - static QgsServerLogger* mInstance; + static QgsServerLogger* sInstance; QFile mLogFile; QTextStream mTextStream; diff --git a/src/server/services/DummyService/dummy.cpp b/src/server/services/DummyService/dummy.cpp index 3dbb1a2d0961..4a693714ef95 100644 --- a/src/server/services/DummyService/dummy.cpp +++ b/src/server/services/DummyService/dummy.cpp @@ -56,8 +56,8 @@ class QgsSampleModule: public QgsServiceModule // Entry points QGISEXTERN QgsServiceModule* QGS_ServiceModule_Init() { - static QgsSampleModule module; - return &module; + static QgsSampleModule sModule; + return &sModule; } QGISEXTERN void QGS_ServiceModule_Exit( QgsServiceModule* ) { diff --git a/src/server/services/wms/qgswms.cpp b/src/server/services/wms/qgswms.cpp index 08deb5f9d366..e2a06b927666 100644 --- a/src/server/services/wms/qgswms.cpp +++ b/src/server/services/wms/qgswms.cpp @@ -172,8 +172,8 @@ class QgsWmsModule: public QgsServiceModule // Entry points QGISEXTERN QgsServiceModule* QGS_ServiceModule_Init() { - static QgsWmsModule module; - return &module; + static QgsWmsModule sModule; + return &sModule; } QGISEXTERN void QGS_ServiceModule_Exit( QgsServiceModule* ) { diff --git a/tests/bench/main.cpp b/tests/bench/main.cpp index d599be9daa0a..35076b64c910 100644 --- a/tests/bench/main.cpp +++ b/tests/bench/main.cpp @@ -108,7 +108,7 @@ void usage( std::string const & appName ) static QString myProjectFileName = QLatin1String( "" ); // This is the 'leftover' arguments collection -static QStringList myFileList; +static QStringList sFileList; int main( int argc, char *argv[] ) { @@ -277,7 +277,7 @@ int main( int argc, char *argv[] ) int idx = optind; QgsDebugMsg( QString( "%1: %2" ).arg( idx ).arg( argv[idx] ) ); #endif - myFileList.append( QDir::toNativeSeparators( QFileInfo( QFile::decodeName( argv[optind++] ) ).absoluteFilePath() ) ); + sFileList.append( QDir::toNativeSeparators( QFileInfo( QFile::decodeName( argv[optind++] ) ).absoluteFilePath() ) ); } } #else @@ -520,8 +520,8 @@ int main( int argc, char *argv[] ) ///////////////////////////////////////////////////////////////////// // autoload any file names that were passed in on the command line ///////////////////////////////////////////////////////////////////// - QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( myFileList.count() ) ); - for ( QStringList::Iterator myIterator = myFileList.begin(); myIterator != myFileList.end(); ++myIterator ) + QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( sFileList.count() ) ); + for ( QStringList::Iterator myIterator = sFileList.begin(); myIterator != sFileList.end(); ++myIterator ) { QgsDebugMsg( QString( "Trying to load file : %1" ).arg(( *myIterator ) ) ); QString myLayerName = *myIterator; diff --git a/tests/src/core/testqgsauthconfig.cpp b/tests/src/core/testqgsauthconfig.cpp index 73b832925750..90aeae6e8d08 100644 --- a/tests/src/core/testqgsauthconfig.cpp +++ b/tests/src/core/testqgsauthconfig.cpp @@ -41,10 +41,10 @@ class TestQgsAuthConfig: public QObject void testConfigSslServer(); private: - static QString smPkiData; + static QString sPkiData; }; -QString TestQgsAuthConfig::smPkiData = QStringLiteral( TEST_DATA_DIR ) + "/auth_system/certs_keys"; +QString TestQgsAuthConfig::sPkiData = QStringLiteral( TEST_DATA_DIR ) + "/auth_system/certs_keys"; void TestQgsAuthConfig::initTestCase() @@ -126,11 +126,11 @@ void TestQgsAuthConfig::testPkiBundle() QVERIFY( bundle.isNull() ); QVERIFY( !bundle.isValid() ); - QList cacerts( QSslCertificate::fromPath( smPkiData + "/chain_subissuer-issuer-root.pem" ) ); + QList cacerts( QSslCertificate::fromPath( sPkiData + "/chain_subissuer-issuer-root.pem" ) ); QVERIFY( !cacerts.isEmpty() ); QCOMPARE( cacerts.size(), 3 ); - QgsPkiBundle bundle2( QgsPkiBundle::fromPemPaths( smPkiData + "/fra_cert.pem", - smPkiData + "/fra_key_w-pass.pem", + QgsPkiBundle bundle2( QgsPkiBundle::fromPemPaths( sPkiData + "/fra_cert.pem", + sPkiData + "/fra_key_w-pass.pem", QStringLiteral( "password" ), cacerts ) ); QVERIFY( !bundle2.isNull() ); @@ -155,7 +155,7 @@ void TestQgsAuthConfig::testPkiBundle() QVERIFY( !bundle.isNull() ); QVERIFY( bundle.isValid() ); - QgsPkiBundle bundle4( QgsPkiBundle::fromPkcs12Paths( smPkiData + "/fra_w-chain.p12", + QgsPkiBundle bundle4( QgsPkiBundle::fromPkcs12Paths( sPkiData + "/fra_w-chain.p12", QStringLiteral( "password" ) ) ); QVERIFY( !bundle4.isNull() ); QVERIFY( bundle4.isValid() ); @@ -174,9 +174,9 @@ void TestQgsAuthConfig::testPkiConfigBundle() mconfig.setUri( QStringLiteral( "http://example.com" ) ); QVERIFY( mconfig.isValid( true ) ); - QSslCertificate clientcert( QSslCertificate::fromPath( smPkiData + "/gerardus_cert.pem" ).at( 0 ) ); + QSslCertificate clientcert( QSslCertificate::fromPath( sPkiData + "/gerardus_cert.pem" ).at( 0 ) ); QByteArray keydata; - QFile file( smPkiData + "/gerardus_key.pem" ); + QFile file( sPkiData + "/gerardus_key.pem" ); if ( file.open( QIODevice::ReadOnly | QIODevice::Text ) ) keydata = file.readAll(); file.close(); @@ -201,7 +201,7 @@ void TestQgsAuthConfig::testConfigSslServer() { QString hostport( QStringLiteral( "localhost:443" ) ); QString confstr( QStringLiteral( "2|||470|||2|||10~~19|||0~~2" ) ); - QSslCertificate sslcert( QSslCertificate::fromPath( smPkiData + "/localhost_ssl_cert.pem" ).at( 0 ) ); + QSslCertificate sslcert( QSslCertificate::fromPath( sPkiData + "/localhost_ssl_cert.pem" ).at( 0 ) ); QgsAuthConfigSslServer sslconfig; QVERIFY( sslconfig.isNull() ); diff --git a/tests/src/core/testqgsauthcrypto.cpp b/tests/src/core/testqgsauthcrypto.cpp index d2f1840c031e..d2c1d2f283fa 100644 --- a/tests/src/core/testqgsauthcrypto.cpp +++ b/tests/src/core/testqgsauthcrypto.cpp @@ -40,30 +40,30 @@ class TestQgsAuthCrypto: public QObject void testPasswordHashKnown(); private: - static const QString smPass; - static const QString smSalt; - static const QString smHash; - static const QString smCiv; - static const QString smText; - static const QString smCrypt; + static const QString PASS; + static const QString SALT; + static const QString HASH; + static const QString CIV; + static const QString TEXT; + static const QString CRYPT; }; -const QString TestQgsAuthCrypto::smPass = QStringLiteral( "password" ); -const QString TestQgsAuthCrypto::smSalt = QStringLiteral( "f48b706946df69d4d2b45bd0603c95af" ); -const QString TestQgsAuthCrypto::smHash = QStringLiteral( "0be18c3f1bf872194d6042f5f4a0c116" ); -const QString TestQgsAuthCrypto::smCiv = QStringLiteral( - "1c18c442b6723ee465bcbb60568412179fcc3313eb0187b4546ca96d869fbdc1" - ); -const QString TestQgsAuthCrypto::smText = QString( - "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " - "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " - "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " - "commodo consequat. Duis aute irure dolor in reprehenderit in voluptate " - "velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint " - "occaecat cupidatat non proident, sunt in culpa qui officia deserunt " - "mollit anim id est laborum." - ); -const QString TestQgsAuthCrypto::smCrypt = QString( +const QString TestQgsAuthCrypto::PASS = QStringLiteral( "password" ); +const QString TestQgsAuthCrypto::SALT = QStringLiteral( "f48b706946df69d4d2b45bd0603c95af" ); +const QString TestQgsAuthCrypto::HASH = QStringLiteral( "0be18c3f1bf872194d6042f5f4a0c116" ); +const QString TestQgsAuthCrypto::CIV = QStringLiteral( + "1c18c442b6723ee465bcbb60568412179fcc3313eb0187b4546ca96d869fbdc1" + ); +const QString TestQgsAuthCrypto::TEXT = QString( + "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod " + "tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim " + "veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea " + "commodo consequat. Duis aute irure dolor in reprehenderit in voluptate " + "velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint " + "occaecat cupidatat non proident, sunt in culpa qui officia deserunt " + "mollit anim id est laborum." + ); +const QString TestQgsAuthCrypto::CRYPT = QString( "ec53707ca8769489a6084e88c0e1fb18d3423406ac23c34ad5ac25600f59486375927bc9ed79" "d363f8774810ef74a92412ae236b949126c6b799dd8c20b5dbc68e7aa8501e414831e91c6533" "83aa6f86eb85eb5206a7e8e894b5c15b6e64de9555c580e1434248d3c0b80ee346583b998ee2" @@ -93,29 +93,29 @@ void TestQgsAuthCrypto::cleanupTestCase() void TestQgsAuthCrypto::testEncrypt() { - QString res = QgsAuthCrypto::encrypt( smPass, smCiv, smText ); - QCOMPARE( res, smCrypt ); + QString res = QgsAuthCrypto::encrypt( PASS, CIV, TEXT ); + QCOMPARE( res, CRYPT ); } void TestQgsAuthCrypto::testDecrypt() { - QString res = QgsAuthCrypto::decrypt( smPass, smCiv, smCrypt ); - QCOMPARE( res, smText ); + QString res = QgsAuthCrypto::decrypt( PASS, CIV, CRYPT ); + QCOMPARE( res, TEXT ); } void TestQgsAuthCrypto::testPasswordHashDerived() { QString salt, hash, civ, derived; - QgsAuthCrypto::passwordKeyHash( smPass, &salt, &hash, &civ ); + QgsAuthCrypto::passwordKeyHash( PASS, &salt, &hash, &civ ); QVERIFY( !civ.isNull() ); - QVERIFY( QgsAuthCrypto::verifyPasswordKeyHash( smPass, salt, hash, &derived ) ); + QVERIFY( QgsAuthCrypto::verifyPasswordKeyHash( PASS, salt, hash, &derived ) ); QVERIFY( !derived.isNull() ); QCOMPARE( hash, derived ); // double-check assigned output } void TestQgsAuthCrypto::testPasswordHashKnown() { - QVERIFY( QgsAuthCrypto::verifyPasswordKeyHash( smPass, smSalt, smHash ) ); + QVERIFY( QgsAuthCrypto::verifyPasswordKeyHash( PASS, SALT, HASH ) ); } QGSTEST_MAIN( TestQgsAuthCrypto ) diff --git a/tests/src/core/testqgscoordinatereferencesystem.cpp b/tests/src/core/testqgscoordinatereferencesystem.cpp index 109bcd9c1bc8..fc1ebff575dd 100644 --- a/tests/src/core/testqgscoordinatereferencesystem.cpp +++ b/tests/src/core/testqgscoordinatereferencesystem.cpp @@ -210,7 +210,7 @@ void TestQgsCoordinateReferenceSystem::ogcWmsCrsCache() QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromOgcWmsCrs( QStringLiteral( "EPSG:4326" ) ); QVERIFY( crs.isValid() ); QCOMPARE( crs.authid(), QString( "EPSG:4326" ) ); - QVERIFY( QgsCoordinateReferenceSystem::mOgcCache.contains( "EPSG:4326" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sOgcCache.contains( "EPSG:4326" ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2 = QgsCoordinateReferenceSystem::fromOgcWmsCrs( QStringLiteral( "EPSG:4326" ) ); QVERIFY( crs2.isValid() ); @@ -219,13 +219,13 @@ void TestQgsCoordinateReferenceSystem::ogcWmsCrsCache() // invalid QgsCoordinateReferenceSystem crs3 = QgsCoordinateReferenceSystem::fromOgcWmsCrs( QStringLiteral( "not a CRS" ) ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mOgcCache.contains( "not a CRS" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sOgcCache.contains( "not a CRS" ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4 = QgsCoordinateReferenceSystem::fromOgcWmsCrs( QStringLiteral( "not a CRS" ) ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mOgcCache.contains( "EPSG:4326" ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sOgcCache.contains( "EPSG:4326" ) ); } void TestQgsCoordinateReferenceSystem::createFromSrid() @@ -244,7 +244,7 @@ void TestQgsCoordinateReferenceSystem::sridCache() crs.createFromSrid( 3112 ); QVERIFY( crs.isValid() ); QCOMPARE( crs.authid(), QString( "EPSG:3112" ) ); - QVERIFY( QgsCoordinateReferenceSystem::mSrIdCache.contains( 3112 ) ); + QVERIFY( QgsCoordinateReferenceSystem::sSrIdCache.contains( 3112 ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2; crs2.createFromSrid( 3112 ); @@ -255,14 +255,14 @@ void TestQgsCoordinateReferenceSystem::sridCache() QgsCoordinateReferenceSystem crs3; crs3.createFromSrid( -3141 ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mSrIdCache.contains( -3141 ) ); + QVERIFY( QgsCoordinateReferenceSystem::sSrIdCache.contains( -3141 ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4; crs4.createFromSrid( -3141 ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mSrIdCache.contains( 3112 ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sSrIdCache.contains( 3112 ) ); } void TestQgsCoordinateReferenceSystem::createFromWkt() @@ -290,7 +290,7 @@ void TestQgsCoordinateReferenceSystem::wktCache() crs.createFromWkt( GEOWKT ); QVERIFY( crs.isValid() ); QCOMPARE( crs.srsid(), GEOCRS_ID ); - QVERIFY( QgsCoordinateReferenceSystem::mWktCache.contains( GEOWKT ) ); + QVERIFY( QgsCoordinateReferenceSystem::sWktCache.contains( GEOWKT ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2; crs2.createFromWkt( GEOWKT ); @@ -301,14 +301,14 @@ void TestQgsCoordinateReferenceSystem::wktCache() QgsCoordinateReferenceSystem crs3; crs3.createFromWkt( QStringLiteral( "bad wkt" ) ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mWktCache.contains( "bad wkt" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sWktCache.contains( "bad wkt" ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4; crs4.createFromWkt( QStringLiteral( "bad wkt" ) ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mWktCache.contains( GEOWKT ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sWktCache.contains( GEOWKT ) ); } QString TestQgsCoordinateReferenceSystem::testESRIWkt( int i, QgsCoordinateReferenceSystem &myCrs ) @@ -446,7 +446,7 @@ void TestQgsCoordinateReferenceSystem::srsIdCache() crs.createFromSrsId( GEOCRS_ID ); QVERIFY( crs.isValid() ); QCOMPARE( crs.srsid(), GEOCRS_ID ); - QVERIFY( QgsCoordinateReferenceSystem::mSrsIdCache.contains( GEOCRS_ID ) ); + QVERIFY( QgsCoordinateReferenceSystem::sSrsIdCache.contains( GEOCRS_ID ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2; crs2.createFromSrsId( GEOCRS_ID ); @@ -457,14 +457,14 @@ void TestQgsCoordinateReferenceSystem::srsIdCache() QgsCoordinateReferenceSystem crs3; crs3.createFromSrsId( -5141 ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mSrsIdCache.contains( -5141 ) ); + QVERIFY( QgsCoordinateReferenceSystem::sSrsIdCache.contains( -5141 ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4; crs4.createFromSrsId( -5141 ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mSrsIdCache.contains( GEOCRS_ID ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sSrsIdCache.contains( GEOCRS_ID ) ); } @@ -494,7 +494,7 @@ void TestQgsCoordinateReferenceSystem::proj4Cache() crs.createFromProj4( GEOPROJ4 ); QVERIFY( crs.isValid() ); QCOMPARE( crs.srsid(), GEOCRS_ID ); - QVERIFY( QgsCoordinateReferenceSystem::mProj4Cache.contains( GEOPROJ4 ) ); + QVERIFY( QgsCoordinateReferenceSystem::sProj4Cache.contains( GEOPROJ4 ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2; crs2.createFromProj4( GEOPROJ4 ); @@ -505,14 +505,14 @@ void TestQgsCoordinateReferenceSystem::proj4Cache() QgsCoordinateReferenceSystem crs3; crs3.createFromProj4( QStringLiteral( "bad proj4" ) ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mProj4Cache.contains( "bad proj4" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sProj4Cache.contains( "bad proj4" ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4; crs4.createFromProj4( QStringLiteral( "bad proj4" ) ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mProj4Cache.contains( GEOPROJ4 ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sProj4Cache.contains( GEOPROJ4 ) ); } void TestQgsCoordinateReferenceSystem::fromStringCache() @@ -522,7 +522,7 @@ void TestQgsCoordinateReferenceSystem::fromStringCache() crs.createFromString( QStringLiteral( "EPSG:3113" ) ); QVERIFY( crs.isValid() ); QCOMPARE( crs.authid(), QString( "EPSG:3113" ) ); - QVERIFY( QgsCoordinateReferenceSystem::mStringCache.contains( "EPSG:3113" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sStringCache.contains( "EPSG:3113" ) ); // a second time, so crs is fetched from cache QgsCoordinateReferenceSystem crs2; crs2.createFromString( QStringLiteral( "EPSG:3113" ) ); @@ -533,14 +533,14 @@ void TestQgsCoordinateReferenceSystem::fromStringCache() QgsCoordinateReferenceSystem crs3; crs3.createFromString( QStringLiteral( "bad string" ) ); QVERIFY( !crs3.isValid() ); - QVERIFY( QgsCoordinateReferenceSystem::mStringCache.contains( "bad string" ) ); + QVERIFY( QgsCoordinateReferenceSystem::sStringCache.contains( "bad string" ) ); // a second time, so invalid crs is fetched from cache QgsCoordinateReferenceSystem crs4; crs4.createFromString( QStringLiteral( "bad string" ) ); QVERIFY( !crs4.isValid() ); QgsCoordinateReferenceSystem::invalidateCache(); - QVERIFY( !QgsCoordinateReferenceSystem::mStringCache.contains( "EPSG:3113" ) ); + QVERIFY( !QgsCoordinateReferenceSystem::sStringCache.contains( "EPSG:3113" ) ); } void TestQgsCoordinateReferenceSystem::isValid() { diff --git a/tests/src/core/testqgsexpression.cpp b/tests/src/core/testqgsexpression.cpp index 2cb8a2059dba..2272523ff98f 100644 --- a/tests/src/core/testqgsexpression.cpp +++ b/tests/src/core/testqgsexpression.cpp @@ -1165,8 +1165,8 @@ class TestQgsExpression: public QObject void eval_precedence() { - QCOMPARE( QgsExpression::BinaryOperatorText[QgsExpression::boDiv], "/" ); - QCOMPARE( QgsExpression::BinaryOperatorText[QgsExpression::boConcat], "||" ); + QCOMPARE( QgsExpression::BINARY_OPERATOR_TEXT[QgsExpression::boDiv], "/" ); + QCOMPARE( QgsExpression::BINARY_OPERATOR_TEXT[QgsExpression::boConcat], "||" ); } void eval_columns() @@ -1642,7 +1642,7 @@ class TestQgsExpression: public QObject QCOMPARE( exp.hasParserError(), false ); QSet refCols = exp.referencedColumns(); // make sure we get the all attributes flag - bool allAttributesFlag = refCols.contains( QgsFeatureRequest::AllAttributes ); + bool allAttributesFlag = refCols.contains( QgsFeatureRequest::ALL_ATTRIBUTES ); QCOMPARE( allAttributesFlag, true ); } diff --git a/tests/src/core/testqgslegendrenderer.cpp b/tests/src/core/testqgslegendrenderer.cpp index 073788b5ea28..47f681949e89 100644 --- a/tests/src/core/testqgslegendrenderer.cpp +++ b/tests/src/core/testqgslegendrenderer.cpp @@ -205,8 +205,8 @@ void TestQgsLegendRenderer::init() } QgsProject::instance()->addMapLayer( mVL3 ); - static char raster_array[] = { 1, 2, 2, 1 }; - QString rasterUri = QStringLiteral( "MEM:::DATAPOINTER=%1,PIXELS=2,LINES=2" ).arg(( qulonglong ) raster_array ); + static const char RASTER_ARRAY[] = { 1, 2, 2, 1 }; + QString rasterUri = QStringLiteral( "MEM:::DATAPOINTER=%1,PIXELS=2,LINES=2" ).arg(( qulonglong ) RASTER_ARRAY ); mRL = new QgsRasterLayer( rasterUri, QStringLiteral( "Raster Layer" ), QStringLiteral( "gdal" ) ); QgsProject::instance()->addMapLayer( mRL ); diff --git a/tests/src/python/test_qgsexpression.py b/tests/src/python/test_qgsexpression.py index d6bf6c886681..fb2e05d15ae0 100644 --- a/tests/src/python/test_qgsexpression.py +++ b/tests/src/python/test_qgsexpression.py @@ -130,7 +130,7 @@ def testReferencedColumnsNoSet(self): success = QgsExpression.registerFunction(self.no_referenced_columns_set) exp = QgsExpression('no_referenced_columns_set()') self.assertEqual(exp.referencedColumns(), - {QgsFeatureRequest.AllAttributes}) + {QgsFeatureRequest.ALL_ATTRIBUTES}) def testReferencedColumnsSet(self): success = QgsExpression.registerFunction(self.referenced_columns_set) diff --git a/tests/src/python/test_qgsgraduatedsymbolrenderer.py b/tests/src/python/test_qgsgraduatedsymbolrenderer.py index 9e5f36460692..70bcd341f03f 100644 --- a/tests/src/python/test_qgsgraduatedsymbolrenderer.py +++ b/tests/src/python/test_qgsgraduatedsymbolrenderer.py @@ -194,8 +194,8 @@ def testQgsRendererRangeLabelFormat_1(self): self.assertFalse(format.trimTrailingZeroes(), "TrimTrailingZeroes getter/setter failed") minprecision = -6 maxprecision = 15 - self.assertEqual(QgsRendererRangeLabelFormat.MinPrecision, minprecision, "Minimum precision != -6") - self.assertEqual(QgsRendererRangeLabelFormat.MaxPrecision, maxprecision, "Maximum precision != 15") + self.assertEqual(QgsRendererRangeLabelFormat.MIN_PRECISION, minprecision, "Minimum precision != -6") + self.assertEqual(QgsRendererRangeLabelFormat.MAX_PRECISION, maxprecision, "Maximum precision != 15") format.setPrecision(-10) self.assertEqual(format.precision(), minprecision, "Minimum precision not enforced") format.setPrecision(20) From 6ffe50704f7d011624de6d1bce774638d2b97dbb Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 12 Jan 2017 16:44:22 +1000 Subject: [PATCH 042/332] [composer] Remove support for upgrading pre 2.2 project atlas map settings Open the project in a recent 2.x release and resave to upgrade the project --- doc/api_break.dox | 3 +- python/core/composer/qgsatlascomposition.sip | 9 ------ src/app/composer/qgscomposer.cpp | 4 --- src/core/composer/qgsatlascomposition.cpp | 34 -------------------- src/core/composer/qgsatlascomposition.h | 9 ------ src/core/composer/qgscomposition.cpp | 6 ---- 6 files changed, 2 insertions(+), 63 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index cfd8c0cbf617..2ee5f3b0ba28 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -399,7 +399,8 @@ QgsAdvancedDigitizingDockWidget {#qgis_api_break_3_0_QgsAdvancedDigitizin QgsAtlasComposition {#qgis_api_break_3_0_QgsAtlasComposition} ------------------- -- readXMLMapSettings() has been renamed to readXmlMapSettings() +- readXMLMapSettings() was removed. QGIS no longer supports upgrading pre 2.2 compositions and if this is a +requirement the projects should first be upgraded by opening and saving in 2.18. - composerMap() and setComposerMap() were removed. Use QgsComposerMap::atlasDriven() and setAtlasDriven() instead - fixedScale() and setFixedScale() were removed. Use QgsComposerMap::atlasScalingMode() and setAtlasScalingMode() diff --git a/python/core/composer/qgsatlascomposition.sip b/python/core/composer/qgsatlascomposition.sip index 45e9f2b96bf9..646ece4fd945 100644 --- a/python/core/composer/qgsatlascomposition.sip +++ b/python/core/composer/qgsatlascomposition.sip @@ -189,15 +189,6 @@ public: */ void readXml( const QDomElement& elem, const QDomDocument& doc ); - /** Reads old (pre 2.2) map related atlas settings from xml - * @param elem a QDomElement holding the atlas map properties. - * @param doc QDomDocument for the source xml. - * @see readXMLMapSettings - * @note This method should be called after restoring composer item properties - * @note added in version 2.5 - */ - void readXmlMapSettings( const QDomElement& elem, const QDomDocument& doc ); - QgsComposition* composition(); /** Requeries the current atlas coverage layer and applies filtering and sorting. Returns diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 5b16343e7b86..77e86753ad8a 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -3588,10 +3588,6 @@ void QgsComposer::readXml( const QDomElement& composerElem, const QDomDocument& delete oldAtlasWidget; mAtlasDock->setWidget( new QgsAtlasCompositionWidget( mAtlasDock, mComposition ) ); - //read atlas map parameters (for pre 2.2 templates) - //this part must be done after adding items - mComposition->atlasComposition().readXmlMapSettings( atlasElem, doc ); - //set state of atlas controls QgsAtlasComposition* atlasMap = &mComposition->atlasComposition(); toggleAtlasControls( atlasMap->enabled() ); diff --git a/src/core/composer/qgsatlascomposition.cpp b/src/core/composer/qgsatlascomposition.cpp index ba2fd16aa19b..0e13c9bf4d53 100644 --- a/src/core/composer/qgsatlascomposition.cpp +++ b/src/core/composer/qgsatlascomposition.cpp @@ -661,40 +661,6 @@ void QgsAtlasComposition::readXml( const QDomElement& atlasElem, const QDomDocum emit parameterChanged(); } -void QgsAtlasComposition::readXmlMapSettings( const QDomElement &elem, const QDomDocument &doc ) -{ - Q_UNUSED( doc ); - //look for stored composer map, to upgrade pre 2.1 projects - int composerMapNo = elem.attribute( QStringLiteral( "composerMap" ), QStringLiteral( "-1" ) ).toInt(); - QgsComposerMap * composerMap = nullptr; - if ( composerMapNo != -1 ) - { - QList maps; - mComposition->composerItems( maps ); - for ( QList::iterator it = maps.begin(); it != maps.end(); ++it ) - { - if (( *it )->id() == composerMapNo ) - { - composerMap = ( *it ); - composerMap->setAtlasDriven( true ); - break; - } - } - } - - //upgrade pre 2.1 projects - double margin = elem.attribute( QStringLiteral( "margin" ), QStringLiteral( "0.0" ) ).toDouble(); - if ( composerMap && !qgsDoubleNear( margin, 0.0 ) ) - { - composerMap->setAtlasMargin( margin ); - } - bool fixedScale = elem.attribute( QStringLiteral( "fixedScale" ), QStringLiteral( "false" ) ) == QLatin1String( "true" ) ? true : false; - if ( composerMap && fixedScale ) - { - composerMap->setAtlasScalingMode( QgsComposerMap::Fixed ); - } -} - void QgsAtlasComposition::setHideCoverage( bool hide ) { mHideCoverage = hide; diff --git a/src/core/composer/qgsatlascomposition.h b/src/core/composer/qgsatlascomposition.h index de86863bd36a..6f41175f114c 100644 --- a/src/core/composer/qgsatlascomposition.h +++ b/src/core/composer/qgsatlascomposition.h @@ -220,15 +220,6 @@ class CORE_EXPORT QgsAtlasComposition : public QObject */ void readXml( const QDomElement& elem, const QDomDocument& doc ); - /** Reads old (pre 2.2) map related atlas settings from xml - * @param elem a QDomElement holding the atlas map properties. - * @param doc QDomDocument for the source xml. - * @see readXMLMapSettings - * @note This method should be called after restoring composer item properties - * @note added in version 2.5 - */ - void readXmlMapSettings( const QDomElement& elem, const QDomDocument& doc ); - QgsComposition* composition() { return mComposition; } /** Requeries the current atlas coverage layer and applies filtering and sorting. Returns diff --git a/src/core/composer/qgscomposition.cpp b/src/core/composer/qgscomposition.cpp index b3aaaf43075e..9bcb31003f89 100644 --- a/src/core/composer/qgscomposition.cpp +++ b/src/core/composer/qgscomposition.cpp @@ -1084,12 +1084,6 @@ bool QgsComposition::loadFromTemplate( const QDomDocument& doc, QMap Date: Thu, 12 Jan 2017 16:57:31 +1000 Subject: [PATCH 043/332] [composer] Avoid some use of composition map settings --- src/app/composer/qgscomposer.cpp | 2 +- src/app/composer/qgscomposermapwidget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 77e86753ad8a..fff7ab7d3e2f 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -3931,7 +3931,7 @@ void QgsComposer::cleanupAfterTemplateRead() double currentHeight = mapItem->rect().height(); if ( currentWidth - 0 > 0.0 ) //don't divide through zero { - QgsRectangle canvasExtent = mComposition->mapSettings().visibleExtent(); + QgsRectangle canvasExtent = mQgis->mapCanvas()->mapSettings().visibleExtent(); //adapt min y of extent such that the size of the map item stays the same double newCanvasExtentHeight = currentHeight / currentWidth * canvasExtent.width(); canvasExtent.setYMinimum( canvasExtent.yMaximum() - newCanvasExtentHeight ); diff --git a/src/app/composer/qgscomposermapwidget.cpp b/src/app/composer/qgscomposermapwidget.cpp index 47c71398dc64..64cc63d06a1e 100644 --- a/src/app/composer/qgscomposermapwidget.cpp +++ b/src/app/composer/qgscomposermapwidget.cpp @@ -469,7 +469,7 @@ void QgsComposerMapWidget::on_mSetToMapCanvasExtentButton_clicked() return; } - QgsRectangle newExtent = mComposerMap->composition()->mapSettings().visibleExtent(); + QgsRectangle newExtent = QgisApp::instance()->mapCanvas()->mapSettings().visibleExtent(); mComposerMap->beginCommand( tr( "Map extent changed" ) ); mComposerMap->zoomToExtent( newExtent ); From 24c990f15f5b87b8af865f3fec6681e63ca522f7 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Jan 2017 19:45:22 +1000 Subject: [PATCH 044/332] [needs-docs] Don't restrict project ellipsoid choice when canvas OTF reprojection is disabled These two settings aren't necessarily related - you may want to disable OTF canvas reprojection while still wanting accurate distance/area measurements using an ellipsoid. This change should make distance/area calculation in QGIS more reliable and predictable for users. Calculations are now based entirely on the ellipsoid choice in project properties, so it only takes checking a single setting to verify how measurements are calculated. --- src/app/qgisapp.cpp | 2 +- src/app/qgisappinterface.cpp | 2 +- .../qgsattributeactionpropertiesdialog.cpp | 2 +- src/app/qgsattributetabledialog.cpp | 6 +- src/app/qgsdiagramproperties.cpp | 4 +- src/app/qgsfeatureaction.cpp | 2 +- src/app/qgsfieldcalculator.cpp | 4 +- src/app/qgslabelinggui.cpp | 2 +- src/app/qgsmaptoolmeasureangle.cpp | 3 +- src/app/qgsmeasuredialog.cpp | 74 ++++++------------- src/app/qgsprojectproperties.cpp | 34 ++++----- .../composer/qgscomposerattributetablev2.cpp | 2 +- src/core/composer/qgscomposerhtml.cpp | 2 +- src/core/composer/qgscomposerlabel.cpp | 2 +- src/core/composer/qgscomposerscalebar.cpp | 2 +- src/gui/qgsmaptoolidentify.cpp | 2 +- 16 files changed, 53 insertions(+), 92 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index c0ebfaaae917..0abfa8067ff8 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -7513,7 +7513,7 @@ void QgisApp::selectByForm() QgsDistanceArea myDa; myDa.setSourceCrs( vlayer->crs().srsid() ); - myDa.setEllipsoidalMode( mMapCanvas->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); QgsAttributeEditorContext context; diff --git a/src/app/qgisappinterface.cpp b/src/app/qgisappinterface.cpp index 16771ac82c44..5a438c3b374d 100644 --- a/src/app/qgisappinterface.cpp +++ b/src/app/qgisappinterface.cpp @@ -699,7 +699,7 @@ QgsAttributeDialog* QgisAppInterface::getFeatureForm( QgsVectorLayer *l, QgsFeat QgsDistanceArea myDa; myDa.setSourceCrs( l->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); QgsAttributeEditorContext context; diff --git a/src/app/qgsattributeactionpropertiesdialog.cpp b/src/app/qgsattributeactionpropertiesdialog.cpp index dd76375d8593..513d80fb410c 100644 --- a/src/app/qgsattributeactionpropertiesdialog.cpp +++ b/src/app/qgsattributeactionpropertiesdialog.cpp @@ -200,7 +200,7 @@ void QgsAttributeActionPropertiesDialog::init( const QSet& actionScopes QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); mFieldExpression->setLayer( mLayer ); diff --git a/src/app/qgsattributetabledialog.cpp b/src/app/qgsattributetabledialog.cpp index 476eea847e4c..b5edfd92cf00 100644 --- a/src/app/qgsattributetabledialog.cpp +++ b/src/app/qgsattributetabledialog.cpp @@ -126,7 +126,7 @@ QgsAttributeTableDialog::QgsAttributeTableDialog( QgsVectorLayer *theLayer, QWid myDa = new QgsDistanceArea(); myDa->setSourceCrs( mLayer->crs() ); - myDa->setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa->setEllipsoidalMode( true ); myDa->setEllipsoid( QgsProject::instance()->ellipsoid() ); mEditorContext.setDistanceArea( *myDa ); @@ -587,7 +587,7 @@ void QgsAttributeTableDialog::filterExpressionBuilder() QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); dlg.setGeomCalculator( myDa ); @@ -948,7 +948,7 @@ void QgsAttributeTableDialog::setFilterExpression( const QString& filterString, QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); // parse search string and build parsed tree diff --git a/src/app/qgsdiagramproperties.cpp b/src/app/qgsdiagramproperties.cpp index 20904fabea69..09cfbe59946c 100644 --- a/src/app/qgsdiagramproperties.cpp +++ b/src/app/qgsdiagramproperties.cpp @@ -177,7 +177,7 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer* layer, QWidget* pare mSizeFieldExpressionWidget->setLayer( mLayer ); QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs().srsid() ); - myDa.setEllipsoidalMode( mMapCanvas->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); mSizeFieldExpressionWidget->setGeomCalculator( myDa ); @@ -869,7 +869,7 @@ QString QgsDiagramProperties::showExpressionBuilder( const QString& initialExpre QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs().srsid() ); - myDa.setEllipsoidalMode( mMapCanvas->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); dlg.setGeomCalculator( myDa ); diff --git a/src/app/qgsfeatureaction.cpp b/src/app/qgsfeatureaction.cpp index 6b0533f67ee1..c14e29ef2621 100644 --- a/src/app/qgsfeatureaction.cpp +++ b/src/app/qgsfeatureaction.cpp @@ -57,7 +57,7 @@ QgsAttributeDialog *QgsFeatureAction::newDialog( bool cloneFeature ) QgsDistanceArea myDa; myDa.setSourceCrs( mLayer->crs() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); context.setDistanceArea( myDa ); diff --git a/src/app/qgsfieldcalculator.cpp b/src/app/qgsfieldcalculator.cpp index 012c3f9b6845..577523b4d243 100644 --- a/src/app/qgsfieldcalculator.cpp +++ b/src/app/qgsfieldcalculator.cpp @@ -56,7 +56,7 @@ QgsFieldCalculator::QgsFieldCalculator( QgsVectorLayer* vl, QWidget* parent ) QgsDistanceArea myDa; myDa.setSourceCrs( vl->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); builder->setGeomCalculator( myDa ); @@ -156,7 +156,7 @@ void QgsFieldCalculator::accept() QgsDistanceArea myDa; myDa.setSourceCrs( mVectorLayer->crs().srsid() ); - myDa.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + myDa.setEllipsoidalMode( true ); myDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); QString calcString = builder->expressionText(); diff --git a/src/app/qgslabelinggui.cpp b/src/app/qgslabelinggui.cpp index a52bc44e3a5c..c691d5742a2c 100644 --- a/src/app/qgslabelinggui.cpp +++ b/src/app/qgslabelinggui.cpp @@ -94,7 +94,7 @@ void QgsLabelingGui::setLayer( QgsMapLayer* mapLayer ) mFieldExpressionWidget->setLayer( mLayer ); QgsDistanceArea da; da.setSourceCrs( mLayer->crs().srsid() ); - da.setEllipsoidalMode( QgisApp::instance()->mapCanvas()->mapSettings().hasCrsTransformEnabled() ); + da.setEllipsoidalMode( true ); da.setEllipsoid( QgsProject::instance()->ellipsoid() ); mFieldExpressionWidget->setGeomCalculator( da ); diff --git a/src/app/qgsmaptoolmeasureangle.cpp b/src/app/qgsmaptoolmeasureangle.cpp index 032e5c59ccd6..f96d95c7a684 100644 --- a/src/app/qgsmaptoolmeasureangle.cpp +++ b/src/app/qgsmaptoolmeasureangle.cpp @@ -184,6 +184,5 @@ void QgsMapToolMeasureAngle::configureDistanceArea() QString ellipsoidId = QgsProject::instance()->ellipsoid(); mDa.setSourceCrs( mCanvas->mapSettings().destinationCrs().srsid() ); mDa.setEllipsoid( ellipsoidId ); - // Only use ellipsoidal calculation when project wide transformation is enabled. - mDa.setEllipsoidalMode( mCanvas->mapSettings().hasCrsTransformEnabled() ); + mDa.setEllipsoidalMode( true ); } diff --git a/src/app/qgsmeasuredialog.cpp b/src/app/qgsmeasuredialog.cpp index 332efd68613a..2ae1d0eab70c 100644 --- a/src/app/qgsmeasuredialog.cpp +++ b/src/app/qgsmeasuredialog.cpp @@ -80,15 +80,7 @@ void QgsMeasureDialog::updateSettings() mAreaUnits = QgsProject::instance()->areaUnits(); mDa.setSourceCrs( mTool->canvas()->mapSettings().destinationCrs().srsid() ); mDa.setEllipsoid( QgsProject::instance()->ellipsoid() ); - // Only use ellipsoidal calculation when project wide transformation is enabled. - if ( mTool->canvas()->mapSettings().hasCrsTransformEnabled() ) - { - mDa.setEllipsoidalMode( true ); - } - else - { - mDa.setEllipsoidalMode( false ); - } + mDa.setEllipsoidalMode( true ); QgsDebugMsg( "****************" ); QgsDebugMsg( QString( "Ellipsoid ID : %1" ).arg( mDa.ellipsoid() ) ); @@ -301,33 +293,21 @@ void QgsMeasureDialog::updateUi() else { QgsUnitTypes::AreaUnit resultUnit = QgsUnitTypes::AreaUnknownUnit; - if ( ! mTool->canvas()->hasCrsTransformEnabled() ) + if ( mDa.willUseEllipsoid() ) { - resultUnit = QgsUnitTypes::distanceToAreaUnit( mTool->canvas()->mapSettings().destinationCrs().mapUnits() ); - toolTip += "
    * " + tr( "Project CRS transformation is turned off." ) + ' '; - toolTip += tr( "Area is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), - mTool->canvas()->mapSettings().destinationCrs().description() ); - toolTip += "
    * " + tr( "Ellipsoidal calculation is not possible with CRS transformation disabled." ); - setWindowTitle( tr( "Measure (OTF off)" ) ); + resultUnit = QgsUnitTypes::AreaSquareMeters; + toolTip += "
    * " + tr( "Project ellipsoidal calculation is selected." ) + ' '; + toolTip += "
    * " + tr( "The coordinates are transformed to the chosen ellipsoid (%1), and the area is calculated in %2." ).arg( mDa.ellipsoid(), + QgsUnitTypes::toString( resultUnit ) ); } else { - if ( mDa.willUseEllipsoid() ) - { - resultUnit = QgsUnitTypes::AreaSquareMeters; - toolTip += "
    * " + tr( "Project CRS transformation is turned on and ellipsoidal calculation is selected." ) + ' '; - toolTip += "
    * " + tr( "The coordinates are transformed to the chosen ellipsoid (%1), and the area is calculated in %2." ).arg( mDa.ellipsoid(), - QgsUnitTypes::toString( resultUnit ) ); - } - else - { - resultUnit = QgsUnitTypes::distanceToAreaUnit( mTool->canvas()->mapSettings().destinationCrs().mapUnits() ); - toolTip += "
    * " + tr( "Project CRS transformation is turned on but ellipsoidal calculation is not selected." ) + ' '; - toolTip += tr( "Area is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), - mTool->canvas()->mapSettings().destinationCrs().description() ); - } - setWindowTitle( tr( "Measure (OTF on)" ) ); + resultUnit = QgsUnitTypes::distanceToAreaUnit( mTool->canvas()->mapSettings().destinationCrs().mapUnits() ); + toolTip += "
    * " + tr( "Project ellipsoidal calculation is not selected." ) + ' '; + toolTip += tr( "Area is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), + mTool->canvas()->mapSettings().destinationCrs().description() ); } + setWindowTitle( tr( "Measure (OTF on)" ) ); if ( QgsUnitTypes::unitType( resultUnit ) == QgsUnitTypes::Geographic && QgsUnitTypes::unitType( mAreaUnits ) == QgsUnitTypes::Standard ) @@ -375,33 +355,21 @@ void QgsMeasureDialog::updateUi() else { QgsUnitTypes::DistanceUnit resultUnit = QgsUnitTypes::DistanceUnknownUnit; - if ( ! mTool->canvas()->hasCrsTransformEnabled() ) + if ( mDa.willUseEllipsoid() ) { - resultUnit = mTool->canvas()->mapSettings().destinationCrs().mapUnits(); - toolTip += "
    * " + tr( "Project CRS transformation is turned off." ) + ' '; - toolTip += tr( "Distance is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), - mTool->canvas()->mapSettings().destinationCrs().description() ); - toolTip += "
    * " + tr( "Ellipsoidal calculation is not possible with CRS transformation disabled." ); - setWindowTitle( tr( "Measure (OTF off)" ) ); + resultUnit = QgsUnitTypes::DistanceMeters; + toolTip += "
    * " + tr( "Project ellipsoidal calculation is selected." ) + ' '; + toolTip += "
    * " + tr( "The coordinates are transformed to the chosen ellipsoid (%1), and the distance is calculated in %2." ).arg( mDa.ellipsoid(), + QgsUnitTypes::toString( resultUnit ) ); } else { - if ( mDa.willUseEllipsoid() ) - { - resultUnit = QgsUnitTypes::DistanceMeters; - toolTip += "
    * " + tr( "Project CRS transformation is turned on and ellipsoidal calculation is selected." ) + ' '; - toolTip += "
    * " + tr( "The coordinates are transformed to the chosen ellipsoid (%1), and the distance is calculated in %2." ).arg( mDa.ellipsoid(), - QgsUnitTypes::toString( resultUnit ) ); - } - else - { - resultUnit = mTool->canvas()->mapSettings().destinationCrs().mapUnits(); - toolTip += "
    * " + tr( "Project CRS transformation is turned on but ellipsoidal calculation is not selected." ) + ' '; - toolTip += tr( "Distance is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), - mTool->canvas()->mapSettings().destinationCrs().description() ); - } - setWindowTitle( tr( "Measure (OTF on)" ) ); + resultUnit = mTool->canvas()->mapSettings().destinationCrs().mapUnits(); + toolTip += "
    * " + tr( "Project ellipsoidal calculation is not selected." ) + ' '; + toolTip += tr( "Distance is calculated in %1, based on project CRS (%2)." ).arg( QgsUnitTypes::toString( resultUnit ), + mTool->canvas()->mapSettings().destinationCrs().description() ); } + setWindowTitle( tr( "Measure (OTF on)" ) ); if ( QgsUnitTypes::unitType( resultUnit ) == QgsUnitTypes::Geographic && QgsUnitTypes::unitType( mDistanceUnits ) == QgsUnitTypes::Standard ) diff --git a/src/app/qgsprojectproperties.cpp b/src/app/qgsprojectproperties.cpp index d49fa434a725..9d7f98b983a3 100644 --- a/src/app/qgsprojectproperties.cpp +++ b/src/app/qgsprojectproperties.cpp @@ -1967,31 +1967,25 @@ void QgsProjectProperties::updateEllipsoidUI( int newIndex ) leSemiMinor->setEnabled( false ); leSemiMajor->setText( QLatin1String( "" ) ); leSemiMinor->setText( QLatin1String( "" ) ); - if ( cbxProjectionEnabled->isChecked() ) + + cmbEllipsoid->setEnabled( true ); + cmbEllipsoid->setToolTip( QLatin1String( "" ) ); + if ( mEllipsoidList.at( mEllipsoidIndex ).acronym.startsWith( QLatin1String( "PARAMETER:" ) ) ) { - cmbEllipsoid->setEnabled( true ); - cmbEllipsoid->setToolTip( QLatin1String( "" ) ); - if ( mEllipsoidList.at( mEllipsoidIndex ).acronym.startsWith( QLatin1String( "PARAMETER:" ) ) ) - { - leSemiMajor->setEnabled( true ); - leSemiMinor->setEnabled( true ); - } - else - { - leSemiMajor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); - leSemiMinor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); - } - if ( mEllipsoidList[ mEllipsoidIndex ].acronym != GEO_NONE ) - { - leSemiMajor->setText( QLocale::system().toString( myMajor, 'f', 3 ) ); - leSemiMinor->setText( QLocale::system().toString( myMinor, 'f', 3 ) ); - } + leSemiMajor->setEnabled( true ); + leSemiMinor->setEnabled( true ); } else { - cmbEllipsoid->setEnabled( false ); - cmbEllipsoid->setToolTip( tr( "Can only use ellipsoidal calculations when CRS transformation is enabled" ) ); + leSemiMajor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); + leSemiMinor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); } + if ( mEllipsoidList[ mEllipsoidIndex ].acronym != GEO_NONE ) + { + leSemiMajor->setText( QLocale::system().toString( myMajor, 'f', 3 ) ); + leSemiMinor->setText( QLocale::system().toString( myMinor, 'f', 3 ) ); + } + cmbEllipsoid->setCurrentIndex( mEllipsoidIndex ); // Not always necessary } diff --git a/src/core/composer/qgscomposerattributetablev2.cpp b/src/core/composer/qgscomposerattributetablev2.cpp index 1dded1b143f7..54c6c6457800 100644 --- a/src/core/composer/qgscomposerattributetablev2.cpp +++ b/src/core/composer/qgscomposerattributetablev2.cpp @@ -419,7 +419,7 @@ bool QgsComposerAttributeTableV2::getTableContents( QgsComposerTableContents &co if ( mComposerMap && mShowOnlyVisibleFeatures ) { selectionRect = *mComposerMap->currentMapExtent(); - if ( layer && mComposition->mapSettings().hasCrsTransformEnabled() ) + if ( layer ) { //transform back to layer CRS QgsCoordinateTransform coordTransform( layer->crs(), mComposition->mapSettings().destinationCrs() ); diff --git a/src/core/composer/qgscomposerhtml.cpp b/src/core/composer/qgscomposerhtml.cpp index c59622384c9c..31bbdbca5709 100644 --- a/src/core/composer/qgscomposerhtml.cpp +++ b/src/core/composer/qgscomposerhtml.cpp @@ -546,7 +546,7 @@ void QgsComposerHtml::setExpressionContext( const QgsFeature &feature, QgsVector } if ( mComposition ) { - mDistanceArea->setEllipsoidalMode( mComposition->mapSettings().hasCrsTransformEnabled() ); + mDistanceArea->setEllipsoidalMode( true ); mDistanceArea->setEllipsoid( mComposition->project()->ellipsoid() ); } diff --git a/src/core/composer/qgscomposerlabel.cpp b/src/core/composer/qgscomposerlabel.cpp index ac996b602875..0801aeceb21f 100644 --- a/src/core/composer/qgscomposerlabel.cpp +++ b/src/core/composer/qgscomposerlabel.cpp @@ -264,7 +264,7 @@ void QgsComposerLabel::refreshExpressionContext() //set to composition's mapsettings' crs mDistanceArea->setSourceCrs( mComposition->mapSettings().destinationCrs().srsid() ); } - mDistanceArea->setEllipsoidalMode( mComposition->mapSettings().hasCrsTransformEnabled() ); + mDistanceArea->setEllipsoidalMode( true ); mDistanceArea->setEllipsoid( mComposition->project()->ellipsoid() ); contentChanged(); diff --git a/src/core/composer/qgscomposerscalebar.cpp b/src/core/composer/qgscomposerscalebar.cpp index 1fa3987c8a64..2e3d3c7a0708 100644 --- a/src/core/composer/qgscomposerscalebar.cpp +++ b/src/core/composer/qgscomposerscalebar.cpp @@ -302,7 +302,7 @@ double QgsComposerScaleBar::mapWidth() const else { QgsDistanceArea da; - da.setEllipsoidalMode( mComposition->mapSettings().hasCrsTransformEnabled() ); + da.setEllipsoidalMode( true ); da.setSourceCrs( mComposition->mapSettings().destinationCrs().srsid() ); da.setEllipsoid( mComposition->project()->ellipsoid() ); diff --git a/src/gui/qgsmaptoolidentify.cpp b/src/gui/qgsmaptoolidentify.cpp index e4a2a249e150..ab554bd74ad4 100644 --- a/src/gui/qgsmaptoolidentify.cpp +++ b/src/gui/qgsmaptoolidentify.cpp @@ -353,7 +353,7 @@ QMap< QString, QString > QgsMapToolIdentify::featureDerivedAttributes( QgsFeatur // init distance/area calculator QString ellipsoid = QgsProject::instance()->ellipsoid(); QgsDistanceArea calc; - calc.setEllipsoidalMode( mCanvas->hasCrsTransformEnabled() ); + calc.setEllipsoidalMode( true ); calc.setEllipsoid( ellipsoid ); calc.setSourceCrs( layer->crs().srsid() ); From 797abbd718885d56e3e3a8390cf032dde4f827be Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Jan 2017 19:50:21 +1000 Subject: [PATCH 045/332] [needs-docs] Rename 'Parameters:' ellipsoid option to 'Custom' To better respect UI standards --- src/app/qgsprojectproperties.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/qgsprojectproperties.cpp b/src/app/qgsprojectproperties.cpp index 9d7f98b983a3..c41aef997344 100644 --- a/src/app/qgsprojectproperties.cpp +++ b/src/app/qgsprojectproperties.cpp @@ -1874,7 +1874,7 @@ void QgsProjectProperties::populateEllipsoidList() mEllipsoidList.append( myItem ); myItem.acronym = QStringLiteral( "PARAMETER:6370997:6370997" ); - myItem.description = tr( "Parameters:" ); + myItem.description = tr( "Custom" ); myItem.semiMajor = 6370997.0; myItem.semiMinor = 6370997.0; mEllipsoidList.append( myItem ); @@ -1977,8 +1977,8 @@ void QgsProjectProperties::updateEllipsoidUI( int newIndex ) } else { - leSemiMajor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); - leSemiMinor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Parameters:" ) ) ); + leSemiMajor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Custom" ) ) ); + leSemiMinor->setToolTip( tr( "Select %1 from pull-down menu to adjust radii" ).arg( tr( "Custom" ) ) ); } if ( mEllipsoidList[ mEllipsoidIndex ].acronym != GEO_NONE ) { From e399ce36b71f1e3d2d0ae5f5928116e8007ce9a3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sat, 14 Jan 2017 19:52:50 +1000 Subject: [PATCH 046/332] Reword ellipsoid string to clarify that it also applies to area calculation --- src/ui/qgsprojectpropertiesbase.ui | 138 ++++++++++++++++++++++++----- 1 file changed, 114 insertions(+), 24 deletions(-) diff --git a/src/ui/qgsprojectpropertiesbase.ui b/src/ui/qgsprojectpropertiesbase.ui index 915f004dc305..c18d4e22efc2 100644 --- a/src/ui/qgsprojectpropertiesbase.ui +++ b/src/ui/qgsprojectpropertiesbase.ui @@ -42,7 +42,16 @@ QFrame::Raised - + + 0 + + + 0 + + + 0 + + 0 @@ -197,7 +206,16 @@ QFrame::Raised - + + 0 + + + 0 + + + 0 + + 0 @@ -213,7 +231,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -229,8 +256,8 @@ 0 0 - 694 - 779 + 685 + 784 @@ -451,7 +478,7 @@ Ellipsoid -(for distance calculations) +(for distance and area calculations)
    @@ -694,7 +721,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -710,8 +746,8 @@ 0 0 - 694 - 779 + 334 + 51 @@ -744,7 +780,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -760,8 +805,8 @@ 0 0 - 694 - 779 + 130 + 100 @@ -821,7 +866,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -837,8 +891,8 @@ 0 0 - 694 - 779 + 364 + 528 @@ -1279,7 +1333,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -1294,9 +1357,9 @@ 0 - -912 - 674 - 2497 + 0 + 588 + 2181 @@ -2350,7 +2413,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2366,8 +2438,8 @@ 0 0 - 141 - 54 + 157 + 51 @@ -2403,7 +2475,16 @@ - + + 0 + + + 0 + + + 0 + + 0 @@ -2473,7 +2554,16 @@ QFrame::Raised - + + 0 + + + 0 + + + 0 + + 0 From b412ceb109ae9cb3d318dcef039f7efcf2610b94 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Sat, 14 Jan 2017 12:36:02 +0100 Subject: [PATCH 047/332] Split (#3988) * add coreutils to travis * ppa for coreutils backport --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d31b595167e5..a9d3570a68cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ matrix: - llvm-toolchain-precise-3.8 - ubuntu-toolchain-r-test - george-edison55-precise-backports # doxygen 1.8.3 + - sourceline: 'ppa:nomeata/travis-backports' # - laurent-boulard-devtools (for silver-search, not whitelisted yet https://github.com/travis-ci/apt-source-whitelist/pull/345) packages: - doxygen @@ -31,7 +32,7 @@ matrix: - graphviz - libpq-dev - libfcgi-dev - - libfftw3-3 + - libfftw3-3 - pkg-config - perl # lookahead regex in spell check script - poppler-utils @@ -42,12 +43,13 @@ matrix: # used for spell checks # - silversearcher-ag not available in precise nor in a white listed ppa (in osgeo4travis as for now) - expect-dev # unbuffer + - coreutils # OSX based build with QT4 and Python 2 # - os: osx # env: # - BUILD=osx # - IGNORE_BUILD_FAILURES=YES - + git: depth: 30 From 6de4fceec285ab3f271b2ff6d6bf209dd6fface0 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 14 Jan 2017 16:07:26 +0100 Subject: [PATCH 048/332] GML parser: fix parsing of typenames and geometry names with non-ASCII character (#16009) --- src/core/qgsgml.cpp | 21 +++++++++++---- src/core/qgsgml.h | 2 ++ tests/src/core/testqgsgml.cpp | 49 +++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 5 deletions(-) diff --git a/src/core/qgsgml.cpp b/src/core/qgsgml.cpp index 5982c2f87ebd..b98e0d487646 100644 --- a/src/core/qgsgml.cpp +++ b/src/core/qgsgml.cpp @@ -277,10 +277,12 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QString& typeName, : mTypeName( typeName ) , mTypeNameBA( mTypeName.toUtf8() ) , mTypeNamePtr( mTypeNameBA.constData() ) + , mTypeNameUTF8Len( strlen( mTypeNamePtr ) ) , mWkbType( QgsWkbTypes::Unknown ) , mGeometryAttribute( geometryAttribute ) , mGeometryAttributeBA( geometryAttribute.toUtf8() ) , mGeometryAttributePtr( mGeometryAttributeBA.constData() ) + , mGeometryAttributeUTF8Len( strlen( mGeometryAttributePtr ) ) , mFields( fields ) , mIsException( false ) , mTruncatedResponse( false ) @@ -315,6 +317,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QString& typeName, mTypeName = mTypeName.mid( index + 1 ); mTypeNameBA = mTypeName.toUtf8(); mTypeNamePtr = mTypeNameBA.constData(); + mTypeNameUTF8Len = strlen( mTypeNamePtr ); } mParser = XML_ParserCreateNS( nullptr, NS_SEPARATOR ); @@ -340,8 +343,10 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QList& laye bool invertAxisOrientation ) : mLayerProperties( layerProperties ) , mTypeNamePtr( nullptr ) + , mTypeNameUTF8Len( 0 ) , mWkbType( QgsWkbTypes::Unknown ) , mGeometryAttributePtr( nullptr ) + , mGeometryAttributeUTF8Len( 0 ) , mFields( fields ) , mIsException( false ) , mTruncatedResponse( false ) @@ -397,6 +402,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QList& laye mGeometryAttribute = mLayerProperties[0].mGeometryAttribute; mGeometryAttributeBA = mGeometryAttribute.toUtf8(); mGeometryAttributePtr = mGeometryAttributeBA.constData(); + mGeometryAttributeUTF8Len = strlen( mGeometryAttributePtr ); int index = mTypeName.indexOf( ':' ); if ( index != -1 && index < mTypeName.length() ) { @@ -404,6 +410,7 @@ QgsGmlStreamingParser::QgsGmlStreamingParser( const QList& laye } mTypeNameBA = mTypeName.toUtf8(); mTypeNamePtr = mTypeNameBA.constData(); + mTypeNameUTF8Len = strlen( mTypeNamePtr ); } mEndian = QgsApplication::endian(); @@ -542,7 +549,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } } } - else if ( localNameLen == mGeometryAttribute.size() && + else if ( localNameLen == static_cast( mGeometryAttributeUTF8Len ) && memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) { mParseModeStack.push( QgsGmlStreamingParser::Geometry ); @@ -606,6 +613,7 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } mGeometryAttributeBA = mGeometryAttribute.toUtf8(); mGeometryAttributePtr = mGeometryAttributeBA.constData(); + mGeometryAttributeUTF8Len = strlen( mGeometryAttributePtr ); mParseModeStack.push( QgsGmlStreamingParser::FeatureTuple ); QString id; if ( mGMLNameSpaceURI.isEmpty() ) @@ -634,7 +642,8 @@ void QgsGmlStreamingParser::startElement( const XML_Char* el, const XML_Char** a } } else if ( theParseMode == None && - localNameLen == mTypeName.size() && memcmp( pszLocalName, mTypeNamePtr, mTypeName.size() ) == 0 ) + localNameLen == static_cast( mTypeNameUTF8Len ) && + memcmp( pszLocalName, mTypeNamePtr, mTypeNameUTF8Len ) == 0 ) { Q_ASSERT( !mCurrentFeature ); mCurrentFeature = new QgsFeature( mFeatureCount ); @@ -857,7 +866,8 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) setAttribute( mAttributeName, mStringCash ); } - else if ( theParseMode == Geometry && localNameLen == mGeometryAttribute.size() && + else if ( theParseMode == Geometry && + localNameLen == static_cast( mGeometryAttributeUTF8Len ) && memcmp( pszLocalName, mGeometryAttributePtr, localNameLen ) == 0 ) { mParseModeStack.pop(); @@ -935,8 +945,9 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) } else if (( theParseMode == Tuple && !mTypeNamePtr && LOCALNAME_EQUALS( "Tuple" ) ) || - ( theParseMode == Feature && localNameLen == mTypeName.size() && - memcmp( pszLocalName, mTypeNamePtr, mTypeName.size() ) == 0 ) ) + ( theParseMode == Feature && + localNameLen == static_cast( mTypeNameUTF8Len ) && + memcmp( pszLocalName, mTypeNamePtr, mTypeNameUTF8Len ) == 0 ) ) { Q_ASSERT( mCurrentFeature ); if ( !mCurrentFeature->hasGeometry() ) diff --git a/src/core/qgsgml.h b/src/core/qgsgml.h index 5dd8590d5407..32c42e4a4ecf 100644 --- a/src/core/qgsgml.h +++ b/src/core/qgsgml.h @@ -250,6 +250,7 @@ class CORE_EXPORT QgsGmlStreamingParser QString mTypeName; QByteArray mTypeNameBA; const char* mTypeNamePtr; + size_t mTypeNameUTF8Len; QgsWkbTypes::Type mWkbType; @@ -259,6 +260,7 @@ class CORE_EXPORT QgsGmlStreamingParser QString mGeometryAttribute; QByteArray mGeometryAttributeBA; const char* mGeometryAttributePtr; + size_t mGeometryAttributeUTF8Len; QgsFields mFields; QMap > mThematicAttributes; diff --git a/tests/src/core/testqgsgml.cpp b/tests/src/core/testqgsgml.cpp index 099b81857aef..60b6d9dd240e 100644 --- a/tests/src/core/testqgsgml.cpp +++ b/tests/src/core/testqgsgml.cpp @@ -76,6 +76,7 @@ class TestQgsGML : public QObject void testPartialFeature(); void testThroughOGRGeometry(); void testThroughOGRGeometry_urn_EPSG_4326(); + void testAccents(); }; const QString data1( "" + "" + "" + "" + "" + "" + "" + "" + "" + "0 0 0 10 10 10 10 0 0 0" + "" + "" + "" + "" + "" + "" + "" + "" + "0 0 0 10 10 10 10 0 0 0" + "" + "" + "" + "" + "" + "" + "" + "" + "" ), true ), true ); + QCOMPARE( gmlParser.wkbType(), QgsWkbTypes::MultiPolygon ); + QVector features = gmlParser.getAndStealReadyFeatures(); + QCOMPARE( features.size(), 1 ); + QVERIFY( features[0].first->hasGeometry() ); + QCOMPARE( features[0].first->geometry().wkbType(), QgsWkbTypes::MultiPolygon ); + QgsMultiPolygon multi = features[0].first->geometry().asMultiPolygon(); + QCOMPARE( multi.size(), 2 ); + QCOMPARE( multi[0].size(), 1 ); + QCOMPARE( multi[0][0].size(), 5 ); + delete features[0].first; +} + QGSTEST_MAIN( TestQgsGML ) #include "testqgsgml.moc" From c128d13ddfde777021ab43f77d31728e5b4e288c Mon Sep 17 00:00:00 2001 From: David Marteau Date: Wed, 11 Jan 2017 11:10:42 +0100 Subject: [PATCH 049/332] Remove dead code --- src/server/CMakeLists.txt | 1 - src/server/qgsmapserverutils.cpp | 84 -------------------------------- src/server/qgsmapserverutils.h | 32 ------------ src/server/qgsserverplugins.cpp | 1 - 4 files changed, 118 deletions(-) delete mode 100644 src/server/qgsmapserverutils.cpp delete mode 100644 src/server/qgsmapserverutils.h diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index eae5662abd4f..2a25f6354514 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -38,7 +38,6 @@ SET ( qgis_mapserv_SRCS qgsremotedatasourcebuilder.cpp qgssentdatasourcebuilder.cpp qgsserverlogger.cpp - qgsmapserverutils.cpp qgswcsprojectparser.cpp qgswfsprojectparser.cpp qgswmsconfigparser.cpp diff --git a/src/server/qgsmapserverutils.cpp b/src/server/qgsmapserverutils.cpp deleted file mode 100644 index 86e24a546ddf..000000000000 --- a/src/server/qgsmapserverutils.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/*************************************************************************** - qgsmapserverutils.cpp - --------------------- - begin : August 2010 - copyright : (C) 2010 by Marco Hugentobler - email : marco dot hugentobler at sourcepole dot ch - *************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ -#include "qgsmapserverutils.h" -#include "qgslogger.h" -#include -#include -#include -#include -#include - -QString QgsMapServerUtils::createTempFilePath() -{ - - - //save the content of the file into a temporary location - //generate a name considering the current time - //struct timeval currentTime; - //gettimeofday(¤tTime, nullptr); - - time_t seconds; - time( &seconds ); - srand( seconds ); - - int randomNumber = rand(); - QString tempFileName = QString::number( randomNumber ); - QString tempFilePath; - //on windows, store the temporary file in current_path/tmp directory, - //on unix, store it in /tmp/qgis_wms_serv -#ifndef Q_OS_WIN - QDir tempFileDir( QStringLiteral( "/tmp/qgis_map_serv" ) ); - if ( !tempFileDir.exists() ) //make sure the directory exists - { - QDir tmpDir( QStringLiteral( "/tmp" ) ); - tmpDir.mkdir( QStringLiteral( "qgis_map_serv" ) ); - } - tempFilePath = "/tmp/qgis_map_serv/" + tempFileName; -#else - QDir tempFileDir( QDir::currentPath() + "/tmp" ); - if ( !tempFileDir.exists() ) - { - QDir currentDir( QDir::currentPath() ); - currentDir.mkdir( "tmp" ); - } - tempFilePath = QDir::currentPath() + "/tmp" + "/" + tempFileName; -#endif // Q_OS_WIN - - QFileInfo testFile( tempFilePath ); - while ( testFile.exists() ) - { - //change the name - tempFilePath += QLatin1String( "1" ); - testFile.setFile( tempFilePath ); - } - QgsDebugMsg( tempFilePath ); - return tempFilePath; -} - -int QgsMapServerUtils::createTextFile( const QString& filePath, const QString& text ) -{ - QFile file( filePath ); - if ( file.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) ) - { - QTextStream fileStream( &file ); - fileStream << text; - file.close(); - return 0; - } - else - { - return 1; - } -} diff --git a/src/server/qgsmapserverutils.h b/src/server/qgsmapserverutils.h deleted file mode 100644 index 3af0659151ad..000000000000 --- a/src/server/qgsmapserverutils.h +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - qgsmapserverutils.h - --------------------- - begin : August 2010 - copyright : (C) 2010 by Marco Hugentobler - email : marco dot hugentobler at sourcepole dot ch - *************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ -#ifndef QGSMAPSERVERUTILS_H -#define QGSMAPSERVERUTILS_H - -#include - -//! Some utility functions that may be included from everywhere in the code -namespace QgsMapServerUtils -{ - - /** Creates a ramdom filename for a temporary file. This function also creates the directory to store - the temporary files if it does not already exist. The directory is /tmp/qgis_map_serv/ under linux or - the current working directory on windows*/ - QString createTempFilePath(); - //! Stores the specified text in a temporary file. Returns 0 in case of success - int createTextFile( const QString& filePath, const QString& text ); -} - -#endif diff --git a/src/server/qgsserverplugins.cpp b/src/server/qgsserverplugins.cpp index 6efc678b940c..cc02fdabcdab 100644 --- a/src/server/qgsserverplugins.cpp +++ b/src/server/qgsserverplugins.cpp @@ -22,7 +22,6 @@ #include "qgslogger.h" #include "qgspythonutils.h" #include "qgsserverlogger.h" -#include "qgsmapserverutils.h" #include From 8b0526d678b5381936e3e894fdd87620213a3b6e Mon Sep 17 00:00:00 2001 From: David Marteau Date: Wed, 11 Jan 2017 22:59:27 +0100 Subject: [PATCH 050/332] Revisit server exceptions - Add server exception base class - Enable per service exception definition - Handle QgsException gracefully (error 500) - Handle OGC exception versioning --- python/server/qgsrequesthandler.sip | 45 +---- python/server/qgsserverexception.sip | 56 ++++++ python/server/qgsserverresponse.sip | 5 + python/server/server.sip | 1 + src/server/CMakeLists.txt | 2 +- src/server/qgsfcgiserverresponse.cpp | 10 +- src/server/qgsfcgiserverresponse.h | 8 +- src/server/qgsmapserviceexception.h | 17 +- src/server/qgsrequesthandler.cpp | 30 +--- src/server/qgsrequesthandler.h | 6 +- src/server/qgsserver.cpp | 165 ++++++++++-------- src/server/qgsserverexception.cpp | 77 ++++++++ src/server/qgsserverexception.h | 84 +++++++++ src/server/qgsserverresponse.cpp | 20 ++- src/server/qgsserverresponse.h | 7 + src/server/services/wms/qgswms.cpp | 10 +- .../services/wms/qgswmsdescribelayer.cpp | 24 +-- .../services/wms/qgswmsgetcapabilities.cpp | 22 +-- src/server/services/wms/qgswmsgetcontext.cpp | 27 ++- .../services/wms/qgswmsgetfeatureinfo.cpp | 18 +- .../services/wms/qgswmsgetlegendgraphics.cpp | 29 ++- src/server/services/wms/qgswmsgetmap.cpp | 22 +-- src/server/services/wms/qgswmsgetprint.cpp | 73 ++++---- .../services/wms/qgswmsgetschemaextension.cpp | 24 +-- src/server/services/wms/qgswmsgetstyle.cpp | 26 ++- src/server/services/wms/qgswmsgetstyles.cpp | 14 +- .../services/wms/qgswmsservertransitional.cpp | 66 +++---- .../wms/qgswmsserviceexception.h} | 39 ++++- src/server/services/wms/qgswmsutils.cpp | 29 +-- src/server/services/wms/qgswmsutils.h | 6 +- 30 files changed, 552 insertions(+), 410 deletions(-) create mode 100644 python/server/qgsserverexception.sip create mode 100644 src/server/qgsserverexception.cpp create mode 100644 src/server/qgsserverexception.h rename src/server/{qgsmapserviceexception.cpp => services/wms/qgswmsserviceexception.h} (51%) diff --git a/python/server/qgsrequesthandler.sip b/python/server/qgsrequesthandler.sip index 3470c43bc400..238408ad8f3e 100644 --- a/python/server/qgsrequesthandler.sip +++ b/python/server/qgsrequesthandler.sip @@ -20,45 +20,14 @@ class QgsRequestHandler /Abstract/ { %TypeHeaderCode -#include "qgsmapserviceexception.h" +#include "qgsserverexception.h" #include "qgsrequesthandler.h" %End public: - /** Parses the input and creates a request neutral Parameter/Value map - * @note not available in Python bindings - */ - // virtual void parseInput() = 0; - - /** Sends the map image back to the client - * @note not available in Python bindings - */ - // virtual void setGetMapResponse( const QString& service, QImage* img, int imageQuality ) = 0; - - //! @note not available in Python bindings - // virtual void setGetCapabilitiesResponse( const QDomDocument& doc ) = 0; - - //! @note not available in Python bindings - // virtual void setGetFeatureInfoResponse( const QDomDocument& infoDoc, const QString& infoFormat ) = 0; - - /** Allow plugins to return a QgsMapServiceException*/ - void setServiceException( const QgsMapServiceException& ex /Transfer/ ); - - //! @note not available in Python bindings - // virtual void setXmlResponse( const QDomDocument& doc ) = 0; - - //! @note not available in Python bindings - // virtual void setXmlResponse( const QDomDocument& doc, const QString& mimeType ) = 0; - - //! @note not available in Python bindings - // virtual void setGetPrintResponse( QByteArray* b ) = 0; - - //! @note not available in Python bindings - // virtual bool startGetFeatureResponse( QByteArray* ba, const QString& infoFormat ) = 0; - - //! @note not available in Python bindings - // virtual void setGetFeatureResponse( QByteArray* ba ) = 0; + /** Allow plugins to return a QgsServerException*/ + void setServiceException( const QgsServerException& ex ); //! @note not available in Python bindings void endGetFeatureResponse( QByteArray* ba ); @@ -116,12 +85,4 @@ class QgsRequestHandler /Abstract/ /** Return true if the HTTP headers were already sent to the client*/ bool headersSent() const; - - - //! @note not available in Python bindings - // virtual QPair getResponse() = 0; - -private: - /** Parses the input and creates a request neutral Parameter/Value map*/ - void parseInput(); }; diff --git a/python/server/qgsserverexception.sip b/python/server/qgsserverexception.sip new file mode 100644 index 000000000000..4baa3ea41902 --- /dev/null +++ b/python/server/qgsserverexception.sip @@ -0,0 +1,56 @@ +/*************************************************************************** + qgsserverexception.sip + ------------------------ + begin : January 11 2017 + copyright : (C) 2017 by David Marteau + email : david dot marteau at 3liz dot com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +/** \ingroup server + * \class QgsServerException + * \brief server Exception base class. + */ + +class QgsServerException +{ +%TypeHeaderCode +#include +%End + public: + QgsServerException( const QString& message, int responseCode = 500 ); + + int responseCode() const; + + virtual QByteArray formatResponse( QString& responseFormat ) const; +}; + + +class QgsOgcServiceException +{ +%TypeHeaderCode +#include +%End + public: + QgsOgcServiceException( const QString& code, const QString& message, const QString& locator = QString(), + int responseCode = 200, const QString& version = "1.3.0" ); + + QString message() const; + QString code() const; + QString locator() const; + + virtual QByteArray formatResponse( QString& responseFormat / Out / ) const; +}; + + + + diff --git a/python/server/qgsserverresponse.sip b/python/server/qgsserverresponse.sip index 9b4467954bcb..6581b7408719 100644 --- a/python/server/qgsserverresponse.sip +++ b/python/server/qgsserverresponse.sip @@ -92,6 +92,11 @@ class QgsServerResponse */ virtual qint64 write( const QByteArray& byteArray ); + /** + * Write server exception + */ + virtual void write( const QgsServerException& ex ); + /** * Return the underlying QIODevice */ diff --git a/python/server/server.sip b/python/server/server.sip index e75d5dcba030..5fd5429f3eb8 100644 --- a/python/server/server.sip +++ b/python/server/server.sip @@ -32,6 +32,7 @@ %Include qgsserverrequest.sip %Include qgsserverresponse.sip +%Include qgsserverexception.sip %Include qgsservice.sip %Include qgsservicemodule.sip %Include qgsserviceregistry.sip diff --git a/src/server/CMakeLists.txt b/src/server/CMakeLists.txt index 2a25f6354514..b7f74caefdc7 100644 --- a/src/server/CMakeLists.txt +++ b/src/server/CMakeLists.txt @@ -28,7 +28,7 @@ SET ( qgis_mapserv_SRCS qgswfsserver.cpp qgswcsserver.cpp qgsserversettings.cpp - qgsmapserviceexception.cpp + qgsserverexception.cpp qgsmslayercache.cpp qgsmslayerbuilder.cpp qgshostedvdsbuilder.cpp diff --git a/src/server/qgsfcgiserverresponse.cpp b/src/server/qgsfcgiserverresponse.cpp index 90d0c1ee2d79..7c977d283c6a 100644 --- a/src/server/qgsfcgiserverresponse.cpp +++ b/src/server/qgsfcgiserverresponse.cpp @@ -30,16 +30,14 @@ // QgsFcgiServerResponse::QgsFcgiServerResponse( QgsServerRequest::Method method ) + : mMethod( method ) { mBuffer.open( QIODevice::ReadWrite ); - mHeadersSent = false; - mFinished = false; - mMethod = method; + setDefaultHeaders(); } QgsFcgiServerResponse::~QgsFcgiServerResponse() { - } void QgsFcgiServerResponse::clearHeader( const QString& key ) @@ -82,7 +80,6 @@ void QgsFcgiServerResponse::sendError( int code, const QString& message ) } clear(); - setDefaultHeaders(); setReturnCode( code ); setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/html;charset=utf-8" ) ); write( QStringLiteral( "%1" ).arg( message ) ); @@ -157,6 +154,9 @@ void QgsFcgiServerResponse::clear() mHeaders.clear(); mBuffer.seek( 0 ); mBuffer.buffer().clear(); + + // Restore default headers + setDefaultHeaders(); } void QgsFcgiServerResponse::setDefaultHeaders() diff --git a/src/server/qgsfcgiserverresponse.h b/src/server/qgsfcgiserverresponse.h index 591f6143abdc..c09ccc8c0e5c 100644 --- a/src/server/qgsfcgiserverresponse.h +++ b/src/server/qgsfcgiserverresponse.h @@ -61,13 +61,13 @@ class QgsFcgiServerResponse: public QgsServerResponse /** * Set the default headers */ - virtual void setDefaultHeaders(); + void setDefaultHeaders(); private: QMap mHeaders; - QBuffer mBuffer; - bool mFinished; - bool mHeadersSent; + QBuffer mBuffer; + bool mFinished = false; + bool mHeadersSent = false; QgsServerRequest::Method mMethod; }; diff --git a/src/server/qgsmapserviceexception.h b/src/server/qgsmapserviceexception.h index 686b3b321f7b..219b275215aa 100644 --- a/src/server/qgsmapserviceexception.h +++ b/src/server/qgsmapserviceexception.h @@ -20,12 +20,14 @@ #include -#include "qgsexception.h" +#include "qgsserverexception.h" #include "qgis_server.h" /** \ingroup server * \class QgsMapServiceException - * \brief Exception class for WMS service exceptions. + * \brief Exception class for WMS service exceptions (for compatibility only). + * + * \deprecated Use QsgServerException * * The most important codes are: * * "InvalidFormat" @@ -34,15 +36,12 @@ * * "OperationNotSupported" */ -class SERVER_EXPORT QgsMapServiceException : public QgsException +class SERVER_EXPORT QgsMapServiceException : public QgsOgcServiceException { public: - QgsMapServiceException( const QString& code, const QString& message ); - QString code() const {return mCode;} - QString message() const {return mMessage;} - private: - QString mCode; - QString mMessage; + QgsMapServiceException( const QString& code, const QString& message ) + : QgsOgcServiceException( code, message ) + {} }; #endif diff --git a/src/server/qgsrequesthandler.cpp b/src/server/qgsrequesthandler.cpp index c0d7ef9e399a..d418350dcc01 100644 --- a/src/server/qgsrequesthandler.cpp +++ b/src/server/qgsrequesthandler.cpp @@ -24,7 +24,7 @@ #include "qgshttptransaction.h" #endif #include "qgsmessagelog.h" -#include "qgsmapserviceexception.h" +#include "qgsserverexception.h" #include "qgsserverrequest.h" #include "qgsserverresponse.h" #include @@ -38,7 +38,7 @@ #include QgsRequestHandler::QgsRequestHandler( QgsServerRequest& request, QgsServerResponse& response ) - : mException( nullptr ) + : mExceptionRaised( false ) , mRequest( request ) , mResponse( response ) { @@ -46,7 +46,6 @@ QgsRequestHandler::QgsRequestHandler( QgsServerRequest& request, QgsServerRespon QgsRequestHandler::~QgsRequestHandler() { - delete mException; } QMap QgsRequestHandler::parameterMap() const @@ -70,7 +69,7 @@ void QgsRequestHandler::setHttpResponse( const QByteArray& ba, const QString &fo bool QgsRequestHandler::exceptionRaised() const { - return mException; + return mExceptionRaised; } void QgsRequestHandler::setHeader( const QString &name, const QString &value ) @@ -169,28 +168,11 @@ void QgsRequestHandler::setXmlResponse( const QDomDocument& doc, const QString& setHttpResponse( ba, mimeType ); } -void QgsRequestHandler::setServiceException( const QgsMapServiceException& ex ) +void QgsRequestHandler::setServiceException( const QgsServerException& ex ) { // Safety measure to avoid potential leaks if called repeatedly - delete mException; - mException = new QgsMapServiceException( ex ); - //create Exception DOM document - QDomDocument exceptionDoc; - QDomElement serviceExceptionReportElem = exceptionDoc.createElement( QStringLiteral( "ServiceExceptionReport" ) ); - serviceExceptionReportElem.setAttribute( QStringLiteral( "version" ), QStringLiteral( "1.3.0" ) ); - serviceExceptionReportElem.setAttribute( QStringLiteral( "xmlns" ), QStringLiteral( "http://www.opengis.net/ogc" ) ); - exceptionDoc.appendChild( serviceExceptionReportElem ); - QDomElement serviceExceptionElem = exceptionDoc.createElement( QStringLiteral( "ServiceException" ) ); - serviceExceptionElem.setAttribute( QStringLiteral( "code" ), ex.code() ); - QDomText messageText = exceptionDoc.createTextNode( ex.message() ); - serviceExceptionElem.appendChild( messageText ); - serviceExceptionReportElem.appendChild( serviceExceptionElem ); - - QByteArray ba = exceptionDoc.toByteArray(); - // Clear response headers and body and set new exception - // TODO: check for headersSent() - clear(); - setHttpResponse( ba, QStringLiteral( "text/xml" ) ); + mExceptionRaised = true; + mResponse.write( ex ); } bool QgsRequestHandler::startGetFeatureResponse( QByteArray* ba, const QString& infoFormat ) diff --git a/src/server/qgsrequesthandler.h b/src/server/qgsrequesthandler.h index d55c2d331337..ea418979fc68 100644 --- a/src/server/qgsrequesthandler.h +++ b/src/server/qgsrequesthandler.h @@ -31,7 +31,7 @@ class QDomDocument; class QImage; -class QgsMapServiceException; +class QgsServerException; class QgsServerRequest; class QgsServerResponse; @@ -58,7 +58,7 @@ class SERVER_EXPORT QgsRequestHandler void setGetCapabilitiesResponse( const QDomDocument& doc ); //! Allow plugins to return a QgsMapServiceException - void setServiceException( const QgsMapServiceException &ex ); + void setServiceException( const QgsServerException &ex ); //! @note not available in Python bindings void setXmlResponse( const QDomDocument& doc ); @@ -154,7 +154,7 @@ class SERVER_EXPORT QgsRequestHandler QString mFormatString; //format string as it is passed in the request (with base) QString mService; QString mInfoFormat; - QgsMapServiceException* mException; // Stores the exception + bool mExceptionRaised; QgsServerRequest& mRequest; QgsServerResponse& mResponse; diff --git a/src/server/qgsserver.cpp b/src/server/qgsserver.cpp index a32ac62f5c37..d3496449fa3f 100644 --- a/src/server/qgsserver.cpp +++ b/src/server/qgsserver.cpp @@ -396,100 +396,114 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res // Call requestReady() method (if enabled) theResponse.start(); - QMap parameterMap = request.parameters(); - printRequestParameters( parameterMap, logLevel ); - - QgsAccessControl* accessControl = sServerInterface->accessControls(); + // Plugins may have set exceptions + if ( !theRequestHandler.exceptionRaised() ) + { + try + { + QMap parameterMap = request.parameters(); + printRequestParameters( parameterMap, logLevel ); - //Config file path - QString configFilePath = configPath( *sConfigFilePath, parameterMap ); + QgsAccessControl* accessControl = sServerInterface->accessControls(); - sServerInterface->setConfigFilePath( configFilePath ); + //Config file path + QString configFilePath = configPath( *sConfigFilePath, parameterMap ); - //Service parameter - QString serviceString = parameterMap.value( QStringLiteral( "SERVICE" ) ); + sServerInterface->setConfigFilePath( configFilePath ); - if ( serviceString.isEmpty() ) - { - // SERVICE not mandatory for WMS 1.3.0 GetMap & GetFeatureInfo - QString requestString = parameterMap.value( QStringLiteral( "REQUEST" ) ); - if ( requestString == QLatin1String( "GetMap" ) || requestString == QLatin1String( "GetFeatureInfo" ) ) - { - serviceString = QStringLiteral( "WMS" ); - } - } + //Service parameter + QString serviceString = parameterMap.value( QStringLiteral( "SERVICE" ) ); - QString versionString = parameterMap.value( QStringLiteral( "VERSION" ) ); + if ( serviceString.isEmpty() ) + { + // SERVICE not mandatory for WMS 1.3.0 GetMap & GetFeatureInfo + QString requestString = parameterMap.value( QStringLiteral( "REQUEST" ) ); + if ( requestString == QLatin1String( "GetMap" ) || requestString == QLatin1String( "GetFeatureInfo" ) ) + { + serviceString = QStringLiteral( "WMS" ); + } + } - //possibility for client to suggest a download filename - QString outputFileName = parameterMap.value( QStringLiteral( "FILE_NAME" ) ); - if ( !outputFileName.isEmpty() ) - { - theRequestHandler.setHeader( QStringLiteral( "Content-Disposition" ), "attachment; filename=\"" + outputFileName + "\"" ); - } + QString versionString = parameterMap.value( QStringLiteral( "VERSION" ) ); - // Enter core services main switch - if ( !theRequestHandler.exceptionRaised() ) - { - // Lookup for service + //possibility for client to suggest a download filename + QString outputFileName = parameterMap.value( QStringLiteral( "FILE_NAME" ) ); + if ( !outputFileName.isEmpty() ) + { + theRequestHandler.setHeader( QStringLiteral( "Content-Disposition" ), "attachment; filename=\"" + outputFileName + "\"" ); + } - QgsService* service = sServiceRegistry.getService( serviceString, versionString ); - if ( service ) - { - service->executeRequest( request, theResponse ); - } - else if ( serviceString == QLatin1String( "WCS" ) ) - { - QgsWCSProjectParser* p = QgsConfigCache::instance()->wcsConfiguration( - configFilePath - , accessControl - ); - if ( !p ) + // Lookup for service + QgsService* service = sServiceRegistry.getService( serviceString, versionString ); + if ( service ) { - theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Project file error" ), QStringLiteral( "Error reading the project file" ) ) ); + service->executeRequest( request, theResponse ); } - else + else if ( serviceString == QLatin1String( "WCS" ) ) { - QgsWCSServer wcsServer( - configFilePath - , sSettings - , parameterMap - , p - , &theRequestHandler - , accessControl - ); - wcsServer.executeRequest(); + + QgsWCSProjectParser* p = QgsConfigCache::instance()->wcsConfiguration( + configFilePath + , accessControl + ); + if ( !p ) + { + theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Project file error" ), + QStringLiteral( "Error reading the project file" ) ) ); + } + else + { + QgsWCSServer wcsServer( + configFilePath + , sSettings + , parameterMap + , p + , &theRequestHandler + , accessControl + ); + wcsServer.executeRequest(); + } } - } - else if ( serviceString == QLatin1String( "WFS" ) ) - { - QgsWfsProjectParser* p = QgsConfigCache::instance()->wfsConfiguration( - configFilePath - , accessControl - ); - if ( !p ) + else if ( serviceString == QLatin1String( "WFS" ) ) { - theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Project file error" ), QStringLiteral( "Error reading the project file" ) ) ); + QgsWfsProjectParser* p = QgsConfigCache::instance()->wfsConfiguration( + configFilePath + , accessControl + ); + if ( !p ) + { + theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Project file error" ), + QStringLiteral( "Error reading the project file" ) ) ); + } + else + { + QgsWfsServer wfsServer( + configFilePath + , sSettings + , parameterMap + , p + , &theRequestHandler + , accessControl + ); + wfsServer.executeRequest(); + } } else { - QgsWfsServer wfsServer( - configFilePath - , sSettings - , parameterMap - , p - , &theRequestHandler - , accessControl - ); - wfsServer.executeRequest(); + throw QgsOgcServiceException( QStringLiteral( "Service configuration error" ), + QStringLiteral( "Service unknown or unsupported" ) ) ; } } - else + catch ( QgsServerException& ex ) { - theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Service configuration error" ), QStringLiteral( "Service unknown or unsupported" ) ) ); - } // end switch - } // end if not exception raised - + theResponse.write( ex ); + } + catch ( QgsException& ex ) + { + // Internal server error + theResponse.sendError( 500, ex.what() ); + } + } // Terminate the response theResponse.finish(); @@ -497,7 +511,6 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res // to a deleted request handler from Python bindings sServerInterface->clearRequestHandler(); - if ( logLevel == QgsMessageLog::INFO ) { QgsMessageLog::logMessage( "Request finished in " + QString::number( time.elapsed() ) + " ms", QStringLiteral( "Server" ), QgsMessageLog::INFO ); diff --git a/src/server/qgsserverexception.cpp b/src/server/qgsserverexception.cpp new file mode 100644 index 000000000000..c903effb501d --- /dev/null +++ b/src/server/qgsserverexception.cpp @@ -0,0 +1,77 @@ +/*************************************************************************** + qgsservervexception.h + ------------------- + begin : January 11, 2017 + copyright : (C) 2017 David Marteau + email : david dot marteau at 3liz dot com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "qgsserverexception.h" + +#include + +// QgsServerException +QgsServerException::QgsServerException( const QString& message, int responseCode ) + : QgsException( message ) + , mResponseCode( responseCode ) +{ + +} + +QByteArray QgsServerException::formatResponse( QString& responseFormat ) const +{ + QDomDocument doc; + QDomElement root = doc.createElement( QStringLiteral( "ServerException" ) ); + doc.appendChild( root ); + root.appendChild( doc.createTextNode( what() ) ); + + responseFormat = QStringLiteral( "text/xml; charset=utf-8" ); + return doc.toByteArray(); +} + + +// QgsOgcServiceException +QgsOgcServiceException:: QgsOgcServiceException( const QString& code, const QString& message, const QString& locator, + int responseCode, const QString& version ) + : QgsServerException( message, responseCode ) + , mCode( code ) + , mMessage( message ) + , mLocator( locator ) + , mVersion( version ) +{ + +} + +QByteArray QgsOgcServiceException::formatResponse( QString& responseFormat ) const +{ + QDomDocument doc; + QDomElement root = doc.createElement( QStringLiteral( "ServiceExceptionReport" ) ); + root.setAttribute( QStringLiteral( "version" ), mVersion ); + root.setAttribute( QStringLiteral( "xmlns" ) , QStringLiteral( "http://www.opengis.net/ogc" ) ); + doc.appendChild( root ); + + QDomElement elem = doc.createElement( QStringLiteral( "ServiceException" ) ); + elem.setAttribute( QStringLiteral( "code" ), mCode ); + elem.appendChild( doc.createTextNode( mMessage ) ); + root.appendChild( elem ); + + if ( ! mLocator.isEmpty() ) + { + elem.setAttribute( QStringLiteral( "locator" ), mLocator ); + } + + responseFormat = QStringLiteral( "text/xml; charset=utf-8" ); + return doc.toByteArray(); +} + + + diff --git a/src/server/qgsserverexception.h b/src/server/qgsserverexception.h new file mode 100644 index 000000000000..2895d9233d22 --- /dev/null +++ b/src/server/qgsserverexception.h @@ -0,0 +1,84 @@ +/*************************************************************************** + qgserverexception.h + ------------------------ + begin : January 11, 2017 + copyright : (C) 2017 by David Marteau + email : david dot marteau at 3liz dot com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef QGSSERVEREXCEPTION_H +#define QGSSERVEREXCEPTION_H + +#include +#include + +#include "qgsexception.h" +#include "qgis_server.h" + +/** \ingroup server + * \class QgsServerException + * \brief Exception base class for server exceptions. + */ +class SERVER_EXPORT QgsServerException : public QgsException +{ + public: + QgsServerException( const QString& message, int responseCode = 500 ); + + /** + * @return the return HTTP response code associated with this exception + */ + int responseCode() const { return mResponseCode; } + + /** Format the exception for sending to client + * + * @param responseFormat QString to store the content type of the response format. + * @return QByteArray the fermatted response. + * + * The defaolt implementation return text/xml format. + */ + virtual QByteArray formatResponse( QString& responseFormat ) const; + + private: + int mResponseCode; +}; + +/** \ingroup server + * \class QgsOcgServiceException + * \brief Exception base class for service exceptions. + * + * Note that this exeception is assaciated with a default return code 200 which may be + * not appropriate in some situations. + */ +class SERVER_EXPORT QgsOgcServiceException : public QgsServerException +{ + public: + QgsOgcServiceException( const QString& code, const QString& message, const QString& locator = QString(), + int responseCode = 200, const QString& version = QStringLiteral( "1.3.0" ) ); + + QString message() const { return mMessage; } + QString code() const { return mCode; } + QString locator() const { return mLocator; } + QString version() const { return mVersion; } + + virtual QByteArray formatResponse( QString& responseFormat ) const override; + + private: + QString mCode; + QString mMessage; + QString mLocator; + QString mVersion; + + +}; + +#endif + diff --git a/src/server/qgsserverresponse.cpp b/src/server/qgsserverresponse.cpp index 738aa5f8a92e..4e0c3398a0fe 100644 --- a/src/server/qgsserverresponse.cpp +++ b/src/server/qgsserverresponse.cpp @@ -19,7 +19,7 @@ #include "qgsserverresponse.h" #include "qgsmessagelog.h" -//#include +#include "qgsserverexception.h" //! constructor QgsServerResponse::QgsServerResponse() @@ -75,3 +75,21 @@ qint64 QgsServerResponse::write( const char* data ) return 0; } +void QgsServerResponse::write( const QgsServerException& ex ) +{ + QString responseFormat; + QByteArray ba = ex.formatResponse( responseFormat ); + + if ( headersSent() ) + { + QgsMessageLog::logMessage( QStringLiteral( "Error: Cannot write exception after header sent !" ) ); + return; + } + + clear(); + setReturnCode( ex.responseCode() ); + setHeader( "Content-Type", responseFormat ); + write( ba ); +} + + diff --git a/src/server/qgsserverresponse.h b/src/server/qgsserverresponse.h index ea4ca8140fd4..dd4261d33330 100644 --- a/src/server/qgsserverresponse.h +++ b/src/server/qgsserverresponse.h @@ -24,6 +24,8 @@ #include #include +class QgsServerException; + /** * \ingroup server * QgsServerResponse @@ -126,6 +128,11 @@ class SERVER_EXPORT QgsServerResponse */ virtual qint64 write( const char* data ); + /** + * Write server exception + */ + virtual void write( const QgsServerException& ex ); + /** * Return the underlying QIODevice */ diff --git a/src/server/services/wms/qgswms.cpp b/src/server/services/wms/qgswms.cpp index e2a06b927666..b94c128d683e 100644 --- a/src/server/services/wms/qgswms.cpp +++ b/src/server/services/wms/qgswms.cpp @@ -79,9 +79,8 @@ namespace QgsWms QString req = params.value( QStringLiteral( "REQUEST" ) ); if ( req.isEmpty() ) { - writeError( response, QStringLiteral( "OperationNotSupported" ), - QStringLiteral( "Please check the value of the REQUEST parameter" ) ); - return; + throw QgsServiceException( QStringLiteral( "OperationNotSupported" ), + QStringLiteral( "Please check the value of the REQUEST parameter" ) ); } if (( QSTR_COMPARE( mVersion, "1.1.1" ) && QSTR_COMPARE( req, "capabilities" ) ) @@ -142,9 +141,8 @@ namespace QgsWms else { // Operation not supported - writeError( response, QStringLiteral( "OperationNotSupported" ), - QString( "Request %1 is not supported" ).arg( req ) ); - return; + throw QgsServiceException( QStringLiteral( "OperationNotSupported" ), + QString( "Request %1 is not supported" ).arg( req ) ); } } diff --git a/src/server/services/wms/qgswmsdescribelayer.cpp b/src/server/services/wms/qgswmsdescribelayer.cpp index a8131a5284eb..d1e67f1ccfe2 100644 --- a/src/server/services/wms/qgswmsdescribelayer.cpp +++ b/src/server/services/wms/qgswmsdescribelayer.cpp @@ -30,21 +30,15 @@ namespace QgsWms { Q_UNUSED( version ); QgsServerRequest::Parameters params = request.parameters(); - try - { - QgsWmsServer server( serverIface->configFilePath(), - *serverIface->serverSettings(), - params, - getConfigParser( serverIface ), - serverIface->accessControls() ); - QDomDocument doc = server.describeLayer(); - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } + + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), + params, + getConfigParser( serverIface ), + serverIface->accessControls() ); + QDomDocument doc = server.describeLayer(); + response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); + response.write( doc.toByteArray() ); } diff --git a/src/server/services/wms/qgswmsgetcapabilities.cpp b/src/server/services/wms/qgswmsgetcapabilities.cpp index fc2053e1a31e..d0412eacfdd3 100644 --- a/src/server/services/wms/qgswmsgetcapabilities.cpp +++ b/src/server/services/wms/qgswmsgetcapabilities.cpp @@ -49,20 +49,14 @@ namespace QgsWms { QgsMessageLog::logMessage( QStringLiteral( "Capabilities document not found in cache" ) ); QDomDocument doc; - try - { - QgsWmsServer server( configFilePath, - *serverSettings, - params, - getConfigParser( serverIface ), - accessControl ); - doc = server.getCapabilities( version, projectSettings ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - return; - } + QgsWmsServer server( configFilePath, + *serverSettings, + params, + getConfigParser( serverIface ), + accessControl ); + + doc = server.getCapabilities( version, projectSettings ); + if ( cache ) { capabilitiesCache->insertCapabilitiesDocument( configFilePath, cacheKey, &doc ); diff --git a/src/server/services/wms/qgswmsgetcontext.cpp b/src/server/services/wms/qgswmsgetcontext.cpp index 538f517dc60c..c6b136a70799 100644 --- a/src/server/services/wms/qgswmsgetcontext.cpp +++ b/src/server/services/wms/qgswmsgetcontext.cpp @@ -29,22 +29,17 @@ namespace QgsWms const QgsServerRequest& request, QgsServerResponse& response ) { QgsServerRequest::Parameters params = request.parameters(); - try - { - Q_UNUSED( version ); - QgsWmsServer server( serverIface->configFilePath(), - *serverIface->serverSettings(), - params, - getConfigParser( serverIface ), - serverIface->accessControls() ); - QDomDocument doc = server.getContext(); - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } + Q_UNUSED( version ); + + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), + params, + getConfigParser( serverIface ), + serverIface->accessControls() ); + + QDomDocument doc = server.getContext(); + response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); + response.write( doc.toByteArray() ); } diff --git a/src/server/services/wms/qgswmsgetfeatureinfo.cpp b/src/server/services/wms/qgswmsgetfeatureinfo.cpp index bc34a4332bc3..2e28186b80f5 100644 --- a/src/server/services/wms/qgswmsgetfeatureinfo.cpp +++ b/src/server/services/wms/qgswmsgetfeatureinfo.cpp @@ -146,9 +146,8 @@ namespace QgsWms } else //unsupported format, set exception { - writeError( response, QStringLiteral( "InvalidFormat" ), - QString( "Feature info format '%1' is not supported. Possibilities are 'text/plain', 'text/html' or 'text/xml'." ).arg( infoFormat ) ); - return; + throw QgsServiceException( QStringLiteral( "InvalidFormat" ), + QString( "Feature info format '%1' is not supported. Possibilities are 'text/plain', 'text/html' or 'text/xml'." ).arg( infoFormat ) ); } response.setHeader( QStringLiteral( "Content-Type" ), infoFormat + QStringLiteral( "; charset=utf-8" ) ); @@ -165,17 +164,10 @@ namespace QgsWms *serverIface->serverSettings(), params, getConfigParser( serverIface ), serverIface->accessControls() ); - try - { - QDomDocument doc = server.getFeatureInfo( version ); - QString outputFormat = params.value( QStringLiteral( "INFO_FORMAT" ), QStringLiteral( "text/plain" ) ); - writeInfoResponse( doc, response, outputFormat ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } + QDomDocument doc = server.getFeatureInfo( version ); + QString outputFormat = params.value( QStringLiteral( "INFO_FORMAT" ), QStringLiteral( "text/plain" ) ); + writeInfoResponse( doc, response, outputFormat ); } diff --git a/src/server/services/wms/qgswmsgetlegendgraphics.cpp b/src/server/services/wms/qgswmsgetlegendgraphics.cpp index b55e523c2c5b..b5c37acd9092 100644 --- a/src/server/services/wms/qgswmsgetlegendgraphics.cpp +++ b/src/server/services/wms/qgswmsgetlegendgraphics.cpp @@ -33,25 +33,22 @@ namespace QgsWms QgsServerRequest::Parameters params = request.parameters(); QgsWmsConfigParser* parser = getConfigParser( serverIface ); - QgsWmsServer server( serverIface->configFilePath(), *serverIface->serverSettings(), - params, parser, serverIface->accessControls() ); - try + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), + params, parser, + serverIface->accessControls() ); + + QScopedPointer result( server.getLegendGraphics() ); + + if ( !result.isNull() ) { - QScopedPointer result( server.getLegendGraphics() ); - if ( !result.isNull() ) - { - QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) ); - writeImage( response, *result, format, server.getImageQuality() ); - } - else - { - writeError( response, QStringLiteral( "UnknownError" ), - QStringLiteral( "Failed to compute GetLegendGraphics image" ) ); - } + QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) ); + writeImage( response, *result, format, server.getImageQuality() ); } - catch ( QgsMapServiceException& ex ) + else { - writeError( response, ex.code(), ex.message() ); + throw QgsServiceException( QStringLiteral( "UnknownError" ), + QStringLiteral( "Failed to compute GetLegendGraphics image" ) ); } } diff --git a/src/server/services/wms/qgswmsgetmap.cpp b/src/server/services/wms/qgswmsgetmap.cpp index a24d66f39b3d..ef3e178312a2 100644 --- a/src/server/services/wms/qgswmsgetmap.cpp +++ b/src/server/services/wms/qgswmsgetmap.cpp @@ -37,23 +37,17 @@ namespace QgsWms QgsWmsServer server( serverIface->configFilePath(), *serverIface->serverSettings(), params, parser, serverIface->accessControls() ); - try + + QScopedPointer result( server.getMap() ); + if ( !result.isNull() ) { - QScopedPointer result( server.getMap() ); - if ( !result.isNull() ) - { - QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) ); - writeImage( response, *result, format, server.getImageQuality() ); - } - else - { - writeError( response, QStringLiteral( "UnknownError" ), - QStringLiteral( "Failed to compute GetMap image" ) ); - } + QString format = params.value( QStringLiteral( "FORMAT" ), QStringLiteral( "PNG" ) ); + writeImage( response, *result, format, server.getImageQuality() ); } - catch ( QgsMapServiceException& ex ) + else { - writeError( response, ex.code(), ex.message() ); + throw QgsServiceException( QStringLiteral( "UnknownError" ), + QStringLiteral( "Failed to compute GetMap image" ) ); } } diff --git a/src/server/services/wms/qgswmsgetprint.cpp b/src/server/services/wms/qgswmsgetprint.cpp index a957252afc5b..9790735e703d 100644 --- a/src/server/services/wms/qgswmsgetprint.cpp +++ b/src/server/services/wms/qgswmsgetprint.cpp @@ -28,51 +28,46 @@ namespace QgsWms const QgsServerRequest& request, QgsServerResponse& response ) { QgsServerRequest::Parameters params = request.parameters(); - try - { - Q_UNUSED( version ); - QgsWmsServer server( serverIface->configFilePath(), - *serverIface->serverSettings(), params, - getConfigParser( serverIface ), - serverIface->accessControls() ); - QString format = params.value( "FORMAT" ); - QString contentType; + Q_UNUSED( version ); + + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), params, + getConfigParser( serverIface ), + serverIface->accessControls() ); - // GetPrint supports svg/png/pdf - if ( format.compare( QStringLiteral( "image/png" ), Qt::CaseInsensitive ) == 0 || - format.compare( QStringLiteral( "png" ), Qt::CaseInsensitive ) == 0 ) - { - format = "png"; - contentType = "image/png"; - } - else if ( format.compare( QStringLiteral( "image/svg" ), Qt::CaseInsensitive ) == 0 || - format.compare( QStringLiteral( "image/svg+xml" ), Qt::CaseInsensitive ) == 0 || - format.compare( QStringLiteral( "svg" ), Qt::CaseInsensitive ) == 0 ) - { - format = "svg"; - contentType = "image/svg+xml"; - } - else if ( format.compare( QStringLiteral( "application/pdf" ), Qt::CaseInsensitive ) == 0 || - format.compare( QStringLiteral( "pdf" ), Qt::CaseInsensitive ) == 0 ) - { - format = "pdf"; - contentType = "application/pdf"; - } - else - { - writeError( response, QStringLiteral( "InvalidFormat" ), - QString( "Output format %1 is not supported by the GetPrint request" ).arg( format ) ); - } + QString format = params.value( "FORMAT" ); + QString contentType; - QScopedPointer result( server.getPrint( format ) ); - response.setHeader( QStringLiteral( "Content-Type" ), contentType ); - response.write( *result ); + // GetPrint supports svg/png/pdf + if ( format.compare( QStringLiteral( "image/png" ), Qt::CaseInsensitive ) == 0 || + format.compare( QStringLiteral( "png" ), Qt::CaseInsensitive ) == 0 ) + { + format = "png"; + contentType = "image/png"; + } + else if ( format.compare( QStringLiteral( "image/svg" ), Qt::CaseInsensitive ) == 0 || + format.compare( QStringLiteral( "image/svg+xml" ), Qt::CaseInsensitive ) == 0 || + format.compare( QStringLiteral( "svg" ), Qt::CaseInsensitive ) == 0 ) + { + format = "svg"; + contentType = "image/svg+xml"; + } + else if ( format.compare( QStringLiteral( "application/pdf" ), Qt::CaseInsensitive ) == 0 || + format.compare( QStringLiteral( "pdf" ), Qt::CaseInsensitive ) == 0 ) + { + format = "pdf"; + contentType = "application/pdf"; } - catch ( QgsMapServiceException& ex ) + else { - writeError( response, ex.code(), ex.message() ); + throw QgsServiceException( QStringLiteral( "InvalidFormat" ), + QString( "Output format %1 is not supported by the GetPrint request" ).arg( format ) ); } + + QScopedPointer result( server.getPrint( format ) ); + response.setHeader( QStringLiteral( "Content-Type" ), contentType ); + response.write( *result ); } } // samespace QgsWms diff --git a/src/server/services/wms/qgswmsgetschemaextension.cpp b/src/server/services/wms/qgswmsgetschemaextension.cpp index 84e4e74555c6..5934dc2b1b2f 100644 --- a/src/server/services/wms/qgswmsgetschemaextension.cpp +++ b/src/server/services/wms/qgswmsgetschemaextension.cpp @@ -30,22 +30,16 @@ namespace QgsWms { Q_UNUSED( version ); QgsServerRequest::Parameters params = request.parameters(); - try - { - QgsWmsServer server( serverIface->configFilePath(), - *serverIface->serverSettings(), params, - getConfigParser( serverIface ), - serverIface->accessControls() ); - QDomDocument doc = server.getSchemaExtension(); - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } - } + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), params, + getConfigParser( serverIface ), + serverIface->accessControls() ); + + QDomDocument doc = server.getSchemaExtension(); + response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); + response.write( doc.toByteArray() ); + } } // samespace QgsWms diff --git a/src/server/services/wms/qgswmsgetstyle.cpp b/src/server/services/wms/qgswmsgetstyle.cpp index 287fcb240f91..281eaa729fe4 100644 --- a/src/server/services/wms/qgswmsgetstyle.cpp +++ b/src/server/services/wms/qgswmsgetstyle.cpp @@ -30,23 +30,17 @@ namespace QgsWms { QgsServerRequest::Parameters params = request.parameters(); - try - { - Q_UNUSED( version ); - QgsWmsServer server( serverIface->configFilePath(), - *serverIface->serverSettings(), params, - getConfigParser( serverIface ), - serverIface->accessControls() ); - QDomDocument doc = server.getStyle(); - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } - } + Q_UNUSED( version ); + + QgsWmsServer server( serverIface->configFilePath(), + *serverIface->serverSettings(), params, + getConfigParser( serverIface ), + serverIface->accessControls() ); + QDomDocument doc = server.getStyle(); + response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); + response.write( doc.toByteArray() ); + } } // samespace QgsWms diff --git a/src/server/services/wms/qgswmsgetstyles.cpp b/src/server/services/wms/qgswmsgetstyles.cpp index 32d819080e00..c0779eebda90 100644 --- a/src/server/services/wms/qgswmsgetstyles.cpp +++ b/src/server/services/wms/qgswmsgetstyles.cpp @@ -34,16 +34,10 @@ namespace QgsWms *serverIface->serverSettings(), params, getConfigParser( serverIface ), serverIface->accessControls() ); - try - { - QDomDocument doc = server.getStyles(); - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - catch ( QgsMapServiceException& ex ) - { - writeError( response, ex.code(), ex.message() ); - } + + QDomDocument doc = server.getStyles(); + response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); + response.write( doc.toByteArray() ); } diff --git a/src/server/services/wms/qgswmsservertransitional.cpp b/src/server/services/wms/qgswmsservertransitional.cpp index 7b9d15aff11f..29b7359c414b 100644 --- a/src/server/services/wms/qgswmsservertransitional.cpp +++ b/src/server/services/wms/qgswmsservertransitional.cpp @@ -42,7 +42,6 @@ #include "qgsvectorlayer.h" #include "qgslogger.h" #include "qgsmessagelog.h" -#include "qgsmapserviceexception.h" #include "qgssldconfigparser.h" #include "qgssymbol.h" #include "qgsrenderer.h" @@ -53,6 +52,7 @@ #include "qgsaccesscontrol.h" #include "qgsfeaturerequest.h" #include "qgsmaprendererjobproxy.h" +#include "qgswmsserviceexception.h" #include #include @@ -405,7 +405,7 @@ namespace QgsWms ok = true; if ( d[2] <= d[0] || d[3] <= d[1] ) { - throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" ); + throw QgsServiceException( "InvalidParameterValue", "BBOX is empty" ); } return QgsRectangle( d[0], d[1], d[2], d[3] ); } @@ -419,11 +419,11 @@ namespace QgsWms } if ( !mParameters.contains( QStringLiteral( "LAYER" ) ) && !mParameters.contains( QStringLiteral( "LAYERS" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "LAYER is mandatory for GetLegendGraphic operation" ) ); + throw QgsServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "LAYER is mandatory for GetLegendGraphic operation" ) ); } if ( !mParameters.contains( QStringLiteral( "FORMAT" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "FormatNotSpecified" ), QStringLiteral( "FORMAT is mandatory for GetLegendGraphic operation" ) ); + throw QgsServiceException( QStringLiteral( "FormatNotSpecified" ), QStringLiteral( "FORMAT is mandatory for GetLegendGraphic operation" ) ); } bool contentBasedLegend = false; @@ -436,10 +436,10 @@ namespace QgsWms bool bboxOk; contentBasedLegendExtent = _parseBBOX( mParameters[QStringLiteral( "BBOX" )], bboxOk ); if ( !bboxOk || contentBasedLegendExtent.isEmpty() ) - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Invalid BBOX parameter" ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Invalid BBOX parameter" ) ); if ( mParameters.contains( QStringLiteral( "RULE" ) ) ) - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "BBOX parameter cannot be combined with RULE" ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "BBOX parameter cannot be combined with RULE" ) ); } QStringList layersList, stylesList; @@ -635,7 +635,7 @@ namespace QgsWms #ifdef HAVE_SERVER_PYTHON_PLUGINS if ( !mAccessControl->layerReadPermission( nodeLayer->layer() ) ) { - throw QgsMapServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + nodeLayer->layer()->name() ); + throw QgsServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + nodeLayer->layer()->name() ); } #endif @@ -877,12 +877,12 @@ namespace QgsWms QDomDocument doc; if ( !mParameters.contains( QStringLiteral( "STYLE" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "StyleNotSpecified" ), QStringLiteral( "Style is mandatory for GetStyle operation" ) ); + throw QgsServiceException( QStringLiteral( "StyleNotSpecified" ), QStringLiteral( "Style is mandatory for GetStyle operation" ) ); } if ( !mParameters.contains( QStringLiteral( "LAYER" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layer is mandatory for GetStyle operation" ) ); + throw QgsServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layer is mandatory for GetStyle operation" ) ); } QString styleName = mParameters[ QStringLiteral( "STYLE" )]; @@ -897,13 +897,13 @@ namespace QgsWms QDomDocument doc; if ( !mParameters.contains( QStringLiteral( "LAYERS" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layers is mandatory for GetStyles operation" ) ); + throw QgsServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layers is mandatory for GetStyles operation" ) ); } QStringList layersList = mParameters[ QStringLiteral( "LAYERS" )].split( QStringLiteral( "," ), QString::SkipEmptyParts ); if ( layersList.size() < 1 ) { - throw QgsMapServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layers is mandatory for GetStyles operation" ) ); + throw QgsServiceException( QStringLiteral( "LayerNotSpecified" ), QStringLiteral( "Layers is mandatory for GetStyles operation" ) ); } return mConfigParser->getStyles( layersList ); @@ -914,22 +914,22 @@ namespace QgsWms { if ( !mParameters.contains( QStringLiteral( "SLD_VERSION" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "MissingParameterValue" ), QStringLiteral( "SLD_VERSION is mandatory for DescribeLayer operation" ) ); + throw QgsServiceException( QStringLiteral( "MissingParameterValue" ), QStringLiteral( "SLD_VERSION is mandatory for DescribeLayer operation" ) ); } if ( mParameters[ QStringLiteral( "SLD_VERSION" )] != QLatin1String( "1.1.0" ) ) { - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "SLD_VERSION = %1 is not supported" ).arg( mParameters[ QStringLiteral( "SLD_VERSION" )] ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "SLD_VERSION = %1 is not supported" ).arg( mParameters[ QStringLiteral( "SLD_VERSION" )] ) ); } if ( !mParameters.contains( QStringLiteral( "LAYERS" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "MissingParameterValue" ), QStringLiteral( "LAYERS is mandatory for DescribeLayer operation" ) ); + throw QgsServiceException( QStringLiteral( "MissingParameterValue" ), QStringLiteral( "LAYERS is mandatory for DescribeLayer operation" ) ); } QStringList layersList = mParameters[ QStringLiteral( "LAYERS" )].split( QStringLiteral( "," ), QString::SkipEmptyParts ); if ( layersList.size() < 1 ) { - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Layers is empty" ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Layers is empty" ) ); } //Prepare url @@ -958,7 +958,7 @@ namespace QgsWms { if ( !mAccessControl->layerReadPermission( layer ) ) { - throw QgsMapServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + layer->name() ); + throw QgsServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + layer->name() ); } } #endif @@ -979,7 +979,7 @@ namespace QgsWms if ( !mParameters.contains( QStringLiteral( "TEMPLATE" ) ) ) { clearFeatureSelections( selectedLayerIdList ); - throw QgsMapServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "The TEMPLATE parameter is required for the GetPrint request" ) ); + throw QgsServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "The TEMPLATE parameter is required for the GetPrint request" ) ); } QList< QPair< QgsVectorLayer*, QgsFeatureRenderer*> > bkVectorRenderers; @@ -1056,7 +1056,7 @@ namespace QgsWms { restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies ); clearFeatureSelections( selectedLayerIdList ); - throw QgsMapServiceException( QStringLiteral( "InvalidFormat" ), "Output format '" + formatString + "' is not supported in the GetPrint request" ); + throw QgsServiceException( QStringLiteral( "InvalidFormat" ), "Output format '" + formatString + "' is not supported in the GetPrint request" ); } restoreOpacities( bkVectorRenderers, bkRasterRenderers, labelTransparencies, labelBufferTransparencies ); @@ -1095,7 +1095,7 @@ namespace QgsWms { if ( !checkMaximumWidthHeight() ) { - throw QgsMapServiceException( QStringLiteral( "Size error" ), QStringLiteral( "The requested map size is too large" ) ); + throw QgsServiceException( QStringLiteral( "Size error" ), QStringLiteral( "The requested map size is too large" ) ); } QStringList layersList, stylesList, layerIdList; QImage* theImage = initializeRendering( layersList, stylesList, layerIdList, mapSettings ); @@ -1116,7 +1116,7 @@ namespace QgsWms { if ( !mAccessControl->layerReadPermission( layer ) ) { - throw QgsMapServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + layer->name() ); + throw QgsServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + layer->name() ); } } #endif @@ -1193,7 +1193,7 @@ namespace QgsWms //check if i, j are in the pixel range of the image if ( i < 0 || i > mapSettings.outputSize().width() || j < 0 || j > mapSettings.outputSize().height() ) { - throw QgsMapServiceException( "InvalidPoint", "I/J parameters not within the pixel range" ); + throw QgsServiceException( "InvalidPoint", "I/J parameters not within the pixel range" ); } double xRes = mapSettings.extent().width() / mapSettings.outputSize().width(); @@ -1250,13 +1250,13 @@ namespace QgsWms //read QUERY_LAYERS if ( !mParameters.contains( QStringLiteral( "QUERY_LAYERS" ) ) ) { - throw QgsMapServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "No QUERY_LAYERS" ) ); + throw QgsServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "No QUERY_LAYERS" ) ); } QStringList queryLayerList = mParameters[ QStringLiteral( "QUERY_LAYERS" )].split( QStringLiteral( "," ), QString::SkipEmptyParts ); if ( queryLayerList.size() < 1 ) { - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Malformed QUERY_LAYERS" ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Malformed QUERY_LAYERS" ) ); } //read I,J resp. X,Y @@ -1297,7 +1297,7 @@ namespace QgsWms } else { - throw QgsMapServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "I/J parameters are required for GetFeatureInfo" ) ); + throw QgsServiceException( QStringLiteral( "ParameterMissing" ), QStringLiteral( "I/J parameters are required for GetFeatureInfo" ) ); } } else @@ -1388,7 +1388,7 @@ namespace QgsWms #ifdef HAVE_SERVER_PYTHON_PLUGINS if ( !mAccessControl->layerReadPermission( currentLayer ) ) { - throw QgsMapServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + currentLayer->name() ); + throw QgsServiceException( QStringLiteral( "Security" ), "You are not allowed to access to the layer: " + currentLayer->name() ); } #endif @@ -1706,12 +1706,12 @@ namespace QgsWms if ( !bboxOk ) { //throw a service exception - throw QgsMapServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Invalid BBOX parameter" ) ); + throw QgsServiceException( QStringLiteral( "InvalidParameterValue" ), QStringLiteral( "Invalid BBOX parameter" ) ); } if ( mParameters.contains( "BBOX" ) && mapExtent.isEmpty() ) { - throw QgsMapServiceException( "InvalidParameterValue", "BBOX is empty" ); + throw QgsServiceException( "InvalidParameterValue", "BBOX is empty" ); } QgsUnitTypes::DistanceUnit mapUnits = QgsUnitTypes::DistanceDegrees; @@ -1743,7 +1743,7 @@ namespace QgsWms if ( !outputCRS.isValid() ) { QgsMessageLog::logMessage( QStringLiteral( "Error, could not create output CRS from EPSG" ) ); - throw QgsMapServiceException( QStringLiteral( "InvalidCRS" ), QStringLiteral( "Could not create output CRS" ) ); + throw QgsServiceException( QStringLiteral( "InvalidCRS" ), QStringLiteral( "Could not create output CRS" ) ); } //then set destinationCrs @@ -2220,7 +2220,7 @@ namespace QgsWms else { QgsMessageLog::logMessage( QStringLiteral( "Layer or style not defined, aborting" ) ); - throw QgsMapServiceException( QStringLiteral( "LayerNotDefined" ), "Layer '" + *llstIt + "' and/or style '" + styleName + "' not defined" ); + throw QgsServiceException( QStringLiteral( "LayerNotDefined" ), "Layer '" + *llstIt + "' and/or style '" + styleName + "' not defined" ); } } @@ -2256,10 +2256,10 @@ namespace QgsWms //filter string could be unsafe (danger of sql injection) if ( !testFilterStringSafety( eqSplit.at( 1 ) ) ) { - throw QgsMapServiceException( QStringLiteral( "Filter string rejected" ), "The filter string " + eqSplit.at( 1 ) + - " has been rejected because of security reasons. Note: Text strings have to be enclosed in single or double quotes. " + - "A space between each word / special character is mandatory. Allowed Keywords and special characters are " + - "AND,OR,IN,<,>=,>,>=,!=,',',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression." ); + throw QgsServiceException( QStringLiteral( "Filter string rejected" ), "The filter string " + eqSplit.at( 1 ) + + " has been rejected because of security reasons. Note: Text strings have to be enclosed in single or double quotes. " + + "A space between each word / special character is mandatory. Allowed Keywords and special characters are " + + "AND,OR,IN,<,>=,>,>=,!=,',',(,),DMETAPHONE,SOUNDEX. Not allowed are semicolons in the filter expression." ); } //we need to find the maplayer objects matching the layer name diff --git a/src/server/qgsmapserviceexception.cpp b/src/server/services/wms/qgswmsserviceexception.h similarity index 51% rename from src/server/qgsmapserviceexception.cpp rename to src/server/services/wms/qgswmsserviceexception.h index 57559e1622e4..34cfa6caf239 100644 --- a/src/server/qgsmapserviceexception.cpp +++ b/src/server/services/wms/qgswmsserviceexception.h @@ -1,6 +1,6 @@ /*************************************************************************** - qgsmapserviceexception.h - ------------------- + qgsserviceexception.h + ------------------------ begin : June 13, 2006 copyright : (C) 2006 by Marco Hugentobler email : marco dot hugentobler at karto dot baug dot ethz dot ch @@ -15,11 +15,36 @@ * * ***************************************************************************/ -#include "qgsmapserviceexception.h" +#ifndef QGSWMSSERVICEEXCEPTION_H +#define QGSWMSSERVICEEXCEPTION_H -QgsMapServiceException::QgsMapServiceException( const QString& code, const QString& message ): - QgsException( message ), - mCode( code ), mMessage( message ) +#include + +#include "qgsserverexception.h" + +namespace QgsWms { -} + /** \ingroup server + * \class QgsserviceException + * \brief Exception class for WMS service exceptions. + * + * The most important codes are: + * * "InvalidFormat" + * * "Invalid CRS" + * * "LayerNotDefined" / "StyleNotDefined" + * * "OperationNotSupported" + */ + class QgsServiceException : public QgsOgcServiceException + { + public: + QgsServiceException( const QString& code, const QString& message, const QString& locator = QString(), + int responseCode = 200 ) + : QgsOgcServiceException( code, message, locator, responseCode, QStringLiteral( "1.3.0" ) ) + {} + }; + + +} // namespace QgsWms + +#endif diff --git a/src/server/services/wms/qgswmsutils.cpp b/src/server/services/wms/qgswmsutils.cpp index cb697d75d633..187e74ac5d89 100644 --- a/src/server/services/wms/qgswmsutils.cpp +++ b/src/server/services/wms/qgswmsutils.cpp @@ -25,7 +25,6 @@ namespace QgsWms { - typedef QList< QPair > QgsColorBox; //Color / number of pixels typedef QMultiMap< int, QgsColorBox > QgsColorBoxMap; // sum of pixels / color box @@ -42,35 +41,13 @@ namespace QgsWms QgsWmsConfigParser* parser = QgsConfigCache::instance()->wmsConfiguration( configFilePath, serverIface->accessControls() ); if ( !parser ) { - throw QgsMapServiceException( + throw QgsServiceException( QStringLiteral( "WMS configuration error" ), QStringLiteral( "There was an error reading the project file or the SLD configuration" ) ); - } return parser; } - // Output a wms standard error - void writeError( QgsServerResponse& response, const QString& code, const QString& message ) - { - // WMS errors return erros with http 200 - // XXX Do we really need to use a QDomDocument here ? - QDomDocument doc; - QDomElement root = doc.createElement( QStringLiteral( "ServiceExceptionReport" ) ); - root.setAttribute( QStringLiteral( "version" ), ImplementationVersion() ); - root.setAttribute( QStringLiteral( "xmlns" ) , QStringLiteral( "http://www.opengis.net/ogc" ) ); - doc.appendChild( root ); - - QDomElement elem = doc.createElement( QStringLiteral( "ServiceException" ) ); - elem.setAttribute( QStringLiteral( "code" ), code ); - QDomText messageText = doc.createTextNode( message ); - elem.appendChild( messageText ); - root.appendChild( elem ); - - response.setHeader( QStringLiteral( "Content-Type" ), QStringLiteral( "text/xml; charset=utf-8" ) ); - response.write( doc.toByteArray() ); - } - ImageOutputFormat parseImageFormat( const QString& format ) { if ( format.compare( QLatin1String( "png" ), Qt::CaseInsensitive ) == 0 || @@ -164,8 +141,8 @@ namespace QgsWms } else { - writeError( response, "InvalidFormat", - QString( "Output format '%1' is not supported in the GetMap request" ).arg( formatStr ) ); + throw QgsServiceException( "InvalidFormat", + QString( "Output format '%1' is not supported in the GetMap request" ).arg( formatStr ) ); } } diff --git a/src/server/services/wms/qgswmsutils.h b/src/server/services/wms/qgswmsutils.h index aa56b121cf5a..8bc145e427e9 100644 --- a/src/server/services/wms/qgswmsutils.h +++ b/src/server/services/wms/qgswmsutils.h @@ -25,7 +25,7 @@ #include "qgsmodule.h" #include "qgswmsconfigparser.h" -#include "qgsmapserviceexception.h" +#include "qgswmsserviceexception.h" /** * \ingroup server @@ -51,10 +51,6 @@ namespace QgsWms */ QString ImplementationVersion(); - /** Send WMS standard XML Error respons - */ - void writeError( QgsServerResponse& response, const QString& code, const QString& message ); - /** Parse image format parameter * @return OutputFormat */ From 5abe66b4c779801403ee7395b4eee48945c1c552 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 15 Jan 2017 12:24:59 +0100 Subject: [PATCH 051/332] GML parser: do not use layer extent as feature geometry if the feature has no geometry --- src/core/qgsgml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/qgsgml.cpp b/src/core/qgsgml.cpp index b98e0d487646..cc9890146ea0 100644 --- a/src/core/qgsgml.cpp +++ b/src/core/qgsgml.cpp @@ -904,6 +904,7 @@ void QgsGmlStreamingParser::endElement( const XML_Char* el ) mCurrentFeature == nullptr && mFeatureCount == 0 ) { mLayerExtent = mCurrentExtent; + mCurrentExtent = QgsRectangle(); } mParseModeStack.pop(); From 6ba303e3ad076a0286363d7ec78a9e50e804170f Mon Sep 17 00:00:00 2001 From: Jorge Gustavo Rocha Date: Sun, 15 Jan 2017 19:47:01 +0000 Subject: [PATCH 052/332] SLD parsing: handling ogc:Literal within CssParameter --- src/core/symbology-ng/qgssymbollayerutils.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/core/symbology-ng/qgssymbollayerutils.cpp b/src/core/symbology-ng/qgssymbollayerutils.cpp index 2e7bccc3f607..16b87ca21af9 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.cpp +++ b/src/core/symbology-ng/qgssymbollayerutils.cpp @@ -2566,6 +2566,7 @@ QDomElement QgsSymbolLayerUtils::createSvgParameterElement( QDomDocument &doc, c QgsStringMap QgsSymbolLayerUtils::getSvgParameterList( QDomElement &element ) { QgsStringMap params; + QString value; QDomElement paramElem = element.firstChildElement(); while ( !paramElem.isNull() ) @@ -2573,7 +2574,23 @@ QgsStringMap QgsSymbolLayerUtils::getSvgParameterList( QDomElement &element ) if ( paramElem.localName() == QLatin1String( "SvgParameter" ) || paramElem.localName() == QLatin1String( "CssParameter" ) ) { QString name = paramElem.attribute( QStringLiteral( "name" ) ); - QString value = paramElem.firstChild().nodeValue(); + if (paramElem.firstChild().nodeType() == QDomNode::TextNode) + { + value = paramElem.firstChild().nodeValue(); + } + else + { + if (paramElem.firstChild().nodeType() == QDomNode::ElementNode && + paramElem.firstChild().localName() == QLatin1String("Literal")) + { + QgsDebugMsg(paramElem.firstChild().localName()); + value = paramElem.firstChild().firstChild().nodeValue(); + } + else + { + QgsDebugMsg(QString("unexpected child of %1").arg(paramElem.localName())); + } + } if ( !name.isEmpty() && !value.isEmpty() ) params[ name ] = value; From 2de18c92fc0498747262ba8a34ea4de9a5350534 Mon Sep 17 00:00:00 2001 From: Jorge Gustavo Rocha Date: Sun, 15 Jan 2017 23:41:32 +0000 Subject: [PATCH 053/332] SLD parsing: handling ogc:Literal within CssParameter --- src/core/symbology-ng/qgssymbollayerutils.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/symbology-ng/qgssymbollayerutils.cpp b/src/core/symbology-ng/qgssymbollayerutils.cpp index 16b87ca21af9..c7ca5b78bd1d 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.cpp +++ b/src/core/symbology-ng/qgssymbollayerutils.cpp @@ -2574,21 +2574,21 @@ QgsStringMap QgsSymbolLayerUtils::getSvgParameterList( QDomElement &element ) if ( paramElem.localName() == QLatin1String( "SvgParameter" ) || paramElem.localName() == QLatin1String( "CssParameter" ) ) { QString name = paramElem.attribute( QStringLiteral( "name" ) ); - if (paramElem.firstChild().nodeType() == QDomNode::TextNode) + if ( paramElem.firstChild().nodeType() == QDomNode::TextNode ) { value = paramElem.firstChild().nodeValue(); } else { - if (paramElem.firstChild().nodeType() == QDomNode::ElementNode && - paramElem.firstChild().localName() == QLatin1String("Literal")) + if ( paramElem.firstChild().nodeType() == QDomNode::ElementNode && + paramElem.firstChild().localName() == QLatin1String( "Literal" ) ) { - QgsDebugMsg(paramElem.firstChild().localName()); + QgsDebugMsg( paramElem.firstChild().localName() ); value = paramElem.firstChild().firstChild().nodeValue(); } else { - QgsDebugMsg(QString("unexpected child of %1").arg(paramElem.localName())); + QgsDebugMsg( QString( "unexpected child of %1" ).arg( paramElem.localName() ) ); } } From e0934d7766f626731b3a8e3c436727ffa1700e7c Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 15 Jan 2017 13:14:16 +1000 Subject: [PATCH 054/332] [composer][needs-docs] Rename "world file map" option to "reference map" This option will be used for more than just world file generation, and instead will indicate which map should be considered the master map for the composition from which any composer properties calculating map units will derive the scale from. --- doc/api_break.dox | 1 + python/core/composer/qgscomposition.sip | 15 +- src/app/composer/qgscomposer.cpp | 8 +- src/app/composer/qgscompositionwidget.cpp | 14 +- src/app/composer/qgscompositionwidget.h | 2 +- src/core/composer/qgscomposition.cpp | 10 +- src/core/composer/qgscomposition.h | 16 +- src/ui/composer/qgscompositionwidgetbase.ui | 191 ++++++++++---------- tests/src/core/testqgscomposermap.cpp | 2 +- tests/src/core/testqgscomposition.cpp | 2 +- tests/src/python/test_qgscomposermap.py | 2 +- 11 files changed, 129 insertions(+), 134 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 2ee5f3b0ba28..662364cb9d4d 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -646,6 +646,7 @@ were removed. Use setSnapTolerance() and snapTolerance() instead. - sortZList() was removed. Use refreshZList() instead. - addComposerTable(), composerTableAdded() were removed. - setAllUnselected() has been renamed to setAllDeselected. +- worldFileMap() and setWorldFileMap() have been renamed to referenceMap() and setReferenceMap() QgsCoordinateReferenceSystem {#qgis_api_break_3_0_QgsCoordinateReferenceSystem} diff --git a/python/core/composer/qgscomposition.sip b/python/core/composer/qgscomposition.sip index 7a351a75f765..3a063e7d9d91 100644 --- a/python/core/composer/qgscomposition.sip +++ b/python/core/composer/qgscomposition.sip @@ -359,20 +359,9 @@ class QgsComposition : QGraphicsScene, QgsExpressionContextGenerator */ void setGenerateWorldFile( bool enabled ); - /** Returns the map item which will be used to generate corresponding world files when the - * composition is exported, or nullptr if no corresponding map is set. - * @see setWorldFileMap() - * @see generateWorldFile() - */ - QgsComposerMap* worldFileMap() const; + QgsComposerMap* referenceMap() const; - /** Sets the map item which will be used to generate corresponding world files when the - * composition is exported. - * @param map composer map item - * @see worldFileMap() - * @see setGenerateWorldFile() - */ - void setWorldFileMap( QgsComposerMap* map ); + void setReferenceMap( QgsComposerMap* map ); /** Returns true if a composition should use advanced effects such as blend modes */ bool useAdvancedEffects() const; diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index fff7ab7d3e2f..0b0fcd4ada20 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -2077,9 +2077,9 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode ) mView->setPaintingEnabled( false ); int worldFilePageNo = -1; - if ( mComposition->worldFileMap() ) + if ( mComposition->referenceMap() ) { - worldFilePageNo = mComposition->worldFileMap()->page() - 1; + worldFilePageNo = mComposition->referenceMap()->page() - 1; } for ( int i = 0; i < mComposition->numPages(); ++i ) @@ -2315,9 +2315,9 @@ void QgsComposer::exportCompositionAsImage( QgsComposer::OutputMode mode ) QString filename = QDir( dir ).filePath( atlasMap->currentFilename() ) + fileExt; int worldFilePageNo = -1; - if ( mComposition->worldFileMap() ) + if ( mComposition->referenceMap() ) { - worldFilePageNo = mComposition->worldFileMap()->page() - 1; + worldFilePageNo = mComposition->referenceMap()->page() - 1; } for ( int i = 0; i < mComposition->numPages(); ++i ) diff --git a/src/app/composer/qgscompositionwidget.cpp b/src/app/composer/qgscompositionwidget.cpp index cb1816afa712..268d21fe0beb 100644 --- a/src/app/composer/qgscompositionwidget.cpp +++ b/src/app/composer/qgscompositionwidget.cpp @@ -82,9 +82,9 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c ) mGenerateWorldFileCheckBox->setChecked( mComposition->generateWorldFile() ); // populate the map list - mWorldFileMapComboBox->setComposition( mComposition ); - mWorldFileMapComboBox->setItemType( QgsComposerItem::ComposerMap ); - mWorldFileMapComboBox->setItem( mComposition->worldFileMap() ); + mReferenceMapComboBox->setComposition( mComposition ); + mReferenceMapComboBox->setItemType( QgsComposerItem::ComposerMap ); + mReferenceMapComboBox->setItem( mComposition->referenceMap() ); mSnapToleranceSpinBox->setValue( mComposition->snapTolerance() ); @@ -124,7 +124,7 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c ) connect( mPaperOrientationDDBtn, SIGNAL( dataDefinedActivated( bool ) ), this, SLOT( updateDataDefinedProperty() ) ); connect( mPaperOrientationDDBtn, SIGNAL( dataDefinedActivated( bool ) ), mPaperOrientationComboBox, SLOT( setDisabled( bool ) ) ); - connect( mWorldFileMapComboBox, SIGNAL( itemChanged( QgsComposerItem* ) ), this, SLOT( worldFileMapChanged( QgsComposerItem* ) ) ); + connect( mReferenceMapComboBox, &QgsComposerItemComboBox::itemChanged, this, &QgsCompositionWidget::referenceMapChanged ); //initialize data defined buttons populateDataDefinedButtons(); @@ -679,7 +679,7 @@ void QgsCompositionWidget::on_mGenerateWorldFileCheckBox_toggled( bool state ) mComposition->setGenerateWorldFile( state ); } -void QgsCompositionWidget::worldFileMapChanged( QgsComposerItem* item ) +void QgsCompositionWidget::referenceMapChanged( QgsComposerItem* item ) { if ( !mComposition ) { @@ -687,7 +687,7 @@ void QgsCompositionWidget::worldFileMapChanged( QgsComposerItem* item ) } QgsComposerMap* map = dynamic_cast< QgsComposerMap* >( item ); - mComposition->setWorldFileMap( map ); + mComposition->setReferenceMap( map ); } void QgsCompositionWidget::on_mGridResolutionSpinBox_valueChanged( double d ) @@ -738,6 +738,6 @@ void QgsCompositionWidget::blockSignals( bool block ) mOffsetYSpinBox->blockSignals( block ); mSnapToleranceSpinBox->blockSignals( block ); mGenerateWorldFileCheckBox->blockSignals( block ); - mWorldFileMapComboBox->blockSignals( block ); + mReferenceMapComboBox->blockSignals( block ); } diff --git a/src/app/composer/qgscompositionwidget.h b/src/app/composer/qgscompositionwidget.h index 70e9daae9e83..6bcdab1557b4 100644 --- a/src/app/composer/qgscompositionwidget.h +++ b/src/app/composer/qgscompositionwidget.h @@ -54,7 +54,7 @@ class QgsCompositionWidget: public QgsPanelWidget, private Ui::QgsCompositionWid void on_mResolutionSpinBox_valueChanged( const int value ); void on_mPrintAsRasterCheckBox_toggled( bool state ); void on_mGenerateWorldFileCheckBox_toggled( bool state ); - void worldFileMapChanged( QgsComposerItem* ); + void referenceMapChanged( QgsComposerItem* ); void on_mGridResolutionSpinBox_valueChanged( double d ); void on_mOffsetXSpinBox_valueChanged( double d ); diff --git a/src/core/composer/qgscomposition.cpp b/src/core/composer/qgscomposition.cpp index 9bcb31003f89..981a3eb34f8a 100644 --- a/src/core/composer/qgscomposition.cpp +++ b/src/core/composer/qgscomposition.cpp @@ -789,12 +789,12 @@ void QgsComposition::setPrintResolution( const int dpi ) mProject->setDirty( true ); } -QgsComposerMap* QgsComposition::worldFileMap() const +QgsComposerMap* QgsComposition::referenceMap() const { return dynamic_cast< QgsComposerMap* >( const_cast< QgsComposerItem* >( getComposerItemByUuid( mWorldFileMapId ) ) ); } -void QgsComposition::setWorldFileMap( QgsComposerMap* map ) +void QgsComposition::setReferenceMap( QgsComposerMap* map ) { mWorldFileMapId = map ? map->uuid() : QString(); mProject->setDirty( true ); @@ -3047,7 +3047,7 @@ void QgsComposition::renderRect( QPainter* p, const QRectF& rect ) double* QgsComposition::computeGeoTransform( const QgsComposerMap* map, const QRectF& region , double dpi ) const { if ( !map ) - map = worldFileMap(); + map = referenceMap(); if ( !map ) return nullptr; @@ -3151,7 +3151,7 @@ QGraphicsView *QgsComposition::graphicsView() const void QgsComposition::computeWorldFileParameters( double& a, double& b, double& c, double& d, double& e, double& f ) const { - const QgsComposerMap* map = worldFileMap(); + const QgsComposerMap* map = referenceMap(); if ( !map ) { return; @@ -3166,7 +3166,7 @@ void QgsComposition::computeWorldFileParameters( double& a, double& b, double& c void QgsComposition::computeWorldFileParameters( const QRectF& exportRegion, double& a, double& b, double& c, double& d, double& e, double& f ) const { // World file parameters : affine transformation parameters from pixel coordinates to map coordinates - QgsComposerMap* map = worldFileMap(); + QgsComposerMap* map = referenceMap(); if ( !map ) { return; diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index 9c4b9448a7af..5843cf31f2c2 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -411,7 +411,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo /** Returns true if the composition will generate corresponding world files when pages * are exported. * @see setGenerateWorldFile() - * @see worldFileMap() + * @see referenceMap() */ bool generateWorldFile() const { return mGenerateWorldFile; } @@ -419,24 +419,24 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo * are exported. * @param enabled set to true to generate world files * @see generateWorldFile() - * @see setWorldFileMap() + * @see setReferenceMap() */ void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; } /** Returns the map item which will be used to generate corresponding world files when the * composition is exported, or nullptr if no corresponding map is set. - * @see setWorldFileMap() + * @see setReferenceMap() * @see generateWorldFile() */ - QgsComposerMap* worldFileMap() const; + QgsComposerMap* referenceMap() const; /** Sets the map item which will be used to generate corresponding world files when the * composition is exported. * @param map composer map item - * @see worldFileMap() + * @see referenceMap() * @see setGenerateWorldFile() */ - void setWorldFileMap( QgsComposerMap* map ); + void setReferenceMap( QgsComposerMap* map ); //! Returns true if a composition should use advanced effects such as blend modes bool useAdvancedEffects() const {return mUseAdvancedEffects;} @@ -692,7 +692,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo /** Georeferences a file (image of PDF) exported from the composition. * @param file filename of exported file * @param referenceMap map item to use for georeferencing, or leave as nullptr to use the - * currently defined worldFileMap(). + * currently defined referenceMap(). * @param exportRegion set to a valid rectangle to indicate that only part of the composition was * exported * @param dpi set to DPI of exported file, or leave as -1 to use composition's DPI. @@ -1027,7 +1027,7 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo /** Computes a GDAL style geotransform for georeferencing a composition. * @param referenceMap map item to use for georeferencing, or leave as nullptr to use the - * currently defined worldFileMap(). + * currently defined referenceMap(). * @param exportRegion set to a valid rectangle to indicate that only part of the composition is * being exported * @param dpi allows overriding the default composition DPI, or leave as -1 to use composition's DPI. diff --git a/src/ui/composer/qgscompositionwidgetbase.ui b/src/ui/composer/qgscompositionwidgetbase.ui index c56c745c26d8..eab067995813 100644 --- a/src/ui/composer/qgscompositionwidgetbase.ui +++ b/src/ui/composer/qgscompositionwidgetbase.ui @@ -7,7 +7,7 @@ 0 0 345 - 506 + 464 @@ -59,12 +59,89 @@ 0 - -311 - 327 - 1113 + 0 + 329 + 1065 + + + + Qt::StrongFocus + + + General settings + + + + + + Change... + + + + + + + + + 1 + + + false + + + + + + + ... + + + + + + + + + Number of pages + + + true + + + + + + + Page background + + + + + + + Reference map + + + + + + + true + + + Specifies the master map for this composition, which is used to georeference composer exports and for scale calculation for item styles. + + + false + + + + + + @@ -372,60 +449,6 @@ - - - - Page settings - - - - - - Number of pages - - - true - - - - - - - - - 1 - - - false - - - - - - - ... - - - - - - - - - Page background - - - - - - - Change... - - - - - - @@ -484,26 +507,6 @@ - - - - Reference map - - - - - - - true - - - Specifies the map which is used to georeference composer exports - - - false - - - @@ -660,6 +663,18 @@ + + QgsCollapsibleGroupBox + QGroupBox +
    qgscollapsiblegroupbox.h
    + 1 +
    + + QgsVariableEditorWidget + QWidget +
    qgsvariableeditorwidget.h
    + 1 +
    QgsCollapsibleGroupBoxBasic QGroupBox @@ -686,21 +701,14 @@ QToolButton
    qgsdatadefinedbutton.h
    - - QgsCollapsibleGroupBox - QGroupBox -
    qgscollapsiblegroupbox.h
    - 1 -
    - - QgsVariableEditorWidget - QWidget -
    qgsvariableeditorwidget.h
    - 1 -
    scrollArea + groupBox_4 + mNumPagesSpinBox + mNumPagesDDBtn + mPageStyleButton + mReferenceMapComboBox groupBox mPaperSizeComboBox mPaperSizeDDBtn @@ -716,9 +724,6 @@ mRightMarginSpinBox mBottomMarginSpinBox mResizePageButton - mNumPagesSpinBox - mNumPagesDDBtn - mPageStyleButton mResolutionSpinBox mPrintAsRasterCheckBox mGenerateWorldFileCheckBox diff --git a/tests/src/core/testqgscomposermap.cpp b/tests/src/core/testqgscomposermap.cpp index bbf723c5d925..addb30598199 100644 --- a/tests/src/core/testqgscomposermap.cpp +++ b/tests/src/core/testqgscomposermap.cpp @@ -176,7 +176,7 @@ void TestQgsComposerMap::worldFileGeneration() mComposerMap->setMapRotation( 30.0 ); mComposition->setGenerateWorldFile( true ); - mComposition->setWorldFileMap( mComposerMap ); + mComposition->setReferenceMap( mComposerMap ); double a, b, c, d, e, f; mComposition->computeWorldFileParameters( a, b, c, d, e, f ); diff --git a/tests/src/core/testqgscomposition.cpp b/tests/src/core/testqgscomposition.cpp index 179665239301..cd3786631c76 100644 --- a/tests/src/core/testqgscomposition.cpp +++ b/tests/src/core/testqgscomposition.cpp @@ -543,7 +543,7 @@ void TestQgsComposition::georeference() delete[] t; // don't specify map - composition->setWorldFileMap( map ); + composition->setReferenceMap( map ); t = composition->computeGeoTransform(); QVERIFY( qgsDoubleNear( t[0], 1925.0, 1.0 ) ); QVERIFY( qgsDoubleNear( t[1], 0.211719, 0.0001 ) ); diff --git a/tests/src/python/test_qgscomposermap.py b/tests/src/python/test_qgscomposermap.py index 29d7a5d531a3..8a13d1476d4f 100644 --- a/tests/src/python/test_qgscomposermap.py +++ b/tests/src/python/test_qgscomposermap.py @@ -161,7 +161,7 @@ def testWorldFileGeneration(self): self.mComposerMap.setMapRotation(30.0) self.mComposition.setGenerateWorldFile(True) - self.mComposition.setWorldFileMap(self.mComposerMap) + self.mComposition.setReferenceMap(self.mComposerMap) p = self.mComposition.computeWorldFileParameters() pexpected = (4.180480199790922, 2.4133064516129026, 779443.7612381146, From f32d11b50879ad76eb1dfe9d55bf567d3cc7598e Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 09:25:47 +1000 Subject: [PATCH 055/332] [composer] Use largest map in composition as reference map if no reference map is explicitly set --- src/core/composer/qgscomposition.cpp | 19 ++++++++++++++- src/core/composer/qgscomposition.h | 3 ++- tests/src/core/testqgscomposition.cpp | 33 +++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/src/core/composer/qgscomposition.cpp b/src/core/composer/qgscomposition.cpp index 981a3eb34f8a..7b635d2f2f65 100644 --- a/src/core/composer/qgscomposition.cpp +++ b/src/core/composer/qgscomposition.cpp @@ -791,7 +791,24 @@ void QgsComposition::setPrintResolution( const int dpi ) QgsComposerMap* QgsComposition::referenceMap() const { - return dynamic_cast< QgsComposerMap* >( const_cast< QgsComposerItem* >( getComposerItemByUuid( mWorldFileMapId ) ) ); + // prefer explicitly set reference map + if ( QgsComposerMap* map = dynamic_cast< QgsComposerMap* >( const_cast< QgsComposerItem* >( getComposerItemByUuid( mWorldFileMapId ) ) ) ) + return map; + + // else try to find largest map + QList< const QgsComposerMap* > maps = composerMapItems(); + const QgsComposerMap* largestMap = nullptr; + double largestMapArea = 0; + Q_FOREACH ( const QgsComposerMap* map, maps ) + { + double area = map->rect().width() * map->rect().height(); + if ( area > largestMapArea ) + { + largestMapArea = area; + largestMap = map; + } + } + return const_cast< QgsComposerMap* >( largestMap ); } void QgsComposition::setReferenceMap( QgsComposerMap* map ) diff --git a/src/core/composer/qgscomposition.h b/src/core/composer/qgscomposition.h index 5843cf31f2c2..f7e9851e1b90 100644 --- a/src/core/composer/qgscomposition.h +++ b/src/core/composer/qgscomposition.h @@ -424,7 +424,8 @@ class CORE_EXPORT QgsComposition : public QGraphicsScene, public QgsExpressionCo void setGenerateWorldFile( bool enabled ) { mGenerateWorldFile = enabled; } /** Returns the map item which will be used to generate corresponding world files when the - * composition is exported, or nullptr if no corresponding map is set. + * composition is exported. If no map was explicitly set via setReferenceMap(), the largest + * map in the composition will be returned (or nullptr if there are no maps in the composition). * @see setReferenceMap() * @see generateWorldFile() */ diff --git a/tests/src/core/testqgscomposition.cpp b/tests/src/core/testqgscomposition.cpp index cd3786631c76..4798d8dedea2 100644 --- a/tests/src/core/testqgscomposition.cpp +++ b/tests/src/core/testqgscomposition.cpp @@ -57,6 +57,7 @@ class TestQgsComposition : public QObject void georeference(); void variablesEdited(); void itemVariablesFunction(); + void referenceMap(); private: QgsComposition *mComposition; @@ -639,5 +640,37 @@ void TestQgsComposition::itemVariablesFunction() delete composition; } +void TestQgsComposition::referenceMap() +{ + QgsRectangle extent( 2000, 2800, 2500, 2900 ); + QgsMapSettings ms; + ms.setExtent( extent ); + QgsComposition* composition = new QgsComposition( ms, QgsProject::instance() ); + + // no maps + QVERIFY( !composition->referenceMap() ); + + QgsComposerMap* map = new QgsComposerMap( composition ); + map->setNewExtent( extent ); + map->setSceneRect( QRectF( 30, 60, 200, 100 ) ); + composition->addComposerMap( map ); + + QCOMPARE( composition->referenceMap(), map ); + + // add a larger map + QgsComposerMap* map2 = new QgsComposerMap( composition ); + map2->setNewExtent( extent ); + map2->setSceneRect( QRectF( 30, 60, 250, 150 ) ); + composition->addComposerMap( map2 ); + + QCOMPARE( composition->referenceMap(), map2 ); + + // explicitly set reference map + composition->setReferenceMap( map ); + QCOMPARE( composition->referenceMap(), map ); + + delete composition; +} + QGSTEST_MAIN( TestQgsComposition ) #include "testqgscomposition.moc" From 8a722d29815320396fc14c97fd5ff0f13c679741 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 15 Jan 2017 19:19:51 +1000 Subject: [PATCH 056/332] Move QgsSymbolLayerUtils::createRenderContext to QgsRenderContext::fromQPainter This method is useful in many contexts outside of symbology --- doc/api_break.dox | 1 + python/core/qgsrendercontext.sip | 8 +++ .../core/symbology-ng/qgssymbollayerutils.sip | 3 -- src/core/qgsrendercontext.cpp | 16 ++++++ src/core/qgsrendercontext.h | 8 +++ src/core/symbology-ng/qgssymbol.cpp | 4 +- src/core/symbology-ng/qgssymbollayerutils.cpp | 20 +------- src/core/symbology-ng/qgssymbollayerutils.h | 3 -- .../qgseffectstackpropertieswidget.cpp | 2 +- tests/src/core/testqgspainteffect.cpp | 10 ++-- tests/src/python/CMakeLists.txt | 1 + tests/src/python/test_qgsrendercontext.py | 50 +++++++++++++++++++ 12 files changed, 94 insertions(+), 32 deletions(-) create mode 100644 tests/src/python/test_qgsrendercontext.py diff --git a/doc/api_break.dox b/doc/api_break.dox index 662364cb9d4d..3543af638824 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -1688,6 +1688,7 @@ QgsSymbolLayerUtils (renamed from QgsSymbolLayerUtilsV2) {#qgis_api_break - encodeOutputUnit() and decodeOutputUnit() were removed. QgsUnitTypes::encodeUnit() and QgsUnitTypes::decodeRenderUnit() should be used instead. - The signatures for wellKnownMarkerToSld() and wellKnownMarkerFromSld() were changed. - The symbolPreviewPixmap() customContext is now the fourth parameter +- createRenderContext() was moved to QgsRenderContext::fromQPainter() QgsSymbolSelectorWidget {#qgis_api_break_3_0_QgsSymbolSelectorWidget} diff --git a/python/core/qgsrendercontext.sip b/python/core/qgsrendercontext.sip index d2dde9c7d157..b5cf6a9b93f4 100644 --- a/python/core/qgsrendercontext.sip +++ b/python/core/qgsrendercontext.sip @@ -51,6 +51,14 @@ class QgsRenderContext //! @note added in 2.4 static QgsRenderContext fromMapSettings( const QgsMapSettings& mapSettings ); + /** + * Creates a default render context given a pixel based QPainter destination. + * If no painter is specified or the painter has no device, then a default + * DPI of 88 will be assumed. + * @note added in QGIS 3.0 + */ + static QgsRenderContext fromQPainter( QPainter* painter ); + //getters QPainter* painter(); diff --git a/python/core/symbology-ng/qgssymbollayerutils.sip b/python/core/symbology-ng/qgssymbollayerutils.sip index 12f432519dde..2e8130131f35 100644 --- a/python/core/symbology-ng/qgssymbollayerutils.sip +++ b/python/core/symbology-ng/qgssymbollayerutils.sip @@ -430,9 +430,6 @@ class QgsSymbolLayerUtils /** Returns scale factor painter units -> map units*/ static double mapUnitScaleFactor( const QgsRenderContext& c, QgsUnitTypes::RenderUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() ); - /** Creates a render context for a pixel based device*/ - static QgsRenderContext createRenderContext( QPainter* p ); - /** Multiplies opacity of image pixel values with a (global) transparency value*/ static void multiplyImageOpacity( QImage* image, qreal alpha ); diff --git a/src/core/qgsrendercontext.cpp b/src/core/qgsrendercontext.cpp index 0ccc116a8123..29d8ebafb21f 100644 --- a/src/core/qgsrendercontext.cpp +++ b/src/core/qgsrendercontext.cpp @@ -88,6 +88,22 @@ QgsRenderContext::~QgsRenderContext() mFeatureFilterProvider = nullptr; } +QgsRenderContext QgsRenderContext::fromQPainter( QPainter* painter ) +{ + QgsRenderContext context; + context.setPainter( painter ); + context.setRasterScaleFactor( 1.0 ); + if ( painter && painter->device() ) + { + context.setScaleFactor( painter->device()->logicalDpiX() / 25.4 ); + } + else + { + context.setScaleFactor( 3.465 ); //assume 88 dpi as standard value + } + return context; +} + void QgsRenderContext::setFlags( QgsRenderContext::Flags flags ) { mFlags = flags; diff --git a/src/core/qgsrendercontext.h b/src/core/qgsrendercontext.h index f0c0495f0208..da4abfb7a934 100644 --- a/src/core/qgsrendercontext.h +++ b/src/core/qgsrendercontext.h @@ -93,6 +93,14 @@ class CORE_EXPORT QgsRenderContext //! @note added in 2.4 static QgsRenderContext fromMapSettings( const QgsMapSettings& mapSettings ); + /** + * Creates a default render context given a pixel based QPainter destination. + * If no painter is specified or the painter has no device, then a default + * DPI of 88 will be assumed. + * @note added in QGIS 3.0 + */ + static QgsRenderContext fromQPainter( QPainter* painter ); + //getters QPainter* painter() {return mPainter;} diff --git a/src/core/symbology-ng/qgssymbol.cpp b/src/core/symbology-ng/qgssymbol.cpp index f30ec1d12cdc..e176cba7ce0c 100644 --- a/src/core/symbology-ng/qgssymbol.cpp +++ b/src/core/symbology-ng/qgssymbol.cpp @@ -447,7 +447,7 @@ QColor QgsSymbol::color() const void QgsSymbol::drawPreviewIcon( QPainter* painter, QSize size, QgsRenderContext* customContext ) { - QgsRenderContext context = customContext ? *customContext : QgsSymbolLayerUtils::createRenderContext( painter ); + QgsRenderContext context = customContext ? *customContext : QgsRenderContext::fromQPainter( painter ); context.setForceVectorOutput( true ); QgsSymbolRenderContext symbolContext( context, outputUnit(), mAlpha, false, mRenderHints, nullptr, QgsFields(), mapUnitScale() ); @@ -526,7 +526,7 @@ QImage QgsSymbol::bigSymbolPreviewImage( QgsExpressionContext* expressionContext p.drawLine( 50, 0, 50, 100 ); } - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &p ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &p ); if ( expressionContext ) context.setExpressionContext( *expressionContext ); diff --git a/src/core/symbology-ng/qgssymbollayerutils.cpp b/src/core/symbology-ng/qgssymbollayerutils.cpp index 2e7bccc3f607..2091cfa3d289 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.cpp +++ b/src/core/symbology-ng/qgssymbollayerutils.cpp @@ -626,7 +626,7 @@ QPicture QgsSymbolLayerUtils::symbolLayerPreviewPicture( QgsSymbolLayer* layer, QPainter painter; painter.begin( &picture ); painter.setRenderHint( QPainter::Antialiasing ); - QgsRenderContext renderContext = createRenderContext( &painter ); + QgsRenderContext renderContext = QgsRenderContext::fromQPainter( &painter ); renderContext.setForceVectorOutput( true ); QgsSymbolRenderContext symbolContext( renderContext, units, 1.0, false, 0, nullptr, QgsFields(), scale ); layer->drawPreviewIcon( symbolContext, size ); @@ -641,7 +641,7 @@ QIcon QgsSymbolLayerUtils::symbolLayerPreviewIcon( QgsSymbolLayer* layer, QgsUni QPainter painter; painter.begin( &pixmap ); painter.setRenderHint( QPainter::Antialiasing ); - QgsRenderContext renderContext = createRenderContext( &painter ); + QgsRenderContext renderContext = QgsRenderContext::fromQPainter( &painter ); QgsSymbolRenderContext symbolContext( renderContext, u, 1.0, false, 0, nullptr, QgsFields(), scale ); layer->drawPreviewIcon( symbolContext, size ); painter.end(); @@ -3468,22 +3468,6 @@ double QgsSymbolLayerUtils::mapUnitScaleFactor( const QgsRenderContext &c, QgsUn return 1.0; } -QgsRenderContext QgsSymbolLayerUtils::createRenderContext( QPainter* p ) -{ - QgsRenderContext context; - context.setPainter( p ); - context.setRasterScaleFactor( 1.0 ); - if ( p && p->device() ) - { - context.setScaleFactor( p->device()->logicalDpiX() / 25.4 ); - } - else - { - context.setScaleFactor( 3.465 ); //assume 88 dpi as standard value - } - return context; -} - void QgsSymbolLayerUtils::multiplyImageOpacity( QImage* image, qreal alpha ) { if ( !image ) diff --git a/src/core/symbology-ng/qgssymbollayerutils.h b/src/core/symbology-ng/qgssymbollayerutils.h index 7780231a5dec..4d3f70acb34d 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.h +++ b/src/core/symbology-ng/qgssymbollayerutils.h @@ -508,9 +508,6 @@ class CORE_EXPORT QgsSymbolLayerUtils //! Returns scale factor painter units -> map units static double mapUnitScaleFactor( const QgsRenderContext& c, QgsUnitTypes::RenderUnit u, const QgsMapUnitScale& scale = QgsMapUnitScale() ); - //! Creates a render context for a pixel based device - static QgsRenderContext createRenderContext( QPainter* p ); - //! Multiplies opacity of image pixel values with a (global) transparency value static void multiplyImageOpacity( QImage* image, qreal alpha ); diff --git a/src/gui/effects/qgseffectstackpropertieswidget.cpp b/src/gui/effects/qgseffectstackpropertieswidget.cpp index fb3f2b09fc00..1b7c32eef840 100644 --- a/src/gui/effects/qgseffectstackpropertieswidget.cpp +++ b/src/gui/effects/qgseffectstackpropertieswidget.cpp @@ -212,7 +212,7 @@ void QgsEffectStackPropertiesWidget::updatePreview() previewImage.fill( Qt::transparent ); painter.begin( &previewImage ); painter.setRenderHint( QPainter::Antialiasing ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); if ( !mPreviewPicture ) { QPicture previewPic; diff --git a/tests/src/core/testqgspainteffect.cpp b/tests/src/core/testqgspainteffect.cpp index 5d363a881cb3..9dc49d1f2ead 100644 --- a/tests/src/core/testqgspainteffect.cpp +++ b/tests/src/core/testqgspainteffect.cpp @@ -336,7 +336,7 @@ void TestQgsPaintEffect::drawSource() QPainter painter; painter.begin( &image ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); effect = new QgsDrawSourceEffect(); effect->render( *mPicture, context ); @@ -410,7 +410,7 @@ void TestQgsPaintEffect::blur() image.fill( Qt::transparent ); QPainter painter; painter.begin( &image ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); effect = new QgsBlurEffect(); effect->render( *mPicture, context ); @@ -508,7 +508,7 @@ void TestQgsPaintEffect::dropShadow() image.fill( Qt::transparent ); QPainter painter; painter.begin( &image ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); effect = new QgsDropShadowEffect(); effect->render( *mPicture, context ); @@ -611,7 +611,7 @@ void TestQgsPaintEffect::glow() image.fill( Qt::transparent ); QPainter painter; painter.begin( &image ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); effect = new QgsOuterGlowEffect(); effect->setSpread( 20 ); @@ -673,7 +673,7 @@ void TestQgsPaintEffect::stack() image.fill( Qt::transparent ); QPainter painter; painter.begin( &image ); - QgsRenderContext context = QgsSymbolLayerUtils::createRenderContext( &painter ); + QgsRenderContext context = QgsRenderContext::fromQPainter( &painter ); effect = new QgsEffectStack(); QgsBlurEffect* blur = new QgsBlurEffect(); diff --git a/tests/src/python/CMakeLists.txt b/tests/src/python/CMakeLists.txt index 3d82a87f10ed..6f8d978ac933 100644 --- a/tests/src/python/CMakeLists.txt +++ b/tests/src/python/CMakeLists.txt @@ -87,6 +87,7 @@ ADD_PYTHON_TEST(PyQgsRasterColorRampShader test_qgsrastercolorrampshader.py) ADD_PYTHON_TEST(PyQgsRectangle test_qgsrectangle.py) ADD_PYTHON_TEST(PyQgsRelation test_qgsrelation.py) ADD_PYTHON_TEST(PyQgsRelationManager test_qgsrelationmanager.py) +ADD_PYTHON_TEST(PyQgsRenderContext test_qgsrendercontext.py) ADD_PYTHON_TEST(PyQgsRenderer test_qgsrenderer.py) ADD_PYTHON_TEST(PyQgsRulebasedRenderer test_qgsrulebasedrenderer.py) ADD_PYTHON_TEST(PyQgsSingleSymbolRenderer test_qgssinglesymbolrenderer.py) diff --git a/tests/src/python/test_qgsrendercontext.py b/tests/src/python/test_qgsrendercontext.py new file mode 100644 index 000000000000..5bd97337c649 --- /dev/null +++ b/tests/src/python/test_qgsrendercontext.py @@ -0,0 +1,50 @@ +# -*- coding: utf-8 -*- +"""QGIS Unit tests for QgsRenderContext. + +.. note:: This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. +""" +__author__ = 'Nyall Dawson' +__date__ = '16/01/2017' +__copyright__ = 'Copyright 2017, The QGIS Project' +# This will get replaced with a git SHA1 when you do a git archive +__revision__ = '$Format:%H$' + +import qgis # NOQA + +from qgis.core import QgsRenderContext +from qgis.PyQt.QtGui import QPainter, QImage +from qgis.testing import unittest + + +class TestQgsRenderContext(unittest.TestCase): + + def testFromQPainter(self): + """ test QgsRenderContext.fromQPainter """ + + # no painter + c = QgsRenderContext.fromQPainter(None) + self.assertFalse(c.painter()) + # assuming 88 dpi as fallback + self.assertAlmostEqual(c.scaleFactor(), 88 / 25.4, 3) + + # no painter destination + p = QPainter() + c = QgsRenderContext.fromQPainter(p) + self.assertEqual(c.painter(), p) + self.assertAlmostEqual(c.scaleFactor(), 88 / 25.4, 3) + + im = QImage(1000, 600, QImage.Format_RGB32) + dots_per_m = 300 / 25.4 * 1000 # 300 dpi to dots per m + im.setDotsPerMeterX(dots_per_m) + im.setDotsPerMeterY(dots_per_m) + p = QPainter(im) + c = QgsRenderContext.fromQPainter(p) + self.assertEqual(c.painter(), p) + self.assertAlmostEqual(c.scaleFactor(), dots_per_m / 1000, 3) # scaleFactor should be pixels/mm + + +if __name__ == '__main__': + unittest.main() From 8a9cee0fb657e5c8fffe4accce6795044b164b78 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 15 Jan 2017 19:20:52 +1000 Subject: [PATCH 057/332] [composer] Use reference map when creating render context for draw shape/arrow/nodes/paper symbols This commit removes some more instances where changes in the canvas affect compositions. Previously the symbols drawn in shape/arrow/etc items were using the scale from the canvas. This meant that the appearance of these items in composer would change depending on canvas zoom if they used symbols with map unit sizes. Now they take their map scale from the composition's reference map. While this has the nice side effect that now map units can be used in the appearance of these items and they're guaranteed to match up with the reference map item, the main intention here is to remove more of the forced links between compositions (core) and the main canvas (app). --- python/core/composer/qgscomposerutils.sip | 7 ++++ src/core/composer/qgscomposerarrow.cpp | 7 ++-- src/core/composer/qgscomposernodesitem.cpp | 12 ++----- src/core/composer/qgscomposerpolygon.cpp | 7 +--- src/core/composer/qgscomposerpolyline.cpp | 6 +--- src/core/composer/qgscomposershape.cpp | 7 ++-- src/core/composer/qgscomposerutils.cpp | 23 +++++++++++++ src/core/composer/qgscomposerutils.h | 9 +++++ src/core/composer/qgspaperitem.cpp | 8 ++--- tests/src/core/testqgscomposerutils.cpp | 39 ++++++++++++++++++++++ 10 files changed, 89 insertions(+), 36 deletions(-) diff --git a/python/core/composer/qgscomposerutils.sip b/python/core/composer/qgscomposerutils.sip index 6cbe466f9e65..6f8a9c3df832 100644 --- a/python/core/composer/qgscomposerutils.sip +++ b/python/core/composer/qgscomposerutils.sip @@ -243,4 +243,11 @@ class QgsComposerUtils */ static void drawText( QPainter* painter, const QRectF& rect, const QString& text, const QFont& font, const QColor& color = QColor(), const Qt::AlignmentFlag halignment = Qt::AlignLeft, const Qt::AlignmentFlag valignment = Qt::AlignTop, const int flags = Qt::TextWordWrap ); + /** + * Creates a render context suitable for the specified composition and QPainter destination. + * This method returns a new QgsRenderContext which matches the scale and settings from the composition's + * QgsComposition::referenceMap(). + * @note added in QGIS 3.0 + */ + static QgsRenderContext createRenderContext( QgsComposition* composition, QPainter& painter ); }; diff --git a/src/core/composer/qgscomposerarrow.cpp b/src/core/composer/qgscomposerarrow.cpp index 47f64d616f18..1894d1a8cd70 100644 --- a/src/core/composer/qgscomposerarrow.cpp +++ b/src/core/composer/qgscomposerarrow.cpp @@ -182,12 +182,9 @@ void QgsComposerArrow::drawLine( QPainter *painter ) painter->scale( 1 / dotsPerMM, 1 / dotsPerMM ); //scale painter from mm to dots //setup render context - QgsMapSettings ms = mComposition->mapSettings(); - //context units should be in dots - ms.setOutputDpi( painter->device()->logicalDpiX() ); - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); - context.setPainter( painter ); + QgsExpressionContext expressionContext = createExpressionContext(); context.setExpressionContext( expressionContext ); diff --git a/src/core/composer/qgscomposernodesitem.cpp b/src/core/composer/qgscomposernodesitem.cpp index 3c36af008c12..8d2a9bc83d95 100644 --- a/src/core/composer/qgscomposernodesitem.cpp +++ b/src/core/composer/qgscomposernodesitem.cpp @@ -137,11 +137,7 @@ void QgsComposerNodesItem::drawNodes( QPainter *painter ) const symbol.data()->setSize( rectSize ); symbol.data()->setAngle( 45 ); - QgsMapSettings ms = mComposition->mapSettings(); - ms.setOutputDpi( painter->device()->logicalDpiX() ); - - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( painter ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); QgsExpressionContext expressionContext = createExpressionContext(); @@ -172,11 +168,7 @@ void QgsComposerNodesItem::drawSelectedNode( QPainter *painter ) const symbol.reset( QgsMarkerSymbol::createSimple( properties ) ); symbol.data()->setSize( rectSize ); - QgsMapSettings ms = mComposition->mapSettings(); - ms.setOutputDpi( painter->device()->logicalDpiX() ); - - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( painter ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); QgsExpressionContext expressionContext = createExpressionContext(); diff --git a/src/core/composer/qgscomposerpolygon.cpp b/src/core/composer/qgscomposerpolygon.cpp index eef4523a859a..d1cb2f4bd200 100644 --- a/src/core/composer/qgscomposerpolygon.cpp +++ b/src/core/composer/qgscomposerpolygon.cpp @@ -73,13 +73,8 @@ void QgsComposerPolygon::_draw( QPainter *painter ) //setup painter scaling to dots so that raster symbology is drawn to scale const double dotsPerMM = painter->device()->logicalDpiX() / 25.4; - QgsMapSettings ms = mComposition->mapSettings(); - ms.setOutputDpi( painter->device()->logicalDpiX() ); - - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( painter ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); - context.setExpressionContext( createExpressionContext() ); painter->scale( 1 / dotsPerMM, 1 / dotsPerMM ); // scale painter from mm to dots diff --git a/src/core/composer/qgscomposerpolyline.cpp b/src/core/composer/qgscomposerpolyline.cpp index 1d88bd76b69b..ae72ced22551 100644 --- a/src/core/composer/qgscomposerpolyline.cpp +++ b/src/core/composer/qgscomposerpolyline.cpp @@ -100,11 +100,7 @@ void QgsComposerPolyline::_draw( QPainter *painter ) { double dotsPerMM = painter->device()->logicalDpiX() / 25.4; - QgsMapSettings ms = mComposition->mapSettings(); - ms.setOutputDpi( painter->device()->logicalDpiX() ); - - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( painter ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); QgsExpressionContext expressionContext = createExpressionContext(); diff --git a/src/core/composer/qgscomposershape.cpp b/src/core/composer/qgscomposershape.cpp index 1b5468e18c23..db093fc2923b 100644 --- a/src/core/composer/qgscomposershape.cpp +++ b/src/core/composer/qgscomposershape.cpp @@ -21,6 +21,7 @@ #include "qgssymbollayerutils.h" #include "qgscomposermodel.h" #include "qgsmapsettings.h" +#include "qgscomposerutils.h" #include QgsComposerShape::QgsComposerShape( QgsComposition* composition ) @@ -178,11 +179,7 @@ void QgsComposerShape::drawShapeUsingSymbol( QPainter* p ) double dotsPerMM = p->device()->logicalDpiX() / 25.4; //setup render context - QgsMapSettings ms = mComposition->mapSettings(); - //context units should be in dots - ms.setOutputDpi( p->device()->logicalDpiX() ); - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( p ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *p ); context.setForceVectorOutput( true ); QgsExpressionContext expressionContext = createExpressionContext(); context.setExpressionContext( expressionContext ); diff --git a/src/core/composer/qgscomposerutils.cpp b/src/core/composer/qgscomposerutils.cpp index b1f3fcf61d83..321e70120cd6 100644 --- a/src/core/composer/qgscomposerutils.cpp +++ b/src/core/composer/qgscomposerutils.cpp @@ -18,6 +18,8 @@ #include "qgscomposerutils.h" #include "qgscomposition.h" #include "qgsdatadefined.h" +#include "qgsmapsettings.h" +#include "qgscomposermap.h" #include #define FONT_WORKAROUND_SCALE 10 //scale factor for upscaling fontsize and downscaling painter @@ -545,3 +547,24 @@ void QgsComposerUtils::drawText( QPainter *painter, const QRectF &rect, const QS painter->drawText( scaledRect, halignment | valignment | flags, text ); painter->restore(); } + +QgsRenderContext QgsComposerUtils::createRenderContext( QgsComposition* composition, QPainter &painter ) +{ + QgsComposerMap* referenceMap = composition ? composition->referenceMap() : nullptr; + if ( !referenceMap ) + { + return QgsRenderContext::fromQPainter( &painter ); + } + + int dpi = painter.device()->logicalDpiX(); + double dotsPerMM = dpi / 25.4; + + // get map settings from reference map + QgsRectangle extent = *( referenceMap->currentMapExtent() ); + QSizeF mapSizeMM = referenceMap->rect().size(); + QgsMapSettings ms = referenceMap->mapSettings( extent, mapSizeMM * dotsPerMM, dpi ); + + QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); + context.setPainter( &painter ); + return context; +} diff --git a/src/core/composer/qgscomposerutils.h b/src/core/composer/qgscomposerutils.h index 41e4a46257f9..106bde3b8e26 100644 --- a/src/core/composer/qgscomposerutils.h +++ b/src/core/composer/qgscomposerutils.h @@ -19,6 +19,7 @@ #include "qgis_core.h" #include "qgscomposition.h" //for page size and orientation enums +#include "qgsrendercontext.h" #include #include @@ -265,6 +266,14 @@ class CORE_EXPORT QgsComposerUtils */ static void drawText( QPainter* painter, const QRectF& rect, const QString& text, const QFont& font, const QColor& color = QColor(), const Qt::AlignmentFlag halignment = Qt::AlignLeft, const Qt::AlignmentFlag valignment = Qt::AlignTop, const int flags = Qt::TextWordWrap ); + /** + * Creates a render context suitable for the specified composition and QPainter destination. + * This method returns a new QgsRenderContext which matches the scale and settings from the composition's + * QgsComposition::referenceMap(). + * @note added in QGIS 3.0 + */ + static QgsRenderContext createRenderContext( QgsComposition* composition, QPainter& painter ); + }; #endif diff --git a/src/core/composer/qgspaperitem.cpp b/src/core/composer/qgspaperitem.cpp index 7b5f3c53b69f..eb975795ecf1 100644 --- a/src/core/composer/qgspaperitem.cpp +++ b/src/core/composer/qgspaperitem.cpp @@ -20,6 +20,7 @@ #include "qgsstyle.h" #include "qgslogger.h" #include "qgsmapsettings.h" +#include "qgscomposerutils.h" #include #include #include @@ -155,12 +156,9 @@ void QgsPaperItem::paint( QPainter* painter, const QStyleOptionGraphicsItem* ite double dotsPerMM = painter->device()->logicalDpiX() / 25.4; //setup render context - QgsMapSettings ms = mComposition->mapSettings(); - //context units should be in dots - ms.setOutputDpi( painter->device()->logicalDpiX() ); - QgsRenderContext context = QgsRenderContext::fromMapSettings( ms ); - context.setPainter( painter ); + QgsRenderContext context = QgsComposerUtils::createRenderContext( mComposition, *painter ); context.setForceVectorOutput( true ); + QgsExpressionContext expressionContext = createExpressionContext(); context.setExpressionContext( expressionContext ); diff --git a/tests/src/core/testqgscomposerutils.cpp b/tests/src/core/testqgscomposerutils.cpp index a839e41d5a69..e560b50c8f70 100644 --- a/tests/src/core/testqgscomposerutils.cpp +++ b/tests/src/core/testqgscomposerutils.cpp @@ -18,10 +18,12 @@ #include "qgsapplication.h" //for standard test font #include "qgscomposerutils.h" #include "qgscomposition.h" +#include "qgscomposermap.h" #include "qgsmultirenderchecker.h" #include "qgsdatadefined.h" #include "qgsfontutils.h" #include "qgsproject.h" +#include "qgstestutils.h" #include #include "qgstest.h" #include @@ -61,6 +63,7 @@ class TestQgsComposerUtils : public QObject void textHeightMM(); //test calculating text height in mm void drawTextPos(); //test drawing text at a pos void drawTextRect(); //test drawing text in a rect + void createRenderContext(); private: bool renderCheck( const QString& testName, QImage &image, int mismatchCount = 0 ); @@ -701,6 +704,42 @@ void TestQgsComposerUtils::drawTextRect() QVERIFY( renderCheck( "composerutils_drawtext_rectflag", testImage, 100 ) ); } +void TestQgsComposerUtils::createRenderContext() +{ + QImage testImage = QImage( 250, 250, QImage::Format_RGB32 ); + testImage.setDotsPerMeterX( 150 / 25.4 * 1000 ); + testImage.setDotsPerMeterY( 150 / 25.4 * 1000 ); + QPainter p( &testImage ); + + // no composition + QgsRenderContext rc = QgsComposerUtils::createRenderContext( nullptr, p ); + QGSCOMPARENEAR( rc.scaleFactor(), 150 / 25.4, 0.001 ); + QCOMPARE( rc.painter(), &p ); + + //create composition with no reference map + QgsRectangle extent( 2000, 2800, 2500, 2900 ); + QgsMapSettings ms; + ms.setExtent( extent ); + QgsComposition* composition = new QgsComposition( ms, QgsProject::instance() ); + rc = QgsComposerUtils::createRenderContext( composition, p ); + QGSCOMPARENEAR( rc.scaleFactor(), 150 / 25.4, 0.001 ); + QCOMPARE( rc.painter(), &p ); + + // add a reference map + QgsComposerMap* map = new QgsComposerMap( composition ); + map->setNewExtent( extent ); + map->setSceneRect( QRectF( 30, 60, 200, 100 ) ); + composition->addComposerMap( map ); + composition->setReferenceMap( map ); + + rc = QgsComposerUtils::createRenderContext( composition, p ); + QGSCOMPARENEAR( rc.scaleFactor(), 150 / 25.4, 0.001 ); + QGSCOMPARENEAR( rc.rendererScale(), map->scale(), 100000 ); + QCOMPARE( rc.painter(), &p ); + + p.end(); +} + bool TestQgsComposerUtils::renderCheck( const QString& testName, QImage &image, int mismatchCount ) { mReport += "

    " + testName + "

    \n"; From f96364e8dc1a0b83a992e8419acbafbe1142a412 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 11:13:41 +1000 Subject: [PATCH 058/332] [composer] Cleanup handling of wms layer/advanced effect detection --- src/app/composer/qgscomposer.cpp | 34 ++++++++++------------------ src/core/composer/qgscomposermap.cpp | 5 ++-- 2 files changed, 15 insertions(+), 24 deletions(-) diff --git a/src/app/composer/qgscomposer.cpp b/src/app/composer/qgscomposer.cpp index 0b0fcd4ada20..f30b481fbe84 100644 --- a/src/app/composer/qgscomposer.cpp +++ b/src/app/composer/qgscomposer.cpp @@ -3800,45 +3800,35 @@ void QgsComposer::setSelectionTool() bool QgsComposer::containsWmsLayer() const { - QMap::const_iterator item_it = mItemWidgetMap.constBegin(); - QgsComposerItem* currentItem = nullptr; - QgsComposerMap* currentMap = nullptr; + QList< QgsComposerMap *> maps; + mComposition->composerItems( maps ); - for ( ; item_it != mItemWidgetMap.constEnd(); ++item_it ) + Q_FOREACH ( QgsComposerMap* map, maps ) { - currentItem = item_it.key(); - currentMap = dynamic_cast( currentItem ); - if ( currentMap ) - { - if ( currentMap->containsWmsLayer() ) - { - return true; - } - } + if ( map->containsWmsLayer() ) + return true; } return false; } bool QgsComposer::containsAdvancedEffects() const { - // Check if composer contains any blend modes or flattened layers for transparency - QMap::const_iterator item_it = mItemWidgetMap.constBegin(); - QgsComposerItem* currentItem = nullptr; - QgsComposerMap* currentMap = nullptr; + QList< QgsComposerItem *> items; + mComposition->composerItems( items ); - for ( ; item_it != mItemWidgetMap.constEnd(); ++item_it ) + Q_FOREACH ( QgsComposerItem* currentItem, items ) { - currentItem = item_it.key(); // Check composer item's blend mode if ( currentItem->blendMode() != QPainter::CompositionMode_SourceOver ) { return true; } + // If item is a composer map, check if it contains any advanced effects - currentMap = dynamic_cast( currentItem ); - if ( currentMap && currentMap->containsAdvancedEffects() ) + if ( QgsComposerMap * currentMap = dynamic_cast( currentItem ) ) { - return true; + if ( currentMap->containsAdvancedEffects() ) + return true; } } return false; diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index 329e855ad2cc..d48cb1f4a9a1 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -1128,7 +1128,7 @@ void QgsComposerMap::updateItem() bool QgsComposerMap::containsWmsLayer() const { - Q_FOREACH ( QgsMapLayer* layer, mComposition->mapSettings().layers() ) + Q_FOREACH ( QgsMapLayer* layer, layersToRender() ) { if ( QgsRasterLayer* currentRasterLayer = qobject_cast( layer ) ) { @@ -1164,7 +1164,7 @@ bool QgsComposerMap::containsAdvancedEffects() const // check if map contains advanced effects like blend modes, or flattened layers for transparency QgsTextFormat layerFormat; - Q_FOREACH ( QgsMapLayer* layer, mComposition->mapSettings().layers() ) + Q_FOREACH ( QgsMapLayer* layer, layersToRender() ) { if ( layer ) { @@ -1188,6 +1188,7 @@ bool QgsComposerMap::containsAdvancedEffects() const if ( QgsPalLabeling::staticWillUseLayer( currentVectorLayer ) ) { // Check all label blending properties + layerFormat.readFromLayer( currentVectorLayer ); if ( layerFormat.containsAdvancedEffects() ) return true; From 49411210b052d44f7fdb28e8e924bf88c31388e5 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 11:25:42 +1000 Subject: [PATCH 059/332] [composer] Remove QgsComposerMap::storeCurrentLayerSet This method was used to sync the canvas layers to a composer map. The logic has been moved to app to avoid a dependancy between compositions and the main map canvas --- doc/api_break.dox | 2 +- python/core/composer/qgscomposermap.sip | 2 -- src/app/composer/qgscomposermapwidget.cpp | 17 ++++++++++++++++- src/app/composer/qgscomposermapwidget.h | 3 +++ src/core/composer/qgscomposermap.cpp | 11 ----------- src/core/composer/qgscomposermap.h | 2 -- 6 files changed, 20 insertions(+), 17 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 3543af638824..32168115baed 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -569,7 +569,7 @@ and should be accessed using QgsComposerMap::overview() or QgsComposerMap::overv instead. - atlasFixedScale() and setAtlasFixedScale() were removed. Use atlasScalingMode() and setAtlasScalingMode() instead. - +- storeCurrentLayerSet() was removed. Use setLayers() instead. QgsComposerMapGrid {#qgis_api_break_3_0_QgsComposerMapGrid} ------------------ diff --git a/python/core/composer/qgscomposermap.sip b/python/core/composer/qgscomposermap.sip index 6721af9943c6..280a2b92cfe5 100644 --- a/python/core/composer/qgscomposermap.sip +++ b/python/core/composer/qgscomposermap.sip @@ -139,8 +139,6 @@ class QgsComposerMap : QgsComposerItem QList layers() const; /** Setter for stored layer set that is used if mKeepLayerSet is true */ void setLayers( const QList layers ); - /** Stores the current layer set of the qgis mapcanvas in mLayerSet*/ - void storeCurrentLayerSet(); /** Getter for flag that determines if current styles of layers should be overridden by previously stored styles. @note added in 2.8 */ bool keepLayerStyles() const; diff --git a/src/app/composer/qgscomposermapwidget.cpp b/src/app/composer/qgscomposermapwidget.cpp index 64cc63d06a1e..fa1968fa0ffd 100644 --- a/src/app/composer/qgscomposermapwidget.cpp +++ b/src/app/composer/qgscomposermapwidget.cpp @@ -828,7 +828,7 @@ void QgsComposerMapWidget::on_mKeepLayerListCheckBox_stateChanged( int state ) if ( state == Qt::Checked ) { - mComposerMap->storeCurrentLayerSet(); + storeCurrentLayerSet(); mComposerMap->setKeepLayerSet( true ); // mutually exclusive with following a preset @@ -1450,6 +1450,21 @@ void QgsComposerMapWidget::updateOverviewFrameSymbolMarker( const QgsComposerMap } } +void QgsComposerMapWidget::storeCurrentLayerSet() +{ + if ( !mComposerMap ) + return; + + QList layers = QgisApp::instance()->mapCanvas()->mapSettings().layers(); + mComposerMap->setLayers( layers ); + + if ( mComposerMap->keepLayerStyles() ) + { + // also store styles associated with the layers + mComposerMap->storeCurrentLayerStyles(); + } +} + QListWidgetItem* QgsComposerMapWidget::addOverviewListItem( const QString& id, const QString& name ) { QListWidgetItem* item = new QListWidgetItem( name, nullptr ); diff --git a/src/app/composer/qgscomposermapwidget.h b/src/app/composer/qgscomposermapwidget.h index 7e0d8709c9bb..0b239041ed92 100644 --- a/src/app/composer/qgscomposermapwidget.h +++ b/src/app/composer/qgscomposermapwidget.h @@ -163,6 +163,9 @@ class QgsComposerMapWidget: public QgsComposerItemBaseWidget, private Ui::QgsCom void loadOverviewEntries(); void updateOverviewFrameSymbolMarker( const QgsComposerMapOverview* overview ); + + void storeCurrentLayerSet(); + }; #endif diff --git a/src/core/composer/qgscomposermap.cpp b/src/core/composer/qgscomposermap.cpp index d48cb1f4a9a1..da1c34c8fd84 100644 --- a/src/core/composer/qgscomposermap.cpp +++ b/src/core/composer/qgscomposermap.cpp @@ -1561,17 +1561,6 @@ bool QgsComposerMap::readXml( const QDomElement& itemElem, const QDomDocument& d return true; } -void QgsComposerMap::storeCurrentLayerSet() -{ - mLayers = _qgis_listRawToQPointer( mComposition->mapSettings().layers() ); - - if ( mKeepLayerStyles ) - { - // also store styles associated with the layers - storeCurrentLayerStyles(); - } -} - QList QgsComposerMap::layers() const { return _qgis_listQPointerToRaw( mLayers ); diff --git a/src/core/composer/qgscomposermap.h b/src/core/composer/qgscomposermap.h index c8d32392c3b4..251a4df25cc6 100644 --- a/src/core/composer/qgscomposermap.h +++ b/src/core/composer/qgscomposermap.h @@ -178,8 +178,6 @@ class CORE_EXPORT QgsComposerMap : public QgsComposerItem QList layers() const; //! Setter for stored layer set that is used if mKeepLayerSet is true void setLayers( const QList layers ); - //! Stores the current layer set of the qgis mapcanvas in mLayerSet - void storeCurrentLayerSet(); //! Getter for flag that determines if current styles of layers should be overridden by previously stored styles. @note added in 2.8 bool keepLayerStyles() const { return mKeepLayerStyles; } From 430af90cfa1f94d5bc82f705573423a7e047f0b1 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Sun, 15 Jan 2017 09:14:58 +1000 Subject: [PATCH 060/332] Remove rasterScaleFactor/setRasterScaleFactor from QgsRenderContext These were not being used by QGIS code (always left at default 1.0 value), and removing them from the api allows us to simplify lots of code. It also makes QgsRenderContext scaling much less confusing. --- doc/api_break.dox | 1 + python/core/qgsmapunitscale.sip | 2 +- python/core/qgsrendercontext.sip | 3 - python/core/qgstextrenderer.sip | 6 +- src/app/qgsmaptoollabel.cpp | 2 +- src/core/qgsmapunitscale.h | 2 +- src/core/qgspallabeling.cpp | 12 ++-- src/core/qgsrendercontext.cpp | 5 -- src/core/qgsrendercontext.h | 6 -- src/core/qgstextrenderer.cpp | 59 ++++++++----------- src/core/qgstextrenderer.h | 6 +- src/core/qgsvectorlayerlabelprovider.cpp | 4 +- src/core/raster/qgsrasterlayerrenderer.cpp | 2 +- .../symbology-ng/qgsellipsesymbollayer.cpp | 6 +- src/core/symbology-ng/qgsfillsymbollayer.cpp | 29 +++------ src/core/symbology-ng/qgslinesymbollayer.cpp | 4 +- .../symbology-ng/qgsmarkersymbollayer.cpp | 28 +++------ .../symbology-ng/qgspointdistancerenderer.cpp | 3 +- src/core/symbology-ng/qgssymbollayerutils.cpp | 25 ++++---- src/gui/qgsmapcanvasitem.cpp | 1 - src/gui/qgstextpreview.cpp | 8 +-- 21 files changed, 79 insertions(+), 135 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 32168115baed..7b39b4459dcb 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -1532,6 +1532,7 @@ QgsRenderContext {#qgis_api_break_3_0_QgsRenderContext} - coordinateTransform() now returns a QgsCoordinateTransform object, not a pointer. An invalid QgsCoordinateTransform will be returned instead of a null pointer if no transformation is required. - setCoordinateTransform() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required. +- rasterScaleFactor() and setRasterScaleFactor() were removed. In QGIS 3.0 QPainter destinations should always be constructed so that 1 painter unit = 1 pixel. QgsRendererRangeLabelFormat {#qgis_api_break_3_0_QgsRendererRangeLabelFormat} --------------------------- diff --git a/python/core/qgsmapunitscale.sip b/python/core/qgsmapunitscale.sip index 36f666cd60da..76b243758b36 100644 --- a/python/core/qgsmapunitscale.sip +++ b/python/core/qgsmapunitscale.sip @@ -18,7 +18,7 @@ class QgsMapUnitScale * @param minScale minimum allowed scale, or 0.0 if no minimum scale set * @param maxScale maximum allowed scale, or 0.0 if no maximum scale set */ - QgsMapUnitScale( double minScale = 0.0, double maxScale = 0.0 ); + explicit QgsMapUnitScale( double minScale = 0.0, double maxScale = 0.0 ); /** The minimum scale, or 0.0 if unset */ double minScale; diff --git a/python/core/qgsrendercontext.sip b/python/core/qgsrendercontext.sip index b5cf6a9b93f4..6a531bfc6333 100644 --- a/python/core/qgsrendercontext.sip +++ b/python/core/qgsrendercontext.sip @@ -75,8 +75,6 @@ class QgsRenderContext double scaleFactor() const; - double rasterScaleFactor() const; - bool renderingStopped() const; bool forceVectorOutput() const; @@ -119,7 +117,6 @@ class QgsRenderContext void setRenderingStopped( bool stopped ); void setScaleFactor( double factor ); - void setRasterScaleFactor( double factor ); void setRendererScale( double scale ); void setPainter( QPainter* p ); diff --git a/python/core/qgstextrenderer.sip b/python/core/qgstextrenderer.sip index ca6ee8b8d291..1c6cd6fd45de 100644 --- a/python/core/qgstextrenderer.sip +++ b/python/core/qgstextrenderer.sip @@ -1049,21 +1049,19 @@ class QgsTextRenderer * @param size size to convert * @param c rendercontext * @param unit size units - * @param rasterfactor whether to consider oversampling * @param mapUnitScale a mapUnitScale clamper * @return font pixel size */ - static int sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); + static int sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); /** Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling) * @param size size to convert * @param c rendercontext * @param unit size units - * @param rasterfactor whether to consider oversampling * @param mapUnitScale a mapUnitScale clamper * @return size that will render, as double */ - static double scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); + static double scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); /** Draws text within a rectangle using the specified settings. * @param rect destination rectangle for text diff --git a/src/app/qgsmaptoollabel.cpp b/src/app/qgsmaptoollabel.cpp index 6463335fe806..5f98e96d551e 100644 --- a/src/app/qgsmaptoollabel.cpp +++ b/src/app/qgsmaptoollabel.cpp @@ -242,7 +242,7 @@ QFont QgsMapToolLabel::currentLabelFont() if ( sizeIndx != -1 ) { font.setPixelSize( QgsTextRenderer::sizeToPixel( f.attribute( sizeIndx ).toDouble(), - context, labelSettings.format().sizeUnit(), true, + context, labelSettings.format().sizeUnit(), labelSettings.format().sizeMapUnitScale() ) ); } diff --git a/src/core/qgsmapunitscale.h b/src/core/qgsmapunitscale.h index e5aaa27cea3d..cf4987328323 100644 --- a/src/core/qgsmapunitscale.h +++ b/src/core/qgsmapunitscale.h @@ -39,7 +39,7 @@ class CORE_EXPORT QgsMapUnitScale * @param minScale minimum allowed scale, or 0.0 if no minimum scale set * @param maxScale maximum allowed scale, or 0.0 if no maximum scale set */ - QgsMapUnitScale( double minScale = 0.0, double maxScale = 0.0 ) + explicit QgsMapUnitScale( double minScale = 0.0, double maxScale = 0.0 ) : minScale( minScale ) , maxScale( maxScale ) , minSizeMMEnabled( false ) diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 60e6c04d9c48..95bbd21f39a1 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -1409,7 +1409,6 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t double labelHeight = fm->ascent() + fm->descent(); // ignore +1 for baseline h += fm->height() + static_cast< double >(( lines - 1 ) * labelHeight * multilineH ); - h /= context->rasterScaleFactor(); for ( int i = 0; i < lines; ++i ) { @@ -1419,7 +1418,6 @@ void QgsPalLayerSettings::calculateLabelSize( const QFontMetricsF* fm, QString t w = width; } } - w /= context->rasterScaleFactor(); #if 0 // XXX strk QgsPoint ptSize = xform->toMapCoordinatesF( w, h ); @@ -1567,7 +1565,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont return; } - int fontPixelSize = QgsTextRenderer::sizeToPixel( fontSize, context, fontunits, true, mFormat.sizeMapUnitScale() ); + int fontPixelSize = QgsTextRenderer::sizeToPixel( fontSize, context, fontunits, mFormat.sizeMapUnitScale() ); // don't try to show font sizes less than 1 pixel (Qt complains) if ( fontPixelSize < 1 ) { @@ -2224,7 +2222,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont double topMargin = qMax( 0.25 * labelFontMetrics->ascent(), 0.0 ); double bottomMargin = 1.0 + labelFontMetrics->descent(); QgsLabelFeature::VisualMargin vm( topMargin, 0.0, bottomMargin, 0.0 ); - vm *= xform->mapUnitsPerPixel() / context.rasterScaleFactor(); + vm *= xform->mapUnitsPerPixel(); ( *labelFeature )->setVisualMargin( vm ); // store the label's calculated font for later use during painting @@ -2234,7 +2232,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont // TODO: only for placement which needs character info // account for any data defined font metrics adjustments lf->calculateInfo( placement == QgsPalLayerSettings::Curved || placement == QgsPalLayerSettings::PerimeterCurved, - labelFontMetrics.data(), xform, context.rasterScaleFactor(), maxcharanglein, maxcharangleout ); + labelFontMetrics.data(), xform, 1.0, maxcharanglein, maxcharangleout ); // for labelFeature the LabelInfo is passed to feat when it is registered // TODO: allow layer-wide feature dist in PAL...? @@ -2706,7 +2704,7 @@ void QgsPalLayerSettings::parseTextStyle( QFont& labelFont, wordspace = wspacing; } } - labelFont.setWordSpacing( QgsTextRenderer::scaleToPixelContext( wordspace, context, fontunits, false, mFormat.sizeMapUnitScale() ) ); + labelFont.setWordSpacing( QgsTextRenderer::scaleToPixelContext( wordspace, context, fontunits, mFormat.sizeMapUnitScale() ) ); // data defined letter spacing? double letterspace = labelFont.letterSpacing(); @@ -2720,7 +2718,7 @@ void QgsPalLayerSettings::parseTextStyle( QFont& labelFont, letterspace = lspacing; } } - labelFont.setLetterSpacing( QFont::AbsoluteSpacing, QgsTextRenderer::scaleToPixelContext( letterspace, context, fontunits, false, mFormat.sizeMapUnitScale() ) ); + labelFont.setLetterSpacing( QFont::AbsoluteSpacing, QgsTextRenderer::scaleToPixelContext( letterspace, context, fontunits, mFormat.sizeMapUnitScale() ) ); // data defined strikeout font style? if ( dataDefinedEvaluate( QgsPalLayerSettings::Strikeout, exprVal, &context.expressionContext(), labelFont.strikeOut() ) ) diff --git a/src/core/qgsrendercontext.cpp b/src/core/qgsrendercontext.cpp index 29d8ebafb21f..2a5984c84d20 100644 --- a/src/core/qgsrendercontext.cpp +++ b/src/core/qgsrendercontext.cpp @@ -28,7 +28,6 @@ QgsRenderContext::QgsRenderContext() , mPainter( nullptr ) , mRenderingStopped( false ) , mScaleFactor( 1.0 ) - , mRasterScaleFactor( 1.0 ) , mRendererScale( 1.0 ) , mLabelingEngine( nullptr ) , mGeometry( nullptr ) @@ -47,7 +46,6 @@ QgsRenderContext::QgsRenderContext( const QgsRenderContext& rh ) , mMapToPixel( rh.mMapToPixel ) , mRenderingStopped( rh.mRenderingStopped ) , mScaleFactor( rh.mScaleFactor ) - , mRasterScaleFactor( rh.mRasterScaleFactor ) , mRendererScale( rh.mRendererScale ) , mLabelingEngine( rh.mLabelingEngine ) , mSelectionColor( rh.mSelectionColor ) @@ -69,7 +67,6 @@ QgsRenderContext&QgsRenderContext::operator=( const QgsRenderContext & rh ) mMapToPixel = rh.mMapToPixel; mRenderingStopped = rh.mRenderingStopped; mScaleFactor = rh.mScaleFactor; - mRasterScaleFactor = rh.mRasterScaleFactor; mRendererScale = rh.mRendererScale; mLabelingEngine = rh.mLabelingEngine; mSelectionColor = rh.mSelectionColor; @@ -92,7 +89,6 @@ QgsRenderContext QgsRenderContext::fromQPainter( QPainter* painter ) { QgsRenderContext context; context.setPainter( painter ); - context.setRasterScaleFactor( 1.0 ); if ( painter && painter->device() ) { context.setScaleFactor( painter->device()->logicalDpiX() / 25.4 ); @@ -143,7 +139,6 @@ QgsRenderContext QgsRenderContext::fromMapSettings( const QgsMapSettings& mapSet ctx.setFlag( RenderMapTile, mapSettings.testFlag( QgsMapSettings::RenderMapTile ) ); ctx.setFlag( Antialiasing, mapSettings.testFlag( QgsMapSettings::Antialiasing ) ); ctx.setFlag( RenderPartialOutput, mapSettings.testFlag( QgsMapSettings::RenderPartialOutput ) ); - ctx.setRasterScaleFactor( 1.0 ); ctx.setScaleFactor( mapSettings.outputDpi() / 25.4 ); // = pixels per mm ctx.setRendererScale( mapSettings.scale() ); ctx.setExpressionContext( mapSettings.expressionContext() ); diff --git a/src/core/qgsrendercontext.h b/src/core/qgsrendercontext.h index da4abfb7a934..e792ba95d0e2 100644 --- a/src/core/qgsrendercontext.h +++ b/src/core/qgsrendercontext.h @@ -117,8 +117,6 @@ class CORE_EXPORT QgsRenderContext double scaleFactor() const {return mScaleFactor;} - double rasterScaleFactor() const {return mRasterScaleFactor;} - bool renderingStopped() const {return mRenderingStopped;} bool forceVectorOutput() const; @@ -160,7 +158,6 @@ class CORE_EXPORT QgsRenderContext void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;} void setScaleFactor( double factor ) {mScaleFactor = factor;} - void setRasterScaleFactor( double factor ) {mRasterScaleFactor = factor;} void setRendererScale( double scale ) {mRendererScale = scale;} void setPainter( QPainter* p ) {mPainter = p;} @@ -262,9 +259,6 @@ class CORE_EXPORT QgsRenderContext //! Factor to scale line widths and point marker sizes double mScaleFactor; - //! Factor to scale rasters - double mRasterScaleFactor; - //! Map scale double mRendererScale; diff --git a/src/core/qgstextrenderer.cpp b/src/core/qgstextrenderer.cpp index e71e81ed1521..84e3f524191c 100644 --- a/src/core/qgstextrenderer.cpp +++ b/src/core/qgstextrenderer.cpp @@ -1255,7 +1255,7 @@ QFont QgsTextFormat::scaledFont( const QgsRenderContext& context ) const { QFont font = d->textFont; int fontPixelSize = QgsTextRenderer::sizeToPixel( d->fontSize, context, d->fontSizeUnits, - true, d->fontSizeMapUnitScale ); + d->fontSizeMapUnitScale ); font.setPixelSize( fontPixelSize ); return font; } @@ -1610,12 +1610,12 @@ bool QgsTextFormat::containsAdvancedEffects() const } -int QgsTextRenderer::sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor, const QgsMapUnitScale& mapUnitScale ) +int QgsTextRenderer::sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale ) { - return static_cast< int >( scaleToPixelContext( size, c, unit, rasterfactor, mapUnitScale ) + 0.5 ); + return static_cast< int >( scaleToPixelContext( size, c, unit, mapUnitScale ) + 0.5 ); } -double QgsTextRenderer::scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor, const QgsMapUnitScale& mapUnitScale ) +double QgsTextRenderer::scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale ) { // if render context is that of device (i.e. not a scaled map), just return size double mapUnitsPerPixel = mapUnitScale.computeMapUnitsPerPixel( c ); @@ -1625,7 +1625,7 @@ double QgsTextRenderer::scaleToPixelContext( double size, const QgsRenderContext case QgsUnitTypes::RenderMapUnits: if ( mapUnitsPerPixel > 0.0 ) { - size = size / mapUnitsPerPixel * ( rasterfactor ? c.rasterScaleFactor() : 1 ); + size = size / mapUnitsPerPixel; } if ( unit == QgsUnitTypes::RenderMapUnits ) { @@ -1642,11 +1642,11 @@ double QgsTextRenderer::scaleToPixelContext( double size, const QgsRenderContext break; case QgsUnitTypes::RenderMillimeters: - size *= c.scaleFactor() * ( rasterfactor ? c.rasterScaleFactor() : 1 ); + size *= c.scaleFactor(); break; case QgsUnitTypes::RenderPoints: - size *= 0.352778 * c.scaleFactor() * ( rasterfactor ? c.rasterScaleFactor() : 1 ); + size *= 0.352778 * c.scaleFactor(); break; case QgsUnitTypes::RenderPercentage: @@ -1829,7 +1829,7 @@ void QgsTextRenderer::drawBuffer( QgsRenderContext& context, const QgsTextRender QgsTextBufferSettings buffer = format.buffer(); double penSize = QgsTextRenderer::scaleToPixelContext( buffer.size(), context, - buffer.sizeUnit(), true, buffer.sizeMapUnitScale() ); + buffer.sizeUnit(), buffer.sizeMapUnitScale() ); QPainterPath path; path.setFillRule( Qt::WindingFill ); @@ -2024,13 +2024,13 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer if ( background.sizeType() == QgsTextBackgroundSettings::SizeFixed ) { sizeOut = scaleToPixelContext( background.size().width(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); } else if ( background.sizeType() == QgsTextBackgroundSettings::SizeBuffer ) { sizeOut = qMax( component.size.width(), component.size.height() ); double bufferSize = scaleToPixelContext( background.size().width(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); // add buffer sizeOut += bufferSize * 2; @@ -2065,7 +2065,7 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer QgsStringMap shdwmap( map ); shdwmap[QStringLiteral( "fill" )] = shadow.color().name(); shdwmap[QStringLiteral( "outline" )] = shadow.color().name(); - shdwmap[QStringLiteral( "size" )] = QString::number( sizeOut * context.rasterScaleFactor() ); + shdwmap[QStringLiteral( "size" )] = QString::number( sizeOut ); // store SVG's drawing in QPicture for drop shadow call QPicture svgPict; @@ -2101,9 +2101,8 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer p->save(); p->translate( component.center.x(), component.center.y() ); p->rotate( component.rotation ); - p->scale( 1.0 / context.rasterScaleFactor(), 1.0 / context.rasterScaleFactor() ); - double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), true, background.offsetMapUnitScale() ); - double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), true, background.offsetMapUnitScale() ); + double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), background.offsetMapUnitScale() ); + double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), background.offsetMapUnitScale() ); p->translate( QPointF( xoff, yoff ) ); p->rotate( component.rotationOffset ); p->translate( -sizeOut / 2, sizeOut / 2 ); @@ -2135,8 +2134,8 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer } p->translate( component.center.x(), component.center.y() ); p->rotate( component.rotation ); - double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), false, background.offsetMapUnitScale() ); - double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), false, background.offsetMapUnitScale() ); + double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), background.offsetMapUnitScale() ); + double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), background.offsetMapUnitScale() ); p->translate( QPointF( xoff, yoff ) ); p->rotate( component.rotationOffset ); svgM->renderPoint( QPointF( 0, 0 ), svgContext ); @@ -2155,9 +2154,9 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer if ( background.sizeType() == QgsTextBackgroundSettings::SizeFixed ) { w = scaleToPixelContext( background.size().width(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); h = scaleToPixelContext( background.size().height(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); } else if ( background.sizeType() == QgsTextBackgroundSettings::SizeBuffer ) { @@ -2182,9 +2181,9 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer } double bufferWidth = scaleToPixelContext( background.size().width(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); double bufferHeight = scaleToPixelContext( background.size().height(), context, background.sizeUnit(), - false, background.sizeMapUnitScale() ); + background.sizeMapUnitScale() ); w += bufferWidth * 2; h += bufferHeight * 2; @@ -2203,12 +2202,12 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer } p->translate( QPointF( component.center.x(), component.center.y() ) ); p->rotate( component.rotation ); - double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), false, background.offsetMapUnitScale() ); - double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), false, background.offsetMapUnitScale() ); + double xoff = QgsTextRenderer::scaleToPixelContext( background.offset().x(), context, background.offsetUnit(), background.offsetMapUnitScale() ); + double yoff = QgsTextRenderer::scaleToPixelContext( background.offset().y(), context, background.offsetUnit(), background.offsetMapUnitScale() ); p->translate( QPointF( xoff, yoff ) ); p->rotate( component.rotationOffset ); - double penSize = QgsTextRenderer::scaleToPixelContext( background.borderWidth(), context, background.borderWidthUnit(), true, background.borderWidthMapUnitScale() ); + double penSize = QgsTextRenderer::scaleToPixelContext( background.borderWidth(), context, background.borderWidthUnit(), background.borderWidthMapUnitScale() ); QPen pen; if ( background.borderWidth() > 0 ) @@ -2239,8 +2238,8 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer } else { - double xRadius = QgsTextRenderer::scaleToPixelContext( background.radii().width(), context, background.radiiUnit(), true, background.radiiMapUnitScale() ); - double yRadius = QgsTextRenderer::scaleToPixelContext( background.radii().height(), context, background.radiiUnit(), true, background.radiiMapUnitScale() ); + double xRadius = QgsTextRenderer::scaleToPixelContext( background.radii().width(), context, background.radiiUnit(), background.radiiMapUnitScale() ); + double yRadius = QgsTextRenderer::scaleToPixelContext( background.radii().height(), context, background.radiiUnit(), background.radiiMapUnitScale() ); shapep.drawRoundedRect( rect, xRadius, yRadius ); } } @@ -2251,8 +2250,6 @@ void QgsTextRenderer::drawBackground( QgsRenderContext& context, QgsTextRenderer } shapep.end(); - p->scale( 1.0 / context.rasterScaleFactor(), 1.0 / context.rasterScaleFactor() ); - if ( format.shadow().enabled() && format.shadow().shadowPlacement() == QgsTextShadowSettings::ShadowShape ) { component.picture = shapePict; @@ -2292,7 +2289,7 @@ void QgsTextRenderer::drawShadow( QgsRenderContext& context, const QgsTextRender // generate pixmap representation of label component drawing bool mapUnits = shadow.blurRadiusUnit() == QgsUnitTypes::RenderMapUnits; - double radius = QgsTextRenderer::scaleToPixelContext( shadow.blurRadius(), context, shadow.blurRadiusUnit(), !mapUnits, shadow.blurRadiusMapUnitScale() ); + double radius = QgsTextRenderer::scaleToPixelContext( shadow.blurRadius(), context, shadow.blurRadiusUnit(), shadow.blurRadiusMapUnitScale() ); radius /= ( mapUnits ? context.scaleFactor() / component.dpiRatio : 1 ); radius = static_cast< int >( radius + 0.5 ); @@ -2353,7 +2350,7 @@ void QgsTextRenderer::drawShadow( QgsRenderContext& context, const QgsTextRender #endif double offsetDist = QgsTextRenderer::scaleToPixelContext( shadow.offsetDistance(), context, - shadow.offsetUnit(), true, shadow.offsetMapUnitScale() ); + shadow.offsetUnit(), shadow.offsetMapUnitScale() ); double angleRad = shadow.offsetAngle() * M_PI / 180; // to radians if ( shadow.offsetGlobal() ) { @@ -2484,10 +2481,6 @@ void QgsTextRenderer::drawTextInternal( TextPart drawType, if ( !qgsDoubleNear( component.rotation, 0.0 ) ) context.painter()->rotate( -component.rotation * 180 / M_PI ); - // scale down painter: the font size has been multiplied by raster scale factor - // to workaround a Qt font scaling bug with small font sizes - context.painter()->scale( 1.0 / context.rasterScaleFactor(), 1.0 / context.rasterScaleFactor() ); - // figure x offset for horizontal alignment of multiple lines double xMultiLineOffset = 0.0; double labelWidth = fontMetrics->width( line ); diff --git a/src/core/qgstextrenderer.h b/src/core/qgstextrenderer.h index c992d0616e9c..8ea77c4b31d2 100644 --- a/src/core/qgstextrenderer.h +++ b/src/core/qgstextrenderer.h @@ -1130,21 +1130,19 @@ class CORE_EXPORT QgsTextRenderer * @param size size to convert * @param c rendercontext * @param unit size units - * @param rasterfactor whether to consider oversampling * @param mapUnitScale a mapUnitScale clamper * @return font pixel size */ - static int sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); + static int sizeToPixel( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); /** Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling) * @param size size to convert * @param c rendercontext * @param unit size units - * @param rasterfactor whether to consider oversampling * @param mapUnitScale a mapUnitScale clamper * @return size that will render, as double */ - static double scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, bool rasterfactor = false, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); + static double scaleToPixelContext( double size, const QgsRenderContext& c, QgsUnitTypes::RenderUnit unit, const QgsMapUnitScale& mapUnitScale = QgsMapUnitScale() ); /** Draws text within a rectangle using the specified settings. * @param rect destination rectangle for text diff --git a/src/core/qgsvectorlayerlabelprovider.cpp b/src/core/qgsvectorlayerlabelprovider.cpp index 98d1494c6a83..33c1c0c39b12 100644 --- a/src/core/qgsvectorlayerlabelprovider.cpp +++ b/src/core/qgsvectorlayerlabelprovider.cpp @@ -552,8 +552,8 @@ void QgsVectorLayerLabelProvider::drawLabelPrivate( pal::LabelPosition* label, Q component.center = centerPt; // convert label size to render units - double labelWidthPx = QgsTextRenderer::scaleToPixelContext( label->getWidth(), context, QgsUnitTypes::RenderMapUnits, true ); - double labelHeightPx = QgsTextRenderer::scaleToPixelContext( label->getHeight(), context, QgsUnitTypes::RenderMapUnits, true ); + double labelWidthPx = QgsTextRenderer::scaleToPixelContext( label->getWidth(), context, QgsUnitTypes::RenderMapUnits, QgsMapUnitScale() ); + double labelHeightPx = QgsTextRenderer::scaleToPixelContext( label->getHeight(), context, QgsUnitTypes::RenderMapUnits, QgsMapUnitScale() ); component.size = QSizeF( labelWidthPx, labelHeightPx ); diff --git a/src/core/raster/qgsrasterlayerrenderer.cpp b/src/core/raster/qgsrasterlayerrenderer.cpp index 6f698e5b8d76..a9731bfb4262 100644 --- a/src/core/raster/qgsrasterlayerrenderer.cpp +++ b/src/core/raster/qgsrasterlayerrenderer.cpp @@ -172,7 +172,7 @@ QgsRasterLayerRenderer::QgsRasterLayerRenderer( QgsRasterLayer* layer, QgsRender // TODO R->mLastViewPort = *mRasterViewPort; // TODO: is it necessary? Probably WMS only? - layer->dataProvider()->setDpi( rendererContext.rasterScaleFactor() * 25.4 * rendererContext.scaleFactor() ); + layer->dataProvider()->setDpi( 25.4 * rendererContext.scaleFactor() ); // copy the whole raster pipe! diff --git a/src/core/symbology-ng/qgsellipsesymbollayer.cpp b/src/core/symbology-ng/qgsellipsesymbollayer.cpp index 98520820501b..36f06c77e0c6 100644 --- a/src/core/symbology-ng/qgsellipsesymbollayer.cpp +++ b/src/core/symbology-ng/qgsellipsesymbollayer.cpp @@ -676,8 +676,6 @@ QRectF QgsEllipseSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext& con double angle = 0; calculateOffsetAndRotation( context, size.width(), size.height(), hasDataDefinedRotation, offset, angle ); - double pixelSize = 1.0 / context.renderContext().rasterScaleFactor(); - QMatrix transform; // move to the desired position @@ -707,8 +705,8 @@ QRectF QgsEllipseSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext& con } } - //antialiasing - penWidth += pixelSize; + //antialiasing, add 1 pixel + penWidth += 1; QRectF symbolBounds = transform.mapRect( QRectF( -size.width() / 2.0, -size.height() / 2.0, diff --git a/src/core/symbology-ng/qgsfillsymbollayer.cpp b/src/core/symbology-ng/qgsfillsymbollayer.cpp index 61530020904f..f9219cbc27bd 100644 --- a/src/core/symbology-ng/qgsfillsymbollayer.cpp +++ b/src/core/symbology-ng/qgsfillsymbollayer.cpp @@ -235,13 +235,6 @@ void QgsSimpleFillSymbolLayer::startRender( QgsSymbolRenderContext& context ) fillColor.setAlphaF( context.alpha() * mColor.alphaF() ); mBrush = QBrush( fillColor, mBrushStyle ); - // scale brush content for printout - double rasterScaleFactor = context.renderContext().rasterScaleFactor(); - if ( rasterScaleFactor != 1.0 ) - { - mBrush.setMatrix( QMatrix().scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor ) ); - } - QColor selColor = context.renderContext().selectionColor(); QColor selPenColor = selColor == mColor ? selColor : mBorderColor; if ( ! SELECTION_IS_OPAQUE ) selColor.setAlphaF( context.alpha() ); @@ -1210,8 +1203,8 @@ void QgsShapeburstFillSymbolLayer::renderPolygon( const QPolygonF& points, QList //create a QImage to draw shapeburst in double imWidth = points.boundingRect().width() + ( sideBuffer * 2 ); double imHeight = points.boundingRect().height() + ( sideBuffer * 2 ); - QImage * fillImage = new QImage( imWidth * context.renderContext().rasterScaleFactor(), - imHeight * context.renderContext().rasterScaleFactor(), QImage::Format_ARGB32_Premultiplied ); + QImage * fillImage = new QImage( imWidth, + imHeight, QImage::Format_ARGB32_Premultiplied ); //Fill this image with black. Initially the distance transform is drawn in greyscale, where black pixels have zero distance from the //polygon boundary. Since we don't care about pixels which fall outside the polygon, we start with a black image and then draw over it the //polygon in white. The distance transform function then fills in the correct distance values for the white pixels. @@ -1229,7 +1222,6 @@ void QgsShapeburstFillSymbolLayer::renderPolygon( const QPolygonF& points, QList imgPainter.setBrush( QBrush( Qt::white ) ); imgPainter.setPen( QPen( Qt::black ) ); imgPainter.translate( -points.boundingRect().left() + sideBuffer, - points.boundingRect().top() + sideBuffer ); - imgPainter.scale( context.renderContext().rasterScaleFactor(), context.renderContext().rasterScaleFactor() ); _renderPolygon( &imgPainter, points, rings, context ); imgPainter.end(); @@ -1248,7 +1240,6 @@ void QgsShapeburstFillSymbolLayer::renderPolygon( const QPolygonF& points, QList imgPainter.setBrush( QBrush( Qt::white ) ); imgPainter.setPen( QPen( Qt::black ) ); imgPainter.translate( -points.boundingRect().left() + sideBuffer, - points.boundingRect().top() + sideBuffer ); - imgPainter.scale( context.renderContext().rasterScaleFactor(), context.renderContext().rasterScaleFactor() ); _renderPolygon( &imgPainter, points, nullptr, context ); } imgPainter.end(); @@ -1292,7 +1283,6 @@ void QgsShapeburstFillSymbolLayer::renderPolygon( const QPolygonF& points, QList p->translate( offset ); } - p->scale( 1 / context.renderContext().rasterScaleFactor(), 1 / context.renderContext().rasterScaleFactor() ); p->drawImage( points.boundingRect().left() - sideBuffer, points.boundingRect().top() - sideBuffer, *fillImage ); delete fillImage; @@ -1961,7 +1951,7 @@ void QgsSVGFillSymbolLayer::applyPattern( QBrush& brush, const QString& svgFileP bool fitsInCache = true; double outlineWidth = QgsSymbolLayerUtils::convertToPainterUnits( context.renderContext(), svgOutlineWidth, svgOutlineWidthUnit, svgOutlineWidthMapUnitScale ); const QImage& patternImage = QgsApplication::svgCache()->svgAsImage( svgFilePath, size, svgFillColor, svgOutlineColor, outlineWidth, - context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor(), fitsInCache ); + context.renderContext().scaleFactor(), 1.0, fitsInCache ); if ( !fitsInCache ) { const QPicture& patternPict = QgsApplication::svgCache()->svgAsPicture( svgFilePath, size, svgFillColor, svgOutlineColor, outlineWidth, @@ -1979,7 +1969,6 @@ void QgsSVGFillSymbolLayer::applyPattern( QBrush& brush, const QString& svgFileP } QTransform brushTransform; - brushTransform.scale( 1.0 / context.renderContext().rasterScaleFactor(), 1.0 / context.renderContext().rasterScaleFactor() ); if ( !qgsDoubleNear( context.alpha(), 1.0 ) ) { QImage transparentImage = fitsInCache ? patternImage.copy() : mSvgPattern->copy(); @@ -2778,9 +2767,8 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext& // line rendering needs context for drawing on patternImage QgsRenderContext lineRenderContext; lineRenderContext.setPainter( &p ); - lineRenderContext.setRasterScaleFactor( 1.0 ); - lineRenderContext.setScaleFactor( context.renderContext().scaleFactor() * context.renderContext().rasterScaleFactor() ); - QgsMapToPixel mtp( context.renderContext().mapToPixel().mapUnitsPerPixel() / context.renderContext().rasterScaleFactor() ); + lineRenderContext.setScaleFactor( context.renderContext().scaleFactor() ); + QgsMapToPixel mtp( context.renderContext().mapToPixel().mapUnitsPerPixel() ); lineRenderContext.setMapToPixel( mtp ); lineRenderContext.setForceVectorOutput( false ); lineRenderContext.setExpressionContext( context.renderContext().expressionContext() ); @@ -2819,7 +2807,6 @@ void QgsLinePatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext& } QTransform brushTransform; - brushTransform.scale( 1.0 / context.renderContext().rasterScaleFactor(), 1.0 / context.renderContext().rasterScaleFactor() ); brush.setTransform( brushTransform ); delete fillLineSymbol; @@ -3207,9 +3194,8 @@ void QgsPointPatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext& QgsRenderContext pointRenderContext; pointRenderContext.setRendererScale( context.renderContext().rendererScale() ); pointRenderContext.setPainter( &p ); - pointRenderContext.setRasterScaleFactor( 1.0 ); - pointRenderContext.setScaleFactor( context.renderContext().scaleFactor() * context.renderContext().rasterScaleFactor() ); - QgsMapToPixel mtp( context.renderContext().mapToPixel().mapUnitsPerPixel() / context.renderContext().rasterScaleFactor() ); + pointRenderContext.setScaleFactor( context.renderContext().scaleFactor() ); + QgsMapToPixel mtp( context.renderContext().mapToPixel().mapUnitsPerPixel() ); pointRenderContext.setMapToPixel( mtp ); pointRenderContext.setForceVectorOutput( false ); pointRenderContext.setExpressionContext( context.renderContext().expressionContext() ); @@ -3245,7 +3231,6 @@ void QgsPointPatternFillSymbolLayer::applyPattern( const QgsSymbolRenderContext& brush.setTextureImage( patternImage ); } QTransform brushTransform; - brushTransform.scale( 1.0 / context.renderContext().rasterScaleFactor(), 1.0 / context.renderContext().rasterScaleFactor() ); brush.setTransform( brushTransform ); } diff --git a/src/core/symbology-ng/qgslinesymbollayer.cpp b/src/core/symbology-ng/qgslinesymbollayer.cpp index 6d591bf65b79..cc77c769cc23 100644 --- a/src/core/symbology-ng/qgslinesymbollayer.cpp +++ b/src/core/symbology-ng/qgslinesymbollayer.cpp @@ -203,7 +203,7 @@ void QgsSimpleLineSymbolLayer::startRender( QgsSymbolRenderContext& context ) QStringList versionSplit = QString( qVersion() ).split( '.' ); if ( versionSplit.size() > 1 && versionSplit.at( 1 ).toInt() >= 8 - && ( scaledWidth * context.renderContext().rasterScaleFactor() ) < 1.0 ) + && scaledWidth < 1.0 ) { dashWidthDiv = 1.0; } @@ -522,7 +522,7 @@ void QgsSimpleLineSymbolLayer::applyDataDefinedSymbology( QgsSymbolRenderContext QStringList versionSplit = QString( qVersion() ).split( '.' ); if ( versionSplit.size() > 1 && versionSplit.at( 1 ).toInt() >= 8 - && ( scaledWidth * context.renderContext().rasterScaleFactor() ) < 1.0 ) + && scaledWidth < 1.0 ) { dashWidthDiv = 1.0; } diff --git a/src/core/symbology-ng/qgsmarkersymbollayer.cpp b/src/core/symbology-ng/qgsmarkersymbollayer.cpp index 9f84b3a0383f..e0cd87024a68 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayer.cpp +++ b/src/core/symbology-ng/qgsmarkersymbollayer.cpp @@ -842,16 +842,6 @@ void QgsSimpleMarkerSymbolLayer::startRender( QgsSymbolRenderContext& context ) if ( mUsingCache ) { - if ( !qgsDoubleNear( context.renderContext().rasterScaleFactor(), 1.0 ) ) - { - QTransform transform; - transform.scale( context.renderContext().rasterScaleFactor(), context.renderContext().rasterScaleFactor() ); - if ( !mPolygon.isEmpty() ) - mPolygon = transform.map( mPolygon ); - else - mPath = transform.map( mPath ); - } - if ( !prepareCache( context ) ) { mUsingCache = false; @@ -1017,7 +1007,7 @@ void QgsSimpleMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderCont if ( mUsingCache ) { QImage &img = context.selected() ? mSelCache : mCache; - double s = img.width() / context.renderContext().rasterScaleFactor(); + double s = img.width(); bool hasDataDefinedSize = false; double scaledSize = calculateSize( context, hasDataDefinedSize ); @@ -1456,7 +1446,6 @@ QRectF QgsSimpleMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext QRectF symbolBounds = QgsSimpleMarkerSymbolLayerBase::bounds( point, context ); // need to account for outline width - double pixelSize = 1.0 / context.renderContext().rasterScaleFactor(); double penWidth = 0.0; bool ok = true; if ( hasDataDefinedProperty( QgsSymbolLayer::EXPR_OUTLINE_WIDTH ) ) @@ -1477,8 +1466,8 @@ QRectF QgsSimpleMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext penWidth = 0.0; } } - //antialiasing - penWidth += pixelSize; + //antialiasing, add 1 pixel + penWidth += 1; //extend bounds by pen width / 2.0 symbolBounds.adjust( -penWidth / 2.0, -penWidth / 2.0, @@ -1984,7 +1973,7 @@ void QgsSvgMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderContext { usePict = false; const QImage& img = QgsApplication::svgCache()->svgAsImage( path, size, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor(), fitsInCache ); + context.renderContext().scaleFactor(), 1.0, fitsInCache ); if ( fitsInCache && img.width() > 1 ) { //consider transparency @@ -2007,7 +1996,7 @@ void QgsSvgMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderContext { p->setOpacity( context.alpha() ); const QPicture& pct = QgsApplication::svgCache()->svgAsPicture( path, size, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), context.renderContext().rasterScaleFactor(), context.renderContext().forceVectorOutput() ); + context.renderContext().scaleFactor(), 1.0, context.renderContext().forceVectorOutput() ); if ( pct.width() > 1 ) { @@ -2360,7 +2349,7 @@ bool QgsSvgMarkerSymbolLayer::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa const QByteArray &svgContent = QgsApplication::svgCache()->svgContent( path, size, fillColor, outlineColor, outlineWidth, context.renderContext().scaleFactor(), - context.renderContext().rasterScaleFactor() ); + 1.0 ); //if current entry image is 0: cache image for entry // checks to see if image will fit into cache @@ -2443,10 +2432,9 @@ QRectF QgsSvgMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext& c QSizeF svgViewbox = QgsApplication::svgCache()->svgViewboxSize( path, scaledSize, fillColor, outlineColor, outlineWidth, context.renderContext().scaleFactor(), - context.renderContext().rasterScaleFactor() ); + 1.0 ); double scaledHeight = svgViewbox.isValid() ? scaledSize * svgViewbox.height() / svgViewbox.width() : scaledSize; - double pixelSize = 1.0 / context.renderContext().rasterScaleFactor(); QMatrix transform; @@ -2457,7 +2445,7 @@ QRectF QgsSvgMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext& c transform.rotate( angle ); //antialiasing - outlineWidth += pixelSize / 2.0; + outlineWidth += 1.0 / 2.0; QRectF symbolBounds = transform.mapRect( QRectF( -scaledSize / 2.0, -scaledHeight / 2.0, diff --git a/src/core/symbology-ng/qgspointdistancerenderer.cpp b/src/core/symbology-ng/qgspointdistancerenderer.cpp index 0dbd01663a79..935c74f55821 100644 --- a/src/core/symbology-ng/qgspointdistancerenderer.cpp +++ b/src/core/symbology-ng/qgspointdistancerenderer.cpp @@ -397,7 +397,7 @@ void QgsPointDistanceRenderer::drawLabels( QPointF centerPoint, QgsSymbolRenderC QFont pixelSizeFont = mLabelFont; pixelSizeFont.setPixelSize( context.outputLineWidth( mLabelFont.pointSizeF() * 0.3527 ) ); QFont scaledFont = pixelSizeFont; - scaledFont.setPixelSize( pixelSizeFont.pixelSize() * context.renderContext().rasterScaleFactor() ); + scaledFont.setPixelSize( pixelSizeFont.pixelSize() ); p->setFont( scaledFont ); QFontMetricsF fontMetrics( pixelSizeFont ); @@ -421,7 +421,6 @@ void QgsPointDistanceRenderer::drawLabels( QPointF centerPoint, QgsSymbolRenderC QPointF drawingPoint( centerPoint + currentLabelShift ); p->save(); p->translate( drawingPoint.x(), drawingPoint.y() ); - p->scale( 1.0 / context.renderContext().rasterScaleFactor(), 1.0 / context.renderContext().rasterScaleFactor() ); p->drawText( QPointF( 0, 0 ), groupIt->label ); p->restore(); } diff --git a/src/core/symbology-ng/qgssymbollayerutils.cpp b/src/core/symbology-ng/qgssymbollayerutils.cpp index 2091cfa3d289..b2e73720763e 100644 --- a/src/core/symbology-ng/qgssymbollayerutils.cpp +++ b/src/core/symbology-ng/qgssymbollayerutils.cpp @@ -3305,7 +3305,8 @@ double QgsSymbolLayerUtils::lineWidthScaleFactor( const QgsRenderContext& c, Qgs } } case QgsUnitTypes::RenderPixels: - return 1.0 / c.rasterScaleFactor(); + return 1.0; + case QgsUnitTypes::RenderUnknownUnit: case QgsUnitTypes::RenderPercentage: //no sensible value @@ -3343,7 +3344,7 @@ double QgsSymbolLayerUtils::convertToMapUnits( const QgsRenderContext &c, double double minSizeMU = -DBL_MAX; if ( scale.minSizeMMEnabled ) { - minSizeMU = scale.minSizeMM * c.scaleFactor() * c.rasterScaleFactor() * mup; + minSizeMU = scale.minSizeMM * c.scaleFactor() * mup; } if ( !qgsDoubleNear( scale.minScale, 0.0 ) ) { @@ -3354,7 +3355,7 @@ double QgsSymbolLayerUtils::convertToMapUnits( const QgsRenderContext &c, double double maxSizeMU = DBL_MAX; if ( scale.maxSizeMMEnabled ) { - maxSizeMU = scale.maxSizeMM * c.scaleFactor() * c.rasterScaleFactor() * mup; + maxSizeMU = scale.maxSizeMM * c.scaleFactor() * mup; } if ( !qgsDoubleNear( scale.maxScale, 0.0 ) ) { @@ -3366,11 +3367,11 @@ double QgsSymbolLayerUtils::convertToMapUnits( const QgsRenderContext &c, double } case QgsUnitTypes::RenderMillimeters: { - return size * c.scaleFactor() * c.rasterScaleFactor() * mup; + return size * c.scaleFactor() * mup; } case QgsUnitTypes::RenderPoints: { - return size * c.scaleFactor() * c.rasterScaleFactor() * mup / POINTS_TO_MM; + return size * c.scaleFactor() * mup / POINTS_TO_MM; } case QgsUnitTypes::RenderPixels: { @@ -3397,11 +3398,11 @@ double QgsSymbolLayerUtils::convertFromMapUnits( const QgsRenderContext& context } case QgsUnitTypes::RenderMillimeters: { - return sizeInMapUnits / ( context.scaleFactor() * context.rasterScaleFactor() * mup ); + return sizeInMapUnits / ( context.scaleFactor() * mup ); } case QgsUnitTypes::RenderPoints: { - return sizeInMapUnits / ( context.scaleFactor() * context.rasterScaleFactor() * mup / POINTS_TO_MM ); + return sizeInMapUnits / ( context.scaleFactor() * mup / POINTS_TO_MM ); } case QgsUnitTypes::RenderPixels: { @@ -3421,15 +3422,15 @@ double QgsSymbolLayerUtils::pixelSizeScaleFactor( const QgsRenderContext& c, Qgs switch ( u ) { case QgsUnitTypes::RenderMillimeters: - return ( c.scaleFactor() * c.rasterScaleFactor() ); + return c.scaleFactor(); case QgsUnitTypes::RenderPoints: - return ( c.scaleFactor() * c.rasterScaleFactor() ) * POINTS_TO_MM; + return c.scaleFactor() * POINTS_TO_MM; case QgsUnitTypes::RenderMapUnits: { double mup = scale.computeMapUnitsPerPixel( c ); if ( mup > 0 ) { - return c.rasterScaleFactor() / mup; + return 1.0 / mup; } else { @@ -3451,9 +3452,9 @@ double QgsSymbolLayerUtils::mapUnitScaleFactor( const QgsRenderContext &c, QgsUn switch ( u ) { case QgsUnitTypes::RenderMillimeters: - return scale.computeMapUnitsPerPixel( c ) * c.scaleFactor() * c.rasterScaleFactor(); + return scale.computeMapUnitsPerPixel( c ) * c.scaleFactor(); case QgsUnitTypes::RenderPoints: - return scale.computeMapUnitsPerPixel( c ) * c.scaleFactor() * c.rasterScaleFactor() * POINTS_TO_MM; + return scale.computeMapUnitsPerPixel( c ) * c.scaleFactor() * POINTS_TO_MM; case QgsUnitTypes::RenderMapUnits: { return 1.0; diff --git a/src/gui/qgsmapcanvasitem.cpp b/src/gui/qgsmapcanvasitem.cpp index d43f225acbc4..679b37924827 100644 --- a/src/gui/qgsmapcanvasitem.cpp +++ b/src/gui/qgsmapcanvasitem.cpp @@ -128,7 +128,6 @@ bool QgsMapCanvasItem::setRenderContextVariables( QPainter* p, QgsRenderContext& context.setPainter( p ); context.setRendererScale( mMapCanvas->scale() ); context.setScaleFactor( ms.outputDpi() / 25.4 ); - context.setRasterScaleFactor( 1.0 ); context.setForceVectorOutput( true ); return true; diff --git a/src/gui/qgstextpreview.cpp b/src/gui/qgstextpreview.cpp index 00f8a92864f8..b1f1a02d7941 100644 --- a/src/gui/qgstextpreview.cpp +++ b/src/gui/qgstextpreview.cpp @@ -42,16 +42,16 @@ void QgsTextPreview::paintEvent( QPaintEvent *e ) // slightly inset text double xtrans = 0; if ( mFormat.buffer().enabled() ) - xtrans = QgsTextRenderer::scaleToPixelContext( mFormat.buffer().size(), mContext, mFormat.buffer().sizeUnit(), false, mFormat.buffer().sizeMapUnitScale() ); + xtrans = QgsTextRenderer::scaleToPixelContext( mFormat.buffer().size(), mContext, mFormat.buffer().sizeUnit(), mFormat.buffer().sizeMapUnitScale() ); if ( mFormat.background().enabled() && mFormat.background().sizeType() != QgsTextBackgroundSettings::SizeFixed ) - xtrans = qMax( xtrans, QgsTextRenderer::scaleToPixelContext( mFormat.background().size().width(), mContext, mFormat.background().sizeUnit(), false, mFormat.background().sizeMapUnitScale() ) ); + xtrans = qMax( xtrans, QgsTextRenderer::scaleToPixelContext( mFormat.background().size().width(), mContext, mFormat.background().sizeUnit(), mFormat.background().sizeMapUnitScale() ) ); xtrans += 4; double ytrans = 0.0; if ( mFormat.buffer().enabled() ) - ytrans = qMax( ytrans, QgsTextRenderer::scaleToPixelContext( mFormat.buffer().size(), mContext, mFormat.buffer().sizeUnit(), false, mFormat.buffer().sizeMapUnitScale() ) ); + ytrans = qMax( ytrans, QgsTextRenderer::scaleToPixelContext( mFormat.buffer().size(), mContext, mFormat.buffer().sizeUnit(), mFormat.buffer().sizeMapUnitScale() ) ); if ( mFormat.background().enabled() ) - ytrans = qMax( ytrans, QgsTextRenderer::scaleToPixelContext( mFormat.background().size().height(), mContext, mFormat.background().sizeUnit(), false, mFormat.background().sizeMapUnitScale() ) ); + ytrans = qMax( ytrans, QgsTextRenderer::scaleToPixelContext( mFormat.background().size().height(), mContext, mFormat.background().sizeUnit(), mFormat.background().sizeMapUnitScale() ) ); ytrans += 4; QRectF textRect = rect(); From cc56c80b5bbee2a3d8c423138305cd3e7354e97b Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 08:29:48 +1000 Subject: [PATCH 061/332] Small cleanups and documentation improvements for QgsRenderContext --- src/core/qgsrendercontext.cpp | 31 +++++++----------- src/core/qgsrendercontext.h | 60 +++++++++++++++++++++++++++-------- 2 files changed, 57 insertions(+), 34 deletions(-) diff --git a/src/core/qgsrendercontext.cpp b/src/core/qgsrendercontext.cpp index 2a5984c84d20..5deeb73b4a26 100644 --- a/src/core/qgsrendercontext.cpp +++ b/src/core/qgsrendercontext.cpp @@ -25,15 +25,6 @@ QgsRenderContext::QgsRenderContext() : mFlags( DrawEditingInfo | UseAdvancedEffects | DrawSelection | UseRenderingOptimization ) - , mPainter( nullptr ) - , mRenderingStopped( false ) - , mScaleFactor( 1.0 ) - , mRendererScale( 1.0 ) - , mLabelingEngine( nullptr ) - , mGeometry( nullptr ) - , mFeatureFilterProvider( nullptr ) - , mSegmentationTolerance( M_PI_2 / 90 ) - , mSegmentationToleranceType( QgsAbstractGeometry::MaximumAngle ) { mVectorSimplifyMethod.setSimplifyHints( QgsVectorSimplifyMethod::NoSimplification ); } @@ -73,18 +64,12 @@ QgsRenderContext&QgsRenderContext::operator=( const QgsRenderContext & rh ) mVectorSimplifyMethod = rh.mVectorSimplifyMethod; mExpressionContext = rh.mExpressionContext; mGeometry = rh.mGeometry; - mFeatureFilterProvider = rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->clone() : nullptr; + mFeatureFilterProvider.reset( rh.mFeatureFilterProvider ? rh.mFeatureFilterProvider->clone() : nullptr ); mSegmentationTolerance = rh.mSegmentationTolerance; mSegmentationToleranceType = rh.mSegmentationToleranceType; return *this; } -QgsRenderContext::~QgsRenderContext() -{ - delete mFeatureFilterProvider; - mFeatureFilterProvider = nullptr; -} - QgsRenderContext QgsRenderContext::fromQPainter( QPainter* painter ) { QgsRenderContext context; @@ -209,11 +194,17 @@ void QgsRenderContext::setUseRenderingOptimization( bool enabled ) void QgsRenderContext::setFeatureFilterProvider( const QgsFeatureFilterProvider* ffp ) { - delete mFeatureFilterProvider; - mFeatureFilterProvider = nullptr; - if ( ffp ) { - mFeatureFilterProvider = ffp->clone(); + mFeatureFilterProvider.reset( ffp->clone() ); + } + else + { + mFeatureFilterProvider.reset( nullptr ); } } + +const QgsFeatureFilterProvider* QgsRenderContext::featureFilterProvider() const +{ + return mFeatureFilterProvider.data(); +} diff --git a/src/core/qgsrendercontext.h b/src/core/qgsrendercontext.h index e792ba95d0e2..5945d056546d 100644 --- a/src/core/qgsrendercontext.h +++ b/src/core/qgsrendercontext.h @@ -27,13 +27,12 @@ #include "qgsrectangle.h" #include "qgsvectorsimplifymethod.h" #include "qgsexpressioncontext.h" +#include "qgsfeaturefilterprovider.h" class QPainter; - class QgsAbstractGeometry; class QgsLabelingEngine; class QgsMapSettings; -class QgsFeatureFilterProvider; /** \ingroup core @@ -50,8 +49,6 @@ class CORE_EXPORT QgsRenderContext QgsRenderContext( const QgsRenderContext& rh ); QgsRenderContext& operator=( const QgsRenderContext& rh ); - ~QgsRenderContext(); - /** Enumeration of flags that affect rendering operations. * @note added in QGIS 2.14 */ @@ -103,6 +100,10 @@ class CORE_EXPORT QgsRenderContext //getters + /** + * Returns the destination QPainter for the render operation. + * @see setPainter() + */ QPainter* painter() {return mPainter;} const QPainter* constPainter() const { return mPainter; } @@ -115,6 +116,12 @@ class CORE_EXPORT QgsRenderContext const QgsMapToPixel& mapToPixel() const {return mMapToPixel;} + /** + * Returns the scaling factor for the render to convert painter units + * to physical sizes. This is usually equal to the number of pixels + * per millimeter. + * @see setScaleFactor() + */ double scaleFactor() const {return mScaleFactor;} bool renderingStopped() const {return mRenderingStopped;} @@ -131,6 +138,11 @@ class CORE_EXPORT QgsRenderContext bool drawEditingInformation() const; + /** + * Returns the renderer map scale. This will match the desired scale denominator + * for the rendered map, eg 1000.0 for a 1:1000 map render. + * @see setRendererScale() + */ double rendererScale() const {return mRendererScale;} //! Get access to new labeling engine (may be nullptr) @@ -157,8 +169,28 @@ class CORE_EXPORT QgsRenderContext void setDrawEditingInformation( bool b ); void setRenderingStopped( bool stopped ) {mRenderingStopped = stopped;} + + /** + * Sets the scaling factor for the render to convert painter units + * to physical sizes. This should usually be equal to the number of pixels + * per millimeter. + * @see scaleFactor() + */ void setScaleFactor( double factor ) {mScaleFactor = factor;} + + /** + * Sets the renderer map scale. This should match the desired scale denominator + * for the rendered map, eg 1000.0 for a 1:1000 map render. + * @see rendererScale() + */ void setRendererScale( double scale ) {mRendererScale = scale;} + + /** + * Sets the destination QPainter for the render operation. Ownership of the painter + * is not transferred and the QPainter destination must stay alive for the duration + * of any rendering operations. + * @see painter() + */ void setPainter( QPainter* p ) {mPainter = p;} void setForceVectorOutput( bool force ); @@ -225,7 +257,7 @@ class CORE_EXPORT QgsRenderContext * @note added in QGIS 2.14 * @see setFeatureFilterProvider() */ - const QgsFeatureFilterProvider* featureFilterProvider() const { return mFeatureFilterProvider; } + const QgsFeatureFilterProvider* featureFilterProvider() const; /** Sets the segmentation tolerance applied when rendering curved geometries @param tolerance the segmentation tolerance*/ @@ -244,7 +276,7 @@ class CORE_EXPORT QgsRenderContext Flags mFlags; //! Painter for rendering operations - QPainter* mPainter; + QPainter* mPainter = nullptr; //! For transformation between coordinate systems. Can be invalid if on-the-fly reprojection is not used QgsCoordinateTransform mCoordTransform; @@ -254,16 +286,16 @@ class CORE_EXPORT QgsRenderContext QgsMapToPixel mMapToPixel; //! True if the rendering has been canceled - bool mRenderingStopped; + bool mRenderingStopped = false; //! Factor to scale line widths and point marker sizes - double mScaleFactor; + double mScaleFactor = 1.0; //! Map scale - double mRendererScale; + double mRendererScale = 1.0; //! Newer labeling engine implementation (can be nullptr) - QgsLabelingEngine* mLabelingEngine; + QgsLabelingEngine* mLabelingEngine = nullptr; //! Color used for features that are marked as selected QColor mSelectionColor; @@ -275,14 +307,14 @@ class CORE_EXPORT QgsRenderContext QgsExpressionContext mExpressionContext; //! Pointer to the (unsegmentized) geometry - const QgsAbstractGeometry* mGeometry; + const QgsAbstractGeometry* mGeometry = nullptr; //! The feature filter provider - const QgsFeatureFilterProvider* mFeatureFilterProvider; + QScopedPointer< QgsFeatureFilterProvider > mFeatureFilterProvider; - double mSegmentationTolerance; + double mSegmentationTolerance = M_PI_2 / 90; - QgsAbstractGeometry::SegmentationToleranceType mSegmentationToleranceType; + QgsAbstractGeometry::SegmentationToleranceType mSegmentationToleranceType = QgsAbstractGeometry::MaximumAngle; }; Q_DECLARE_OPERATORS_FOR_FLAGS( QgsRenderContext::Flags ) From 48797fa9b760fb609e04b20993d30ff4be511ce3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 08:44:52 +1000 Subject: [PATCH 062/332] Remove unused (and not useful) QgsRenderContext::constPainter getter Since const QPainters cannot be painted to, there's no value in leaving this in the API --- doc/api_break.dox | 2 ++ python/core/qgsrendercontext.sip | 1 - src/core/qgsrendercontext.h | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 7b39b4459dcb..7c5d08411fd6 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -1533,6 +1533,8 @@ QgsRenderContext {#qgis_api_break_3_0_QgsRenderContext} be returned instead of a null pointer if no transformation is required. - setCoordinateTransform() now takes a QgsCoordinateTransform reference, not a pointer. An invalid QgsCoordinateTransform should be used instead of a null pointer if no transformation is required. - rasterScaleFactor() and setRasterScaleFactor() were removed. In QGIS 3.0 QPainter destinations should always be constructed so that 1 painter unit = 1 pixel. +- The constPainter() getter was removed. Const QPainters cannot be painted to or modified, so this +method was of little use. QgsRendererRangeLabelFormat {#qgis_api_break_3_0_QgsRendererRangeLabelFormat} --------------------------- diff --git a/python/core/qgsrendercontext.sip b/python/core/qgsrendercontext.sip index 6a531bfc6333..945f97ab973b 100644 --- a/python/core/qgsrendercontext.sip +++ b/python/core/qgsrendercontext.sip @@ -62,7 +62,6 @@ class QgsRenderContext //getters QPainter* painter(); - const QPainter* constPainter() const; /** Returns the current coordinate transform for the context, or an invalid * transform is no coordinate transformation is required. diff --git a/src/core/qgsrendercontext.h b/src/core/qgsrendercontext.h index 5945d056546d..380bcd4460c8 100644 --- a/src/core/qgsrendercontext.h +++ b/src/core/qgsrendercontext.h @@ -105,7 +105,6 @@ class CORE_EXPORT QgsRenderContext * @see setPainter() */ QPainter* painter() {return mPainter;} - const QPainter* constPainter() const { return mPainter; } /** Returns the current coordinate transform for the context, or an invalid * transform is no coordinate transformation is required. From 3274e1926f8515a23aeb760035c1e8e4d3cb797f Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 16 Jan 2017 16:01:52 +1000 Subject: [PATCH 063/332] Remove more unused raster scale factor handling --- doc/api_break.dox | 6 ++++ python/core/symbology-ng/qgssvgcache.sip | 15 ++++---- src/app/composer/qgscomposerpicturewidget.cpp | 2 +- src/core/composer/qgscomposerarrow.cpp | 2 +- src/core/composer/qgscomposerpicture.cpp | 2 +- src/core/qgspallabeling.cpp | 2 +- src/core/qgstextlabelfeature.cpp | 6 ++-- src/core/qgstextlabelfeature.h | 2 +- src/core/symbology-ng/qgsfillsymbollayer.cpp | 4 +-- .../symbology-ng/qgsmarkersymbollayer.cpp | 10 +++--- src/core/symbology-ng/qgssvgcache.cpp | 34 ++++++++----------- src/core/symbology-ng/qgssvgcache.h | 20 ++++------- src/gui/symbology-ng/qgssvgselectorwidget.cpp | 2 +- 13 files changed, 50 insertions(+), 57 deletions(-) diff --git a/doc/api_break.dox b/doc/api_break.dox index 7c5d08411fd6..aa09f44cfaa2 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -1632,6 +1632,12 @@ QgsSvgCache {#qgis_api_break_3_0_QgsSvgCache} - This class is no longer a singleton and instance() has been removed. Instead use QgsApplication::svgCache() to access an application-wide cache. - containsParamsV2() was removed. Use containsParamsV3() instead. +- The rasterScaleFactor parameter was removed from all methods + +QgsSvgCacheEntry {#qgis_api_break_3_0_QgsSvgCacheEntry} +---------------- + +- The rasterScaleFactor member was removed. QgsStyle (renamed from QgsStyleV2) {#qgis_api_break_3_0_QgsStyle} ---------------------------------- diff --git a/python/core/symbology-ng/qgssvgcache.sip b/python/core/symbology-ng/qgssvgcache.sip index e880be0e646c..f6ad133d5911 100644 --- a/python/core/symbology-ng/qgssvgcache.sip +++ b/python/core/symbology-ng/qgssvgcache.sip @@ -16,7 +16,7 @@ class QgsSvgCacheEntry * @param outline color of outline * @param lookupKey the key string used in QgsSvgCache for quick lookup of this entry (relative or absolute path) */ - QgsSvgCacheEntry( const QString& file, double size, double outlineWidth, double widthScaleFactor, double rasterScaleFactor, const QColor& fill, const QColor& outline, const QString& lookupKey = QString() ); + QgsSvgCacheEntry( const QString& file, double size, double outlineWidth, double widthScaleFactor, const QColor& fill, const QColor& outline, const QString& lookupKey = QString() ); ~QgsSvgCacheEntry(); //! Absolute path to SVG file @@ -26,7 +26,6 @@ class QgsSvgCacheEntry double size; //size in pixels (cast to int for QImage) double outlineWidth; double widthScaleFactor; - double rasterScaleFactor; /** SVG viewbox size. * @note added in QGIS 2.14 @@ -80,7 +79,7 @@ class QgsSvgCache : QObject * @param fitsInCache */ QImage svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ); + double widthScaleFactor, bool& fitsInCache ); /** Get SVG as QPicture&. * @param file Absolute or relative path to SVG file. * @param size size of cached image @@ -92,7 +91,7 @@ class QgsSvgCache : QObject * @param forceVectorOutput */ QPicture svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput = false ); + double widthScaleFactor, bool forceVectorOutput = false ); /** Calculates the viewbox size of a (possibly cached) SVG file. * @param file Absolute or relative path to SVG file. @@ -106,7 +105,7 @@ class QgsSvgCache : QObject * @note added in QGIS 2.14 */ QSizeF svgViewboxSize( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); /** Tests if an svg file contains parameters for fill, outline color, outline width. If yes, possible default values are returned. If there are several default values in the svg file, only the first one is considered*/ @@ -145,7 +144,7 @@ class QgsSvgCache : QObject /** Get SVG content*/ QByteArray svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); signals: /** Emit a signal to be caught by qgisapp and display a msg on status bar */ @@ -164,14 +163,14 @@ class QgsSvgCache : QObject * @param rasterScaleFactor raster scale factor */ QgsSvgCacheEntry* insertSVG( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); void replaceParamsAndCacheSvg( QgsSvgCacheEntry* entry ); void cacheImage( QgsSvgCacheEntry* entry ); void cachePicture( QgsSvgCacheEntry* entry, bool forceVectorOutput = false ); /** Returns entry from cache or creates a new entry if it does not exist already*/ QgsSvgCacheEntry* cacheEntry( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); /** Removes the least used items until the maximum size is under the limit*/ void trimToMaximumSize(); diff --git a/src/app/composer/qgscomposerpicturewidget.cpp b/src/app/composer/qgscomposerpicturewidget.cpp index 3630095f9ac8..08b16539e572 100644 --- a/src/app/composer/qgscomposerpicturewidget.cpp +++ b/src/app/composer/qgscomposerpicturewidget.cpp @@ -434,7 +434,7 @@ QIcon QgsComposerPictureWidget::svgToIcon( const QString& filePath ) const outlineWidth = 0.6; bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size) - const QImage& img = QgsApplication::svgCache()->svgAsImage( filePath, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache ); + const QImage& img = QgsApplication::svgCache()->svgAsImage( filePath, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, fitsInCache ); return QIcon( QPixmap::fromImage( img ) ); } diff --git a/src/core/composer/qgscomposerarrow.cpp b/src/core/composer/qgscomposerarrow.cpp index 1894d1a8cd70..315e54794b24 100644 --- a/src/core/composer/qgscomposerarrow.cpp +++ b/src/core/composer/qgscomposerarrow.cpp @@ -256,7 +256,7 @@ void QgsComposerArrow::drawSVGMarker( QPainter* p, MarkerType type, const QStrin QSvgRenderer r; const QByteArray &svgContent = QgsApplication::svgCache()->svgContent( svgFileName, mArrowHeadWidth, mArrowHeadFillColor, mArrowHeadOutlineColor, mArrowHeadOutlineWidth, - 1.0, 1.0 ); + 1.0 ); r.load( svgContent ); p->save(); diff --git a/src/core/composer/qgscomposerpicture.cpp b/src/core/composer/qgscomposerpicture.cpp index 977d61469174..6f802be2e430 100644 --- a/src/core/composer/qgscomposerpicture.cpp +++ b/src/core/composer/qgscomposerpicture.cpp @@ -373,7 +373,7 @@ void QgsComposerPicture::loadLocalPicture( const QString &path ) { //try to open svg const QByteArray &svgContent = QgsApplication::svgCache()->svgContent( pic.fileName(), rect().width(), mSvgFillColor, mSvgBorderColor, mSvgBorderWidth, - 1.0, 1.0 ); + 1.0 ); mSVG.load( svgContent ); if ( mSVG.isValid() ) { diff --git a/src/core/qgspallabeling.cpp b/src/core/qgspallabeling.cpp index 95bbd21f39a1..b7b0bd084efd 100644 --- a/src/core/qgspallabeling.cpp +++ b/src/core/qgspallabeling.cpp @@ -2232,7 +2232,7 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, QgsRenderContext &cont // TODO: only for placement which needs character info // account for any data defined font metrics adjustments lf->calculateInfo( placement == QgsPalLayerSettings::Curved || placement == QgsPalLayerSettings::PerimeterCurved, - labelFontMetrics.data(), xform, 1.0, maxcharanglein, maxcharangleout ); + labelFontMetrics.data(), xform, maxcharanglein, maxcharangleout ); // for labelFeature the LabelInfo is passed to feat when it is registered // TODO: allow layer-wide feature dist in PAL...? diff --git a/src/core/qgstextlabelfeature.cpp b/src/core/qgstextlabelfeature.cpp index 9069d72bc19e..e5ed93c34b01 100644 --- a/src/core/qgstextlabelfeature.cpp +++ b/src/core/qgstextlabelfeature.cpp @@ -43,7 +43,7 @@ QString QgsTextLabelFeature::text( int partId ) const } -void QgsTextLabelFeature::calculateInfo( bool curvedLabeling, QFontMetricsF* fm, const QgsMapToPixel* xform, double fontScale, double maxinangle, double maxoutangle ) +void QgsTextLabelFeature::calculateInfo( bool curvedLabeling, QFontMetricsF* fm, const QgsMapToPixel* xform, double maxinangle, double maxoutangle ) { if ( mInfo ) return; @@ -65,7 +65,7 @@ void QgsTextLabelFeature::calculateInfo( bool curvedLabeling, QFontMetricsF* fm, // create label info! double mapScale = xform->mapUnitsPerPixel(); - double labelHeight = mapScale * fm->height() / fontScale; + double labelHeight = mapScale * fm->height(); // mLetterSpacing/mWordSpacing = 0.0 is default for non-curved labels // (non-curved spacings handled by Qt in QgsPalLayerSettings/QgsPalLabeling) @@ -102,7 +102,7 @@ void QgsTextLabelFeature::calculateInfo( bool curvedLabeling, QFontMetricsF* fm, charWidth = fm->width( QString( mClusters[i] ) ) + wordSpaceFix; } - double labelWidth = mapScale * charWidth / fontScale; + double labelWidth = mapScale * charWidth; mInfo->char_info[i].width = labelWidth; } } diff --git a/src/core/qgstextlabelfeature.h b/src/core/qgstextlabelfeature.h index 15fb249e940c..e8a85d6fdd01 100644 --- a/src/core/qgstextlabelfeature.h +++ b/src/core/qgstextlabelfeature.h @@ -39,7 +39,7 @@ class QgsTextLabelFeature : public QgsLabelFeature QString text( int partId ) const; //! calculate data for info(). setDefinedFont() must have been called already. - void calculateInfo( bool curvedLabeling, QFontMetricsF* fm, const QgsMapToPixel* xform, double fontScale, double maxinangle, double maxoutangle ); + void calculateInfo( bool curvedLabeling, QFontMetricsF* fm, const QgsMapToPixel* xform, double maxinangle, double maxoutangle ); //! Get data-defined values const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& dataDefinedValues() const { return mDataDefinedValues; } diff --git a/src/core/symbology-ng/qgsfillsymbollayer.cpp b/src/core/symbology-ng/qgsfillsymbollayer.cpp index f9219cbc27bd..b9cd08472fcf 100644 --- a/src/core/symbology-ng/qgsfillsymbollayer.cpp +++ b/src/core/symbology-ng/qgsfillsymbollayer.cpp @@ -1951,11 +1951,11 @@ void QgsSVGFillSymbolLayer::applyPattern( QBrush& brush, const QString& svgFileP bool fitsInCache = true; double outlineWidth = QgsSymbolLayerUtils::convertToPainterUnits( context.renderContext(), svgOutlineWidth, svgOutlineWidthUnit, svgOutlineWidthMapUnitScale ); const QImage& patternImage = QgsApplication::svgCache()->svgAsImage( svgFilePath, size, svgFillColor, svgOutlineColor, outlineWidth, - context.renderContext().scaleFactor(), 1.0, fitsInCache ); + context.renderContext().scaleFactor(), fitsInCache ); if ( !fitsInCache ) { const QPicture& patternPict = QgsApplication::svgCache()->svgAsPicture( svgFilePath, size, svgFillColor, svgOutlineColor, outlineWidth, - context.renderContext().scaleFactor(), 1.0 ); + context.renderContext().scaleFactor() ); double hwRatio = 1.0; if ( patternPict.width() > 0 ) { diff --git a/src/core/symbology-ng/qgsmarkersymbollayer.cpp b/src/core/symbology-ng/qgsmarkersymbollayer.cpp index e0cd87024a68..95d79fe50a71 100644 --- a/src/core/symbology-ng/qgsmarkersymbollayer.cpp +++ b/src/core/symbology-ng/qgsmarkersymbollayer.cpp @@ -1973,7 +1973,7 @@ void QgsSvgMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderContext { usePict = false; const QImage& img = QgsApplication::svgCache()->svgAsImage( path, size, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), 1.0, fitsInCache ); + context.renderContext().scaleFactor(), fitsInCache ); if ( fitsInCache && img.width() > 1 ) { //consider transparency @@ -1996,7 +1996,7 @@ void QgsSvgMarkerSymbolLayer::renderPoint( QPointF point, QgsSymbolRenderContext { p->setOpacity( context.alpha() ); const QPicture& pct = QgsApplication::svgCache()->svgAsPicture( path, size, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), 1.0, context.renderContext().forceVectorOutput() ); + context.renderContext().scaleFactor(), context.renderContext().forceVectorOutput() ); if ( pct.width() > 1 ) { @@ -2348,8 +2348,7 @@ bool QgsSvgMarkerSymbolLayer::writeDxf( QgsDxfExport& e, double mmMapUnitScaleFa } const QByteArray &svgContent = QgsApplication::svgCache()->svgContent( path, size, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), - 1.0 ); + context.renderContext().scaleFactor() ); //if current entry image is 0: cache image for entry // checks to see if image will fit into cache @@ -2431,8 +2430,7 @@ QRectF QgsSvgMarkerSymbolLayer::bounds( QPointF point, QgsSymbolRenderContext& c } QSizeF svgViewbox = QgsApplication::svgCache()->svgViewboxSize( path, scaledSize, fillColor, outlineColor, outlineWidth, - context.renderContext().scaleFactor(), - 1.0 ); + context.renderContext().scaleFactor() ); double scaledHeight = svgViewbox.isValid() ? scaledSize * svgViewbox.height() / svgViewbox.width() : scaledSize; diff --git a/src/core/symbology-ng/qgssvgcache.cpp b/src/core/symbology-ng/qgssvgcache.cpp index 8bce57524bf5..ad38d1dea545 100644 --- a/src/core/symbology-ng/qgssvgcache.cpp +++ b/src/core/symbology-ng/qgssvgcache.cpp @@ -41,7 +41,6 @@ QgsSvgCacheEntry::QgsSvgCacheEntry() , size( 0.0 ) , outlineWidth( 0 ) , widthScaleFactor( 1.0 ) - , rasterScaleFactor( 1.0 ) , fill( Qt::black ) , outline( Qt::black ) , image( nullptr ) @@ -51,13 +50,12 @@ QgsSvgCacheEntry::QgsSvgCacheEntry() { } -QgsSvgCacheEntry::QgsSvgCacheEntry( const QString& f, double s, double ow, double wsf, double rsf, const QColor& fi, const QColor& ou, const QString& lk ) +QgsSvgCacheEntry::QgsSvgCacheEntry( const QString& f, double s, double ow, double wsf, const QColor& fi, const QColor& ou, const QString& lk ) : file( f ) , lookupKey( lk.isEmpty() ? f : lk ) , size( s ) , outlineWidth( ow ) , widthScaleFactor( wsf ) - , rasterScaleFactor( rsf ) , fill( fi ) , outline( ou ) , image( nullptr ) @@ -77,7 +75,7 @@ QgsSvgCacheEntry::~QgsSvgCacheEntry() bool QgsSvgCacheEntry::operator==( const QgsSvgCacheEntry& other ) const { return other.file == file && qgsDoubleNear( other.size, size ) && qgsDoubleNear( other.outlineWidth, outlineWidth ) && qgsDoubleNear( other.widthScaleFactor, widthScaleFactor ) - && qgsDoubleNear( other.rasterScaleFactor, rasterScaleFactor ) && other.fill == fill && other.outline == outline; + && other.fill == fill && other.outline == outline; } int QgsSvgCacheEntry::dataSize() const @@ -110,12 +108,12 @@ QgsSvgCache::~QgsSvgCache() QImage QgsSvgCache::svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ) + double widthScaleFactor, bool& fitsInCache ) { QMutexLocker locker( &mMutex ); fitsInCache = true; - QgsSvgCacheEntry* currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor, rasterScaleFactor ); + QgsSvgCacheEntry* currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor ); //if current entry image is 0: cache image for entry // checks to see if image will fit into cache @@ -155,11 +153,11 @@ QImage QgsSvgCache::svgAsImage( const QString& file, double size, const QColor& } QPicture QgsSvgCache::svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput ) + double widthScaleFactor, bool forceVectorOutput ) { QMutexLocker locker( &mMutex ); - QgsSvgCacheEntry* currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor, rasterScaleFactor ); + QgsSvgCacheEntry* currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor ); //if current entry picture is 0: cache picture for entry //update stats for memory usage @@ -173,31 +171,31 @@ QPicture QgsSvgCache::svgAsPicture( const QString& file, double size, const QCol } QByteArray QgsSvgCache::svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ) + double widthScaleFactor ) { QMutexLocker locker( &mMutex ); - QgsSvgCacheEntry *currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor, rasterScaleFactor ); + QgsSvgCacheEntry *currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor ); return currentEntry->svgContent; } -QSizeF QgsSvgCache::svgViewboxSize( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, double widthScaleFactor, double rasterScaleFactor ) +QSizeF QgsSvgCache::svgViewboxSize( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, double widthScaleFactor ) { QMutexLocker locker( &mMutex ); - QgsSvgCacheEntry *currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor, rasterScaleFactor ); + QgsSvgCacheEntry *currentEntry = cacheEntry( file, size, fill, outline, outlineWidth, widthScaleFactor ); return currentEntry->viewboxSize; } QgsSvgCacheEntry* QgsSvgCache::insertSVG( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ) + double widthScaleFactor ) { // The file may be relative path (e.g. if path is data defined) QString path = QgsSymbolLayerUtils::symbolNameToPath( file ); - QgsSvgCacheEntry* entry = new QgsSvgCacheEntry( path, size, outlineWidth, widthScaleFactor, rasterScaleFactor, fill, outline, file ); + QgsSvgCacheEntry* entry = new QgsSvgCacheEntry( path, size, outlineWidth, widthScaleFactor, fill, outline, file ); replaceParamsAndCacheSvg( entry ); @@ -564,7 +562,7 @@ void QgsSvgCache::cachePicture( QgsSvgCacheEntry *entry, bool forceVectorOutput } QgsSvgCacheEntry* QgsSvgCache::cacheEntry( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ) + double widthScaleFactor ) { //search entries in mEntryLookup QgsSvgCacheEntry* currentEntry = nullptr; @@ -575,8 +573,7 @@ QgsSvgCacheEntry* QgsSvgCache::cacheEntry( const QString& file, double size, con { QgsSvgCacheEntry* cacheEntry = *entryIt; if ( qgsDoubleNear( cacheEntry->size, size ) && cacheEntry->fill == fill && cacheEntry->outline == outline && - qgsDoubleNear( cacheEntry->outlineWidth, outlineWidth ) && qgsDoubleNear( cacheEntry->widthScaleFactor, widthScaleFactor ) - && qgsDoubleNear( cacheEntry->rasterScaleFactor, rasterScaleFactor ) ) + qgsDoubleNear( cacheEntry->outlineWidth, outlineWidth ) && qgsDoubleNear( cacheEntry->widthScaleFactor, widthScaleFactor ) ) { currentEntry = cacheEntry; break; @@ -587,7 +584,7 @@ QgsSvgCacheEntry* QgsSvgCache::cacheEntry( const QString& file, double size, con //cache and replace params in svg content if ( !currentEntry ) { - currentEntry = insertSVG( file, size, fill, outline, outlineWidth, widthScaleFactor, rasterScaleFactor ); + currentEntry = insertSVG( file, size, fill, outline, outlineWidth, widthScaleFactor ); } else { @@ -895,7 +892,6 @@ void QgsSvgCache::printEntryList() QgsDebugMsg( "File:" + entry->file ); QgsDebugMsg( "Size:" + QString::number( entry->size ) ); QgsDebugMsg( "Width scale factor" + QString::number( entry->widthScaleFactor ) ); - QgsDebugMsg( "Raster scale factor" + QString::number( entry->rasterScaleFactor ) ); entry = entry->nextEntry; } } diff --git a/src/core/symbology-ng/qgssvgcache.h b/src/core/symbology-ng/qgssvgcache.h index 5b9e85a83178..0be40f0fa4f6 100644 --- a/src/core/symbology-ng/qgssvgcache.h +++ b/src/core/symbology-ng/qgssvgcache.h @@ -46,12 +46,11 @@ class CORE_EXPORT QgsSvgCacheEntry * @param size * @param outlineWidth width of outline * @param widthScaleFactor width scale factor - * @param rasterScaleFactor raster scale factor * @param fill color of fill * @param outline color of outline * @param lookupKey the key string used in QgsSvgCache for quick lookup of this entry (relative or absolute path) */ - QgsSvgCacheEntry( const QString& file, double size, double outlineWidth, double widthScaleFactor, double rasterScaleFactor, const QColor& fill, const QColor& outline, const QString& lookupKey = QString() ); + QgsSvgCacheEntry( const QString& file, double size, double outlineWidth, double widthScaleFactor, const QColor& fill, const QColor& outline, const QString& lookupKey = QString() ); ~QgsSvgCacheEntry(); //! QgsSvgCacheEntry cannot be copied. @@ -66,7 +65,6 @@ class CORE_EXPORT QgsSvgCacheEntry double size; //size in pixels (cast to int for QImage) double outlineWidth; double widthScaleFactor; - double rasterScaleFactor; /** SVG viewbox size. * @note added in QGIS 2.14 @@ -119,11 +117,10 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param outline color of outline * @param outlineWidth width of outline * @param widthScaleFactor width scale factor - * @param rasterScaleFactor raster scale factor * @param fitsInCache */ QImage svgAsImage( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool& fitsInCache ); + double widthScaleFactor, bool& fitsInCache ); /** Get SVG as QPicture&. * @param file Absolute or relative path to SVG file. @@ -132,11 +129,10 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param outline color of outline * @param outlineWidth width of outline * @param widthScaleFactor width scale factor - * @param rasterScaleFactor raster scale factor * @param forceVectorOutput */ QPicture svgAsPicture( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor, bool forceVectorOutput = false ); + double widthScaleFactor, bool forceVectorOutput = false ); /** Calculates the viewbox size of a (possibly cached) SVG file. * @param file Absolute or relative path to SVG file. @@ -145,12 +141,11 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param outline color of outline * @param outlineWidth width of outline * @param widthScaleFactor width scale factor - * @param rasterScaleFactor raster scale factor * @returns viewbox size set in SVG file * @note added in QGIS 2.14 */ QSizeF svgViewboxSize( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); /** Tests if an svg file contains parameters for fill, outline color, outline width. If yes, possible default values are returned. If there are several default values in the svg file, only the first one is considered*/ @@ -189,7 +184,7 @@ class CORE_EXPORT QgsSvgCache : public QObject //! Get SVG content QByteArray svgContent( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); signals: //! Emit a signal to be caught by qgisapp and display a msg on status bar @@ -205,17 +200,16 @@ class CORE_EXPORT QgsSvgCache : public QObject * @param outline color of outline * @param outlineWidth width of outline * @param widthScaleFactor width scale factor - * @param rasterScaleFactor raster scale factor */ QgsSvgCacheEntry* insertSVG( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); void replaceParamsAndCacheSvg( QgsSvgCacheEntry* entry ); void cacheImage( QgsSvgCacheEntry* entry ); void cachePicture( QgsSvgCacheEntry* entry, bool forceVectorOutput = false ); //! Returns entry from cache or creates a new entry if it does not exist already QgsSvgCacheEntry* cacheEntry( const QString& file, double size, const QColor& fill, const QColor& outline, double outlineWidth, - double widthScaleFactor, double rasterScaleFactor ); + double widthScaleFactor ); //! Removes the least used items until the maximum size is under the limit void trimToMaximumSize(); diff --git a/src/gui/symbology-ng/qgssvgselectorwidget.cpp b/src/gui/symbology-ng/qgssvgselectorwidget.cpp index 339d15b21399..afea142c4464 100644 --- a/src/gui/symbology-ng/qgssvgselectorwidget.cpp +++ b/src/gui/symbology-ng/qgssvgselectorwidget.cpp @@ -259,7 +259,7 @@ QPixmap QgsSvgSelectorListModel::createPreview( const QString& entry ) const outlineWidth = 0.2; bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size) - const QImage& img = QgsApplication::svgCache()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache ); + const QImage& img = QgsApplication::svgCache()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, fitsInCache ); return QPixmap::fromImage( img ); } From b340d7bdb6f1c1a6a5c20169be0bc49d7d443672 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Mon, 16 Jan 2017 16:51:44 +0800 Subject: [PATCH 064/332] Add willBeDeleted() signal to QgsMapLayer (#3998) This allows pieces of code that depend on map layers to listen directly to the layer's notification rather than having to listen to project's layersWillBeRemoved signal (and cycle through the whole list) --- python/core/qgsmaplayer.sip | 8 ++++++++ src/core/qgsmaplayer.h | 8 ++++++++ src/core/qgspluginlayer.cpp | 7 +++++++ src/core/qgspluginlayer.h | 1 + src/core/qgsvectorlayer.cpp | 1 + src/core/raster/qgsrasterlayer.cpp | 2 ++ 6 files changed, 27 insertions(+) diff --git a/python/core/qgsmaplayer.sip b/python/core/qgsmaplayer.sip index 34350d8f7fba..9d90a6be95ee 100644 --- a/python/core/qgsmaplayer.sip +++ b/python/core/qgsmaplayer.sip @@ -743,6 +743,14 @@ class QgsMapLayer : QObject */ void dependenciesChanged(); + /** + * Emitted in the destructor when the layer is about to be deleted, + * but it is still in a perfectly valid state: the last chance for + * other pieces of code for some cleanup if they use the layer. + * @note added in QGIS 3.0 + */ + void willBeDeleted(); + protected: /** Set the extent */ virtual void setExtent( const QgsRectangle &rect ); diff --git a/src/core/qgsmaplayer.h b/src/core/qgsmaplayer.h index 2e76b7b6d87c..f88fd3e75947 100644 --- a/src/core/qgsmaplayer.h +++ b/src/core/qgsmaplayer.h @@ -778,6 +778,14 @@ class CORE_EXPORT QgsMapLayer : public QObject */ void dependenciesChanged(); + /** + * Emitted in the destructor when the layer is about to be deleted, + * but it is still in a perfectly valid state: the last chance for + * other pieces of code for some cleanup if they use the layer. + * @note added in QGIS 3.0 + */ + void willBeDeleted(); + protected: //! Set the extent virtual void setExtent( const QgsRectangle &rect ); diff --git a/src/core/qgspluginlayer.cpp b/src/core/qgspluginlayer.cpp index 873fdcfd4f91..c61997ecf911 100644 --- a/src/core/qgspluginlayer.cpp +++ b/src/core/qgspluginlayer.cpp @@ -24,6 +24,13 @@ QgsPluginLayer::QgsPluginLayer( const QString& layerType, const QString& layerNa setLegend( QgsMapLayerLegend::defaultPluginLegend( this ) ); } +QgsPluginLayer::~QgsPluginLayer() +{ + // TODO: shall we move the responsibility of emitting the signal to plugin + // layer implementations before they start doing their part of cleanup...? + emit willBeDeleted(); +} + QString QgsPluginLayer::pluginLayerType() { return mPluginLayerType; diff --git a/src/core/qgspluginlayer.h b/src/core/qgspluginlayer.h index 952737275b76..0da33e91dc8e 100644 --- a/src/core/qgspluginlayer.h +++ b/src/core/qgspluginlayer.h @@ -34,6 +34,7 @@ class CORE_EXPORT QgsPluginLayer : public QgsMapLayer public: QgsPluginLayer( const QString& layerType, const QString& layerName = QString() ); + ~QgsPluginLayer(); //! Return plugin layer type (the same as used in QgsPluginLayerRegistry) QString pluginLayerType(); diff --git a/src/core/qgsvectorlayer.cpp b/src/core/qgsvectorlayer.cpp index dac585acff15..631981bb741a 100644 --- a/src/core/qgsvectorlayer.cpp +++ b/src/core/qgsvectorlayer.cpp @@ -172,6 +172,7 @@ QgsVectorLayer::QgsVectorLayer( const QString& vectorLayerPath, QgsVectorLayer::~QgsVectorLayer() { + emit willBeDeleted(); mValid = false; diff --git a/src/core/raster/qgsrasterlayer.cpp b/src/core/raster/qgsrasterlayer.cpp index 4a79f8c3f0c3..f027ddb6018d 100644 --- a/src/core/raster/qgsrasterlayer.cpp +++ b/src/core/raster/qgsrasterlayer.cpp @@ -170,6 +170,8 @@ QgsRasterLayer::QgsRasterLayer( const QString & uri, QgsRasterLayer::~QgsRasterLayer() { + emit willBeDeleted(); + mValid = false; // Note: provider and other interfaces are owned and deleted by pipe } From 5679fb0417af723f29029d48ed791e4c7c425ea6 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 16 Jan 2017 10:22:32 +0100 Subject: [PATCH 065/332] [spell check] allow global replace also fix matching case --- scripts/spell_check/check_spelling.sh | 96 ++++++++++++++++++++------- 1 file changed, 71 insertions(+), 25 deletions(-) diff --git a/scripts/spell_check/check_spelling.sh b/scripts/spell_check/check_spelling.sh index b1635d0ca177..a801ce2679bf 100755 --- a/scripts/spell_check/check_spelling.sh +++ b/scripts/spell_check/check_spelling.sh @@ -1,6 +1,6 @@ #!/bin/bash ########################################################################### -# chkspelling_ag.sh +# checkk_spelling.sh # --------------------- # Date : December 2016 # Copyright : (C) 2016 by Denis Rouzaud @@ -14,7 +14,7 @@ # # ########################################################################### -# -i: enter interactive mode to fix errors +# -r: deactivate interactive mode to fix errors # optional argument: list of files to be checked @@ -46,17 +46,24 @@ else INPUTFILES="." fi -SPELLOK='(#\s*spellok|)$' - -# split into several files to avoid too long regexes -SPLIT=4 +# prefix command for mac os support (gsed, gsplit) GNUPREFIX= if [[ "$OSTYPE" =~ darwin* ]]; then GNUPREFIX=g fi +# regex to find escape string +SPELLOKRX='(#\s*spellok|)$' + +# split into several files to avoid too long regexes +SPLIT=4 + ${GNUPREFIX}split --number=l/$SPLIT --numeric-suffixes --suffix-length=1 --additional-suffix=~ ${DIR}/spelling.dat spelling +# global replace variables (dictionary) +declare -A GLOBREP_ALLFILES +declare -A GLOBREP_CURRENTFILE +declare -A GLOBREP_IGNORE for ((I=0;I<$SPLIT;I++)) ; do SPELLFILE=spelling$I~; @@ -72,12 +79,13 @@ for ((I=0;I<$SPLIT;I++)) ; do COMMANDS="" ERRORFOUND=NO while read -u 3 -r LINE; do - echo "$LINE" - ERRORFOUND=YES - if [[ "$INTERACTIVE" =~ YES ]]; then + echo "$LINE" + ERRORFOUND=YES + if [[ "$INTERACTIVE" =~ YES ]]; then NOCOLOR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g') if [[ "$NOCOLOR" =~ ^[[:alnum:]][[:alnum:]\/\._-]+$ ]]; then FILE=$NOCOLOR + GLOBREP_CURRENTFILE=() fi if [[ "$NOCOLOR" =~ ^[0-9]+: ]]; then if [[ -z $FILE ]]; then @@ -85,9 +93,26 @@ for ((I=0;I<$SPLIT;I++)) ; do exit 1 fi NUMBER=$(echo "$NOCOLOR" | cut -d: -f1) - ERROR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/^.*\x1B\[30;43m(.*?)\x1B\[0m.*$/\1/') + ERROR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/^.*?\x1B\[30;43m(.*?)\x1B\[0m.*$/\1/') CORRECTION=$(ag --nonumbers --ignore-case --word-regexp "$ERROR" ${DIR}/spelling.dat | cut -d: -f2) + # Match case + MATCHCASE="$ERROR:$CORRECTION" + CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2) + # Skip global replace + if [[ ! -z ${GLOBREP_CURRENTFILE["$ERROR"]} ]]; then + continue + fi + if [[ ! -z ${GLOBREP_ALLFILES["$ERROR"]} ]]; then + echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" + ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE + continue + fi + if [[ ! -z ${GLOBREP_IGNORE["$ERROR"]} ]]; then + continue + fi + + # escape string SPELLOKSTR='//#spellok' if [[ "$FILE" =~ \.(txt|html|htm)$ ]]; then SPELLOKSTR='' @@ -98,43 +123,64 @@ for ((I=0;I<$SPLIT;I++)) ; do fi fi if [[ "$FILE" =~ \.(py)$ ]]; then - SPELLOKSTR='#spellok' - fi + SPELLOKSTR='#spellok' + fi + SPELLOKSTR_ESC=$(echo "$SPELLOKSTR" | ${GNUPREFIX}sed -r 's/\//\\\//g') - echo "" + # Display menu + echo "***" + echo -e "Error found: \x1B[31m$ERROR\x1B[0m" echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTION\x1B[0m at line $NUMBER" - echo -e " \x1B[4ma\x1B[0mppend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line to avoid spell check on this line" + echo -e " replace all occurences by \x1B[33m$CORRECTION\x1B[0m in current \x1B[4mf\x1B[0mile" + echo -e " replace all occurences by \x1B[33m$CORRECTION\x1B[0m in \x1B[4ma\x1B[0mll files" + echo -e " a\x1B[4mp\x1B[0mpend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line $NUMBER to avoid spell check on this line" echo -e " en\x1B[4mt\x1B[0mer your own correction" - echo -e " ignore and \x1B[4mc\x1B[0montinue" + echo -e " skip and \x1B[4mc\x1B[0montinue" + echo -e " skip all \x1B[4mo\x1B[0mccurences and continue" echo -e " ignore and \x1B[4me\x1B[0mxit" while read -n 1 n; do echo "" case $n in r) - MATCHCASE="$ERROR:$CORRECTION" - CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\U\2/;s/([A-Z][a-z]+):([a-z])/\U\2\L/') - echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTION\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" - ${GNUPREFIX}sed -i "${NUMBER}s/$ERROR/$CORRECTION/g" $FILE + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + ${GNUPREFIX}sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + f) + GLOBREP_CURRENTFILE+=(["$ERROR"]="$CORRECTION") + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" + ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE break ;; a) + GLOBREP_CURRENTFILE+=(["$ERROR"]="$CORRECTION") + GLOBREP_ALLFILES+=(["$ERROR"]="$CORRECTION") + echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" + ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + p) echo -e "appending \x1B[33m$SPELLOKSTR\x1B[0m to \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" - SPELLOKSTR=$(echo "$SPELLOKSTR" | ${GNUPREFIX}sed -r 's/\//\\\//g') - ${GNUPREFIX}sed -i "${NUMBER}s/\$/ $SPELLOKSTR/" $FILE + ${GNUPREFIX}sed -i "${NUMBER}s/\$/ $SPELLOKSTR_ESC/" $FILE break ;; t) echo "Enter the correction: " read CORRECTION MATCHCASE="$ERROR:$CORRECTION" - CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\U\2/;s/([A-Z][a-z]+):([a-z])/\U\2\L/') - echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTION\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" sed -i "${NUMBER}s/$ERROR/$CORRECTION/g" $FILE + CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2) + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE break ;; c) break ;; + o) + GLOBREP_IGNORE+=(["$ERROR"]="$CORRECTION") + break + ;; e) exit 1 ;; @@ -147,8 +193,8 @@ for ((I=0;I<$SPLIT;I++)) ; do FILE="" fi fi - done 3< <(unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOK}"')' $INPUTFILES ; \ - unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOK}"')' $INPUTFILES ) + done 3< <(unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ; \ + unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ) rm $SPELLFILE From bf22cbfa9d69aca4595e8c80352bf12aadeebdcf Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 16 Jan 2017 10:56:42 +0100 Subject: [PATCH 066/332] [spellcheck] fix case detection + some fixes --- NEWS | 2 +- doc/news.html | 2 +- doc/news.t2t | 2 +- python/core/qgsvectorlayer.sip | 2 +- scripts/spell_check/check_spelling.sh | 20 +++++++-------- scripts/spell_check/spelling.dat | 30 +++++++++++------------ src/core/qgsvectorlayer.h | 2 +- src/core/qgsvectorlayerfeatureiterator.h | 2 +- src/gui/qgisgui.h | 2 +- src/providers/wfs/qgswfsdatasourceuri.cpp | 2 +- src/providers/wfs/qgswfsshareddata.cpp | 4 +-- tests/src/core/testqgsexpression.cpp | 2 +- 12 files changed, 36 insertions(+), 36 deletions(-) diff --git a/NEWS b/NEWS index e74e09833b8d..2ffc60c9b5fc 100644 --- a/NEWS +++ b/NEWS @@ -2605,7 +2605,7 @@ Raster support for most GDAL formats Raster implementation supports a variety of rendering settings including semi transparent overlays, pallette inversion, flexible band to color mapping in multiband images and creation of pseudocolor. -Change to a data provider architecture for vector layers. Addtional data +Change to a data provider architecture for vector layers. Additional data types can be supported by writing a provider plugin Buffer plugin for PostGIS layers PostgreSQL port number can be specified when making connections diff --git a/doc/news.html b/doc/news.html index 895ef8da0ecf..bfc01fc532b9 100644 --- a/doc/news.html +++ b/doc/news.html @@ -2936,7 +2936,7 @@

    28. 0.5

    Raster implementation supports a variety of rendering settings including semi transparent overlays, pallette inversion, flexible band to color mapping in multiband images and creation of pseudocolor. -Change to a data provider architecture for vector layers. Addtional data +Change to a data provider architecture for vector layers. Additional data types can be supported by writing a provider plugin Buffer plugin for PostGIS layers PostgreSQL port number can be specified when making connections diff --git a/doc/news.t2t b/doc/news.t2t index 7c4493b2fc25..e501e4fd3e4b 100644 --- a/doc/news.t2t +++ b/doc/news.t2t @@ -2558,7 +2558,7 @@ Raster support for most GDAL formats Raster implementation supports a variety of rendering settings including semi transparent overlays, pallette inversion, flexible band to color mapping in multiband images and creation of pseudocolor. -Change to a data provider architecture for vector layers. Addtional data +Change to a data provider architecture for vector layers. Additional data types can be supported by writing a provider plugin Buffer plugin for PostGIS layers PostgreSQL port number can be specified when making connections diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 1e122ef578e0..c69889b02995 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -420,7 +420,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator bool removeJoin( const QString& joinLayerId ); /** - * Acccessor to the join buffer object + * Accessor to the join buffer object * @note added 2.14.7 */ QgsVectorLayerJoinBuffer* joinBuffer(); diff --git a/scripts/spell_check/check_spelling.sh b/scripts/spell_check/check_spelling.sh index a801ce2679bf..5c80bf2fe17c 100755 --- a/scripts/spell_check/check_spelling.sh +++ b/scripts/spell_check/check_spelling.sh @@ -61,9 +61,9 @@ SPLIT=4 ${GNUPREFIX}split --number=l/$SPLIT --numeric-suffixes --suffix-length=1 --additional-suffix=~ ${DIR}/spelling.dat spelling # global replace variables (dictionary) -declare -A GLOBREP_ALLFILES -declare -A GLOBREP_CURRENTFILE -declare -A GLOBREP_IGNORE +declare -A GLOBREP_ALLFILES=() +declare -A GLOBREP_CURRENTFILE=() +declare -A GLOBREP_IGNORE=() for ((I=0;I<$SPLIT;I++)) ; do SPELLFILE=spelling$I~; @@ -130,9 +130,9 @@ for ((I=0;I<$SPLIT;I++)) ; do # Display menu echo "***" echo -e "Error found: \x1B[31m$ERROR\x1B[0m" - echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTION\x1B[0m at line $NUMBER" - echo -e " replace all occurences by \x1B[33m$CORRECTION\x1B[0m in current \x1B[4mf\x1B[0mile" - echo -e " replace all occurences by \x1B[33m$CORRECTION\x1B[0m in \x1B[4ma\x1B[0mll files" + echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTIONCASE\x1B[0m at line $NUMBER" + echo -e " replace all occurences by \x1B[33m$CORRECTIONCASE\x1B[0m in current \x1B[4mf\x1B[0mile" + echo -e " replace all occurences by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[4ma\x1B[0mll files" echo -e " a\x1B[4mp\x1B[0mpend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line $NUMBER to avoid spell check on this line" echo -e " en\x1B[4mt\x1B[0mer your own correction" echo -e " skip and \x1B[4mc\x1B[0montinue" @@ -148,13 +148,13 @@ for ((I=0;I<$SPLIT;I++)) ; do break ;; f) - GLOBREP_CURRENTFILE+=(["$ERROR"]="$CORRECTION") + GLOBREP_CURRENTFILE+=(["$ERROR"]=1) echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE break ;; a) - GLOBREP_CURRENTFILE+=(["$ERROR"]="$CORRECTION") + GLOBREP_CURRENTFILE+=(["$ERROR"]=1) GLOBREP_ALLFILES+=(["$ERROR"]="$CORRECTION") echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE @@ -193,8 +193,8 @@ for ((I=0;I<$SPLIT;I++)) ; do FILE="" fi fi - done 3< <(unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ; \ - unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ) + done 3< <(unbuffer ag --ignore-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ; \ + unbuffer ag --ignore-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ) rm $SPELLFILE diff --git a/scripts/spell_check/spelling.dat b/scripts/spell_check/spelling.dat index a8d4701707dd..a6ecdaa91868 100644 --- a/scripts/spell_check/spelling.dat +++ b/scripts/spell_check/spelling.dat @@ -69,7 +69,7 @@ accesing:accessing accesnt:accent accesories:accessories accessable:accessible -accesss:access +accesss:access:* accidant:accident accidentaly:accidentally accidential:accidental @@ -351,8 +351,8 @@ alcoholical:alcoholic aleady:already aledge:allege:* aledged:alleged -aledges:alleges -alege:allege +aledges:alleges:* +alege:allege:* aleged:alleged alegience:allegiance alegorical:allegorical @@ -368,10 +368,10 @@ algorythm:algorithm alientating:alienating alignemnt:alignment alignemnts:alignments -alledge:allege +alledge:allege:* alledged:alleged alledgedly:allegedly -alledges:alleges +alledges:alleges:* allegedely:allegedly allegedy:allegedly allegely:allegedly @@ -387,7 +387,7 @@ alliviate:alleviate allmost:almost allopone:allophone allopones:allophones -allowd:allowed +allowd:allowed:* allpication:application allready:already allthough:although @@ -985,7 +985,7 @@ boudaries:boundaries boudary:boundary bouding:bounding boundries:boundaries -boundry:boundary +boundry:boundary:* bouyancy:buoyancy bouyant:buoyant boyant:buoyant @@ -1054,7 +1054,7 @@ calcualte:calculate calcualted:calculated calcualtes:calculates calcualting:calculating -calculater:calculator +calculater:calculator:* calculs:calculus calender:calendar calenders:calendars @@ -1239,11 +1239,11 @@ chemestry:chemistry chemicaly:chemically childen:children childern:children -childs:children +childs:children:* chnage:change chnages:changes choise:choice -choosed:chose +choosed:chose:* choosen:chosen chosing:choosing chould:should @@ -1281,7 +1281,7 @@ clearified:clarified clearifies:clarifies clearify:clarify clearifying:clarifying -cleint:client +cleint:client:* cleints:clients clera:clear clincial:clinical @@ -1387,10 +1387,10 @@ commisioned:commissioned commisioner:commissioner commisioning:commissioning commisions:commissions -commited:committed -commitee:committee -commiter:committer -commiters:committers +commited:committed:* +commitee:committee:* +commiter:committer:* +commiters:committers:* commiting:committing committ:commit committe:committee diff --git a/src/core/qgsvectorlayer.h b/src/core/qgsvectorlayer.h index f5c6bd75d431..4b377b210e03 100644 --- a/src/core/qgsvectorlayer.h +++ b/src/core/qgsvectorlayer.h @@ -521,7 +521,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte bool removeJoin( const QString& joinLayerId ); /** - * Acccessor to the join buffer object + * Accessor to the join buffer object * @note added 2.14.7 */ QgsVectorLayerJoinBuffer* joinBuffer() { return mJoinBuffer; } diff --git a/src/core/qgsvectorlayerfeatureiterator.h b/src/core/qgsvectorlayerfeatureiterator.h index ecda9c4fd760..6ddd190369b4 100644 --- a/src/core/qgsvectorlayerfeatureiterator.h +++ b/src/core/qgsvectorlayerfeatureiterator.h @@ -168,7 +168,7 @@ class CORE_EXPORT QgsVectorLayerFeatureIterator : public QgsAbstractFeatureItera */ struct FetchJoinInfo { - const QgsVectorJoinInfo* joinInfo;//!< Cannonical source of information about the join + const QgsVectorJoinInfo* joinInfo;//!< Canonical source of information about the join QgsAttributeList attributes; //!< Attributes to fetch int indexOffset; //!< At what position the joined fields start QgsVectorLayer* joinLayer; //!< Resolved pointer to the joined layer diff --git a/src/gui/qgisgui.h b/src/gui/qgisgui.h index de1d7faf24ca..0e7a0fb69caa 100644 --- a/src/gui/qgisgui.h +++ b/src/gui/qgisgui.h @@ -39,7 +39,7 @@ namespace QgisGui * for platforms such as the Mac where modal and modeless dialogs have * different looks, QGIS modal dialogs will look the same as Qt modal * dialogs and all modal dialogs will look distinct from modeless dialogs. - * Althought not the standard Mac modal look, it does lack the minimize + * Although not the standard Mac modal look, it does lack the minimize * control which makes sense only for modeless dislogs. * * The Qt3 method of creating a true Mac modal dialog is deprecated in Qt4 diff --git a/src/providers/wfs/qgswfsdatasourceuri.cpp b/src/providers/wfs/qgswfsdatasourceuri.cpp index 77cce780c992..cc8e975cd189 100644 --- a/src/providers/wfs/qgswfsdatasourceuri.cpp +++ b/src/providers/wfs/qgswfsdatasourceuri.cpp @@ -22,7 +22,7 @@ QgsWFSDataSourceURI::QgsWFSDataSourceURI( const QString& uri ) : mURI( uri ) { - // Compatiblity with QGIS < 2.16 layer URI of the format + // Compatibility with QGIS < 2.16 layer URI of the format // http://example.com/?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=x&SRSNAME=y&username=foo&password= if ( !mURI.hasParam( QgsWFSConstants::URI_PARAM_URL ) ) { diff --git a/src/providers/wfs/qgswfsshareddata.cpp b/src/providers/wfs/qgswfsshareddata.cpp index 4ae5060b70cb..155c283884bc 100644 --- a/src/providers/wfs/qgswfsshareddata.cpp +++ b/src/providers/wfs/qgswfsshareddata.cpp @@ -729,8 +729,8 @@ bool QgsWFSSharedData::changeGeometryValues( const QgsGeometryMap &geometry_map newAttrMap[idx] = QString( wkb.toHex().data() ); newChangedAttrMap[ iter.key()] = newAttrMap; - QgsGeometry polyBoudingBox = QgsGeometry::fromRect( iter.value().boundingBox() ); - newGeometryMap[ iter.key()] = polyBoudingBox; + QgsGeometry polyBoundingBox = QgsGeometry::fromRect( iter.value().boundingBox() ); + newGeometryMap[ iter.key()] = polyBoundingBox; } else { diff --git a/tests/src/core/testqgsexpression.cpp b/tests/src/core/testqgsexpression.cpp index 2272523ff98f..da7c2982cd75 100644 --- a/tests/src/core/testqgsexpression.cpp +++ b/tests/src/core/testqgsexpression.cpp @@ -2158,7 +2158,7 @@ class TestQgsExpression: public QObject QTest::newRow( "OGR no Crosses" ) << "crosses( $geometry, geomFromWKT('LINESTRING ( 0 0, 0 10 )') )" << QgsGeometry::fromPolyline( line ) << false << QVariant( 0 ); QTest::newRow( "OGR Within" ) << "within( $geometry, geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))') )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 1 ); QTest::newRow( "OGR no Within" ) << "within( geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))'), $geometry )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 0 ); - QTest::newRow( "OGR Contians" ) << "contains( geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))'), $geometry )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 1 ); + QTest::newRow( "OGR Contains" ) << "contains( geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))'), $geometry )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 1 ); QTest::newRow( "OGR no Contains" ) << "contains( $geometry, geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))') )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 0 ); QTest::newRow( "OGR no Overlaps" ) << "overlaps( geomFromWKT('POLYGON((-90 -90, -90 90, 190 -90, -90 -90))'), $geometry )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 0 ); QTest::newRow( "OGR overlaps" ) << "overlaps( geomFromWKT('POLYGON((0 -5,10 5,10 -5,0 -5))'), $geometry )" << QgsGeometry::fromPolygon( polygon ) << false << QVariant( 1 ); From 0fdd168de3d5a923191159d63f6784279588e4ef Mon Sep 17 00:00:00 2001 From: Alexandre Neto Date: Mon, 16 Jan 2017 10:26:00 +0000 Subject: [PATCH 067/332] Replace mActionCheckQgisVersion.PNG by SVG --- images/images.qrc | 2 +- images/themes/default/clear_input.svg | Bin 4860 -> 0 bytes .../themes/default/mActionCheckQgisVersion.png | Bin 769 -> 0 bytes .../themes/default/mActionCheckQgisVersion.svg | 1 + src/app/qgisapp.cpp | 2 +- .../ui/qgsgeometrycheckerresulttab.ui | 4 ++-- src/ui/qgisapp.ui | 2 +- 7 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 images/themes/default/clear_input.svg delete mode 100644 images/themes/default/mActionCheckQgisVersion.png create mode 100644 images/themes/default/mActionCheckQgisVersion.svg diff --git a/images/images.qrc b/images/images.qrc index 3f4d61c1d3fc..562533929b59 100644 --- a/images/images.qrc +++ b/images/images.qrc @@ -160,7 +160,7 @@ themes/default/mActionCapturePolygon.svg themes/default/mActionNewTableRow.svg themes/default/mActionChangeLabelProperties.svg - themes/default/mActionCheckQgisVersion.png + themes/default/mActionCheckQgisVersion.svg themes/default/mActionCollapseTree.svg themes/default/mActionComposerManager.svg themes/default/mActionConditionalFormatting.svg diff --git a/images/themes/default/clear_input.svg b/images/themes/default/clear_input.svg deleted file mode 100644 index e5f5c41e5b8b8b7385aa841786e7228a30c915d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4860 zcmeHK`8U-6_kX=+VZ<=R7>tavOxCewENRflS{mC}VvwyANtSn(8HA!pwq#!-p&?m| zk$nkmZ&7K4M6x7HqWO4#&infxe1H7hbMARO?zzwVJm-1OdE9fKR6~kkNeOZv1ONc} zJvXMF)RNr8e~s!MUprVb#dtCAJKYR8taC9$U%?AJ{%uI;d?$Llfu=(GL z+1XhRhht@Fwz;`EIXT(b(6GF`JT^9V@7}$Lh=`1gjHINb;o;%Z(o#=PkG8h9;NV~? z)jlpRuDZI)opuI;!T9_8D<~+qxjGve8FhDeJ2^Q?OG{HI6ch@jqobp)u8u$;0s{kX z-%h!n7#|)Mf<_CINJssAy%_W;B$6*M!2iL6^1524in06BFW#iV7qpu}8Et z<>X{dOvv=;$p3ra|L}hu_O8f8NZ7N;*>&gZ}DLHzsnGK1-eaLO$L;qv>egWVhs=`co z>cu{6(6-CKn>~pt@eAkaGD$c1#1wEDEJkcXjhk%ZEbEEV_+yv;%rocF->LOJN11So z#`9zKA*b|_3K{2K0-|-^>{JrK=!{P|XfV`N>)D+ot#@*VSU1y^uDCy}R=d)z7^I%H z${{_Te+}cu+UK=g`39}@d=#~-+i>Ci6ZgyUAlvBE2u=Xjlj9C9PWRnWbQ^x!yf(*# zVzX{xJ0}tCj8J_PBWxA=sxy|uE!7r5U;FyHM1G_#;_CX!^k723?%|}OiN<>sqzFR> zz=2a)bQs!~%|PHtI6CA=6FZjMB#{R02<49?@l)bgsPTNN2KN_H7|H+$FnB9B}Ie2CP++Q{BiZB#bb=f`zc z&Vm-3#TAII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hsu;e9P&0%0BPKzmrBmqqLF;1pl2;cZSZUmM4Xxj z`@p|p7e9GP#q(1~`|oJocfljwu~sRNWBX&vM)_CQE~)prUfKZPNnfb{;?ub$;2LqU zU5zRDy1OQda1Hel-*wC}tdURr=h-K!X(eG^5skt9mG6^p`L7vydT}*9<7%BcUGN7E Rl|zjG6xf^H{~GjP{115cHeO`Ol5zyLImnGt9T1H%VqW(G%q0AggA&F~&9`H#VoA)Q3SX95jmWT@xj;7a)R z^BV(@{Q!sq8Il<;00a;d!!L#n;(X!)41XB*GfZYMAj-f=Km(^R%;#X{xbI--kf0)> z!T>bq0>f_xLy(~$B>({gGI%4<76vm1GXbE)euf@AhW7vs>}8nG%FKFS(^xaXBh-W8 z%8e@wmu_A<0CbomLngxqm{NcMVqoZE5MbzF_^Sy{dctr5O#t#j!dhU7L{~0=gA&dn81P~-iG%@UF4rO*=QfFfLbMX(u|4sitF#HF) z;6Km>z%XRs1V)NE0|Sd03j-quP|FJjhChpe>VE!Tz);7Kh|OSt0Ac}?KN&Xuz4X`N zul!#I26Z6c4d{z4z+hnq(q=$D2y*}p144#}K=u-_oP$4LH|iN6a)YQh#7^a2TZY_83Gt?0om_>hAsuh{$++A \ No newline at end of file diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 525dd659e7c5..170006aad5c0 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -2617,7 +2617,7 @@ void QgisApp::setTheme( const QString& theThemeName ) mActionProjectProperties->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionProjectProperties.png" ) ) ); mActionManagePlugins->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionShowPluginManager.svg" ) ) ); mActionShowPythonDialog->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "console/iconRunConsole.png" ) ) ); - mActionCheckQgisVersion->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionCheckQgisVersion.png" ) ) ); + mActionCheckQgisVersion->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionCheckQgisVersion.svg" ) ) ); mActionOptions->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionOptions.svg" ) ) ); mActionConfigureShortcuts->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionKeyboardShortcuts.svg" ) ) ); mActionCustomization->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "/mActionInterfaceCustomization.svg" ) ) ); diff --git a/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui b/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui index 7a0f7ae630fa..b75824f21b49 100644 --- a/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui +++ b/src/plugins/geometry_checker/ui/qgsgeometrycheckerresulttab.ui @@ -291,7 +291,7 @@ - :/images/themes/default/mActionCheckQgisVersion.png:/images/themes/default/mActionCheckQgisVersion.png + :/images/themes/default/mActionCheckQgisVersion.svg:/images/themes/default/mActionCheckQgisVersion.svg @@ -308,7 +308,7 @@ - :/images/themes/default/mActionCheckQgisVersion.png:/images/themes/default/mActionCheckQgisVersion.png + :/images/themes/default/mActionCheckQgisVersion.svg:/images/themes/default/mActionCheckQgisVersion.svg diff --git a/src/ui/qgisapp.ui b/src/ui/qgisapp.ui index 8df43b4a1ee9..ad9b8732252f 100644 --- a/src/ui/qgisapp.ui +++ b/src/ui/qgisapp.ui @@ -1654,7 +1654,7 @@ - :/images/themes/default/mActionCheckQgisVersion.png:/images/themes/default/mActionCheckQgisVersion.png + :/images/themes/default/mActionCheckQgisVersion.svg:/images/themes/default/mActionCheckQgisVersion.svg Check QGIS Version From 9324bdac1f90058ba77ac01002a5379cfb79c545 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Fri, 13 Jan 2017 18:49:06 +0100 Subject: [PATCH 068/332] [bugfix] WFS-T Fixes #15597 #16043 This commit fixes a few bugs on WFS-T with servers that support WFS-T > 1.0.0 when user configure version != 1.0.0 ("auto" is the default). It also fixes WFS-T multiple operations on GeoServer when an insert operation is among them and the feature store does not return generated feature ids for the inserted features (i.e. shapefiles). Tested on GeoServer and QGIS Server (cherry-picked from 502a8da40380) --- src/providers/wfs/qgswfscapabilities.cpp | 34 +++-- src/providers/wfs/qgswfsprovider.cpp | 15 +- .../wfs/qgswfstransactionrequest.cpp | 1 + tests/src/python/test_provider_wfs.py | 136 ++++++++++++++++++ 4 files changed, 176 insertions(+), 10 deletions(-) diff --git a/src/providers/wfs/qgswfscapabilities.cpp b/src/providers/wfs/qgswfscapabilities.cpp index 4954a0924512..9b9bcb947d27 100644 --- a/src/providers/wfs/qgswfscapabilities.cpp +++ b/src/providers/wfs/qgswfscapabilities.cpp @@ -246,11 +246,31 @@ void QgsWfsCapabilities::capabilitiesReplyFinished() } // Parse operations supported for all feature types - bool insertCap, updateCap, deleteCap; - parseSupportedOperations( featureTypeListElem.firstChildElement( QStringLiteral( "Operations" ) ), - insertCap, - updateCap, - deleteCap ); + bool insertCap = false; + bool updateCap = false; + bool deleteCap = false; + // WFS < 2 + if ( mCaps.version.startsWith( QLatin1String( "1" ) ) ) + { + parseSupportedOperations( featureTypeListElem.firstChildElement( QStringLiteral( "Operations" ) ), + insertCap, + updateCap, + deleteCap ); + } + else // WFS 2.0.0 tested on GeoServer + { + QDomNodeList operationNodes = doc.elementsByTagName( "Operation" ); + for ( int i = 0; i < operationNodes.count(); i++ ) + { + QDomElement operationElement = operationNodes.at( i ).toElement( ); + if ( operationElement.isElement( ) && "Transaction" == operationElement.attribute( "name" ) ) + { + insertCap = true; + updateCap = true; + deleteCap = true; + } + } + } // get the elements QDomNodeList featureTypeList = featureTypeListElem.elementsByTagName( QStringLiteral( "FeatureType" ) ); @@ -474,10 +494,6 @@ void QgsWfsCapabilities::parseSupportedOperations( const QDomElement& operations updateCap = false; deleteCap = false; - // TODO: remove me when WFS-T 1.1 or 2.0 is done - if ( !mCaps.version.startsWith( QLatin1String( "1.0" ) ) ) - return; - if ( operationsElem.isNull() ) { return; diff --git a/src/providers/wfs/qgswfsprovider.cpp b/src/providers/wfs/qgswfsprovider.cpp index 83f9289a60cc..489c858c226c 100644 --- a/src/providers/wfs/qgswfsprovider.cpp +++ b/src/providers/wfs/qgswfsprovider.cpp @@ -852,6 +852,16 @@ bool QgsWFSProvider::addFeatures( QgsFeatureList &flist ) { //transaction successful. Add the features to the cache QStringList idList = insertedFeatureIds( serverResponse ); + /* Fix issue with GeoServer and shapefile feature stores when no real + feature id are returned but new0 returned instead of the featureId*/ + Q_FOREACH ( const QString &v, idList ) + { + if ( v.startsWith( QStringLiteral( "new" ) ) ) + { + reloadData(); + return true; + } + } QStringList::const_iterator idIt = idList.constBegin(); featureIt = flist.begin(); @@ -1392,7 +1402,10 @@ bool QgsWFSProvider::sendTransactionDocument( const QDomDocument& doc, QDomDocum QDomElement QgsWFSProvider::createTransactionElement( QDomDocument& doc ) const { QDomElement transactionElem = doc.createElementNS( QgsWFSConstants::WFS_NAMESPACE, QStringLiteral( "Transaction" ) ); - transactionElem.setAttribute( QStringLiteral( "version" ), QStringLiteral( "1.0.0" ) ); + // QString WfsVersion = mShared->mWFSVersion; + // For now: hardcoded to 1.0.0 + QString WfsVersion = QStringLiteral( "1.0.0" ); + transactionElem.setAttribute( QStringLiteral( "version" ), WfsVersion ); transactionElem.setAttribute( QStringLiteral( "service" ), QStringLiteral( "WFS" ) ); transactionElem.setAttribute( QStringLiteral( "xmlns:xsi" ), QStringLiteral( "http://www.w3.org/2001/XMLSchema-instance" ) ); diff --git a/src/providers/wfs/qgswfstransactionrequest.cpp b/src/providers/wfs/qgswfstransactionrequest.cpp index 5ed6a297c44a..60cdf1886443 100644 --- a/src/providers/wfs/qgswfstransactionrequest.cpp +++ b/src/providers/wfs/qgswfstransactionrequest.cpp @@ -36,6 +36,7 @@ bool QgsWFSTransactionRequest::send( const QDomDocument& doc, QDomDocument& serv QgsDebugMsg( errorMsg ); return false; } + QgsDebugMsg( mResponse ); return true; } return false; diff --git a/tests/src/python/test_provider_wfs.py b/tests/src/python/test_provider_wfs.py index 9eb0def0b1d9..b87b98950dcd 100644 --- a/tests/src/python/test_provider_wfs.py +++ b/tests/src/python/test_provider_wfs.py @@ -2225,6 +2225,142 @@ def testDescribeFeatureTypeWithInlineType(self): got = got_f[0].geometry().geometry() self.assertEqual((got.x(), got.y()), (2.0, 49.0)) + def testWFS20TransactionsDisabled(self): + """Test WFS 2.0 Transaction disabled""" + + endpoint = self.__class__.basetestpath + '/fake_qgis_http_endpoint_WFS_2.0_transaction' + + with open(sanitize(endpoint, '?SERVICE=WFS?REQUEST=GetCapabilities?ACCEPTVERSIONS=2.0.0,1.1.0,1.0.0'), 'wb') as f: + f.write(""" + + + + + + 1 + + + + + TRUE + + + + + my:typename + Title + Abstract + urn:ogc:def:crs:EPSG::4326 + + -71.123 66.33 + -65.32 78.3 + + + +""".encode('UTF-8')) + + with open(sanitize(endpoint, '?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=2.0.0&TYPENAME=my:typename'), 'wb') as f: + f.write(""" + + + + + + + + + + + + + +""".encode('UTF-8')) + + # Create test layer + vl = QgsVectorLayer(u"url='http://" + endpoint + u"' typename='my:typename'", u'test', u'WFS') + assert vl.isValid() + self.assertEqual(vl.dataProvider().capabilities() & vl.dataProvider().EditingCapabilities, vl.dataProvider().NoCapabilities) + self.assertEqual(vl.wkbType(), QgsWkbTypes.Point) + + def testWFS20TransactionsEnabled(self): + """Test WFS 2.0 Transaction enabled""" + + endpoint = self.__class__.basetestpath + '/fake_qgis_http_endpoint_WFS_2.0_transaction' + + with open(sanitize(endpoint, '?SERVICE=WFS?REQUEST=GetCapabilities?ACCEPTVERSIONS=2.0.0,1.1.0,1.0.0'), 'wb') as f: + f.write(""" + + + + + + 1 + + + + + TRUE + + + + + + + + + + + text/xml; subtype=gml/3.2 + + + + + ALL + SOME + + + + + + + my:typename + Title + Abstract + urn:ogc:def:crs:EPSG::4326 + + -71.123 66.33 + -65.32 78.3 + + + +""".format(endpoint=endpoint).encode('UTF-8')) + + with open(sanitize(endpoint, '?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=2.0.0&TYPENAME=my:typename'), 'wb') as f: + f.write(""" + + + + + + + + + + + + + + + + + +""".encode('UTF-8')) + + # Create test layer + vl = QgsVectorLayer(u"url='http://" + endpoint + u"' typename='my:typename'", u'test', u'WFS') + assert vl.isValid() + self.assertNotEqual(vl.dataProvider().capabilities() & vl.dataProvider().EditingCapabilities, vl.dataProvider().NoCapabilities) + self.assertEqual(vl.wkbType(), QgsWkbTypes.Point) if __name__ == '__main__': unittest.main() From 3d3856580fd2ea7ff5b6a07f1d5d1fcb867e88f2 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 16 Jan 2017 11:45:34 +0100 Subject: [PATCH 069/332] Qt 5.2 has QComboBox::currentData --- src/app/qgsaddattrdialog.cpp | 8 ++++---- src/app/qgsnewspatialitelayerdialog.cpp | 2 +- src/gui/editorwidgets/qgsrelationreferencewidget.cpp | 2 +- src/gui/qgsnewgeopackagelayerdialog.cpp | 8 ++++---- src/gui/qgsnewvectorlayerdialog.cpp | 4 ++-- src/gui/qgsprojectionselectionwidget.cpp | 2 +- src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/qgsaddattrdialog.cpp b/src/app/qgsaddattrdialog.cpp index e79814e27ef4..b127c485b19d 100644 --- a/src/app/qgsaddattrdialog.cpp +++ b/src/app/qgsaddattrdialog.cpp @@ -112,16 +112,16 @@ QgsField QgsAddAttrDialog::field() const QgsDebugMsg( QString( "idx:%1 name:%2 type:%3 typeName:%4 length:%5 prec:%6 comment:%7" ) .arg( mTypeBox->currentIndex() ) .arg( mNameEdit->text() ) - .arg( mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toInt() ) - .arg( mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole + 1 ).toString() ) + .arg( mTypeBox->currentData( Qt::UserRole ).toInt() ) + .arg( mTypeBox->currentData( Qt::UserRole + 1 ).toString() ) .arg( mLength->value() ) .arg( mPrec->value() ) .arg( mCommentEdit->text() ) ); return QgsField( mNameEdit->text(), - ( QVariant::Type ) mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toInt(), - mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole + 1 ).toString(), + ( QVariant::Type ) mTypeBox->currentData( Qt::UserRole ).toInt(), + mTypeBox->currentData( Qt::UserRole + 1 ).toString(), mLength->value(), mPrec->value(), mCommentEdit->text() ); diff --git a/src/app/qgsnewspatialitelayerdialog.cpp b/src/app/qgsnewspatialitelayerdialog.cpp index 554c3c847ae5..96b4b5019706 100644 --- a/src/app/qgsnewspatialitelayerdialog.cpp +++ b/src/app/qgsnewspatialitelayerdialog.cpp @@ -174,7 +174,7 @@ void QgsNewSpatialiteLayerDialog::on_mAddAttributeButton_clicked() { QString myName = mNameEdit->text(); //use userrole to avoid translated type string - QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString(); + QString myType = mTypeBox->currentData( Qt::UserRole ).toString(); mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType ) ); checkOk(); diff --git a/src/gui/editorwidgets/qgsrelationreferencewidget.cpp b/src/gui/editorwidgets/qgsrelationreferencewidget.cpp index 558e24642286..0a18bc93d3f0 100644 --- a/src/gui/editorwidgets/qgsrelationreferencewidget.cpp +++ b/src/gui/editorwidgets/qgsrelationreferencewidget.cpp @@ -339,7 +339,7 @@ QgsFeature QgsRelationReferenceWidget::referencedFeature() const } else { - fid = mComboBox->itemData( mComboBox->currentIndex(), QgsAttributeTableModel::FeatureIdRole ).value(); + fid = mComboBox->currentData( QgsAttributeTableModel::FeatureIdRole ).value(); } mReferencedLayer->getFeatures( QgsFeatureRequest().setFilterFid( fid ) ).nextFeature( f ); } diff --git a/src/gui/qgsnewgeopackagelayerdialog.cpp b/src/gui/qgsnewgeopackagelayerdialog.cpp index 8ef4dc968c71..644e952889d9 100644 --- a/src/gui/qgsnewgeopackagelayerdialog.cpp +++ b/src/gui/qgsnewgeopackagelayerdialog.cpp @@ -111,7 +111,7 @@ QgsNewGeoPackageLayerDialog::~QgsNewGeoPackageLayerDialog() void QgsNewGeoPackageLayerDialog::on_mFieldTypeBox_currentIndexChanged( int ) { - QString myType = mFieldTypeBox->itemData( mFieldTypeBox->currentIndex(), Qt::UserRole ).toString(); + QString myType = mFieldTypeBox->currentData( Qt::UserRole ).toString(); mFieldLengthEdit->setEnabled( myType == QLatin1String( "text" ) ); if ( myType != QLatin1String( "text" ) ) mFieldLengthEdit->setText( QLatin1String( "" ) ); @@ -121,7 +121,7 @@ void QgsNewGeoPackageLayerDialog::on_mFieldTypeBox_currentIndexChanged( int ) void QgsNewGeoPackageLayerDialog::on_mGeometryTypeBox_currentIndexChanged( int ) { OGRwkbGeometryType geomType = static_cast - ( mGeometryTypeBox->itemData( mGeometryTypeBox->currentIndex(), Qt::UserRole ).toInt() ); + ( mGeometryTypeBox->currentData( Qt::UserRole ).toInt() ); bool isSpatial = geomType != wkbNone; mGeometryColumnEdit->setEnabled( isSpatial ); mCheckBoxCreateSpatialIndex->setEnabled( isSpatial ); @@ -196,7 +196,7 @@ void QgsNewGeoPackageLayerDialog::on_mAddAttributeButton_clicked() } //use userrole to avoid translated type string - QString myType = mFieldTypeBox->itemData( mFieldTypeBox->currentIndex(), Qt::UserRole ).toString(); + QString myType = mFieldTypeBox->currentData( Qt::UserRole ).toString(); QString length = mFieldLengthEdit->text(); mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << length ) ); @@ -348,7 +348,7 @@ bool QgsNewGeoPackageLayerDialog::apply() QString layerDescription( mLayerDescriptionEdit->text() ); OGRwkbGeometryType wkbType = static_cast - ( mGeometryTypeBox->itemData( mGeometryTypeBox->currentIndex(), Qt::UserRole ).toInt() ); + ( mGeometryTypeBox->currentData( Qt::UserRole ).toInt() ); OGRSpatialReferenceH hSRS = nullptr; // consider spatial reference system of the layer diff --git a/src/gui/qgsnewvectorlayerdialog.cpp b/src/gui/qgsnewvectorlayerdialog.cpp index 18e6b38ff1d7..0a9836fa574b 100644 --- a/src/gui/qgsnewvectorlayerdialog.cpp +++ b/src/gui/qgsnewvectorlayerdialog.cpp @@ -171,7 +171,7 @@ void QgsNewVectorLayerDialog::on_mAddAttributeButton_clicked() QString myWidth = mWidth->text(); QString myPrecision = mPrecision->isEnabled() ? mPrecision->text() : QLatin1String( "" ); //use userrole to avoid translated type string - QString myType = mTypeBox->itemData( mTypeBox->currentIndex(), Qt::UserRole ).toString(); + QString myType = mTypeBox->currentData( Qt::UserRole ).toString(); mAttributeView->addTopLevelItem( new QTreeWidgetItem( QStringList() << myName << myType << myWidth << myPrecision ) ); if ( mAttributeView->topLevelItemCount() > 0 ) { @@ -205,7 +205,7 @@ void QgsNewVectorLayerDialog::attributes( QList< QPair >& at ) QString QgsNewVectorLayerDialog::selectedFileFormat() const { //use userrole to avoid translated type string - QString myType = mFileFormatComboBox->itemData( mFileFormatComboBox->currentIndex(), Qt::UserRole ).toString(); + QString myType = mFileFormatComboBox->currentData( Qt::UserRole ).toString(); return myType; } diff --git a/src/gui/qgsprojectionselectionwidget.cpp b/src/gui/qgsprojectionselectionwidget.cpp index ae6f2991dde6..f264d3d1351d 100644 --- a/src/gui/qgsprojectionselectionwidget.cpp +++ b/src/gui/qgsprojectionselectionwidget.cpp @@ -84,7 +84,7 @@ QgsCoordinateReferenceSystem QgsProjectionSelectionWidget::crs() const return mCrs; case QgsProjectionSelectionWidget::RecentCrs: { - long srsid = mCrsComboBox->itemData( mCrsComboBox->currentIndex(), Qt::UserRole + 1 ).toLongLong(); + long srsid = mCrsComboBox->currentData( Qt::UserRole + 1 ).toLongLong(); QgsCoordinateReferenceSystem crs = QgsCoordinateReferenceSystem::fromSrsId( srsid ); return crs; } diff --git a/src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp b/src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp index fd9f5f6772b4..218d32021cc2 100644 --- a/src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp +++ b/src/gui/symbology-ng/qgscptcitycolorrampdialog.cpp @@ -435,7 +435,7 @@ void QgsCptCityColorRampDialog::on_cboVariantName_currentIndexChanged( int index { Q_UNUSED( index ); if ( cboVariantName->currentIndex() != -1 ) - mRamp.setVariantName( cboVariantName->itemData( cboVariantName->currentIndex(), Qt::UserRole ).toString() ); + mRamp.setVariantName( cboVariantName->currentData( Qt::UserRole ).toString() ); QgsDebugMsg( QString( "variant= %1 - %2 variants" ).arg( mRamp.variantName() ).arg( mRamp.variantList().count() ) ); updatePreview(); emit changed(); From 14c4dea4db1b10c1dc25b43130b8e9d0b41ed39a Mon Sep 17 00:00:00 2001 From: Alexandre Neto Date: Mon, 16 Jan 2017 11:16:12 +0000 Subject: [PATCH 070/332] Replaces ProjectionEnable Icons and text Replaces the OFT enable and Disable Icons to use the same CRS Icon as in options Changes behavior on CRS TEXT showing when OTF is off, instead of when it's ON. --- images/themes/default/mIconProjectionDisabled.svg | 2 +- images/themes/default/mIconProjectionEnabled.svg | 2 +- src/app/qgisapp.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/themes/default/mIconProjectionDisabled.svg b/images/themes/default/mIconProjectionDisabled.svg index 5329f8d5f768..5f94c94ac404 100644 --- a/images/themes/default/mIconProjectionDisabled.svg +++ b/images/themes/default/mIconProjectionDisabled.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/images/themes/default/mIconProjectionEnabled.svg b/images/themes/default/mIconProjectionEnabled.svg index 1dbc3f481f82..39117e13a11a 100644 --- a/images/themes/default/mIconProjectionEnabled.svg +++ b/images/themes/default/mIconProjectionEnabled.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index 170006aad5c0..1eeabadd88b4 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -10275,13 +10275,13 @@ void QgisApp::updateCrsStatusBar() if ( mMapCanvas->mapSettings().hasCrsTransformEnabled() ) { - mOnTheFlyProjectionStatusButton->setText( tr( "%1 (OTF)" ).arg( mOnTheFlyProjectionStatusButton->text() ) ); mOnTheFlyProjectionStatusButton->setToolTip( tr( "Current CRS: %1 (OTF enabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) ); mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionEnabled.svg" ) ) ); } else { + mOnTheFlyProjectionStatusButton->setText( tr( "%1 (OTF off)" ).arg( mOnTheFlyProjectionStatusButton->text() ) ); mOnTheFlyProjectionStatusButton->setToolTip( tr( "Current CRS: %1 (OTF disabled)" ).arg( mMapCanvas->mapSettings().destinationCrs().description() ) ); mOnTheFlyProjectionStatusButton->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "mIconProjectionDisabled.svg" ) ) ); From 783fae1bc9f0e75d35ec55217675370f74f16250 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tudor=20B=C4=83r=C4=83scu?= Date: Mon, 16 Jan 2017 11:10:41 +0200 Subject: [PATCH 071/332] fix setRelationId description --- python/core/qgsrelation.sip | 2 +- src/core/qgsrelation.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/core/qgsrelation.sip b/python/core/qgsrelation.sip index cc347aa2a3bf..fa723329cf79 100644 --- a/python/core/qgsrelation.sip +++ b/python/core/qgsrelation.sip @@ -43,7 +43,7 @@ class QgsRelation void writeXml( QDomNode& node, QDomDocument& doc ) const; /** - * Set a name for this relation + * Set an id for this relation * * @param id */ diff --git a/src/core/qgsrelation.h b/src/core/qgsrelation.h index 92eded123b42..8c2d3cdb3006 100644 --- a/src/core/qgsrelation.h +++ b/src/core/qgsrelation.h @@ -86,7 +86,7 @@ class CORE_EXPORT QgsRelation void writeXml( QDomNode& node, QDomDocument& doc ) const; /** - * Set a name for this relation + * Set an id for this relation * * @param id */ From 50e5d97a17df0d5957921ff0c8a9e41032270c33 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 16 Jan 2017 15:12:15 +0100 Subject: [PATCH 072/332] [spellcheck] fix using whole dictionary --- scripts/spell_check/check_spelling.sh | 176 +++++++++++++------------- 1 file changed, 86 insertions(+), 90 deletions(-) diff --git a/scripts/spell_check/check_spelling.sh b/scripts/spell_check/check_spelling.sh index 5c80bf2fe17c..d25296b9f51c 100755 --- a/scripts/spell_check/check_spelling.sh +++ b/scripts/spell_check/check_spelling.sh @@ -68,7 +68,7 @@ declare -A GLOBREP_IGNORE=() for ((I=0;I<$SPLIT;I++)) ; do SPELLFILE=spelling$I~; - # This will try to look for mispelling within larger words. + # This will try to look for misspelling within larger words. # Condition is hard to explain in words. # You can test it here: https://regex101.com/r/7kznVA/9 # extra words that should not be checked in longer words @@ -94,115 +94,111 @@ for ((I=0;I<$SPLIT;I++)) ; do fi NUMBER=$(echo "$NOCOLOR" | cut -d: -f1) ERROR=$(echo "$LINE" | ${GNUPREFIX}sed -r 's/^.*?\x1B\[30;43m(.*?)\x1B\[0m.*$/\1/') - CORRECTION=$(ag --nonumbers --ignore-case --word-regexp "$ERROR" ${DIR}/spelling.dat | cut -d: -f2) + CORRECTION=$(ag --nonumbers --ignore-case "^$ERROR:" ${DIR}/spelling.dat | cut -d: -f2) # Match case MATCHCASE="$ERROR:$CORRECTION" CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2) # Skip global replace - if [[ ! -z ${GLOBREP_CURRENTFILE["$ERROR"]} ]]; then - continue - fi if [[ ! -z ${GLOBREP_ALLFILES["$ERROR"]} ]]; then echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE continue - fi - if [[ ! -z ${GLOBREP_IGNORE["$ERROR"]} ]]; then - continue - fi - # escape string - SPELLOKSTR='//#spellok' - if [[ "$FILE" =~ \.(txt|html|htm)$ ]]; then - SPELLOKSTR='' - fi - if [[ "$FILE" =~ \.(h|cpp|sip)$ ]]; then - if [[ "$NOCOLOR" =~ ^\s*(\/*)|(\/\/) ]]; then + elif [[ -z ${GLOBREP_CURRENTFILE["$ERROR"]} ]] && [[ -z ${GLOBREP_IGNORE["$ERROR"]} ]]; then + # escape string + SPELLOKSTR='//#spellok' + if [[ "$FILE" =~ \.(txt|html|htm|dox)$ ]]; then + SPELLOKSTR='' + fi + if [[ "$FILE" =~ \.(h|cpp|sip)$ ]]; then + if [[ "$NOCOLOR" =~ ^\s*(\/*)|(\/\/) ]]; then + SPELLOKSTR='#spellok' + fi + fi + if [[ "$FILE" =~ \.(py)$ ]]; then SPELLOKSTR='#spellok' fi + SPELLOKSTR_ESC=$(echo "$SPELLOKSTR" | ${GNUPREFIX}sed -r 's/\//\\\//g') + + # Display menu + echo "***" + echo -e "Error found: \x1B[31m$ERROR\x1B[0m" + echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTIONCASE\x1B[0m at line $NUMBER" + echo -e " replace all occurrences by \x1B[33m$CORRECTIONCASE\x1B[0m in current \x1B[4mf\x1B[0mile" + echo -e " replace all occurrences by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[4ma\x1B[0mll files" + echo -e " a\x1B[4mp\x1B[0mpend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line $NUMBER to avoid spell check on this line" + echo -e " en\x1B[4mt\x1B[0mer your own correction" + echo -e " skip and \x1B[4mc\x1B[0montinue" + echo -e " skip all \x1B[4mo\x1B[0mccurences and continue" + echo -e " ignore and \x1B[4me\x1B[0mxit" + + while read -n 1 n; do + echo "" + case $n in + r) + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + ${GNUPREFIX}sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + f) + GLOBREP_CURRENTFILE+=(["$ERROR"]=1) + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" + ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + a) + GLOBREP_CURRENTFILE+=(["$ERROR"]=1) + GLOBREP_ALLFILES+=(["$ERROR"]=1) + echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" + ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + p) + echo -e "appending \x1B[33m$SPELLOKSTR\x1B[0m to \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + ${GNUPREFIX}sed -i "${NUMBER}s/\$/ $SPELLOKSTR_ESC/" $FILE + break + ;; + t) + echo "Enter the correction: " + read CORRECTION + MATCHCASE="$ERROR:$CORRECTION" + CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2) + echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" + sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE + break + ;; + c) + break + ;; + o) + GLOBREP_IGNORE+=(["$ERROR"]="$CORRECTION") + break + ;; + e) + exit 1 + ;; + *) invalid option;; + esac + done fi - if [[ "$FILE" =~ \.(py)$ ]]; then - SPELLOKSTR='#spellok' - fi - SPELLOKSTR_ESC=$(echo "$SPELLOKSTR" | ${GNUPREFIX}sed -r 's/\//\\\//g') - - # Display menu - echo "***" - echo -e "Error found: \x1B[31m$ERROR\x1B[0m" - echo -e " \x1B[4mr\x1B[0meplace by \x1B[33m$CORRECTIONCASE\x1B[0m at line $NUMBER" - echo -e " replace all occurences by \x1B[33m$CORRECTIONCASE\x1B[0m in current \x1B[4mf\x1B[0mile" - echo -e " replace all occurences by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[4ma\x1B[0mll files" - echo -e " a\x1B[4mp\x1B[0mpend \x1B[33m$SPELLOKSTR\x1B[0m at the end of the line $NUMBER to avoid spell check on this line" - echo -e " en\x1B[4mt\x1B[0mer your own correction" - echo -e " skip and \x1B[4mc\x1B[0montinue" - echo -e " skip all \x1B[4mo\x1B[0mccurences and continue" - echo -e " ignore and \x1B[4me\x1B[0mxit" - - while read -n 1 n; do - echo "" - case $n in - r) - echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" - ${GNUPREFIX}sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE - break - ;; - f) - GLOBREP_CURRENTFILE+=(["$ERROR"]=1) - echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" - ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE - break - ;; - a) - GLOBREP_CURRENTFILE+=(["$ERROR"]=1) - GLOBREP_ALLFILES+=(["$ERROR"]="$CORRECTION") - echo -e "replace \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m" - ${GNUPREFIX}sed -i -r "/${SPELLOKRX}/! s/$ERROR/$CORRECTIONCASE/g" $FILE - break - ;; - p) - echo -e "appending \x1B[33m$SPELLOKSTR\x1B[0m to \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" - ${GNUPREFIX}sed -i "${NUMBER}s/\$/ $SPELLOKSTR_ESC/" $FILE - break - ;; - t) - echo "Enter the correction: " - read CORRECTION - MATCHCASE="$ERROR:$CORRECTION" - CORRECTIONCASE=$(echo "$MATCHCASE" | ${GNUPREFIX}sed -r 's/([A-Z]+):(.*)/\1:\U\2/; s/([A-Z][a-z]+):([a-z])/\1:\U\2\L/' | cut -d: -f2) - echo -e "replacing \x1B[33m$ERROR\x1B[0m by \x1B[33m$CORRECTIONCASE\x1B[0m in \x1B[33m$FILE\x1B[0m at line \x1B[33m$NUMBER\x1B[0m" - sed -i "${NUMBER}s/$ERROR/$CORRECTIONCASE/g" $FILE - break - ;; - c) - break - ;; - o) - GLOBREP_IGNORE+=(["$ERROR"]="$CORRECTION") - break - ;; - e) - exit 1 - ;; - *) invalid option;; - esac - done - fi if [[ "$NOCOLOR" =~ ^\s*$ ]]; then FILE="" fi fi - done 3< <(unbuffer ag --ignore-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ; \ - unbuffer ag --ignore-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ) + done 3< <(unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline --word-regexp -p $AGIGNORE "${WHOLEWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ; \ + unbuffer ag --smart-case --all-text --nopager --color-match "30;43" --numbers --nomultiline -p $AGIGNORE "${INWORDS}"'(?!.*'"${SPELLOKRX}"')' $INPUTFILES ) rm $SPELLFILE - if [[ "$ERRORFOUND" =~ YES ]]; then - echo -e "\x1B[1msome errors have been found.\x1B[0m" - exit 1 - else - exit 0 - fi done + +if [[ "$ERRORFOUND" =~ YES ]]; then + echo -e "\x1B[1msome errors have been found.\x1B[0m" + exit 1 +else + exit 0 +fi + exit From e7c9b74afa96261cb1f3cc2c3c631a0a034420b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tudor=20B=C4=83r=C4=83scu?= Date: Thu, 12 Jan 2017 11:53:05 +0200 Subject: [PATCH 073/332] Show warning when adding more than 1 part to single geometry layers --- src/app/qgsmaptooladdpart.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app/qgsmaptooladdpart.cpp b/src/app/qgsmaptooladdpart.cpp index adeb79da0d80..3d8b12320085 100644 --- a/src/app/qgsmaptooladdpart.cpp +++ b/src/app/qgsmaptooladdpart.cpp @@ -65,6 +65,10 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent * e ) return; } + bool isGeometryEmpty = false; + if ( vlayer->selectedFeatures()[0].geometry().isEmpty() ) + isGeometryEmpty = true; + if ( !checkSelection() ) { stopCapturing(); @@ -194,6 +198,12 @@ void QgsMapToolAddPart::cadCanvasReleaseEvent( QgsMapMouseEvent * e ) vlayer->endEditCommand(); vlayer->triggerRepaint(); + + if (( !isGeometryEmpty ) && QgsWkbTypes::isSingleType( vlayer->wkbType() ) ) + { + emit messageEmitted( tr( "Add part: Feature geom is single part and you've added more than one" ), QgsMessageBar::WARNING ); + } + return; } From f2e556a4469f16f9a3cb54b9b950d34cc449e083 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Mon, 16 Jan 2017 16:06:00 +0100 Subject: [PATCH 074/332] creatensis.pl: handle release names with blanks --- ms-windows/osgeo4w/creatensis.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ms-windows/osgeo4w/creatensis.pl b/ms-windows/osgeo4w/creatensis.pl index 2856930ab638..3b9eb64b2509 100755 --- a/ms-windows/osgeo4w/creatensis.pl +++ b/ms-windows/osgeo4w/creatensis.pl @@ -446,7 +446,7 @@ sub getDeps { $cmd .= sprintf( " -DVERSION_INT='%d%02d%02d%02d'", $pmajor, $pminor, $ppatch, $binary ); $cmd .= sprintf( " -DQGIS_BASE='$packagename %d.%d'", $pmajor, $pminor ); $cmd .= " -DINSTALLER_NAME='$packagename-OSGeo4W-$version-$binary-Setup$archpostfix.exe'"; -$cmd .= " -DDISPLAYED_NAME='$packagename \'$releasename\' ($version)'"; +$cmd .= " -DDISPLAYED_NAME=\"$packagename '$releasename' ($version)\""; $cmd .= " -DSHORTNAME='$shortname'"; $cmd .= " -DINSTALLER_TYPE=OSGeo4W"; $cmd .= " -DPACKAGE_FOLDER=osgeo4w/$unpacked"; From 0a63d1f2c2b028360a6ac1eaf8512f00524b3cec Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Mon, 16 Jan 2017 15:13:30 +0100 Subject: [PATCH 075/332] [spellcheck] properly look into various cases and add more fixes" --- CMakeLists.txt | 2 +- NEWS | 36 +-- README.md | 2 +- cmake/FindQCA.cmake | 2 +- cmake/FindQScintilla.cmake | 2 +- cmake/PythonMacros.cmake | 6 +- cmake/Txt2Tags.cmake | 2 +- cmake/UsePythonTest.cmake | 2 +- cmake/modules/ECMQt4To5Porting.cmake | 2 +- cmake_templates/Doxyfile.in | 2 +- debian/copyright | 2 +- doc/api_break.dox | 4 +- doc/news.html | 36 +-- doc/news.t2t | 36 +-- images/themes/default/providerGrass.svg | 4 +- .../interpolation/NormVecDecorator.sip | 2 +- python/console/console_editor.py | 16 +- python/console/console_output.py | 2 +- python/core/auth/qgsauthmethod.sip | 2 +- .../composer/qgscomposerattributetablev2.sip | 4 +- python/core/composer/qgscomposermap.sip | 2 +- python/core/dxf/qgsdxfexport.sip | 2 +- python/core/geometry/qgsgeometry.sip | 4 +- python/core/qgsactionmanager.sip | 4 +- python/core/qgsannotation.sip | 2 +- python/core/qgsapplication.sip | 8 +- python/core/qgscacheindex.sip | 2 +- python/core/qgscolorscheme.sip | 2 +- python/core/qgscoordinatereferencesystem.sip | 2 +- python/core/qgscoordinatetransform.sip | 2 +- python/core/qgsexpression.sip | 4 +- python/core/qgsexpressioncontext.sip | 4 +- python/core/qgsfontutils.sip | 2 +- python/core/qgsmaplayer.sip | 2 +- python/core/qgsmaprendererjob.sip | 2 +- python/core/qgsoptionalexpression.sip | 2 +- python/core/qgsowsconnection.sip | 2 +- python/core/qgspluginlayer.sip | 2 +- python/core/qgspoint.sip | 4 +- python/core/qgsrunprocess.sip | 2 +- python/core/qgssnappingconfig.sip | 4 +- python/core/qgssqlstatement.sip | 6 +- python/core/qgsstatisticalsummary.sip | 4 +- python/core/qgstaskmanager.sip | 2 +- python/core/qgsunittypes.sip | 2 +- python/core/qgsvectorlayer.sip | 4 +- python/core/qgsvectorlayerutils.sip | 2 +- python/core/raster/qgscontrastenhancement.sip | 2 +- python/core/raster/qgsrasterdataprovider.sip | 2 +- python/core/raster/qgsrasterinterface.sip | 6 +- python/core/raster/qgsrasterpyramid.sip | 2 +- python/core/symbology-ng/qgsrenderer.sip | 4 +- python/core/symbology-ng/qgsstyle.sip | 6 +- python/core/symbology-ng/qgssymbol.sip | 2 +- .../core/qgseditorwidgetfactory.sip | 2 +- .../core/qgseditorwidgetregistry.sip | 2 +- .../editorwidgets/core/qgswidgetwrapper.sip | 2 +- python/gui/qgisinterface.sip | 4 +- .../gui/qgsadvanceddigitizingdockwidget.sip | 2 +- python/gui/qgsexpressionbuilderwidget.sip | 2 +- python/gui/qgsgeometryrubberband.sip | 2 +- python/gui/qgsidentifymenu.sip | 4 +- python/gui/qgsmapcanvas.sip | 2 +- python/gui/qgsmaplayerconfigwidgetfactory.sip | 2 +- python/gui/qgspanelwidget.sip | 2 +- python/gui/qgstablewidgetbase.sip | 2 +- python/gui/raster/qgsrasterminmaxwidget.sip | 2 +- .../symbology-ng/qgsstylemanagerdialog.sip | 2 +- .../db_manager/db_plugins/oracle/TODO.md | 2 +- .../grass7/description/v.net.visibility.txt | 2 +- .../plugins/processing/algs/grass7/grass7.txt | 2 +- python/plugins/processing/algs/help/qgis.yaml | 4 +- .../plugins/processing/algs/qgis/Delaunay.py | 6 +- python/plugins/processing/algs/qgis/Union.py | 2 +- python/plugins/processing/gui/menus.py | 2 +- python/plugins/processing/tests/README.md | 2 +- python/plugins/processing/tools/postgis.py | 2 +- python/pyplugin_installer/installer_data.py | 6 +- python/server/qgsserverfilter.sip | 2 +- python/server/qgsserverinterface.sip | 2 +- python/server/qgsserversettings.sip | 2 +- python/server/qgsserviceregistry.sip | 2 +- .../QgsDecorationNorthArrowDialog | 2 +- resources/cpt-city-qgis-min/es/COPYING.xml | 2 +- .../ggr/Brushed_Aluminium.svg | 4 +- .../cpt-city-qgis-min/nd/vermillion/DESC.xml | 6 +- .../nd/vermillion/Split_02.svg | 4 +- .../nd/vermillion/Tertiary_01.svg | 4 +- .../ocal/ukranian-flag-smooth.svg | 4 +- .../cpt-city-qgis-min/ocal/ukranian-flag.svg | 4 +- .../cpt-city-qgis-min/selections/div.xml | 4 +- .../wkp/encyclopedia/DESC.xml | 2 +- resources/function_help/json/coalesce | 2 +- scripts/doxygen_space.pl | 2 +- scripts/spell_check/.agignore | 26 ++- scripts/spell_check/check_spelling.sh | 19 +- scripts/spell_check/spelling.dat | 205 ++++++++++-------- .../interpolation/DualEdgeTriangulation.cc | 2 +- src/analysis/interpolation/NormVecDecorator.h | 2 +- src/analysis/raster/qgskde.h | 2 +- src/analysis/vector/qgsgeometryanalyzer.cpp | 10 +- src/app/composer/qgscomposer.cpp | 2 +- src/app/composer/qgscomposerlegendwidget.cpp | 2 +- src/app/composer/qgscompositionwidget.cpp | 2 +- src/app/composer/qgscompositionwidget.h | 4 +- src/app/gps/qwtpolar-0.1/qwt_polar_canvas.cpp | 2 +- src/app/gps/qwtpolar-0.1/qwt_polar_layout.cpp | 4 +- src/app/gps/qwtpolar-0.1/qwt_polar_plot.cpp | 2 +- src/app/main.cpp | 2 +- src/app/nodetool/qgsmaptoolnodetool.cpp | 2 +- src/app/nodetool/qgsmaptoolnodetool.h | 2 +- src/app/pluginmanager/README | 2 +- src/app/pluginmanager/qgspluginmanager.h | 4 +- src/app/qgisapp.cpp | 14 +- src/app/qgisappinterface.h | 4 +- src/app/qgisappstylesheet.cpp | 2 +- src/app/qgsalignrasterdialog.cpp | 2 +- src/app/qgsattributetabledialog.cpp | 2 +- src/app/qgsbookmarks.cpp | 2 +- src/app/qgsbrowserdockwidget.cpp | 12 +- src/app/qgsclipboard.h | 2 +- src/app/qgsdecorationcopyright.cpp | 2 +- src/app/qgsdiagramproperties.cpp | 4 +- src/app/qgsfeatureaction.cpp | 2 +- src/app/qgsidentifyresultsdialog.cpp | 2 +- src/app/qgsmaptoolpointsymbol.h | 2 +- src/app/qgsmaptoolshowhidelabels.h | 2 +- src/app/qgsoptions.cpp | 4 +- src/app/qgsprojectlayergroupdialog.cpp | 2 +- src/app/qgsprojectproperties.cpp | 6 +- src/astyle/ASFormatter.cpp | 10 +- src/core/auth/qgsauthcrypto.h | 2 +- src/core/auth/qgsauthmethod.h | 2 +- .../composer/qgscomposerattributetablev2.h | 4 +- src/core/composer/qgscomposermap.cpp | 10 +- src/core/composer/qgscomposermap.h | 4 +- src/core/composer/qgscomposertablecolumn.h | 2 +- src/core/composer/qgscomposition.cpp | 2 +- src/core/dxf/qgsdxfexport.h | 2 +- .../qgsvaluemapfieldformatter.h | 2 +- src/core/geometry/qgsgeometry.h | 6 +- src/core/geometry/qgsgeos.cpp | 16 +- src/core/gps/tok.c | 2 +- .../layertree/qgslayertreemodellegendnode.cpp | 2 +- src/core/qgis.h | 2 +- src/core/qgsactionmanager.cpp | 2 +- src/core/qgsactionmanager.h | 4 +- src/core/qgsannotation.h | 2 +- src/core/qgsapplication.cpp | 2 +- src/core/qgsapplication.h | 10 +- src/core/qgscacheindex.h | 2 +- src/core/qgscolorscheme.h | 2 +- src/core/qgsconnectionpool.h | 2 +- src/core/qgscoordinatereferencesystem.cpp | 2 +- src/core/qgscoordinatereferencesystem.h | 4 +- src/core/qgscoordinatetransform.cpp | 10 +- src/core/qgscoordinatetransform.h | 4 +- src/core/qgscoordinatetransform_p.h | 8 +- src/core/qgscredentials.h | 2 +- src/core/qgscrscache.cpp | 2 +- src/core/qgsdataitem.cpp | 2 +- src/core/qgsexpression.cpp | 4 +- src/core/qgsexpression.h | 4 +- src/core/qgsexpressioncontext.h | 4 +- src/core/qgsexpressioncontextgenerator.h | 2 +- src/core/qgsfeatureiterator.cpp | 2 +- src/core/qgsfeatureiterator.h | 2 +- src/core/qgsfontutils.h | 2 +- src/core/qgsgml.cpp | 6 +- src/core/qgsgml.h | 4 +- src/core/qgsmaplayer.cpp | 2 +- src/core/qgsmaplayer.h | 2 +- src/core/qgsmaprendererjob.h | 2 +- src/core/qgsofflineediting.cpp | 2 +- src/core/qgsoptionalexpression.h | 2 +- src/core/qgsowsconnection.h | 2 +- src/core/qgspallabeling.cpp | 6 +- src/core/qgspluginlayer.h | 2 +- src/core/qgspoint.h | 4 +- src/core/qgsproject.cpp | 16 +- src/core/qgsproject.h | 2 +- src/core/qgsprojectfiletransform.cpp | 4 +- src/core/qgsrunprocess.h | 2 +- src/core/qgssnappingconfig.h | 4 +- src/core/qgssqlstatement.h | 6 +- src/core/qgsstatisticalsummary.h | 4 +- src/core/qgstaskmanager.cpp | 4 +- src/core/qgstaskmanager.h | 2 +- src/core/qgsunittypes.h | 2 +- src/core/qgsvectorlayer.h | 4 +- src/core/qgsvectorlayerundocommand.cpp | 2 +- src/core/qgsvectorlayerutils.cpp | 2 +- src/core/qgsvectorlayerutils.h | 2 +- src/core/raster/qgscontrastenhancement.cpp | 6 +- src/core/raster/qgscontrastenhancement.h | 4 +- .../raster/qgscontrastenhancementfunction.h | 2 +- src/core/raster/qgsrasterdataprovider.h | 2 +- src/core/raster/qgsrasterfilewriter.cpp | 2 +- src/core/raster/qgsrasterinterface.h | 6 +- src/core/raster/qgsrasterlayer.cpp | 2 +- src/core/raster/qgsrasterlayer.h | 4 +- src/core/raster/qgsrasterlayerrenderer.h | 2 +- src/core/raster/qgsrasterpyramid.h | 2 +- src/core/simplify/effectivearea.cpp | 2 +- src/core/simplify/effectivearea.h | 2 +- src/core/symbology-ng/qgscptcityarchive.cpp | 8 +- src/core/symbology-ng/qgscptcityarchive.h | 2 +- src/core/symbology-ng/qgsrenderer.h | 4 +- src/core/symbology-ng/qgsstyle.cpp | 2 +- src/core/symbology-ng/qgsstyle.h | 6 +- src/core/symbology-ng/qgssymbol.h | 2 +- src/core/symbology-ng/qgssymbollayerutils.cpp | 8 +- src/core/symbology-ng/qgssymbollayerutils.h | 2 +- src/gui/auth/qgsauthconfigeditor.h | 2 +- src/gui/auth/qgsautheditorwidgets.h | 2 +- src/gui/auth/qgsauthguiutils.h | 2 +- .../core/qgseditorwidgetautoconf.h | 2 +- .../core/qgseditorwidgetfactory.h | 2 +- .../core/qgseditorwidgetregistry.h | 2 +- src/gui/editorwidgets/core/qgswidgetwrapper.h | 2 +- src/gui/qgisinterface.h | 4 +- src/gui/qgsadvanceddigitizingdockwidget.cpp | 2 +- src/gui/qgsadvanceddigitizingdockwidget.h | 4 +- src/gui/qgscollapsiblegroupbox.cpp | 4 +- src/gui/qgsencodingfiledialog.cpp | 2 +- src/gui/qgsexpressionbuilderdialog.cpp | 2 +- src/gui/qgsexpressionbuilderdialog.h | 2 +- src/gui/qgsexpressionbuilderwidget.cpp | 2 +- src/gui/qgsexpressionbuilderwidget.h | 4 +- src/gui/qgsgeometryrubberband.h | 2 +- src/gui/qgshighlight.cpp | 2 +- src/gui/qgsidentifymenu.h | 4 +- src/gui/qgsmanageconnectionsdialog.cpp | 2 +- src/gui/qgsmapcanvas.cpp | 6 +- src/gui/qgsmapcanvas.h | 2 +- src/gui/qgsmaplayerconfigwidgetfactory.h | 2 +- src/gui/qgsmaptoolcapture.cpp | 4 +- src/gui/qgsnewgeopackagelayerdialog.cpp | 2 +- src/gui/qgspanelwidget.h | 2 +- src/gui/qgsprojectionselector.cpp | 4 +- src/gui/qgsrubberband.cpp | 2 +- src/gui/qgssqlcomposerdialog.cpp | 2 +- src/gui/qgssubstitutionlistwidget.cpp | 2 +- src/gui/qgstablewidgetbase.h | 2 +- src/gui/qgstaskmanagerwidget.h | 2 +- src/gui/qgstextannotationitem.h | 2 +- src/gui/qgstextformatwidget.cpp | 6 +- src/gui/qgsvariableeditorwidget.cpp | 2 +- src/gui/raster/qgsrasterhistogramwidget.cpp | 2 +- src/gui/raster/qgsrasterminmaxwidget.h | 2 +- src/gui/raster/qgsrasterrendererwidget.h | 2 +- .../qgsgraduatedsymbolrendererwidget.cpp | 2 +- .../qgsstyleexportimportdialog.cpp | 2 +- src/gui/symbology-ng/qgsstylemanagerdialog.h | 2 +- src/gui/symbology-ng/qgssvgselectorwidget.cpp | 2 +- src/gui/symbology-ng/qgssymbollayerwidget.cpp | 2 +- .../symbology-ng/qgssymbolselectordialog.h | 2 +- src/plugins/compass/qgscompassplugin.cpp | 2 +- .../evisdatabaseconnectiongui.cpp | 6 +- .../evisgenericeventbrowsergui.cpp | 8 +- .../eventbrowser/evisgenericeventbrowsergui.h | 4 +- src/plugins/evis/idtool/eviseventidtool.cpp | 2 +- .../georeferencer/qgsgeoreftransform.h | 4 +- src/plugins/grass/qgsgrassmapcalc.h | 2 +- src/plugins/grass/qgsgrassmodule.cpp | 6 +- src/plugins/grass/qgsgrassmoduleparam.h | 2 +- src/plugins/grass/qgsgrasstools.cpp | 2 +- src/plugins/grass/scripts/t.rast.what.qgis.py | 2 +- src/plugins/plugin_template/README.whatnext | 4 +- src/plugins/plugin_template/plugingui.cpp | 4 +- src/plugins/spatialquery/qgsmngprogressbar.h | 2 +- src/providers/db2/qgsdb2tablemodel.h | 2 +- .../delimitedtext/qgsdelimitedtextprovider.h | 2 +- .../qgsdelimitedtextsourceselect.cpp | 2 +- src/providers/gdal/qgsgdalprovider.cpp | 8 +- src/providers/gdal/qgsgdalproviderbase.cpp | 2 +- src/providers/grass/qgsgrass.cpp | 8 +- src/providers/grass/qgsgrass.h | 6 +- .../grass/qgsgrassrasterprovider.cpp | 2 +- src/providers/grass/qgsgrassvectormap.h | 2 +- src/providers/mssql/qgsmssqlsourceselect.cpp | 2 +- src/providers/mssql/qgsmssqltablemodel.h | 2 +- src/providers/ogr/qgsogrprovider.h | 2 +- .../spatialite/qgsspatialiteconnection.h | 2 +- .../spatialite/qgsspatialiteprovider.cpp | 2 +- .../spatialite/qgsspatialitetablemodel.h | 2 +- src/providers/wcs/qgswcsprovider.cpp | 6 +- src/providers/wfs/qgswfscapabilities.cpp | 2 +- src/providers/wfs/qgswfsfeatureiterator.cpp | 8 +- src/python/qgspythonutilsimpl.cpp | 2 +- src/server/qgsserver.cpp | 8 +- src/server/qgsserver.h | 4 +- src/server/qgsserverexception.h | 2 +- src/server/qgsserverfilter.h | 2 +- src/server/qgsserverinterface.h | 2 +- src/server/qgsserverplugins.h | 2 +- src/server/qgsserverprojectparser.cpp | 6 +- src/server/qgsserversettings.h | 2 +- src/server/qgsserviceregistry.cpp | 2 +- .../services/wms/qgswmsservertransitional.h | 2 +- src/server/services/wms/qgswmsutils.h | 2 +- tests/bench/README | 2 +- tests/bench/main.cpp | 2 +- tests/src/analysis/testopenstreetmap.cpp | 4 +- tests/src/core/testqgsatlascomposition.cpp | 2 +- tests/src/core/testqgscomposermap.cpp | 4 +- tests/src/core/testqgsgeometry.cpp | 2 +- tests/src/core/testqgsmaprendererjob.cpp | 2 +- tests/src/core/testqgspoint.cpp | 2 +- tests/src/core/testqgsstyle.cpp | 2 +- tests/src/core/testqgstaskmanager.cpp | 6 +- tests/src/gui/testqgsscalecombobox.cpp | 6 +- tests/src/python/providertestbase.py | 2 +- tests/src/python/test_qgsactionmanager.py | 2 +- tests/src/python/test_qgsappstartup.py | 2 +- .../python/test_qgsdelimitedtextprovider.py | 2 +- .../test_qgsdelimitedtextprovider_wanted.py | 8 +- tests/src/python/test_qgsmaplayerregistry.py | 2 +- tests/src/python/test_qgsrasterlayer.py | 2 +- tests/src/python/test_qgsrenderer.py | 4 +- .../python/test_qgsserver_accesscontrol.py | 2 +- tests/testdata/font/QGIS-Vera/COPYRIGHT.TXT | 2 +- tests/testdata/font/QGIS-Vera/README.TXT | 2 +- .../testdata/font/QGIS-Vera/RELEASENOTES.TXT | 4 +- ...e-crash2.qml => raster-palette-crash2.qml} | 0 ...e-crash2.tif => raster-palette-crash2.tif} | Bin ....xml => raster-palette-crash2.tif.aux.xml} | 0 327 files changed, 704 insertions(+), 672 deletions(-) rename tests/testdata/raster/{raster-pallette-crash2.qml => raster-palette-crash2.qml} (100%) rename tests/testdata/raster/{raster-pallette-crash2.tif => raster-palette-crash2.tif} (100%) rename tests/testdata/raster/{raster-pallette-crash2.tif.aux.xml => raster-palette-crash2.tif.aux.xml} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index a17413f82833..4847fcb2a9a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,7 +96,7 @@ SET (WITH_BINDINGS TRUE CACHE BOOL "Determines whether python bindings should be IF (WITH_BINDINGS) # By default bindings will be installed only to QGIS directory # Someone might want to install it to python site-packages directory - # as otherwise user has to use PYTHONPATH environemnt variable to add + # as otherwise user has to use PYTHONPATH environment variable to add # QGIS bindings to package search path SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)") SET (WITH_STAGED_PLUGINS TRUE CACHE BOOL "Stage-install core Python plugins to run from build directory? (utilities and console are always staged)") diff --git a/NEWS b/NEWS index 2ffc60c9b5fc..8b0d4793d945 100644 --- a/NEWS +++ b/NEWS @@ -647,7 +647,7 @@ were made. - Fix #4496 (Refresh map list in composer table widget in showEvent) - OS X build/install updates - GRASS version support -- Intializing from WKT favourize EPSG instead of PROJ.4 +- Initializing from WKT favourize EPSG instead of PROJ.4 - Add What's this to Help menu (implement #4179) - fTools: update layers lists after adding new layer to TOC (fix #4318) - Don't block QGIS main window when running Merge shapefiles tool. Partially addresses #4383 @@ -711,7 +711,7 @@ http://linfiniti.com/2011/08/improvements-to-raster-performance-in-qgis-master/] - Tweak for layer cache - [backport] Fix bug where histogram can be assigned negative frequency for a pixel range. Also fix potential memory leak as new histogram vector was assigned to band stats without clearing the old. - Added section on using QtCreator -- Fix bugs causing a crash when histogram is gathered due to uninitilised histogram vector +- Fix bugs causing a crash when histogram is gathered due to uninitialized histogram vector - Added missing QUrl include - A neater fix for missing map parameter as suggested by Juergen - Fixed a bug where map= was not being published in onlineresource url when project files are not in the same dir as cgi @@ -1007,7 +1007,7 @@ pixels or map units - Allow postgres layers without saved username & password by asking for credentials - Support NULL values in search strings - Optionally add new layers to the selected group -- Map composer can add attribute Tables in layouts. It is possibile to show +- Map composer can add attribute Tables in layouts. It is possible to show only visible features in composer table or all features - Identify tool attribute form now non-modal in view mode (since r12796) - Identified features' highlight disappear when window is deactivate or @@ -1143,7 +1143,7 @@ such it contains new features and extends the programmatic interface over QGIS 1.0.x. If stability and long term support is more important to you then cool new and untested features, we recommend that you use a copy of QGIS from our stable 1.0.x release series. -This release includes over 140 bug fixes and enchancements +This release includes over 140 bug fixes and enhancements over the QGIS 1.1.0 release. In addition we have added the following new features: @@ -1276,7 +1276,7 @@ QGIS 1.0.x. If stability and long term support is more important to you then cool new and untested features, we recommend that you use a copy of QGIS from our stable 1.0.x release series. -This release includes many bug fixes and enchancements +This release includes many bug fixes and enhancements over the QGIS 1.0.0 release. In addition we have added the following new features: @@ -1372,7 +1372,7 @@ QGIS 0.10.0 release. In addition we have made the following changes: 22. Version 0.10.0 'Io' ======================= -This release includes over 120 bug fixes and enchancements +This release includes over 120 bug fixes and enhancements over the QGIS 0.9.1 release. In addition we have added the following new features: @@ -1393,7 +1393,7 @@ improvements 'under the hood'. 23. Version 0.9.2rc1 'Ganymede' =============================== -- This release candidate includes over 40 bug fixes and enchancements +- This release candidate includes over 40 bug fixes and enhancements over the QGIS 0.9.1 release. In addition we have added the following new features: - Imrovements to digitising capabilities. @@ -1887,7 +1887,7 @@ Added remove all layers from overview button. Extents are now correctly restored when project is loaded 2004-06-24 [ts] 0.3.0devel51 -Completion of projectio fixes to freeze canvas and restore zorder correctly. +Completion of projection fixes to freeze canvas and restore zorder correctly. Small issue with restoring extents properly needs to be resolved still. 2004-06-23 [mcoletti] 0.3.0devel50 @@ -1898,11 +1898,11 @@ linking with -rdynamic and using dlopen()'s RTLD_GLOBAL flag. 2004-06-21 [ts] 0.3.0devel49 -Revised raster stats emiting of progress update to not do it when stats are +Revised raster stats emitting of progress update to not do it when stats are fetched from cache. QGisApp progress bar now updates as each layer is rendered in the mapCanvas. -Some minor updates to projectio +Some minor updates to projection 2004-06-21 [larsl] 0.3.0devel48 Hooked up the GPS gui to code that uses gpsbabel to import lots of GPS file @@ -1914,7 +1914,7 @@ fixed wrong versions and DOS endlines 2004-06-21 [ts] 0.3.0devel46 -Got tired of always resetting my gidbase dir everytime qgis restarts - +Got tired of always resetting my gidbase dir every time qgis restarts - added it to qsettings. 2004-06-21 [ts] 0.3.0devel45 @@ -1928,7 +1928,7 @@ Fix for bug [ 973922 ] Overview shows layers in wrong order Fixed show stopper bug where maplayerregistry wasn't being cleared properly on file new -Added setZOrder which will be used in next commit to fix projectio zorder problem +Added setZOrder which will be used in next commit to fix projection zorder problem 2004-06-20 [ts] 0.3.0devel43 @@ -1952,7 +1952,7 @@ Beginnings of generic vector file writer - incomplete and doesn't do anything us to create a new point shapefile: QgsVectorFileWriter myFileWriter("/tmp/test.shp", wkbPoint); - if (myFileWriter.initialise()) + if (myFileWriter.initialize()) { myFileWriter.createField("TestInt",OFTInteger,8,0); myFileWriter.createField("TestRead",OFTReal,8,3); @@ -2030,7 +2030,7 @@ Added acetate layer support to the map canvas. Currently there is only one QgsAcetateObject. More acetate types will follow... 2004-06-10 [ts] 0.3.0devel27 -Modified projectio (serialisation and deserialisation of project files) to +Modified projection (serialisation and deserialisation of project files) to use maplayerregistry and not mapcanvas. Implemented state handling of 'showInOverview' property in project io. @@ -2444,7 +2444,7 @@ endian-ness. 2004-04-02 [stevehalasz] 0.1.0devel25 2004-04-01 [jobi] 0.1.0devel24 -changed qgiscommit to hopefuly fix all problems +changed qgiscommit to hopefully fix all problems 2004-04-01 [jobi] 0.1.0devel23 Extended tools/qgiscommit to pass parameters to cvs @@ -2498,7 +2498,7 @@ Added gps_importer plugin (still a work in progress) 2004-03-22 [mac] 0.1.0devel8 s/config.h/qgsconfig.h/ -qgsconfig.h now has header sentinals +qgsconfig.h now has header sentinels now will install headers in $(prefix)/qgis/include and libqis.* library in $(prefix)/lib "src/Makefile" no longer relies on explicit dependencies and uses better @@ -2603,7 +2603,7 @@ QGIS can load layers and / or a project on start up by specifying these Symbol renderers for simple, graduated, and continuous symbols Raster support for most GDAL formats Raster implementation supports a variety of rendering settings including - semi transparent overlays, pallette inversion, flexible band to color mapping + semi transparent overlays, palette inversion, flexible band to color mapping in multiband images and creation of pseudocolor. Change to a data provider architecture for vector layers. Additional data types can be supported by writing a provider plugin @@ -2637,7 +2637,7 @@ Features in shapefiles can be selected by dragging a selection box or selecting the records in the attribute table Zoom to extent of selected features (Shapefiles only) Bug fix: Bug that prevented reopening of the attribute table once - it was initally displayed and closed + it was initially displayed and closed Bug fix: Bug that prevented lines from being drawn with widths other than 1 pixel Build system has changed for building with PostgreSQL support. diff --git a/README.md b/README.md index 17fbfd14184e..511b2c05510e 100644 --- a/README.md +++ b/README.md @@ -76,4 +76,4 @@ repository, and then [issue a pull request](http://help.github.com/pull-requests review your contribution and commit it upstream as appropriate. If you commit a new feature, add [FEATURE] to your commit message AND give a clear description of the new feature. A webhook will automatically create an issue on the QGIS-Documentation repo to tell people to write about it. -If you are not a developer, there are many other possibilities which do not require programing skills to help QGIS to evolve. Check our [project homepage for more information](http://qgis.org/en/site/getinvolved/index.html). +If you are not a developer, there are many other possibilities which do not require programming skills to help QGIS to evolve. Check our [project homepage for more information](http://qgis.org/en/site/getinvolved/index.html). diff --git a/cmake/FindQCA.cmake b/cmake/FindQCA.cmake index 4f6839b842b0..5b9c9f533d97 100644 --- a/cmake/FindQCA.cmake +++ b/cmake/FindQCA.cmake @@ -72,7 +72,7 @@ else(NOT QCA_FOUND) file(STRINGS "${_qca_version_h}" _qca_version_str REGEX "^.*QCA_VERSION_STR +\"[^\"]+\".*$") string(REGEX REPLACE "^.*QCA_VERSION_STR +\"([^\"]+)\".*$" "\\1" QCA_VERSION_STR "${_qca_version_str}") else() - # qca_core.h contains hexidecimal version in <= 2.0.3 + # qca_core.h contains hexadecimal version in <= 2.0.3 set(_qca_core_h "${QCA_INCLUDE_DIR}/qca_core.h") if(EXISTS "${_qca_core_h}") file(STRINGS "${_qca_core_h}" _qca_version_str REGEX "^#define +QCA_VERSION +0x[0-9a-fA-F]+.*") diff --git a/cmake/FindQScintilla.cmake b/cmake/FindQScintilla.cmake index 8826e1f2a81e..86799f3ddcd5 100644 --- a/cmake/FindQScintilla.cmake +++ b/cmake/FindQScintilla.cmake @@ -69,7 +69,7 @@ ELSE(EXISTS QSCINTILLA_VERSION_STR) ENDIF(QSCINTILLA_LIBRARY AND QSCINTILLA_INCLUDE_DIR) IF(QSCINTILLA_INCLUDE_DIR AND NOT EXISTS QSCINTILLA_VERSION_STR) - # get QScintilla2 version from header, is optinally retrieved via bindings + # get QScintilla2 version from header, is optionally retrieved via bindings # with Qsci PyQt4 module FILE(READ ${QSCINTILLA_INCLUDE_DIR}/Qsci/qsciglobal.h qsci_header) STRING(REGEX REPLACE "^.*QSCINTILLA_VERSION_STR +\"([^\"]+)\".*$" "\\1" QSCINTILLA_VERSION_STR "${qsci_header}") diff --git a/cmake/PythonMacros.cmake b/cmake/PythonMacros.cmake index 858ad9690e52..222f65d813d7 100644 --- a/cmake/PythonMacros.cmake +++ b/cmake/PythonMacros.cmake @@ -14,13 +14,13 @@ GET_FILENAME_COMPONENT(PYTHON_MACROS_MODULE_PATH ${CMAKE_CURRENT_LIST_FILE} PATH) -MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) +MACRO(PYTHON_INSTALL SOURCE_FILE DESTINATION_DIR) FIND_FILE(_python_compile_py PythonCompile.py PATHS ${CMAKE_MODULE_PATH}) # Install the source file. - INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESINATION_DIR}) + INSTALL(FILES ${SOURCE_FILE} DESTINATION ${DESTINATION_DIR}) # Byte compile and install the .pyc file. GET_FILENAME_COMPONENT(_absfilename ${SOURCE_FILE} ABSOLUTE) @@ -57,5 +57,5 @@ MACRO(PYTHON_INSTALL SOURCE_FILE DESINATION_DIR) ) ENDIF(_abs_bin_py STREQUAL ${_absfilename}) - INSTALL(FILES ${_bin_pyc} DESTINATION ${DESINATION_DIR}) + INSTALL(FILES ${_bin_pyc} DESTINATION ${DESTINATION_DIR}) ENDMACRO(PYTHON_INSTALL) diff --git a/cmake/Txt2Tags.cmake b/cmake/Txt2Tags.cmake index 7b216f87d0ea..4bdf3617bf23 100644 --- a/cmake/Txt2Tags.cmake +++ b/cmake/Txt2Tags.cmake @@ -27,7 +27,7 @@ MACRO(FIND_TXT2TAGS) FIND_PROGRAM(PDFLATEX_EXECUTABLE pdflatex) ENDIF (NOT PDFLATEX_EXECUTABLE) IF (NOT PDFLATEX_EXECUTABLE) - MESSAGE(ERROR "pdflatex not found - txt2tags documention pdf cannot be generated") + MESSAGE(ERROR "pdflatex not found - txt2tags documentation pdf cannot be generated") ENDIF(NOT PDFLATEX_EXECUTABLE) ENDIF(WITH_TXT2TAGS_PDF) ENDMACRO(FIND_TXT2TAGS) diff --git a/cmake/UsePythonTest.cmake b/cmake/UsePythonTest.cmake index 376ffa0e9d24..288549e671c0 100644 --- a/cmake/UsePythonTest.cmake +++ b/cmake/UsePythonTest.cmake @@ -2,7 +2,7 @@ # SET(ENV{PYTHONPATH} ${LIBRARY_OUTPUT_PATH}) # SET(my_test "from test_mymodule import *\;test_mymodule()") # ADD_TEST(PYTHON-TEST-MYMODULE python -c ${my_test}) -# Since cmake is only transmitting the ADD_TEST line to ctest thus you are loosing +# Since cmake is only transmitting the ADD_TEST line to ctest thus you are losing # the env var. The only way to store the env var is to physically write in the cmake script # whatever PYTHONPATH you want and then add the test as 'cmake -P python_test.cmake' # diff --git a/cmake/modules/ECMQt4To5Porting.cmake b/cmake/modules/ECMQt4To5Porting.cmake index 0cfbfb8c3028..ecd019996df0 100644 --- a/cmake/modules/ECMQt4To5Porting.cmake +++ b/cmake/modules/ECMQt4To5Porting.cmake @@ -30,7 +30,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #============================================================================= -# The automoc_qt4 macro is superceeded by CMAKE_AUTOMOC from CMake 2.8.6 +# The automoc_qt4 macro is superseded by CMAKE_AUTOMOC from CMake 2.8.6 # A Qt 5 version is not provided by CMake or Qt. include(MacroAddFileDependencies) diff --git a/cmake_templates/Doxyfile.in b/cmake_templates/Doxyfile.in index 40e199599d54..8bd35fb27b9f 100644 --- a/cmake_templates/Doxyfile.in +++ b/cmake_templates/Doxyfile.in @@ -1038,7 +1038,7 @@ EXT_LINKS_IN_WINDOW = NO FORMULA_FONTSIZE = 10 -# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files diff --git a/debian/copyright b/debian/copyright index 8f5a7f40e2f9..6e3dfe3b82b8 100644 --- a/debian/copyright +++ b/debian/copyright @@ -595,7 +595,7 @@ License: ElvenSword this situation.) . * Do not remove my name on it (preview). I saw some Turkish and - Russian forum sites delete artists names though, and they puting + Russian forum sites delete artists names though, and they put their own cursed crappy logos on the previews. It is not sharing. It is ... . diff --git a/doc/api_break.dox b/doc/api_break.dox index aa09f44cfaa2..c7047091b4a5 100644 --- a/doc/api_break.dox +++ b/doc/api_break.dox @@ -666,7 +666,7 @@ called if changes are made to the CRS database. QgsCoordinateTransform {#qgis_api_break_3_0_QgsCoordinateTransform} ---------------------- -- QgsCoordinateTransform is no longer a QObject. readXml, writeXml and initialise are all normal public members now, +- QgsCoordinateTransform is no longer a QObject. readXml, writeXml and initialize are all normal public members now, not slots. The invalidTransformInput() signal has been removed. - The extra QgsCoordinateTransform constructors (those not taking QgsCoordinateReferenceSystem arguments) have been removed. Now, QgsCoordinateTransform must be created using an already existing source and destination @@ -674,7 +674,7 @@ QgsCoordinateReferenceSystem object. - QgsCoordinateTransform::clone() has been removed. Just use direct copies instead. - sourceCrs() and destCrs() now return a copy instead of a reference to the CRS. This has no effect on PyQGIS code, but c++ plugins calling these methods will need to be updated. -- isInitialised() has been renamed to isValid() +- isInitialised() has been renamed to isValid() - theCRS parameter in setSourceCrs has been renamed to 'crs' - setDestCRS() has been renamed to setDestinationCrs() for consistency - destCRS() has been renamed to destinationCrs() for consistency diff --git a/doc/news.html b/doc/news.html index bfc01fc532b9..4284fb3cf209 100644 --- a/doc/news.html +++ b/doc/news.html @@ -758,7 +758,7 @@

    12. Whats new in Version 1.7.2 'Wroclaw'?

  • Fix #4496 (Refresh map list in composer table widget in showEvent)
  • OS X build/install updates
  • GRASS version support -
  • Intializing from WKT favourize EPSG instead of PROJ.4 +
  • Initializing from WKT favourize EPSG instead of PROJ.4
  • Add What's this to Help menu (implement #4179)
  • fTools: update layers lists after adding new layer to TOC (fix #4318)
  • Don't block QGIS main window when running Merge shapefiles tool. Partially addresses #4383 @@ -825,7 +825,7 @@

    13. Whats new in Version 1.7.1 'Wroclaw'?

  • Tweak for layer cache
  • [backport] Fix bug where histogram can be assigned negative frequency for a pixel range. Also fix potential memory leak as new histogram vector was assigned to band stats without clearing the old.
  • Added section on using QtCreator -
  • Fix bugs causing a crash when histogram is gathered due to uninitilised histogram vector +
  • Fix bugs causing a crash when histogram is gathered due to uninitialized histogram vector
  • Added missing QUrl include
  • A neater fix for missing map parameter as suggested by Juergen
  • Fixed a bug where map= was not being published in onlineresource url when project files are not in the same dir as cgi @@ -1133,7 +1133,7 @@

    16.1. Main GUI

  • Allow postgres layers without saved username &amp; password by asking for credentials
  • Support NULL values in search strings
  • Optionally add new layers to the selected group -
  • Map composer can add attribute Tables in layouts. It is possibile to show +
  • Map composer can add attribute Tables in layouts. It is possible to show only visible features in composer table or all features
  • Identify tool attribute form now non-modal in view mode (since r12796)
  • Identified features' highlight disappear when window is deactivate or @@ -1281,7 +1281,7 @@

    19. Version 1.2.0 'Daphnis'

    QGIS 1.0.x. If stability and long term support is more important to you then cool new and untested features, we recommend that you use a copy of QGIS from our stable 1.0.x release series. -This release includes over 140 bug fixes and enchancements +This release includes over 140 bug fixes and enhancements over the QGIS 1.1.0 release. In addition we have added the following new features:

    @@ -1423,7 +1423,7 @@

    19.9. Command line arguments

    then cool new and untested features, we recommend that you use a copy of QGIS from our stable 1.0.x release series.

    -This release includes many bug fixes and enchancements +This release includes many bug fixes and enhancements over the QGIS 1.0.0 release. In addition we have added the following new features:

    @@ -1526,7 +1526,7 @@

    21. Version 0.11.0 'Metis'

    22. Version 0.10.0 'Io'

    -This release includes over 120 bug fixes and enchancements +This release includes over 120 bug fixes and enhancements over the QGIS 0.9.1 release. In addition we have added the following new features:

    @@ -1550,7 +1550,7 @@

    22. Version 0.10.0 'Io'

    23. Version 0.9.2rc1 'Ganymede'