Skip to content

Commit 5d7a6c1

Browse files
committed
remove useless API break
1 parent 16497ee commit 5d7a6c1

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

python/core/qgseditformconfig.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Set the active layout style for the attribute editor for this layer
114114
Get path or URL to the .ui form. Only meaningful with EditorLayout.UiFileLayout
115115
%End
116116

117-
bool setUiForm( const QString &ui, QString *errMsg /Out/ = 0 );
117+
void setUiForm( const QString &ui );
118118
%Docstring
119119
Set path to the .ui form.
120120
When a string is provided in ``ui``, the layout style will be set to EditorLayout.UiFileLayout,

src/app/qgsattributesformproperties.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,7 @@ void QgsAttributesFormProperties::apply()
684684
editFormConfig.addTab( createAttributeEditorWidget( tabItem, nullptr, false ) );
685685
}
686686

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

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

src/core/qgseditformconfig.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ QString QgsEditFormConfig::uiForm() const
152152
return d->mUiFormPath;
153153
}
154154

155-
bool QgsEditFormConfig::setUiForm( const QString &ui, QString *errMsg )
155+
void QgsEditFormConfig::setUiForm( const QString &ui )
156156
{
157-
Q_UNUSED( errMsg );
158157
if ( !ui.isEmpty() && !QUrl::fromUserInput( ui ).isLocalFile() )
159158
{
160159
// any existing download will not be restarted!
@@ -170,8 +169,6 @@ bool QgsEditFormConfig::setUiForm( const QString &ui, QString *errMsg )
170169
setLayout( UiFileLayout );
171170
}
172171
d->mUiFormPath = ui;
173-
174-
return true;
175172
}
176173

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

286281
QDomNode editFormInitNode = node.namedItem( QStringLiteral( "editforminit" ) );

src/core/qgseditformconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class CORE_EXPORT QgsEditFormConfig
148148
* If \a ui is a URL, a local copy of the file will be made and will be used to create the forms
149149
* \a context is provided to save error messages
150150
*/
151-
bool setUiForm( const QString &ui, QString *errMsg SIP_OUT = nullptr );
151+
void setUiForm( const QString &ui );
152152

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

0 commit comments

Comments
 (0)