On Mon, May 17, 2021 at 6:31 PM Félix <[email protected]> wrote:

> Thank you - but oh no! -> the bug still remains !


Oops. I have just created #1946
<https://github.com/leo-editor/leo-editor/issues/1946>: Ensure that Qt
plugins call g.assertUI('qt').

I expect to complete work on this issue later today.

The recent bug happens because I mistakenly removed the call to
g.assertUi('qt'). This call raises g.UiTypeException if g.app.gui is not
the Qt gui.  The plugins manager catches this exception.

Imo, it's better to use g.assertUI than to create top-level if statements
that guard class definitions.

There will be two parts to the fix:

1. Call g.assertUI('qt') in all "real" Qt plugins, as follows:

#
# Fail fast, right after all imports.
g.assertUi('qt')  # May raise g.UiTypeException, caught by the plugins
manager.

2. Write a unit test that ensures that all qt plugins raise UiTypeException
when using a Null gui.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0eVHk_7WrOf%3D0BtApBZeN80YoiRJFX-701rWbRYKN2Pw%40mail.gmail.com.

Reply via email to