Skip to content

Commit

Permalink
Fix checks
Browse files Browse the repository at this point in the history
  • Loading branch information
domi4484 committed May 10, 2021
1 parent 9fdcda4 commit 390bb55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/gui/editorwidgets/qgsjsoneditconfigdlg.cpp
Expand Up @@ -19,8 +19,8 @@ QgsJsonEditConfigDlg::QgsJsonEditConfigDlg( QgsVectorLayer *vl, int fieldIdx, QW
: QgsEditorConfigWidget( vl, fieldIdx, parent )
{
setupUi( this );
connect( mDefaultViewComboBox, QOverload<int>::of( &QComboBox::currentIndexChanged ), this, &QgsEditorConfigWidget::changed );
connect( mFormatJsonComboBox, QOverload<int>::of( &QComboBox::currentIndexChanged ), this, &QgsEditorConfigWidget::changed );
connect( mDefaultViewComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), this, &QgsEditorConfigWidget::changed );
connect( mFormatJsonComboBox, qOverload<int>( &QComboBox::currentIndexChanged ), this, &QgsEditorConfigWidget::changed );
}


Expand Down
10 changes: 5 additions & 5 deletions src/gui/editorwidgets/qgsjsoneditwidget.cpp
Expand Up @@ -164,16 +164,16 @@ void QgsJsonEditWidget::refreshTreeViewItemValue( const QJsonValue &jsonValue, Q
switch ( jsonValue.type() )
{
case QJsonValue::Null:
treeWidgetItemParent->setText( ( int )TreeWidgetColumn::Value, QStringLiteral( "null" ) );
treeWidgetItemParent->setText( static_cast<int>( TreeWidgetColumn::Value ), QStringLiteral( "null" ) );
break;
case QJsonValue::Bool:
treeWidgetItemParent->setText( ( int )TreeWidgetColumn::Value, jsonValue.toBool() ? QStringLiteral( "true" ) : QStringLiteral( "false" ) );
treeWidgetItemParent->setText( static_cast<int>( TreeWidgetColumn::Value ), jsonValue.toBool() ? QStringLiteral( "true" ) : QStringLiteral( "false" ) );
break;
case QJsonValue::Double:
treeWidgetItemParent->setText( ( int )TreeWidgetColumn::Value, QString::number( jsonValue.toDouble() ) );
treeWidgetItemParent->setText( static_cast<int>( TreeWidgetColumn::Value ), QString::number( jsonValue.toDouble() ) );
break;
case QJsonValue::String:
treeWidgetItemParent->setText( ( int )TreeWidgetColumn::Value, jsonValue.toString() );
treeWidgetItemParent->setText( static_cast<int>( TreeWidgetColumn::Value ), jsonValue.toString() );
break;
case QJsonValue::Array:
{
Expand All @@ -199,7 +199,7 @@ void QgsJsonEditWidget::refreshTreeViewItemValue( const QJsonValue &jsonValue, Q
}
break;
case QJsonValue::Undefined:
treeWidgetItemParent->setText( ( int )TreeWidgetColumn::Value, QStringLiteral( "Undefined value" ) );
treeWidgetItemParent->setText( static_cast<int>( TreeWidgetColumn::Value ), QStringLiteral( "Undefined value" ) );
break;
}
}
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsjsoneditwrapper.h
Expand Up @@ -31,7 +31,7 @@ SIP_NO_FILE
*
* Options:
* <ul>
* <li><b>DefaultView</b> <i>Default view can be choosen between text or tree.</i></li>
* <li><b>DefaultView</b> <i>Default view, text or tree can be selected.</i></li>
* </ul>
* \note not available in Python bindings
*/
Expand Down

0 comments on commit 390bb55

Please sign in to comment.