Ensure enum types used a signal arguments are registered with Qt fully qualified

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6586 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-04-06 17:11:27 +00:00
parent 53308a941b
commit 64eb0dea03
1 changed files with 4 additions and 2 deletions

View File

@ -23,6 +23,10 @@ QItemEditorFactory * item_editor_factory ()
void register_types ()
{
// we still have to register the fully qualified names of enum types
// used as signal/slot connection arguments since the new Qt 5.5
// Q_ENUM macro only seems to register the unqualified name
// Radio namespace
auto frequency_type_id = qRegisterMetaType<Radio::Frequency> ("Frequency");
qRegisterMetaType<Radio::Frequencies> ("Frequencies");
@ -61,9 +65,7 @@ void register_types ()
// Transceiver
qRegisterMetaType<Transceiver::TransceiverState> ("Transceiver::TransceiverState");
#if QT_VERSION < 0x050500
qRegisterMetaType<Transceiver::MODE> ("Transceiver::MODE");
#endif
// Transceiver factory
#if QT_VERSION < 0x050500