Skip to content
Permalink
Browse files

Migrate Photo and FileName widgets to ExternalResource

  • Loading branch information
m-kuhn committed Jan 20, 2017
1 parent 4c642ac commit abac18cc7b038c3bc2236c5f940acf14e04b8f91
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/core/qgsprojectfiletransform.cpp
@@ -704,6 +704,20 @@ void QgsProjectFileTransform::transform2990()
}
editWidgetConfiguration.insert( QStringLiteral( "map" ), map );
}
else if ( ewv2Type == QStringLiteral( "Photo" ) )
{
editWidgetElement.setAttribute( "type", QStringLiteral( "ExternalResource" ) );

editWidgetConfiguration.insert( QStringLiteral( "DocumentViewer" ), 1 );
editWidgetConfiguration.insert( QStringLiteral( "DocumentViewerHeight" ), editWidgetConfiguration.value( QStringLiteral( "Height" ) ) );
editWidgetConfiguration.insert( QStringLiteral( "DocumentViewerWidth" ), editWidgetConfiguration.value( QStringLiteral( "Width" ) ) );
editWidgetConfiguration.insert( QStringLiteral( "RelativeStorage" ), 1 );
}
else if ( ewv2Type == QStringLiteral( "FileName" ) )
{
editWidgetElement.setAttribute( "type", QStringLiteral( "ExternalResource" ) );
editWidgetConfiguration.insert( QStringLiteral( "RelativeStorage" ), 1 );
}

editWidgetConfigElement.appendChild( QgsXmlUtils::writeVariant( editWidgetConfiguration, mDom ) );
}

0 comments on commit abac18c

Please sign in to comment.
You can’t perform that action at this time.