Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix test
  • Loading branch information
3nids committed May 23, 2023
1 parent 916cbb8 commit f0ec61b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/app/qgsmergeattributesdialog.cpp
Expand Up @@ -234,7 +234,9 @@ void QgsMergeAttributesDialog::createTableWidgetContents()

if ( !mVectorLayer->dataProvider()->defaultValueClause( idx ).isEmpty() )
{
mTableWidget->item( mTableWidget->rowCount() - 1, j )->setData( Qt::DisplayRole, mVectorLayer->dataProvider()->defaultValueClause( idx ) );
QVariant v = mVectorLayer->dataProvider()->defaultValueClause( idx );
mTableWidget->item( mTableWidget->rowCount() - 1, j )->setData( Qt::DisplayRole, v );
mTableWidget->item( mTableWidget->rowCount() - 1, j )->setData( Qt::UserRole, v );
setToManual = true;
}
else
Expand Down Expand Up @@ -775,7 +777,6 @@ QgsAttributes QgsMergeAttributesDialog::mergedAttributes() const
if ( !comboBox )
continue;


QVariant value;
QWidget *w = mTableWidget->cellWidget( mFeatureList.size() + 1, widgetIndex );
QgsEditorWidgetWrapper *eww = QgsEditorWidgetWrapper::fromWidget( w );
Expand Down
2 changes: 1 addition & 1 deletion tests/src/app/testqgsmergeattributesdialog.cpp
Expand Up @@ -86,7 +86,7 @@ class TestQgsMergeattributesDialog : public QObject

// At beginnning the first feature of the list is the target
QCOMPARE( dialog.targetFeatureId(), FID_NULL );
QCOMPARE( dialog.mergedAttributes().first(), "Autogenerate" );
QCOMPARE( dialog.mergedAttributes()[0], "Autogenerate" );

// Check after taking feature with largest geometry
QVERIFY( QMetaObject::invokeMethod( &dialog, "mFromLargestPushButton_clicked" ) );
Expand Down

0 comments on commit f0ec61b

Please sign in to comment.