[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Require Qt5 for the upcoming 6.1 release?
From: |
John W. Eaton |
Subject: |
Require Qt5 for the upcoming 6.1 release? |
Date: |
Fri, 1 Nov 2019 16:01:49 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
I just wasted WAY more time than I would like to admit debugging a
signal/slot connection because of a stupid ONE-CHARACTER TYPO. Instead of
connect (p, SIGNAL (settings_changed (const gui_settings *)),
this, SLOT (handle_settings (const gui_settings *)));
I wrote
connect (p, SIGNAL (settings_changed (const gui_ettings *)),
this, SLOT (handle_settings (const gui_settings *)));
It seems obvious now, but of course there was no warning and I simply
could not spot the error among all the other changes I had made. Gah.
Can we just please give up on Qt4 already and start using Qt5-style
signal/slot connections that would catch this kind of error at compile time?
We discussed dropping support for Qt4 back in March and June of this
year. I think most of us agreed that it was a good idea but we haven't
followed through.
If we agree that this is the right move for 6.1, then I'm willing to do
most or all of the work to fix the configure script and start updating
the sources immediately. If we delay, I think we will have to wait
until after the 6.1 release as this is a fairly big change so deserves
sufficient time for testing.
As a compromise that would allow us to move to the Qt5 way of making
signal/slot connections while still supporting Qt4, I'd be willing to
use a macro like
OCTAVE_CONNECT (sender_object, sender_class, signal_name, signal_args,
receiver_object, receiver_class, slot_name, slot_args);
if it is possible. This macro would expand to
connect (sender_object, SIGNAL (signal_name signal_args),
receiver_object, SLOT (slot_name slot_args));
for Qt4 and
connect (sender_object, &sender_class::signal_name,
receiver_object, &receiver_class:slot_name);
for Qt5. But I don't know whether something like this will work
properly with the moc thing.
jwe
- Require Qt5 for the upcoming 6.1 release?,
John W. Eaton <=