Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qgis/QGIS
Browse files Browse the repository at this point in the history
  • Loading branch information
pcav committed May 22, 2015
2 parents 7dacddc + 06ae01e commit efeae6f
Show file tree
Hide file tree
Showing 44 changed files with 736 additions and 241 deletions.
30 changes: 27 additions & 3 deletions .travis.yml
Expand Up @@ -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

18 changes: 8 additions & 10 deletions python/core/qgsexpression.sip
Expand Up @@ -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. */
Expand All @@ -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 );
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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 );
Expand All @@ -439,7 +437,7 @@ class QgsExpression
class NodeColumnRef : QgsExpression::Node
{
public:
NodeColumnRef( QString name );
NodeColumnRef( const QString& name );

QString name() const;

Expand Down
2 changes: 2 additions & 0 deletions python/core/symbology-ng/qgsmarkersymbollayerv2.sip
Expand Up @@ -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/;
Expand Down
1 change: 1 addition & 0 deletions python/gui/qgsdatadefinedbutton.sip
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/app/composer/qgscomposer.cpp
Expand Up @@ -79,6 +79,7 @@
#include <QPainter>
#include <QPixmap>
#include <QPrintDialog>
#include <QPrinter>
#include <QSettings>
#include <QSizeGrip>
#include <QSvgGenerator>
Expand Down
1 change: 1 addition & 0 deletions src/app/composer/qgscomposer.h
Expand Up @@ -51,6 +51,7 @@ class QUndoView;
class QComboBox;
class QLabel;
class QTreeView;
class QPrinter;

/** \ingroup MapComposer
* \brief A gui for composing a printable map.
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsoptions.cpp
Expand Up @@ -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() );
Expand Down Expand Up @@ -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() );
Expand Down
7 changes: 0 additions & 7 deletions src/core/CMakeLists.txt
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsexpression.cpp
Expand Up @@ -1657,7 +1657,7 @@ bool QgsExpression::unregisterFunction( QString name )

QStringList QgsExpression::gmBuiltinFunctions;

const QStringList &QgsExpression::BuiltinFunctions()
const QStringList& QgsExpression::BuiltinFunctions()
{
if ( gmBuiltinFunctions.isEmpty() )
{
Expand Down Expand Up @@ -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() )
{
Expand Down
15 changes: 8 additions & 7 deletions src/core/qgsexpression.h
Expand Up @@ -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; }
Expand All @@ -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;

Expand Down Expand Up @@ -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 );
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -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;
Expand All @@ -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; }

Expand Down
1 change: 1 addition & 0 deletions src/core/qgsvectorlayer.h
@@ -1,3 +1,4 @@

/***************************************************************************
qgsvectorlayer.h - description
-------------------
Expand Down
6 changes: 6 additions & 0 deletions src/core/qgswebframe.h
Expand Up @@ -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:
Expand Down Expand Up @@ -69,6 +74,7 @@ class CORE_EXPORT QWebFrame : public QObject

signals:
void javaScriptWindowObjectCleared();
/// @endcond
};
#endif
#endif // QGSWEBFRAME_H
83 changes: 0 additions & 83 deletions src/core/qgswebpage.cpp

This file was deleted.

0 comments on commit efeae6f

Please sign in to comment.