Skip to content
Permalink
Browse files

remove useless API break

  • Loading branch information
3nids committed May 9, 2018
1 parent 16497ee commit 5d7a6c18ec6e372f3e01cd0f1d624dce3cca4dad
@@ -114,7 +114,7 @@ Set the active layout style for the attribute editor for this layer
Get path or URL to the .ui form. Only meaningful with EditorLayout.UiFileLayout
%End

bool setUiForm( const QString &ui, QString *errMsg /Out/ = 0 );
void setUiForm( const QString &ui );
%Docstring
Set path to the .ui form.
When a string is provided in ``ui``, the layout style will be set to EditorLayout.UiFileLayout,
@@ -684,9 +684,7 @@ void QgsAttributesFormProperties::apply()
editFormConfig.addTab( createAttributeEditorWidget( tabItem, nullptr, false ) );
}

QString *errMsg = new QString();
if ( !editFormConfig.setUiForm( mEditFormLineEdit->text(), errMsg ) )
QgisApp::instance()->messageBar()->pushMessage( *errMsg, Qgis::Warning );
editFormConfig.setUiForm( mEditFormLineEdit->text() );

editFormConfig.setLayout( ( QgsEditFormConfig::EditorLayout ) mEditorLayoutComboBox->currentIndex() );

@@ -152,9 +152,8 @@ QString QgsEditFormConfig::uiForm() const
return d->mUiFormPath;
}

bool QgsEditFormConfig::setUiForm( const QString &ui, QString *errMsg )
void QgsEditFormConfig::setUiForm( const QString &ui )
{
Q_UNUSED( errMsg );
if ( !ui.isEmpty() && !QUrl::fromUserInput( ui ).isLocalFile() )
{
// any existing download will not be restarted!
@@ -170,8 +169,6 @@ bool QgsEditFormConfig::setUiForm( const QString &ui, QString *errMsg )
setLayout( UiFileLayout );
}
d->mUiFormPath = ui;

return true;
}

bool QgsEditFormConfig::readOnly( int idx ) const
@@ -278,9 +275,7 @@ void QgsEditFormConfig::readXml( const QDomNode &node, QgsReadWriteContext &cont
if ( !editFormNode.isNull() )
{
QDomElement e = editFormNode.toElement();
QString *errMsg = new QString();
if ( !setUiForm( context.pathResolver().readPath( e.text() ), errMsg ) )
context.pushMessage( *errMsg, Qgis::Warning );
setUiForm( context.pathResolver().readPath( e.text() ) );
}

QDomNode editFormInitNode = node.namedItem( QStringLiteral( "editforminit" ) );
@@ -148,7 +148,7 @@ class CORE_EXPORT QgsEditFormConfig
* If \a ui is a URL, a local copy of the file will be made and will be used to create the forms
* \a context is provided to save error messages
*/
bool setUiForm( const QString &ui, QString *errMsg SIP_OUT = nullptr );
void setUiForm( const QString &ui );

/**
* Set the editor widget config for a widget which is not for a simple field.

0 comments on commit 5d7a6c1

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