Skip to content

Commit

Permalink
Remove unused mAnnotationForm member + getter/setter from QgsVectorLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed May 14, 2017
1 parent 33b6fab commit 24e06a4
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 43 deletions.
1 change: 1 addition & 0 deletions doc/api_break.dox
Expand Up @@ -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}
Expand Down
11 changes: 0 additions & 11 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/app/qgsformannotationdialog.cpp
Expand Up @@ -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();
}
}
Expand Down
17 changes: 0 additions & 17 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -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() )
Expand Down Expand Up @@ -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 )
Expand Down Expand Up @@ -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() )
Expand Down
9 changes: 0 additions & 9 deletions src/core/qgsvectorlayer.h
Expand Up @@ -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
*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 24e06a4

Please sign in to comment.