Skip to content

Commit

Permalink
[spellcheck] allow inwords checks and line skipping
Browse files Browse the repository at this point in the history
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 37ebcdd
Show file tree
Hide file tree
Showing 90 changed files with 280 additions and 253 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -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
Expand All @@ -33,6 +33,7 @@ matrix:
- libfcgi-dev
- libfftw3-3
- pkg-config
- perl # lookahead regex in spell check script
- poppler-utils
- txt2tags
- xvfb
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions doc/api_break.dox
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand All @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion doc/news.html
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/news.t2t
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/release-sponsors.html
Expand Up @@ -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>
Expand Down
12 changes: 6 additions & 6 deletions python/console/console_editor.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down
12 changes: 6 additions & 6 deletions python/console/console_sci.py
Expand Up @@ -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)
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion python/core/auth/qgsauthcertutils.sip
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposernodesitem.sip
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions python/core/composer/qgscomposerpicture.sip
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposition.sip
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions python/core/conversions.sip
Expand Up @@ -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
4 changes: 2 additions & 2 deletions python/core/layertree/qgslayertreenode.sip
Expand Up @@ -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 );

Expand Down
12 changes: 6 additions & 6 deletions python/plugins/processing/algs/taudem/dropanalysis.py
Expand Up @@ -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'
Expand All @@ -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))
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 37ebcdd

Please sign in to comment.