Fix travis

This commit is contained in:
Nyall Dawson 2019-01-07 21:07:15 +10:00
parent 2b4482fab4
commit 63204cfdb5
3 changed files with 9 additions and 3 deletions

View File

@ -39,6 +39,9 @@ The ``render`` argument indicates whether the category should initially be rende
%End
QgsRendererCategory( const QgsRendererCategory &cat );
%Docstring
Copy constructor.
%End
QVariant value() const;
%Docstring

View File

@ -54,6 +54,9 @@ class CORE_EXPORT QgsRendererCategory
*/
QgsRendererCategory( const QVariant &value, QgsSymbol *symbol SIP_TRANSFER, const QString &label, bool render = true );
/**
* Copy constructor.
*/
QgsRendererCategory( const QgsRendererCategory &cat );
QgsRendererCategory &operator=( QgsRendererCategory cat );

View File

@ -248,9 +248,9 @@ void TestQgsCategorizedRendererWidget::model()
QCOMPARE( model->data( model->index( 1, 2 ), Qt::DisplayRole ).toString(), QStringLiteral( "list" ) );
QCOMPARE( model->data( model->index( 2, 2 ), Qt::DisplayRole ).toString(), QStringLiteral( "dd" ) );
QCOMPARE( model->data( model->index( 0, 0 ), Qt::CheckStateRole ).toInt(), Qt::Checked );
QCOMPARE( model->data( model->index( 1, 0 ), Qt::CheckStateRole ).toInt(), Qt::Checked );
QCOMPARE( model->data( model->index( 2, 0 ), Qt::CheckStateRole ).toInt(), Qt::Unchecked );
QCOMPARE( model->data( model->index( 0, 0 ), Qt::CheckStateRole ).toInt(), static_cast< int >( Qt::Checked ) );
QCOMPARE( model->data( model->index( 1, 0 ), Qt::CheckStateRole ).toInt(), static_cast< int >( Qt::Checked ) );
QCOMPARE( model->data( model->index( 2, 0 ), Qt::CheckStateRole ).toInt(), static_cast< int >( Qt::Unchecked ) );
}
QGSTEST_MAIN( TestQgsCategorizedRendererWidget )