wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.77k stars 1.7k forks source link

[wxQt] Make native wxGraphicsContext implementation available under non wxMSW too #24484

Closed AliKet closed 2 weeks ago

AliKet commented 4 weeks ago

@vadz I suspect that wxUSE_GRAPHICS_CONTEXT was set to 0 (and I don't know why if this is the case) when running the tests in CI. Notice that none of the tests defined here https://github.com/wxWidgets/wxWidgets/blob/ee309e078a2294d59c754b79c0407184e7558738/tests/graphics/clippingbox.cpp#L2240-L2242 has run ?

TIA for any hint!

AliKet commented 4 weeks ago

@dsa-t it would be great if you could test this PR and report any issues here before merging, TIA for your help on this!

AliKet commented 3 weeks ago

@vadz As I suspected wxUSE_GRAPHICS_CONTEXT is defined to 0 !! and I don't know why ? This temporary commit d4b413d proves it, see https://github.com/wxWidgets/wxWidgets/actions/runs/8741380641/job/23987274557?pr=24484

FYI everything works correctly for me locally without any special setup.

vadz commented 3 weeks ago

This is due to the following lines in configure output:

checking for CAIRO... no
configure: WARNING: wxGraphicsContext won't be available

Which is in turn due to this

https://github.com/wxWidgets/wxWidgets/blob/ee309e078a2294d59c754b79c0407184e7558738/configure.ac#L534-L536

If you just remove the test for Qt there, it should work, I think.

AliKet commented 3 weeks ago

This is due to the following lines in configure output:

checking for CAIRO... no
configure: WARNING: wxGraphicsContext won't be available

Which is in turn due to this

https://github.com/wxWidgets/wxWidgets/blob/ee309e078a2294d59c754b79c0407184e7558738/configure.ac#L534-L536

If you just remove the test for Qt there, it should work, I think.

Thanks a lot. I'll push the change and see how it goes...

AliKet commented 3 weeks ago

@vadz This is ready for review, TIA!