Skip to content
Permalink
Browse files

[spellcheck] allow inwords checks and line skipping

spell check will be done automatically in words by default (when some conditions are fulfilled)
possibility to avoid in words checking by adding :* at the end in spelling.dat

one can add #spellok at the end of a line of code to skip spell check on this line
  • Loading branch information
3nids committed Jan 10, 2017
1 parent 1ad965b commit 37ebcdd1cd27e12280599b4e6016b27912b88169
Showing with 280 additions and 253 deletions.
  1. +2 −1 .travis.yml
  2. +1 −1 NEWS
  3. +9 −2 doc/api_break.dox
  4. +1 −1 doc/news.html
  5. +1 −1 doc/news.t2t
  6. +1 −1 doc/release-sponsors.html
  7. +6 −6 python/console/console_editor.py
  8. +6 −6 python/console/console_sci.py
  9. +1 −1 python/core/auth/qgsauthcertutils.sip
  10. +1 −1 python/core/composer/qgscomposernodesitem.sip
  11. +12 −12 python/core/composer/qgscomposerpicture.sip
  12. +1 −1 python/core/composer/qgscomposition.sip
  13. +4 −4 python/core/conversions.sip
  14. +2 −2 python/core/layertree/qgslayertreenode.sip
  15. +6 −6 python/plugins/processing/algs/taudem/dropanalysis.py
  16. +33 −33 python/plugins/processing/gui/ListMultiselectWidget.py
  17. +5 −5 python/plugins/processing/modeler/ModelerParametersDialog.py
  18. +1 −1 python/plugins/processing/script/ScriptSelector.py
  19. +1 −1 python/plugins/processing/ui/scriptselector.ui
  20. +1 −1 python/sip_helpers/qgissiphelper.cpp
  21. +2 −2 python/sip_helpers/qgissiphelper.h
  22. +1 −1 resources/customization.xml
  23. +9 −1 scripts/.agignore
  24. +17 −9 scripts/chkspelling_ag.sh
  25. +10 −8 scripts/spelling.dat
  26. +1 −1 src/app/composer/qgscomposer.cpp
  27. +1 −1 src/app/nodetool/qgsmaptoolnodetool.h
  28. +2 −2 src/app/openstreetmap/qgsosmexportdialog.cpp
  29. +1 −1 src/app/openstreetmap/qgsosmexportdialog.h
  30. +1 −1 src/app/pluginmanager/qgspluginmanager.h
  31. +4 −4 src/app/qgsdxfexportdialog.cpp
  32. +2 −2 src/app/qgsdxfexportdialog.h
  33. +2 −2 src/app/qgsmaptoolselect.cpp
  34. +1 −1 src/app/qgsmaptoolselect.h
  35. +2 −2 src/app/qgsmaptoolselectfreehand.cpp
  36. +1 −1 src/app/qgsmaptoolselectfreehand.h
  37. +2 −2 src/app/qgsmaptoolselectpolygon.cpp
  38. +1 −1 src/app/qgsmaptoolselectpolygon.h
  39. +3 −3 src/app/qgsmaptoolselectradius.cpp
  40. +1 −1 src/app/qgsmaptoolselectradius.h
  41. +2 −2 src/app/qgsmaptoolselectrectangle.cpp
  42. +1 −1 src/app/qgsmaptoolselectrectangle.h
  43. +1 −1 src/app/qgsoptions.cpp
  44. +3 −3 src/app/qgsprojectlayergroupdialog.cpp
  45. +1 −1 src/app/qgsprojectlayergroupdialog.h
  46. +3 −3 src/app/qgsprojectproperties.cpp
  47. +2 −2 src/app/qgsprojectproperties.h
  48. +1 −1 src/astyle/ASBeautifier.cpp
  49. +1 −1 src/core/auth/qgsauthcertutils.h
  50. +1 −1 src/core/composer/qgscomposermousehandles.cpp
  51. +1 −1 src/core/composer/qgscomposernodesitem.h
  52. +12 −12 src/core/composer/qgscomposerpicture.h
  53. +7 −7 src/core/composer/qgscomposition.cpp
  54. +1 −1 src/core/composer/qgscomposition.h
  55. +2 −2 src/core/layertree/qgslayertreenode.h
  56. +4 −3 src/core/qgslabelingengine.cpp
  57. +1 −1 src/core/qgslabelingengine.h
  58. +2 −2 src/core/qgsmaptopixel.cpp
  59. +1 −1 src/core/qgsprojectproperty.h
  60. +19 −19 src/gui/qgscomposerview.cpp
  61. +1 −1 src/gui/qgscomposerview.h
  62. +1 −1 src/gui/qgsdatumtransformdialog.h
  63. +4 −4 src/gui/qgsprevieweffect.cpp
  64. +1 −1 src/plugins/grass/qgsgrassmoduleinput.h
  65. +5 −5 src/plugins/grass/qgsgrassmoduleparam.h
  66. +2 −2 src/plugins/offline_editing/offline_editing_plugin_gui.cpp
  67. +1 −1 src/plugins/offline_editing/offline_editing_plugin_gui.h
  68. +1 −1 src/plugins/offline_editing/offline_editing_plugin_guibase.ui
  69. +1 −1 src/providers/gdal/qgsgdalproviderbase.cpp
  70. +1 −1 src/providers/gdal/qgsgdalproviderbase.h
  71. +1 −1 src/providers/grass/qgsgrassimport.h
  72. +1 −1 src/providers/ogr/qgsogrprovider.cpp
  73. +1 −1 src/providers/ogr/qgsogrprovider.h
  74. +1 −1 src/providers/wcs/qgswcsprovider.h
  75. +1 −1 src/providers/wfs/qgswfscapabilities.cpp
  76. +1 −1 src/providers/wfs/qgswfsprovider.h
  77. +1 −1 src/providers/wfs/qgswfsrequest.cpp
  78. +3 −3 src/server/qgsmslayercache.cpp
  79. +1 −1 src/server/qgsmslayercache.h
  80. +2 −2 src/ui/qgsdxfexportdialogbase.ui
  81. +2 −2 src/ui/qgsosmexportdialog.ui
  82. +1 −1 src/ui/qgspointdisplacementrendererwidgetbase.ui
  83. +4 −4 src/ui/qgsprojectpropertiesbase.ui
  84. +1 −1 tests/src/core/testqgsapplication.cpp
  85. +1 −1 tests/src/python/acceptable_missing_doc.py
  86. +2 −2 tests/src/python/test_provider_wfs.py
  87. +2 −2 tests/src/python/test_qgscomposerpolygon.py
  88. +2 −2 tests/src/python/test_qgscomposerpolyline.py
  89. +1 −1 tests/src/python/test_qgspallabeling_base.py
  90. +8 −8 tests/src/python/test_qgsserver_accesscontrol.py
@@ -23,7 +23,7 @@ matrix:
- llvm-toolchain-precise-3.8
- ubuntu-toolchain-r-test
- george-edison55-precise-backports # doxygen 1.8.3
# - laurent-boulard-devtools not whitelisted yet https://github.com/travis-ci/apt-source-whitelist/pull/345
# - laurent-boulard-devtools (for silver-search, not whitelisted yet https://github.com/travis-ci/apt-source-whitelist/pull/345)
packages:
- doxygen
- bison
@@ -33,6 +33,7 @@ matrix:
- libfcgi-dev
- libfftw3-3
- pkg-config
- perl # lookahead regex in spell check script
- poppler-utils
- txt2tags
- xvfb
2 NEWS
@@ -91,7 +91,7 @@ This release has following new features:
- Layer Legend: New option to zoom to a layer's visible scale range
- Map Composer: New tools for drawing polygons and polylines
- Map Composer: Embed atlas features into composer HTML source as GeoJSON
- Map Composer: Parameterized svg support for composer svg images
- Map Composer: Parametrized svg support for composer svg images
- Map Composer: Easier use of HTML in labels
- Map Composer: Relative links in composer labels
- Map Composer: Georeference outputs (eg PDF) from composer
@@ -205,7 +205,7 @@ Renamed Classes {#qgis_api_break_3_0_renamed_classes}
<tr><td>QgsApplication<td>userStyleV2Path<td>userStylePath
<tr><td>QgsComposerShape<td>setUseSymbolV2<td>setUseSymbol
<tr><td>QgsIFeatureSelectionManager<td>selectedFeaturesIds<td>selectedFeatureIds
<tr><td>QgsMapLayer<td>capitaliseLayerName<td>capitalizeLayerName
<tr><td>QgsMapLayer<td>capitaliseLayerName<td>capitalizeLayerName <!--#spellok-->
<tr><td>QgsSymbolLayerUtils<td>createSymbolLayerV2ListFromSld<td>createSymbolLayerListFromSld
<tr><td>QgsVectorLayer<td>editorWidgetV2Config<td>editorWidgetConfig
<tr><td>QgsVectorLayer<td>editorWidgetV2Text<td>editorWidgetText
@@ -582,6 +582,7 @@ QgsComposerNodesItem {#qgis_api_break_3_0_QgsComposerNodesItem}

- _readXMLStyle() has been renamed to _readXmlStyle()
- _writeXMLStyle() has been renamed to _writeXMLStyle()
- unselectNode() has been renamed to deselectNode() <!--#spellok-->


QgsComposerPicture {#qgis_api_break_3_0_QgsComposerPicture}
@@ -610,6 +611,11 @@ QgsComposerTableV2 {#qgis_api_break_3_0_QgsComposerTableV2}

- rowsVisible(), rowRange(), drawHorizontalGridLines() and
drawVerticalGridLines() were removed.

QgsComposerView {#qgis_api_break_3_0_QgsComposerView}
--------------------

- unselectNode() has been renamed to deselectNode() <!--#spellok-->


QgsComposition {#qgis_api_break_3_0_QgsComposition}
@@ -625,6 +631,7 @@ were removed. Use setSnapTolerance() and snapTolerance() instead.
- pixelFontSize(), pointFontSize(), relativeResizeRect(), relativePosition() were removed. Use the corresponding methods in QgsComposerUtils instead.
- sortZList() was removed. Use refreshZList() instead.
- addComposerTable(), composerTableAdded() were removed.
- setAllUnselected() has been renamed to setAllDeselected. <!--#spellok-->


QgsCoordinateReferenceSystem {#qgis_api_break_3_0_QgsCoordinateReferenceSystem}
@@ -1189,7 +1196,7 @@ screenUpdateRequested() were removed. These members have had no effect for a num
- drawLabels() method was removed. It used old deprecated labeling. Replaced by labeling based on PAL library, see QgsLabelingEngine.
- readLayerXML() was renamed to readLayerXml()
- writeLayerXML() was renamed to writeLayerXml()
- capitaliseLayerName() was renamed to capitalizeLayerName()
- capitaliseLayerName() was renamed to capitalizeLayerName() <!--#spellok-->


QgsMapLayerRegistry {#qgis_api_break_3_0_QgsMapLayerRegistry}
@@ -171,7 +171,7 @@ <H1>1. What's new in Version 2.16 'Nødebo'?</H1>
<LI>Layer Legend: New option to zoom to a layer's visible scale range
<LI>Map Composer: New tools for drawing polygons and polylines
<LI>Map Composer: Embed atlas features into composer HTML source as GeoJSON
<LI>Map Composer: Parameterized svg support for composer svg images
<LI>Map Composer: Parametrized svg support for composer svg images
<LI>Map Composer: Easier use of HTML in labels
<LI>Map Composer: Relative links in composer labels
<LI>Map Composer: Georeference outputs (e.g., PDF) from composer
@@ -85,7 +85,7 @@ This release has following new features:
- Layer Legend: New option to zoom to a layer's visible scale range
- Map Composer: New tools for drawing polygons and polylines
- Map Composer: Embed atlas features into composer HTML source as GeoJSON
- Map Composer: Parameterized svg support for composer svg images
- Map Composer: Parametrized svg support for composer svg images
- Map Composer: Easier use of HTML in labels
- Map Composer: Relative links in composer labels
- Map Composer: Georeference outputs (eg PDF) from composer
@@ -121,7 +121,7 @@ <h3 class="text-muted"><img src="images/projects/thumbnails/0e2f6fb1efc89d41120c
<p>April 17, 2016 - April 17, 2017</p>
<p>Bronze : 500 EUR or more</p>
<p><img src="images/projects/thumbnails/e24951be1e5ff2d6fd591f9760871e38a684bed0.png.100x50_q85.png" /></p>
<p><a href="http://www.gfi-gis.de/">GFI - Gesellschaft für Informationstechnologie mbH</a></p>
<p><a href="http://www.gfi-gis.de/">GFI - Gesellschaft für Informationstechnologie mbH</a></p> <!--#spellok-->
<p>April 15, 2016 - April 15, 2017</p>
<p>Bronze : 500 EUR or more</p>
<p><img src="images/projects/thumbnails/44113fc21a8e2cd84d93459d0f00b3a64850095c.png.100x50_q85.jpg" /></p>
@@ -168,7 +168,7 @@ def __init__(self, parent=None):
self.newShortcutCS.activated.connect(self.autoCompleteKeyBinding)
self.runScut = QShortcut(QKeySequence(Qt.CTRL + Qt.Key_E), self)
self.runScut.setContext(Qt.WidgetShortcut)
self.runScut.activated.connect(self.runSelectedCode)
self.runScut.activated.connect(self.runSelectedCode) #spellok
self.runScriptScut = QShortcut(QKeySequence(Qt.SHIFT + Qt.CTRL + Qt.Key_E), self)
self.runScriptScut.setContext(Qt.WidgetShortcut)
self.runScriptScut.activated.connect(self.runScriptCode)
@@ -307,9 +307,9 @@ def contextMenuEvent(self, e):
syntaxCheck = menu.addAction(iconSyntaxCk,
QCoreApplication.translate("PythonConsole", "Check Syntax"),
self.syntaxCheck, 'Ctrl+4')
runSelected = menu.addAction(iconRun,
runSelected = menu.addAction(iconRun, #spellok
QCoreApplication.translate("PythonConsole", "Run Selected"),
self.runSelectedCode, 'Ctrl+E')
self.runSelectedCode, 'Ctrl+E') #spellok
menu.addAction(iconRunScript,
QCoreApplication.translate("PythonConsole", "Run Script"),
self.runScriptCode, 'Shift+Ctrl+E')
@@ -358,14 +358,14 @@ def contextMenuEvent(self, e):
pasteAction.setEnabled(False)
codePadAction.setEnabled(False)
cutAction.setEnabled(False)
runSelected.setEnabled(False)
runSelected.setEnabled(False) #spellok
copyAction.setEnabled(False)
selectAllAction.setEnabled(False)
undoAction.setEnabled(False)
redoAction.setEnabled(False)
showCodeInspection.setEnabled(False)
if self.hasSelectedText():
runSelected.setEnabled(True)
runSelected.setEnabled(True) #spellok
copyAction.setEnabled(True)
cutAction.setEnabled(True)
codePadAction.setEnabled(True)
@@ -600,7 +600,7 @@ def runScriptCode(self):
self.parent.pc.shell.runCommand(u"exec(open(u'{0}'.encode('{1}')).read())"
.format(filename.replace("\\", "/"), sys.getfilesystemencoding()))

def runSelectedCode(self):
def runSelectedCode(self): #spellok
cmd = self.selectedText()
self.parent.pc.shell.insertFromDropPaste(cmd)
self.parent.pc.shell.entered()
@@ -166,8 +166,8 @@ def commandConsole(self, commands):
if not self.is_cursor_on_last_line():
self.move_cursor_to_end()
line, pos = self.getCursorPosition()
selCmdLenght = len(self.text(line))
self.setSelection(line, 4, line, selCmdLenght)
selCmdLength = len(self.text(line))
self.setSelection(line, 4, line, selCmdLength)
self.removeSelectedText()
for cmd in commands:
self.append(cmd)
@@ -348,8 +348,8 @@ def clearHistorySession(self):
def showPrevious(self):
if self.historyIndex < len(self.history) and self.history:
line, pos = self.getCursorPosition()
selCmdLenght = len(self.text(line))
self.setSelection(line, 4, line, selCmdLenght)
selCmdLength = len(self.text(line))
self.setSelection(line, 4, line, selCmdLength)
self.removeSelectedText()
self.historyIndex += 1
if self.historyIndex == len(self.history):
@@ -363,8 +363,8 @@ def showPrevious(self):
def showNext(self):
if self.historyIndex > 0 and self.history:
line, pos = self.getCursorPosition()
selCmdLenght = len(self.text(line))
self.setSelection(line, 4, line, selCmdLenght)
selCmdLength = len(self.text(line))
self.setSelection(line, 4, line, selCmdLength)
self.removeSelectedText()
self.historyIndex -= 1
if self.historyIndex == len(self.history):
@@ -138,7 +138,7 @@ class QgsAuthCertUtils
/** Get the general name for certificate trust */
static QString getCertTrustName( QgsAuthCertUtils::CertTrustPolicy trust );

/** Get string with colon delimeters every 2 characters */
/** Get string with colon delimiters every 2 characters */
static QString getColonDelimited( const QString& txt );

/** Get the sha1 hash for certificate
@@ -74,7 +74,7 @@ class QgsComposerNodesItem: QgsComposerItem

/** Deselect a node.
*/
void unselectNode();
void deselectNode();

/** Stores state in Dom element
* @param elem is Dom element corresponding to 'Composer' tag
@@ -172,51 +172,51 @@ class QgsComposerPicture: QgsComposerItem
*/
ItemPositionMode pictureAnchor() const;

/** Returns the fill color used for parameterized SVG files.
/** Returns the fill color used for parametrized SVG files.
* @see setSvgFillColor()
* @see svgBorderColor()
* @note added in QGIS 2.14.1
*/
QColor svgFillColor() const;

/** Sets the fill color used for parameterized SVG files.
/** Sets the fill color used for parametrized SVG files.
* @param color fill color.
* @note this setting only has an effect on parameterized SVG files, and is ignored for
* non-parameterized SVG files.
* @note this setting only has an effect on parametrized SVG files, and is ignored for
* non-parametrized SVG files.
* @see svgFillColor()
* @see setSvgBorderColor()
* @note added in QGIS 2.14.1
*/
void setSvgFillColor( const QColor& color );

/** Returns the border color used for parameterized SVG files.
/** Returns the border color used for parametrized SVG files.
* @see setSvgBorderColor()
* @see svgFillColor()
* @note added in QGIS 2.14.1
*/
QColor svgBorderColor() const;

/** Sets the border color used for parameterized SVG files.
/** Sets the border color used for parametrized SVG files.
* @param color border color.
* @note this setting only has an effect on parameterized SVG files, and is ignored for
* non-parameterized SVG files.
* @note this setting only has an effect on parametrized SVG files, and is ignored for
* non-parametrized SVG files.
* @see svgBorderlColor()
* @see setSvgFillColor()
* @note added in QGIS 2.14.1
*/
void setSvgBorderColor( const QColor& color );

/** Returns the border width (in mm) used for parameterized SVG files.
/** Returns the border width (in mm) used for parametrized SVG files.
* @see setSvgBorderWidth()
* @see svgBorderColor()
* @note added in QGIS 2.14.1
*/
double svgBorderWidth() const;

/** Sets the border width used for parameterized SVG files.
/** Sets the border width used for parametrized SVG files.
* @param width border width in mm
* @note this setting only has an effect on parameterized SVG files, and is ignored for
* non-parameterized SVG files.
* @note this setting only has an effect on parametrized SVG files, and is ignored for
* non-parametrized SVG files.
* @see svgBorderWidth()
* @see setSvgBorderColor()
* @note added in QGIS 2.14.1
@@ -768,7 +768,7 @@ class QgsComposition : QGraphicsScene, QgsExpressionContextGenerator
* QGraphicsScene::clearSelection, as the latter does not correctly emit signals to allow
* the composition's model to update.
* @note added in version 2.5*/
void setAllUnselected();
void setAllDeselected();

/** Refreshes a data defined property for the composition by reevaluating the property's value
* and redrawing the composition with this new value.
@@ -2033,11 +2033,11 @@ template <TYPE>
#include "qgissiphelper.h"
%End

%PostInitialisationCode
%PostInitialisationCode //#spellok

// Import the Chimera helper registration functions.
void (*register_from_qvariant_convertor)(FromQVariantConvertorFn);
register_from_qvariant_convertor = (void (*)(FromQVariantConvertorFn))sipImportSymbol("pyqt5_register_from_qvariant_convertor");
register_from_qvariant_convertor(null_from_qvariant_convertor);
void (*register_from_qvariant_converter)(FromQVariantConverterFn);
register_from_qvariant_converter = (void (*)(FromQVariantConverterFn))sipImportSymbol("pyqt5_register_from_qvariant_convertor"); //#spellok
register_from_qvariant_converter(null_from_qvariant_converter);
%End
%End
@@ -98,11 +98,11 @@ class QgsLayerTreeNode : QObject
//! @note added in 3.0
bool isVisible() const;

//! Returns whether a node is checked (independantly of its ancestors or children)
//! Returns whether a node is checked (independently of its ancestors or children)
//! @note added in 3.0
bool itemVisibilityChecked() const;

//! Check or uncheck a node (independantly of its ancestors or children)
//! Check or uncheck a node (independently of its ancestors or children)
//! @note added in 3.0
void setItemVisibilityChecked( bool checked );

@@ -55,9 +55,9 @@ class DropAnalysis(GeoAlgorithm):
D8_FLOW_DIR_GRID = 'D8_FLOW_DIR_GRID'
ACCUM_STREAM_SOURCE_GRID = 'ACCUM_STREAM_SOURCE_GRID'
OUTLETS_SHAPE = 'OUTLETS_SHAPE'
MIN_TRESHOLD = 'MIN_TRESHOLD'
MIN_THRESHOLD = 'MIN_THRESHOLD'
MAX_THRESHOLD = 'MAX_THRESHOLD'
TRESHOLD_NUM = 'TRESHOLD_NUM'
THRESHOLD_NUM = 'THRESHOLD_NUM'
STEP_TYPE = 'STEP_TYPE'

DROP_ANALYSIS_FILE = 'DROP_ANALYSIS_FILE'
@@ -81,11 +81,11 @@ def defineCharacteristics(self):
self.addParameter(ParameterVector(self.OUTLETS_SHAPE,
self.tr('Outlets Shapefile'),
[dataobjects.TYPE_VECTOR_POINT], False))
self.addParameter(ParameterNumber(self.MIN_TRESHOLD,
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.TRESHOLD_NUM,
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))
@@ -116,9 +116,9 @@ def processAlgorithm(self, progress):
commands.append('-o')
commands.append(self.getParameterValue(self.OUTLETS_SHAPE))
commands.append('-par')
commands.append(str(self.getParameterValue(self.MIN_TRESHOLD)))
commands.append(str(self.getParameterValue(self.MIN_THRESHOLD)))
commands.append(str(self.getParameterValue(self.MAX_THRESHOLD)))
commands.append(str(self.getParameterValue(self.TRESHOLD_NUM)))
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))

0 comments on commit 37ebcdd

Please sign in to comment.
You can’t perform that action at this time.