Skip to content
Permalink
Browse files
Remove unused mAnnotationForm member + getter/setter from QgsVectorLayer
  • Loading branch information
wonder-sk committed May 14, 2017
1 parent 33b6fab commit 24e06a4941d43b9dafb01892321a585860960138
Showing with 1 addition and 43 deletions.
  1. +1 −0 doc/api_break.dox
  2. +0 −11 python/core/qgsvectorlayer.sip
  3. +0 −6 src/app/qgsformannotationdialog.cpp
  4. +0 −17 src/core/qgsvectorlayer.cpp
  5. +0 −9 src/core/qgsvectorlayer.h
@@ -2213,6 +2213,7 @@ displayExpression instead. For the map tip use mapTipTemplate() instead.
- insertSegmentVerticesForSnap() has been removed - use addTopologicalPoints() directly.
- addFeature() no longer accepts an alsoUpdateExtent boolean - this extra argument has been ignored for some time
- addFeatures() no longer accepts a makeSelected boolean, and will not automatically select newly added features. If desired, features must be manually selected by calling selectByIds() after addFeatures()
- annotationForm() and setAnnotationForm() have been removed. Form path is stored in individual QgsFormAnnotation objects.


QgsVectorLayerEditBuffer {#qgis_api_break_3_0_QgsVectorLayerEditBuffer}
@@ -1307,17 +1307,6 @@ Delete a feature from the layer (but does not commit it)
:rtype: bool
%End

QString annotationForm() const;
%Docstring
Get annotation form
:rtype: str
%End

void setAnnotationForm( const QString &ui );
%Docstring
Set annotation form for layer
%End

QList<QgsRelation> referencingRelations( int idx ) const;
%Docstring
Get relations, where the foreign key is on this layer
@@ -62,12 +62,6 @@ void QgsFormAnnotationDialog::applySettingsToItem()
{
QgsFormAnnotation *annotation = static_cast< QgsFormAnnotation * >( mItem->annotation() );
annotation->setDesignerForm( mFileLineEdit->text() );
QgsVectorLayer *layer = qobject_cast< QgsVectorLayer * >( annotation->mapLayer() );
if ( layer )
{
//set last used annotation form as default for the layer
layer->setAnnotationForm( mFileLineEdit->text() );
}
mItem->update();
}
}
@@ -1589,13 +1589,6 @@ bool QgsVectorLayer::readSymbology( const QDomNode &layerNode, QString &errorMes
// process the attribute actions
mActions->readXml( layerNode );

QDomNode annotationFormNode = layerNode.namedItem( QStringLiteral( "annotationform" ) );
if ( !annotationFormNode.isNull() )
{
QDomElement e = annotationFormNode.toElement();
mAnnotationForm = QgsProject::instance()->readPath( e.text() );
}

mAttributeAliasMap.clear();
QDomNode aliasesNode = layerNode.namedItem( QStringLiteral( "aliases" ) );
if ( !aliasesNode.isNull() )
@@ -1927,11 +1920,6 @@ bool QgsVectorLayer::writeSymbology( QDomNode &node, QDomDocument &doc, QString
++index;
}

QDomElement afField = doc.createElement( QStringLiteral( "annotationform" ) );
QDomText afText = doc.createTextNode( QgsProject::instance()->writePath( mAnnotationForm ) );
afField.appendChild( afText );
node.appendChild( afField );

//attribute aliases
QDomElement aliasElem = doc.createElement( QStringLiteral( "aliases" ) );
Q_FOREACH ( const QgsField &field, mFields )
@@ -2636,11 +2624,6 @@ bool QgsVectorLayer::isModified() const
return mEditBuffer && mEditBuffer->isModified();
}

void QgsVectorLayer::setAnnotationForm( const QString &ui )
{
mAnnotationForm = ui;
}

void QgsVectorLayer::setRenderer( QgsFeatureRenderer *r )
{
if ( !hasGeometryType() )
@@ -1247,12 +1247,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
bool rollBack( bool deleteBuffer = true );

//! Get annotation form
QString annotationForm() const { return mAnnotationForm; }

//! Set annotation form for layer
void setAnnotationForm( const QString &ui );

/**
* Get relations, where the foreign key is on this layer
*
@@ -1981,9 +1975,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte

QStringList mCommitErrors;

//! Annotation form for this layer
QString mAnnotationForm;

//! stores information about uncommitted changes to layer
QgsVectorLayerEditBuffer *mEditBuffer = nullptr;
friend class QgsVectorLayerEditBuffer;

0 comments on commit 24e06a4

Please sign in to comment.