@@ -316,15 +316,35 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
316
316
{
317
317
public:
318
318
319
+ /* *
320
+ * \deprecated since QGIS 3.0.2. The name parameter is not used for anything and overwritten by the relationId internally.
321
+ */
322
+ Q_DECL_DEPRECATED QgsAttributeEditorRelation (const QString &name, const QString &relationId, QgsAttributeEditorElement *parent)
323
+ : QgsAttributeEditorElement( AeTypeRelation, name, parent )
324
+ , mRelationId( relationId )
325
+ , mShowLinkButton( true )
326
+ , mShowUnlinkButton( true )
327
+ {}
328
+
329
+ /* *
330
+ * \deprecated since QGIS 3.0.2. The name parameter is not used for anything and overwritten by the relationId internally.
331
+ */
332
+ Q_DECL_DEPRECATED QgsAttributeEditorRelation (const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent)
333
+ : QgsAttributeEditorElement( AeTypeRelation, name, parent )
334
+ , mRelationId( relation.id() )
335
+ , mRelation( relation )
336
+ , mShowLinkButton( true )
337
+ , mShowUnlinkButton( true )
338
+ {}
339
+
319
340
/* *
320
341
* Creates a new element which embeds a relation.
321
342
*
322
- * \param name The name of this element
323
343
* \param relationId The id of the relation to embed
324
344
* \param parent The parent (used as container)
325
345
*/
326
- QgsAttributeEditorRelation ( const QString &name, const QString & relationId, QgsAttributeEditorElement *parent )
327
- : QgsAttributeEditorElement( AeTypeRelation, name , parent )
346
+ QgsAttributeEditorRelation ( const QString &relationId, QgsAttributeEditorElement *parent)
347
+ : QgsAttributeEditorElement( AeTypeRelation, relationId , parent )
328
348
, mRelationId ( relationId )
329
349
, mShowLinkButton ( true )
330
350
, mShowUnlinkButton ( true )
@@ -333,12 +353,11 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
333
353
/* *
334
354
* Creates a new element which embeds a relation.
335
355
*
336
- * \param name The name of this element
337
356
* \param relation The relation to embed
338
357
* \param parent The parent (used as container)
339
358
*/
340
- QgsAttributeEditorRelation ( const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent )
341
- : QgsAttributeEditorElement( AeTypeRelation, name , parent )
359
+ QgsAttributeEditorRelation ( const QgsRelation &relation, QgsAttributeEditorElement *parent)
360
+ : QgsAttributeEditorElement( AeTypeRelation, relation.id() , parent )
342
361
, mRelationId ( relation.id() )
343
362
, mRelation ( relation )
344
363
, mShowLinkButton ( true )
0 commit comments