Skip to content

Commit

Permalink
fix(ColorProperties): fix test on Qt < 6.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
troopa81 authored and nyalldawson committed Jul 17, 2024
1 parent ea65474 commit b118111
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/src/app/testqgsprojectproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,15 @@ void TestQgsProjectProperties::testColorSettings()
std::unique_ptr< QgsProjectProperties > pp = std::make_unique< QgsProjectProperties >( mQgisApp->mapCanvas() );
QCOMPARE( static_cast<Qgis::ColorModel>( pp->mColorModel->currentData().toInt() ), Qgis::ColorModel::Rgb );
QVERIFY( !pp->mColorSpace.isValid() );
#if QT_VERSION >= QT_VERSION_CHECK(6, 8, 0)
QCOMPARE( pp->mColorSpaceName->text(), QStringLiteral( "<i>None</i>" ) );
QVERIFY( !pp->mRemoveIccProfile->isEnabled() );
#else
QVERIFY( !pp->mRemoveIccProfile->isVisible() );
QVERIFY( !pp->mAddIccProfile->isVisible() );
QVERIFY( !pp->mColorSpaceName->isVisible() );
QVERIFY( !pp->mIccProfileLabel->isVisible() );
#endif

pp->mColorModel->setCurrentIndex( pp->mColorModel->findData( QVariant::fromValue( Qgis::ColorModel::Cmyk ) ) );
QCOMPARE( static_cast<Qgis::ColorModel>( pp->mColorModel->currentData().toInt() ), Qgis::ColorModel::Cmyk );
Expand Down

0 comments on commit b118111

Please sign in to comment.