Skip to content

Commit

Permalink
Merge branch 'master' into regularShape_gui
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti committed Sep 28, 2017
2 parents 8e4234c + 69f370e commit a8f9f9f
Show file tree
Hide file tree
Showing 838 changed files with 2,366 additions and 3,859 deletions.
3 changes: 2 additions & 1 deletion debian/control.in
Expand Up @@ -273,7 +273,8 @@ Depends:
qgis-provider-grass (= ${binary:Version}),
${shlibs:Depends},
${misc:Depends},
grass-core
grass-core,
grass{GRASSABI}
Description: GRASS plugin for QGIS
QGIS is a Geographic Information System (GIS) which manages, analyzes and
display databases of geographic information.
Expand Down
2 changes: 2 additions & 0 deletions debian/rules
Expand Up @@ -54,6 +54,7 @@ QGIS_PATCH=$(shell sed -ne 's/SET(CPACK_PACKAGE_VERSION_PATCH "\([0-9]*\)")/\1/p
QGIS_ABI=$(QGIS_MAJOR).$(QGIS_MINOR).$(QGIS_PATCH)
GRASS=grass$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2))
GRASSVER=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1))
GRASSABI=$(subst .,,$(shell pkg-config --modversion grass|cut -d. -f1,2,3|sed -e 's/RC/-/'))

CMAKE_OPTS := \
-G Ninja \
Expand Down Expand Up @@ -187,6 +188,7 @@ $(2): $(1)
-e "s/\{QGIS_ABI\}/$(QGIS_ABI)/g" \
-e "s/\{GRASS\}/$(GRASS)/g" \
-e "s/\{GRASSVER\}/$(GRASSVER)/g" \
-e "s/\{GRASSABI\}/$(GRASSABI)/g" \
-e "s/\{GRASSVER_QGISABI\}/$(GRASSVER)-$(QGIS_ABI)/g" \
$$^ >$$@

Expand Down
2 changes: 1 addition & 1 deletion python/console/console.py
Expand Up @@ -238,7 +238,7 @@ def __init__(self, parent=None):
self.pasteEditorButton.setToolTip(pasteEditorBt)
self.pasteEditorButton.setText(pasteEditorBt)
# Action Run Script (subprocess)
runScriptEditorBt = QCoreApplication.translate("PythonConsole", "Run script")
runScriptEditorBt = QCoreApplication.translate("PythonConsole", "Run Script")
self.runScriptEditorButton = QAction(self)
self.runScriptEditorButton.setCheckable(False)
self.runScriptEditorButton.setEnabled(True)
Expand Down
13 changes: 7 additions & 6 deletions python/console/console_editor.py
Expand Up @@ -34,6 +34,7 @@
import traceback
import codecs
import re
import importlib


class KeyFilter(QObject):
Expand Down Expand Up @@ -520,7 +521,7 @@ def _runSubProcess(self, filename, tmp=False):
if dir not in sys.path:
sys.path.append(dir)
if name in sys.modules:
reload(sys.modules[name]) # NOQA
importlib.reload(sys.modules[name]) # NOQA
try:
# set creationflags for running command without shell window
if sys.platform.startswith('win'):
Expand Down Expand Up @@ -1174,7 +1175,7 @@ def listObject(self, tab):
sys.path.append(pathFile)
found = True
try:
reload(pyclbr) # NOQA
importlib.reload(pyclbr) # NOQA
dictObject = {}
readModule = pyclbr.readmodule(module)
readModuleFunction = pyclbr.readmodule_ex(module)
Expand Down Expand Up @@ -1236,10 +1237,10 @@ def listObject(self, tab):
iconWarning = QgsApplication.getThemeIcon("console/iconSyntaxErrorConsole.png")
msgItem.setIcon(0, iconWarning)
self.parent.listClassMethod.addTopLevelItem(msgItem)
# s = traceback.format_exc()
# print '## Error: '
# sys.stderr.write(s)
# pass
# s = traceback.format_exc()
# print('## Error: ')
# sys.stderr.write(s)
# pass

def refreshSettingsEditor(self):
countTab = self.count()
Expand Down
11 changes: 11 additions & 0 deletions python/core/auth/qgsauthmanager.sip
Expand Up @@ -359,6 +359,17 @@ Get list of authentication ids from database
:rtype: bool
%End

bool updateNetworkProxy( QNetworkProxy &proxy /In,Out/, const QString &authcfg,
const QString &dataprovider = QString() );
%Docstring
Provider call to update a QNetworkProxy with an authentication config
\param proxy the QNetworkProxy
\param authcfg Associated authentication config id
\param dataprovider Provider key filter, offering logic branching in authentication method
:return: Whether operation succeeded
:rtype: bool
%End


bool storeAuthSetting( const QString &key, const QVariant &value, bool encrypt = false );
%Docstring
Expand Down
13 changes: 13 additions & 0 deletions python/core/auth/qgsauthmethod.sip
Expand Up @@ -28,6 +28,7 @@ class QgsAuthMethod : QObject
NetworkReply,
DataSourceUri,
GenericDataSourceUri,
NetworkProxy,
All
};
typedef QFlags<QgsAuthMethod::Expansion> Expansions;
Expand Down Expand Up @@ -110,6 +111,18 @@ Increment this if method is significantly updated, allow updater code to be writ
:rtype: bool
%End

virtual bool updateNetworkProxy( QNetworkProxy &proxy, const QString &authcfg,
const QString &dataprovider = QString() );
%Docstring
Update proxy settings with authentication components
\param proxy
\param authcfg Authentication configuration ID
\param dataprovider Textual key for a data provider, e.g. 'proxy', that allows
for custom updater code specific to the provider
:return: Whether the update succeeded
:rtype: bool
%End

virtual void clearCachedConfig( const QString &authcfg ) = 0;
%Docstring
Clear any cached configuration. Called when the QgsAuthManager deletes an authentication configuration (authcfg).
Expand Down
1 change: 1 addition & 0 deletions python/core/dxf/qgsdxfexport.sip
Expand Up @@ -12,6 +12,7 @@




class QgsDxfExport
{

Expand Down
2 changes: 2 additions & 0 deletions python/core/geometry/qgsgeometry.sip
Expand Up @@ -1201,7 +1201,9 @@ Returns an extruded version of this geometry.
%End
public:
Error();

explicit Error( const QString &m );

Error( const QString &m, const QgsPointXY &p );
QString what();
%Docstring
Expand Down
6 changes: 3 additions & 3 deletions python/core/qgsattributetableconfig.sip
Expand Up @@ -37,10 +37,10 @@ Constructor for ColumnConfig
%End


QgsAttributeTableConfig::Type type; //!< The type of this column.
QgsAttributeTableConfig::Type type;
QString name; //!< The name of the attribute if this column represents a field
bool hidden; //!< Flag that controls if the column is hidden
int width; //!< Width of column, or -1 for default width
bool hidden;
int width;
};

enum ActionWidgetStyle
Expand Down
1 change: 1 addition & 0 deletions python/core/qgsdiagramrenderer.sip
Expand Up @@ -318,6 +318,7 @@ class QgsDiagramSettings
};

QgsDiagramSettings();

bool enabled;
QFont font;
QList< QColor > categoryColors;
Expand Down
7 changes: 4 additions & 3 deletions python/core/qgspallabeling.sip
Expand Up @@ -21,6 +21,7 @@ class QgsLabelPosition
public:
QgsLabelPosition( int id, double r, const QVector< QgsPointXY > &corners, const QgsRectangle &rect, double w, double h, const QString &layer, const QString &labeltext, const QFont &labelfont, bool upside_down, bool diagram = false, bool pinned = false, const QString &providerId = QString() );
QgsLabelPosition();

int featureId;
double rotation;
QVector< QgsPointXY > cornerPoints;
Expand Down Expand Up @@ -701,9 +702,9 @@ Z-Index of label, where labels with a higher z-index are rendered on top of labe
QgsPointXY ptZero;
QgsPointXY ptOne;
QgsGeometry extentGeom;
int mFeaturesToLabel; // total features that will probably be labeled, may be less (figured before PAL)
int mFeatsSendingToPal; // total features tested for sending into PAL (relative to maxNumLabels)
int mFeatsRegPal; // number of features registered in PAL, when using limitNumLabels
int mFeaturesToLabel;
int mFeatsSendingToPal;
int mFeatsRegPal;

};

Expand Down
6 changes: 3 additions & 3 deletions python/core/qgssettings.sip
Expand Up @@ -130,7 +130,7 @@ class QgsSettings : QObject
%End
~QgsSettings();

void beginGroup( const QString &prefix );
void beginGroup( const QString &prefix, const QgsSettings::Section section = QgsSettings::NoSection );
%Docstring
Appends prefix to the current group.
The current group is automatically prepended to all keys specified to QSettings.
Expand Down Expand Up @@ -245,9 +245,9 @@ Returns the path where settings written using this QSettings object are stored.
This function is called automatically from QSettings's destructor and by the event
loop at regular intervals, so you normally don't need to call it yourself.
%End
void remove( const QString &key );
void remove( const QString &key, const QgsSettings::Section section = QgsSettings::NoSection );
%Docstring
Removes the setting key and any sub-settings of key.
Removes the setting key and any sub-settings of key in a section.
%End
QString prefixedKey( const QString &key, const QgsSettings::Section section ) const;
%Docstring
Expand Down
2 changes: 1 addition & 1 deletion python/core/symbology/qgssvgcache.sip
Expand Up @@ -37,7 +37,7 @@ class QgsSvgCacheEntry
%Docstring
Absolute path to SVG file
%End
double size; //size in pixels (cast to int for QImage)
double size;
double strokeWidth;
double widthScaleFactor;

Expand Down
2 changes: 1 addition & 1 deletion python/gui/auth/qgsauthcerttrustpolicycombobox.sip
Expand Up @@ -22,7 +22,7 @@ class QgsAuthCertTrustPolicyComboBox : QComboBox
explicit QgsAuthCertTrustPolicyComboBox(
QWidget *parent /TransferThis/ = 0,
QgsAuthCertUtils::CertTrustPolicy policy = QgsAuthCertUtils::DefaultTrust,
QgsAuthCertUtils::CertTrustPolicy defaultpolicy = QgsAuthCertUtils::DefaultTrust );
QgsAuthCertUtils::CertTrustPolicy defaultpolicy = QgsAuthCertUtils::DefaultTrust );
%Docstring
Construct a combo box for defining certificate trust policy
\param parent Parent widget
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgscurveeditorwidget.sip
Expand Up @@ -93,7 +93,7 @@ Emitted when the widget curve changes

protected:

virtual void keyPressEvent( QKeyEvent *event ) ;
virtual void keyPressEvent( QKeyEvent *event );

};

Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsexternalresourcewidget.sip
Expand Up @@ -97,7 +97,7 @@ returns the height of the document viewer
setDocumentViewerWidth set the height of the document viewer.
\param height the height. Use 0 for automatic best display.
%End
int documentViewerWidth() const ;
int documentViewerWidth() const;
%Docstring
returns the width of the document viewer
:rtype: int
Expand Down
1 change: 1 addition & 0 deletions python/gui/qgsnewnamedialog.sip
Expand Up @@ -114,6 +114,7 @@ class QgsNewNameDialog : QgsDialog

QString highlightText( const QString &text );
%Docstring
List of names with extensions
:rtype: str
%End
static QStringList fullNames( const QString &name, const QStringList &extensions );
Expand Down
4 changes: 2 additions & 2 deletions python/gui/qgssublayersdialog.sip
Expand Up @@ -27,9 +27,9 @@ class QgsSublayersDialog : QDialog
{
LayerDefinition();

int layerId; //!< Identifier of the layer (one unique layer id may have multiple types though)
int layerId;
QString layerName; //!< Name of the layer (not necessarily unique)
int count; //!< Number of features (might be unused)
int count;
QString type; //!< Extra type depending on the use (e.g. geometry type for vector sublayers)
};

Expand Down
2 changes: 1 addition & 1 deletion scripts/sipify.pl
Expand Up @@ -748,7 +748,7 @@ sub detect_comment_block{
};

# remove struct member assignment
if ( $SIP_RUN != 1 && $ACCESS[$#ACCESS] == PUBLIC && $LINE =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = \w+(\([^()]+\))?;/ ){
if ( $SIP_RUN != 1 && $ACCESS[$#ACCESS] == PUBLIC && $LINE =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = [\-\w\:\.]+(\([^()]+\))?\s*;/ ){
dbg_info("remove struct member assignment");
$LINE = "$1;";
}
Expand Down
14 changes: 0 additions & 14 deletions src/analysis/interpolation/CloughTocherInterpolator.cpp
Expand Up @@ -20,26 +20,12 @@
#include "NormVecDecorator.h"

CloughTocherInterpolator::CloughTocherInterpolator()
: mEdgeTolerance( 0.00001 )
, der1X( 0.0 )
, der1Y( 0.0 )
, der2X( 0.0 )
, der2Y( 0.0 )
, der3X( 0.0 )
, der3Y( 0.0 )
{

}

CloughTocherInterpolator::CloughTocherInterpolator( NormVecDecorator *tin )
: mTIN( tin )
, mEdgeTolerance( 0.00001 )
, der1X( 0.0 )
, der1Y( 0.0 )
, der2X( 0.0 )
, der2Y( 0.0 )
, der3X( 0.0 )
, der3Y( 0.0 )
{

}
Expand Down
14 changes: 7 additions & 7 deletions src/analysis/interpolation/CloughTocherInterpolator.h
Expand Up @@ -35,7 +35,7 @@ class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
//! Association with a triangulation object
NormVecDecorator *mTIN = nullptr;
//! Tolerance of the barycentric coordinates at the borders of the triangles (to prevent errors because of very small negativ baricentric coordinates)
double mEdgeTolerance;
double mEdgeTolerance = 0.00001;
//! First point of the triangle in x-,y-,z-coordinates
QgsPoint point1 = QgsPoint( 0, 0, 0 );
//! Second point of the triangle in x-,y-,z-coordinates
Expand Down Expand Up @@ -75,17 +75,17 @@ class ANALYSIS_EXPORT CloughTocherInterpolator : public TriangleInterpolator
//! Control point 16
QgsPoint cp16 = QgsPoint( 0, 0, 0 );
//! Derivative in x-direction at point1
double der1X;
double der1X = 0.0;
//! Derivative in y-direction at point1
double der1Y;
double der1Y = 0.0;
//! Derivative in x-direction at point2
double der2X;
double der2X = 0.0;
//! Derivative in y-direction at point2
double der2Y;
double der2Y = 0.0;
//! Derivative in x-direction at point3
double der3X;
double der3X = 0.0;
//! Derivative in y-direction at point3
double der3Y;
double der3Y = 0.0;
//! Stores point1 of the last run
QgsPoint lpoint1 = QgsPoint( 0, 0, 0 );
//! Stores point2 of the last run
Expand Down

0 comments on commit a8f9f9f

Please sign in to comment.