From 585aa4667f3aa8c025c1687b55556cd4abb7e02c Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 14 May 2022 01:48:59 +0200 Subject: [PATCH] Fixed non-Qt-binding case --- src/ant/ant/ant.pro | 2 -- src/laybasic/laybasic/gsiDeclLayPixelBuffer.cc | 4 ++-- src/laybasic/unit_tests/layLayoutViewTests.cc | 2 +- testdata/ruby/layLayoutView.rb | 10 ++++++++++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/ant/ant/ant.pro b/src/ant/ant/ant.pro index 7a5a1705c..079b34e75 100644 --- a/src/ant/ant/ant.pro +++ b/src/ant/ant/ant.pro @@ -30,7 +30,6 @@ SOURCES = \ # Enabled without Qt: HEADERS += \ - antForceLink.h \ antConfig.h \ antObject.h \ antPlugin.h \ @@ -40,7 +39,6 @@ HEADERS += \ antCommon.h SOURCES += \ - antForceLink.cc \ antConfig.cc \ antObject.cc \ antPlugin.cc \ diff --git a/src/laybasic/laybasic/gsiDeclLayPixelBuffer.cc b/src/laybasic/laybasic/gsiDeclLayPixelBuffer.cc index 7019aee2c..c40fd39be 100644 --- a/src/laybasic/laybasic/gsiDeclLayPixelBuffer.cc +++ b/src/laybasic/laybasic/gsiDeclLayPixelBuffer.cc @@ -160,7 +160,7 @@ Class decl_PixelBuffer ("lay", "PixelBuffer", gsi::method ("fill", &lay::PixelBuffer::fill, gsi::arg ("color"), "@brief Fills the pixel buffer with the given pixel value\n" ) + -#if defined(HAVE_QT) +#if defined(HAVE_QT) && defined(HAVE_QTBINDINGS) gsi::method_ext ("fill", &fill_with_qcolor, gsi::arg ("color"), "@brief Fills the pixel buffer with the given QColor\n" ) + @@ -352,7 +352,7 @@ Class decl_BitmapBuffer ("lay", "BitmapBuffer", gsi::method ("fill", &lay::BitmapBuffer::fill, gsi::arg ("color"), "@brief Fills the pixel buffer with the given pixel value\n" ) + -#if defined(HAVE_QT) +#if defined(HAVE_QT) && defined(HAVE_QTBINDINGS) gsi::method_ext ("fill", &fill_with_qcolor, gsi::arg ("color"), "@brief Fills the pixel buffer with the given QColor\n" ) + diff --git a/src/laybasic/unit_tests/layLayoutViewTests.cc b/src/laybasic/unit_tests/layLayoutViewTests.cc index 5ce061274..1507d8cfd 100644 --- a/src/laybasic/unit_tests/layLayoutViewTests.cc +++ b/src/laybasic/unit_tests/layLayoutViewTests.cc @@ -260,7 +260,7 @@ TEST(13) } #endif -#if defined(HAVE_PNG) || defined(HAVE_QT) +#if defined(HAVE_PNG) && defined(HAVE_QT) TEST(21) { lay::LayoutView lv (0, false, 0); diff --git a/testdata/ruby/layLayoutView.rb b/testdata/ruby/layLayoutView.rb index 28c59f72a..456480a0d 100644 --- a/testdata/ruby/layLayoutView.rb +++ b/testdata/ruby/layLayoutView.rb @@ -425,6 +425,16 @@ class LAYLayoutView_TestClass < TestBase def test_4 + # check if PNG support is compiled in + # TODO: remove this once PNG support is available on all platforms + begin + RBA::PixelBuffer.read_png(File.join($ut_testsrc, "testdata/lay/au_lv1.png")) + rescue => ex + # PNG support missing + puts "WARNING: PNG support not compiled in - skipping test" + return + end + # standalone image generation (see C++ tests) lv = RBA::LayoutView::new lv.set_config("inst-color", "#000000")