[qgis] 01/07: Imported Upstream version 2.8.6+dfsg
Sebastiaan Couwenberg
sebastic at moszumanska.debian.org
Wed Jan 20 05:17:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
sebastic pushed a commit to branch master
in repository qgis.
commit 2d55ac1a4efbb6ea66bd64ee8d5e87796baf0405
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date: Tue Jan 19 06:48:01 2016 +0100
Imported Upstream version 2.8.6+dfsg
---
CMakeLists.txt | 2 +-
ChangeLog | 37 ++++++++++++++++++++++
debian/changelog | 10 ++++--
debian/control.in | 21 ++++++++++++
.../editorwidgets/core/qgseditorwidgetwrapper.sip | 9 ++++++
python/gui/qgsfieldvalidator.sip | 2 +-
src/core/qgsmaplayer.cpp | 6 ++++
.../editorwidgets/core/qgseditorwidgetwrapper.cpp | 6 ++++
.../editorwidgets/core/qgseditorwidgetwrapper.h | 9 ++++++
src/gui/editorwidgets/qgstexteditwrapper.cpp | 17 ++++++++--
src/gui/qgsfieldvalidator.cpp | 16 ++++++----
src/gui/qgsfieldvalidator.h | 3 +-
src/providers/postgres/qgspostgresprovider.cpp | 8 ++---
13 files changed, 128 insertions(+), 18 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 41deab2..29ddef8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
SET(CPACK_PACKAGE_VERSION_MAJOR "2")
SET(CPACK_PACKAGE_VERSION_MINOR "8")
-SET(CPACK_PACKAGE_VERSION_PATCH "5")
+SET(CPACK_PACKAGE_VERSION_PATCH "6")
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(RELEASE_NAME "Wien")
IF (POLICY CMP0048) # in CMake 3.0.0+
diff --git a/ChangeLog b/ChangeLog
index 34a8827..062eb58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+Sebastian Dietrich <SebDieBln at users.noreply.github.com> 2015-12-30
+
+ read source from provider before saving memory layer (fixes #8997)
+
+ (cherry picked from commit dbc0f072c638981db982011776d7b110215e80b7)
+
+Juergen E. Fischer <jef at norbit.de> 2015-03-18
+
+ edit widgets: keep default values of new feature's attributes until they are added
+ (fixes #12391 & #12386 & #13857)
+
+ (cherry picked from commit bfb8ab6893d5bf77b4ae92c6c90e0b5b9c7e9ae7)
+
+Bas Couwenberg <sebastic at xs4all.nl> 2015-12-23
+
+ Add dependency on openscenegraph-plugin-osgearth to qgis-plugin-globe.
+
+ QGIS crashes when using the Globe plugin if this package is not installed,
+ as reported in QGIS issue #9818 [0] and Debian Bug #808817 [1].
+
+ [0] https://hub.qgis.org/issues/9818
+ [1] https://bugs.debian.org/808817
+
+ (cherry picked from commit 076c2a09b707c2b1c59985d27ad79b0a2a580000)
+
+Bas Couwenberg <sebastic at xs4all.nl> 2015-05-27
+
+ Add qgis-dbg package to provide debug symbols.
+
+ The debug package was requested in [Debian Bug #786985](https://bugs.debian.org/786985).
+
+ (cherry picked from commit 44d6cc3786dccd1de125f5f0be821706ee1f0bb4)
+
+Juergen E. Fischer <jef at norbit.de> 2015-12-18
+
+ Release of 2.8.5
+
rldhont <rldhont at gmail.com> 2015-12-18
[BUGFIX] WFS GetCapabilities respons misses <keywords> key
diff --git a/debian/changelog b/debian/changelog
index e38df26..90650d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,14 @@
-qgis (2.8.5) UNRELEASED; urgency=medium
+qgis (2.8.6) UNRELEASED; urgency=medium
+
+ * Release of 2.8.6
+
+ -- Jürgen E. Fischer <jef at norbit.de> Fri, 15 Jan 2016 13:00:09 +0100
+
+qgis (2.8.5) unstable; urgency=medium
* Release of 2.8.5
- -- Jürgen E. Fischer <jef at norbit.de> Fri, 18 Dec 2015 14:18:20 +0100
+ -- Jürgen E. Fischer <jef at norbit.de> Fri, 15 Jan 2016 13:00:09 +0100
qgis (2.8.4) unstable; urgency=medium
diff --git a/debian/control.in b/debian/control.in
index 44d2f4e..2265478 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -248,6 +248,26 @@ Description: QGIS - development files
This package contains the headers and libraries needed to develop plugins for
QGIS.
+Package: qgis-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends:
+ libqgis-core{QGIS_ABI} (= ${binary:Version}),
+ libqgis-gui{QGIS_ABI} (= ${binary:Version}),
+ libqgis-analysis{QGIS_ABI} (= ${binary:Version}),
+ libqgis-networkanalysis{QGIS_ABI} (= ${binary:Version}),
+ libqgis-server{QGIS_ABI} (= ${binary:Version}),
+ libqgisgrass{QGIS_ABI} (= ${binary:Version}),
+ libqgispython{QGIS_ABI} (= ${binary:Version}),
+ ${misc:Depends}
+Suggests: gdb
+Description: QGIS - debugging symbols
+ QGIS is a Geographic Information System (GIS) which manages, analyzes and
+ display databases of geographic information.
+ .
+ This package contains debugging symbols.
+
Package: qgis-provider-grass
Architecture: any
Depends:
@@ -298,6 +318,7 @@ Architecture: any
Depends:
qgis (= ${binary:Version}),
qgis-plugin-globe-common (= ${source:Version}),
+ openscenegraph-plugin-osgearth,
${shlibs:Depends},
${misc:Depends}
Description: OSG globe plugin for QGIS
diff --git a/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip b/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip
index dbe50cd..2dfdcee 100644
--- a/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip
+++ b/python/gui/editorwidgets/core/qgseditorwidgetwrapper.sip
@@ -65,6 +65,15 @@ class QgsEditorWidgetWrapper : QObject
QgsField field();
/**
+ * Access the default value of the field.
+ *
+ * @return the default value of the field
+ *
+ * @see layer()
+ */
+ QVariant defaultValue();
+
+ /**
* Will return a wrapper for a given widget
* @param widget The widget which was created by a wrapper
* @return The wrapper for the widget or NULL
diff --git a/python/gui/qgsfieldvalidator.sip b/python/gui/qgsfieldvalidator.sip
index 51bb043..49b0bd5 100644
--- a/python/gui/qgsfieldvalidator.sip
+++ b/python/gui/qgsfieldvalidator.sip
@@ -6,7 +6,7 @@ class QgsFieldValidator : QValidator
%End
public:
- QgsFieldValidator( QObject *parent, const QgsField &field, QString dateFormat = "yyyy-MM-dd" );
+ QgsFieldValidator( QObject *parent, const QgsField &field, QString defaultValue, QString dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();
virtual State validate(QString & /In,Out/, int & /In,Out/) const = 0 /API=QString:2 - /;
diff --git a/src/core/qgsmaplayer.cpp b/src/core/qgsmaplayer.cpp
index 815cf4f..8b28b82 100644
--- a/src/core/qgsmaplayer.cpp
+++ b/src/core/qgsmaplayer.cpp
@@ -45,6 +45,7 @@
#include "qgsrasterlayer.h"
#include "qgsrectangle.h"
#include "qgsvectorlayer.h"
+#include "qgsvectordataprovider.h"
QgsMapLayer::QgsMapLayer( QgsMapLayer::LayerType type,
@@ -549,6 +550,11 @@ bool QgsMapLayer::writeLayerXML( QDomElement& layerElement, QDomDocument& docume
urlDest.setQueryItems( urlSource.queryItems() );
src = QString::fromAscii( urlDest.toEncoded() );
}
+ else if ( vlayer && vlayer->providerType() == "memory" )
+ {
+ // Refetch the source from the provider, because adding fields actually changes the source for this provider.
+ src = vlayer->dataProvider()->dataSourceUri();
+ }
else
{
bool handled = false;
diff --git a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp
index 04055b0..98d63d0 100644
--- a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp
+++ b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.cpp
@@ -15,6 +15,7 @@
#include "qgseditorwidgetwrapper.h"
#include "qgsvectorlayer.h"
+#include "qgsvectordataprovider.h"
#include "qgsfield.h"
#include <QWidget>
@@ -35,6 +36,11 @@ QgsField QgsEditorWidgetWrapper::field()
return layer()->pendingFields()[mFieldIdx];
}
+QVariant QgsEditorWidgetWrapper::defaultValue()
+{
+ return layer()->dataProvider()->defaultValue( mFieldIdx );
+}
+
QgsEditorWidgetWrapper* QgsEditorWidgetWrapper::fromWidget( QWidget* widget )
{
return qobject_cast<QgsEditorWidgetWrapper*>( widget->property( "EWV2Wrapper" ).value<QgsWidgetWrapper*>() );
diff --git a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h
index 289aaa9..cb81482 100644
--- a/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h
+++ b/src/gui/editorwidgets/core/qgseditorwidgetwrapper.h
@@ -82,6 +82,15 @@ class GUI_EXPORT QgsEditorWidgetWrapper : public QgsWidgetWrapper
QgsField field();
/**
+ * Access the default value of the field.
+ *
+ * @return the default value of the field
+ *
+ * @see layer()
+ */
+ QVariant defaultValue();
+
+ /**
* Will return a wrapper for a given widget
* @param widget The widget which was created by a wrapper
* @return The wrapper for the widget or NULL
diff --git a/src/gui/editorwidgets/qgstexteditwrapper.cpp b/src/gui/editorwidgets/qgstexteditwrapper.cpp
index f0f34ce..340ddfc 100644
--- a/src/gui/editorwidgets/qgstexteditwrapper.cpp
+++ b/src/gui/editorwidgets/qgstexteditwrapper.cpp
@@ -59,6 +59,11 @@ QVariant QgsTextEditWrapper::value()
v == QSettings().value( "qgis/nullValue", "NULL" ).toString() )
return QVariant( field().type() );
+ if ( v == defaultValue().toString() )
+ {
+ return defaultValue();
+ }
+
QVariant res( v );
if ( field().convertCompatible( res ) )
return res;
@@ -99,16 +104,22 @@ void QgsTextEditWrapper::initWidget( QWidget* editor )
if ( mLineEdit )
{
- mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field() ) );
+ mLineEdit->setValidator( new QgsFieldValidator( mLineEdit, field(), defaultValue().toString() ) );
+
+ QVariant defVal = defaultValue();
+ if ( defVal.isNull() )
+ {
+ defVal = QSettings().value( "qgis/nullValue", "NULL" );
+ }
QgsFilterLineEdit *fle = qobject_cast<QgsFilterLineEdit*>( mLineEdit );
if ( field().type() == QVariant::Int || field().type() == QVariant::Double || field().type() == QVariant::LongLong || field().type() == QVariant::Date )
{
- mLineEdit->setPlaceholderText( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
+ mLineEdit->setPlaceholderText( defVal.toString() );
}
else if ( fle )
{
- fle->setNullValue( QSettings().value( "qgis/nullValue", "NULL" ).toString() );
+ fle->setNullValue( defVal.toString() );
}
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( valueChanged( QString ) ) );
diff --git a/src/gui/qgsfieldvalidator.cpp b/src/gui/qgsfieldvalidator.cpp
index 9c583ed..a716661 100644
--- a/src/gui/qgsfieldvalidator.cpp
+++ b/src/gui/qgsfieldvalidator.cpp
@@ -29,9 +29,10 @@
#include "qgslonglongvalidator.h"
#include "qgsfield.h"
-QgsFieldValidator::QgsFieldValidator( QObject *parent, const QgsField &field, QString dateFormat )
+QgsFieldValidator::QgsFieldValidator( QObject *parent, const QgsField &field, QString defaultValue, QString dateFormat )
: QValidator( parent )
, mField( field )
+ , mDefaultValue( defaultValue )
, mDateFormat( dateFormat )
{
switch ( mField.type() )
@@ -105,6 +106,9 @@ QValidator::State QgsFieldValidator::validate( QString &s, int &i ) const
return Acceptable;
}
+ if ( s == mDefaultValue )
+ return Acceptable;
+
// delegate to the child validator if any
if ( mValidator )
{
@@ -115,10 +119,10 @@ QValidator::State QgsFieldValidator::validate( QString &s, int &i ) const
{
// allow to enter the NULL representation, which might be
// longer than the actual field
- if ( mNullValue.size() > 0 &&
- s.size() > 0 &&
- s.size() < mNullValue.size() &&
- s == mNullValue.left( s.size() ) )
+ if ( mNullValue.size() > 0 && s.size() > 0 && s.size() < mNullValue.size() && s == mNullValue.left( s.size() ) )
+ return Intermediate;
+
+ if ( mDefaultValue.size() > 0 && s.size() > 0 && s.size() < mDefaultValue.size() && s == mDefaultValue.left( s.size() ) )
return Intermediate;
if ( s == mNullValue )
@@ -146,7 +150,7 @@ void QgsFieldValidator::fixup( QString &s ) const
{
mValidator->fixup( s );
}
- else if ( mField.type() == QVariant::String && mField.length() > 0 && s.size() > mField.length() )
+ else if ( mField.type() == QVariant::String && mField.length() > 0 && s.size() > mField.length() && s != mDefaultValue )
{
// if the value is longer, this must be a partial NULL representation
s = mNullValue;
diff --git a/src/gui/qgsfieldvalidator.h b/src/gui/qgsfieldvalidator.h
index 35e2e4b..cf31cc2 100644
--- a/src/gui/qgsfieldvalidator.h
+++ b/src/gui/qgsfieldvalidator.h
@@ -31,7 +31,7 @@ class GUI_EXPORT QgsFieldValidator : public QValidator
Q_OBJECT
public:
- QgsFieldValidator( QObject *parent, const QgsField &field, QString dateFormat = "yyyy-MM-dd" );
+ QgsFieldValidator( QObject *parent, const QgsField &field, QString defaultValue, QString dateFormat = "yyyy-MM-dd" );
~QgsFieldValidator();
virtual State validate( QString &, int & ) const override;
@@ -46,6 +46,7 @@ class GUI_EXPORT QgsFieldValidator : public QValidator
QValidator *mValidator;
QgsField mField;
QString mNullValue;
+ QString mDefaultValue;
QString mDateFormat;
};
diff --git a/src/providers/postgres/qgspostgresprovider.cpp b/src/providers/postgres/qgspostgresprovider.cpp
index 78a1731..5502034 100644
--- a/src/providers/postgres/qgspostgresprovider.cpp
+++ b/src/providers/postgres/qgspostgresprovider.cpp
@@ -3407,10 +3407,10 @@ QGISEXTERN bool saveStyle( const QString& uri, const QString& qmlStyle, const QS
{
res = conn->PQexec( "CREATE TABLE layer_styles("
"id SERIAL PRIMARY KEY"
- ",f_table_catalog varchar(256)"
- ",f_table_schema varchar(256)"
- ",f_table_name varchar(256)"
- ",f_geometry_column varchar(256)"
+ ",f_table_catalog varchar"
+ ",f_table_schema varchar"
+ ",f_table_name varchar"
+ ",f_geometry_column varchar"
",styleName varchar(30)"
",styleQML xml"
",styleSLD xml"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/qgis.git
More information about the Pkg-grass-devel
mailing list