Skip to content
Permalink
Browse files
Merge branch 'master' of https://github.com/qgis/QGIS
  • Loading branch information
pcav committed May 22, 2015
2 parents 7dacddc + 06ae01e commit efeae6f44fe59e4d07c637ded89648fdb38fc61c
Showing with 736 additions and 241 deletions.
  1. +27 −3 .travis.yml
  2. +8 −10 python/core/qgsexpression.sip
  3. +2 −0 python/core/symbology-ng/qgsmarkersymbollayerv2.sip
  4. +1 −0 python/gui/qgsdatadefinedbutton.sip
  5. +1 −0 src/app/composer/qgscomposer.cpp
  6. +1 −0 src/app/composer/qgscomposer.h
  7. +2 −0 src/app/qgsoptions.cpp
  8. +0 −7 src/core/CMakeLists.txt
  9. +2 −2 src/core/qgsexpression.cpp
  10. +8 −7 src/core/qgsexpression.h
  11. +1 −0 src/core/qgsvectorlayer.h
  12. +6 −0 src/core/qgswebframe.h
  13. +0 −83 src/core/qgswebpage.cpp
  14. +17 −1 src/core/qgswebpage.h
  15. +12 −0 src/core/qgswebview.h
  16. +27 −6 src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
  17. +27 −7 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  18. +21 −3 src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
  19. +4 −0 src/core/symbology-ng/qgsmarkersymbollayerv2.h
  20. +37 −0 src/core/symbology-ng/qgsrendererv2.cpp
  21. +10 −1 src/core/symbology-ng/qgsrendererv2.h
  22. +10 −6 src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
  23. +6 −0 src/core/symbology-ng/qgssymbollayerv2.cpp
  24. +5 −0 src/gui/qgsdatadefinedbutton.cpp
  25. +1 −0 src/gui/qgsdatadefinedbutton.h
  26. +6 −0 src/gui/symbology-ng/characterwidget.cpp
  27. +1 −0 src/gui/symbology-ng/characterwidget.h
  28. +5 −2 src/gui/symbology-ng/qgsrendererv2widget.cpp
  29. +8 −1 src/gui/symbology-ng/qgssymbollayerv2widget.cpp
  30. +2 −0 src/providers/postgres/CMakeLists.txt
  31. +152 −0 src/providers/postgres/qgspostgresexpressioncompiler.cpp
  32. +26 −28 src/{core/qgswebframe.cpp → providers/postgres/qgspostgresexpressioncompiler.h}
  33. +25 −2 src/providers/postgres/qgspostgresfeatureiterator.cpp
  34. +7 −1 src/providers/postgres/qgspostgresfeatureiterator.h
  35. +9 −32 src/ui/qgsgraduatedsymbolrendererv2widget.ui
  36. +8 −1 src/ui/qgsoptionsbase.ui
  37. +39 −15 src/ui/symbollayer/widget_fontmarker.ui
  38. +0 −15 tests/README
  39. +42 −0 tests/README.md
  40. +2 −1 tests/src/python/CMakeLists.txt
  41. +33 −0 tests/src/python/providertestutils.py
  42. +57 −0 tests/src/python/test_provider_postgres.py
  43. +2 −7 tests/src/python/utilities.py
  44. +76 −0 tests/testdata/postgres/testdata.sql
@@ -11,19 +11,43 @@ notifications:
on_success: change
skip_join: true

addons:
postgresql: "9.1"

before_install:
- sudo add-apt-repository ppa:ubuntugis/ppa -y
- sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y # For postgresql-9.1-postgis-2.1
- sudo add-apt-repository ppa:smspillaz/cmake-3.0.2 -y
- sudo rm -f /etc/apt/sources.list.d/pgdg-source.list # postgis from pgdg requires different gdal package than the grass package
- sudo apt-get update -qq
- sudo apt-get install --no-install-recommends bison cmake cmake-data doxygen flex git graphviz grass-dev libexpat1-dev libfcgi-dev libgdal1-dev libgeos-dev libgsl0-dev libpq-dev libproj-dev libqscintilla2-dev libqt4-dev libqt4-opengl-dev libqtwebkit-dev libqwt-dev libspatialindex-dev libspatialite-dev libsqlite3-dev lighttpd pkg-config poppler-utils pyqt4-dev-tools python python-dev python-qt4 python-qt4-dev python-sip python-sip-dev spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi xfonts-base xfonts-scalable xvfb
- sudo apt-get remove postgresql-9.1-postgis-2.1 # Remove postgis from pgdg, will install postgis from ubuntugis-unstable instead
- sudo apt-get install --no-install-recommends
bison cmake cmake-data doxygen flex git graphviz
grass-dev libexpat1-dev libfcgi-dev libgdal1-dev
libgeos-dev libgsl0-dev libpq-dev libproj-dev
libqscintilla2-dev libqt4-dev libqt4-opengl-dev
libqtwebkit-dev libqwt-dev libspatialindex-dev
libspatialite-dev libsqlite3-dev lighttpd pkg-config
poppler-utils pyqt4-dev-tools python python-dev
python-qt4 python-qt4-dev python-sip python-sip-dev
spawn-fcgi txt2tags xauth xfonts-100dpi xfonts-75dpi
xfonts-base xfonts-scalable xvfb
postgresql-9.1-postgis-2.1
- cmake --version
- clang --version

install:
- mkdir build
- cd build
- cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=OFF -DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON -DENABLE_MODELTEST=ON -DWITH_QWTPOLAR=OFF -DWITH_APIDOC=ON ..
- cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=OFF -DWITH_GRASS=OFF
-DSUPPRESS_QT_WARNINGS=ON -DENABLE_MODELTEST=ON
-DWITH_QWTPOLAR=OFF -DWITH_APIDOC=ON ..

before_script:
- printf "[qgis_test]\nhost=localhost\ndbname=qgis_test\nuser=postgres" > ~/.pg_service.conf
- psql -c 'CREATE DATABASE qgis_test;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d qgis_test
- psql -f $TRAVIS_BUILD_DIR/tests/testdata/postgres/testdata.sql -U postgres -d qgis_test

script: xvfb-run ctest -V -E 'PyQgsPalLabelingServer|qgis_wcsprovidertest' -S ../qgis-test-travis.ctest --output-on-failure

@@ -194,7 +194,7 @@ class QgsExpression
class Function
{
public:
Function( QString fnname, int params, QString group, QString helpText = QString(), bool usesGeometry = false, QStringList referencedColumns = QStringList() );
Function( const QString& fnname, int params, const QString& group, const QString& helpText = QString(), bool usesGeometry = false, QStringList referencedColumns = QStringList(), bool lazyEval = false );
/** The name of the function. */
QString name();
/** The number of parameters this function takes. */
@@ -219,17 +219,15 @@ class QgsExpression
/** The group the function belongs to. */
QString group();
/** The help text for the function. */
QString helptext();
const QString helptext();

virtual QVariant func( const QVariantList& values, const QgsFeature* f, QgsExpression* parent ) = 0;
};


static const QList<QgsExpression::Function *> &Functions();
// static QList<Function*> gmFunctions;
static const QList<QgsExpression::Function *>& Functions();

// static QStringList gmBuiltinFunctions;
static const QStringList &BuiltinFunctions();
static const QStringList& BuiltinFunctions();

static bool registerFunction( Function* function );
static bool unregisterFunction( QString name );
@@ -311,7 +309,7 @@ class QgsExpression
~NodeList();
void append( QgsExpression::Node* node /Transfer/ );
int count();
QList<QgsExpression::Node*> list();
const QList<QgsExpression::Node*>& list();

virtual QString dump() const;

@@ -422,9 +420,9 @@ class QgsExpression
class NodeLiteral : QgsExpression::Node
{
public:
NodeLiteral( QVariant value );
NodeLiteral( const QVariant& value );

QVariant value() const;
const QVariant& value() const;

virtual QgsExpression::NodeType nodeType() const;
virtual bool prepare( QgsExpression* parent, const QgsFields &fields );
@@ -439,7 +437,7 @@ class QgsExpression
class NodeColumnRef : QgsExpression::Node
{
public:
NodeColumnRef( QString name );
NodeColumnRef( const QString& name );

QString name() const;

@@ -159,6 +159,8 @@ class QgsFontMarkerSymbolLayerV2 : QgsMarkerSymbolLayerV2
QColor color = DEFAULT_FONTMARKER_COLOR,
double angle = DEFAULT_FONTMARKER_ANGLE );

~QgsFontMarkerSymbolLayerV2();

// static stuff

static QgsSymbolLayerV2* create( const QgsStringMap& properties = QgsStringMap() ) /Factory/;
@@ -181,6 +181,7 @@ class QgsDataDefinedButton : QToolButton
* Common descriptions for expected input values
*/
static QString trString();
static QString charDesc();
static QString boolDesc();
static QString anyStringDesc();
static QString intDesc();
@@ -79,6 +79,7 @@
#include <QPainter>
#include <QPixmap>
#include <QPrintDialog>
#include <QPrinter>
#include <QSettings>
#include <QSizeGrip>
#include <QSvgGenerator>
@@ -51,6 +51,7 @@ class QUndoView;
class QComboBox;
class QLabel;
class QTreeView;
class QPrinter;

/** \ingroup MapComposer
* \brief A gui for composing a printable map.
@@ -555,6 +555,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
cbxSnappingOptionsDocked->setChecked( settings.value( "/qgis/dockSnapping", false ).toBool() );
cbxAddPostgisDC->setChecked( settings.value( "/qgis/addPostgisDC", false ).toBool() );
cbxAddOracleDC->setChecked( settings.value( "/qgis/addOracleDC", false ).toBool() );
cbxCompileExpressions->setChecked( settings.value( "/qgis/postgres/compileExpressions", false ).toBool() );
cbxCreateRasterLegendIcons->setChecked( settings.value( "/qgis/createRasterLegendIcons", false ).toBool() );
cbxCopyWKTGeomFromTable->setChecked( settings.value( "/qgis/copyGeometryAsWKT", true ).toBool() );
leNullValue->setText( settings.value( "qgis/nullValue", "NULL" ).toString() );
@@ -1058,6 +1059,7 @@ void QgsOptions::saveOptions()
settings.setValue( "/qgis/dockSnapping", cbxSnappingOptionsDocked->isChecked() );
settings.setValue( "/qgis/addPostgisDC", cbxAddPostgisDC->isChecked() );
settings.setValue( "/qgis/addOracleDC", cbxAddOracleDC->isChecked() );
settings.setValue( "/qgis/postgres/compileExpressions", cbxCompileExpressions->isChecked() );
settings.setValue( "/qgis/defaultLegendGraphicResolution", mLegendGraphicResolutionSpinBox->value() );
bool createRasterLegendIcons = settings.value( "/qgis/createRasterLegendIcons", false ).toBool();
settings.setValue( "/qgis/createRasterLegendIcons", cbxCreateRasterLegendIcons->isChecked() );
@@ -291,13 +291,6 @@ SET(QGIS_CORE_SRCS
raster/qgshuesaturationfilter.cpp
)

IF (NOT WITH_QTWEBKIT)
SET(QGIS_CORE_SRCS ${QGIS_CORE_SRCS}
qgswebpage.cpp
qgswebframe.cpp
)
ENDIF(NOT WITH_QTWEBKIT)

IF(ENABLE_MODELTEST)
SET(MODELTEST_SRCS
../../tests/qt_modeltest/modeltest.cpp
@@ -1657,7 +1657,7 @@ bool QgsExpression::unregisterFunction( QString name )

QStringList QgsExpression::gmBuiltinFunctions;

const QStringList &QgsExpression::BuiltinFunctions()
const QStringList& QgsExpression::BuiltinFunctions()
{
if ( gmBuiltinFunctions.isEmpty() )
{
@@ -1700,7 +1700,7 @@ const QStringList &QgsExpression::BuiltinFunctions()

QList<QgsExpression::Function*> QgsExpression::gmFunctions;

const QList<QgsExpression::Function*> &QgsExpression::Functions()
const QList<QgsExpression::Function*>& QgsExpression::Functions()
{
if ( gmFunctions.isEmpty() )
{
@@ -286,7 +286,7 @@ class CORE_EXPORT QgsExpression
class CORE_EXPORT Function
{
public:
Function( QString fnname, int params, QString group, QString helpText = QString(), bool usesGeometry = false, QStringList referencedColumns = QStringList(), bool lazyEval = false )
Function( const QString& fnname, int params, QString group, QString helpText = QString(), bool usesGeometry = false, QStringList referencedColumns = QStringList(), bool lazyEval = false )
: mName( fnname ), mParams( params ), mUsesGeometry( usesGeometry ), mGroup( group ), mHelpText( helpText ), mReferencedColumns( referencedColumns ), mLazyEval( lazyEval ) {}
/** The name of the function. */
QString name() { return mName; }
@@ -312,7 +312,7 @@ class CORE_EXPORT QgsExpression
/** The group the function belongs to. */
QString group() { return mGroup; }
/** The help text for the function. */
QString helptext() { return mHelpText.isEmpty() ? QgsExpression::helptext( mName ) : mHelpText; }
const QString helptext() { return mHelpText.isEmpty() ? QgsExpression::helptext( mName ) : mHelpText; }

virtual QVariant func( const QVariantList& values, const QgsFeature* f, QgsExpression* parent ) = 0;

@@ -352,11 +352,11 @@ class CORE_EXPORT QgsExpression
QStringList mAliases;
};

static const QList<Function*> &Functions();
static QList<Function*> gmFunctions;
static const QList<Function*>& Functions();

static QStringList gmBuiltinFunctions;
static const QStringList &BuiltinFunctions();
static const QStringList& BuiltinFunctions();

static bool registerFunction( Function* function );
static bool unregisterFunction( QString name );
@@ -424,6 +424,7 @@ class CORE_EXPORT QgsExpression
public:
NodeList() {}
virtual ~NodeList() { qDeleteAll( mList ); }
/** Takes ownership of the provided node */
void append( Node* node ) { mList.append( node ); }
int count() { return mList.count(); }
QList<Node*> list() { return mList; }
@@ -572,9 +573,9 @@ class CORE_EXPORT QgsExpression
class CORE_EXPORT NodeLiteral : public Node
{
public:
NodeLiteral( QVariant value ) : mValue( value ) {}
NodeLiteral( const QVariant& value ) : mValue( value ) {}

QVariant value() const { return mValue; }
inline QVariant value() const { return mValue; }

virtual NodeType nodeType() const override { return ntLiteral; }
virtual bool prepare( QgsExpression* parent, const QgsFields &fields ) override;
@@ -592,7 +593,7 @@ class CORE_EXPORT QgsExpression
class CORE_EXPORT NodeColumnRef : public Node
{
public:
NodeColumnRef( QString name ) : mName( name ), mIndex( -1 ) {}
NodeColumnRef( const QString& name ) : mName( name ), mIndex( -1 ) {}

QString name() const { return mName; }

@@ -1,3 +1,4 @@

/***************************************************************************
qgsvectorlayer.h - description
-------------------
@@ -24,8 +24,13 @@
#include <QPainter>
#include <QUrl>

/**
* @brief The QWebFrame class is a collection of stubs to mimic the API of a QWebFrame on systems
* where QtWebkit is not available.
*/
class CORE_EXPORT QWebFrame : public QObject
{
/// @cond
Q_OBJECT

public:
@@ -69,6 +74,7 @@ class CORE_EXPORT QWebFrame : public QObject

signals:
void javaScriptWindowObjectCleared();
/// @endcond
};
#endif
#endif // QGSWEBFRAME_H

This file was deleted.

0 comments on commit efeae6f

Please sign in to comment.