diff --git a/Configuration.cpp b/Configuration.cpp index 164615e0a..03400aea6 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1270,7 +1270,7 @@ void Configuration::impl::read_settings () macros_.setStringList (settings_->value ("Macros", QStringList {"TNX 73 GL"}).toStringList ()); - region_ = settings_->value ("Region", IARURegions::ALL).value (); + region_ = settings_->value ("Region", QVariant::fromValue (IARURegions::ALL)).value (); if (settings_->contains ("FrequenciesForRegionModes")) { @@ -1434,7 +1434,7 @@ void Configuration::impl::write_settings () settings_->setValue ("CalibrationSlopePPM", frequency_calibration_slope_ppm_); settings_->setValue ("pwrBandTxMemory", pwrBandTxMemory_); settings_->setValue ("pwrBandTuneMemory", pwrBandTuneMemory_); - settings_->setValue ("Region", region_); + settings_->setValue ("Region", QVariant::fromValue (region_)); } void Configuration::impl::set_rig_invariants () diff --git a/IARURegions.cpp b/IARURegions.cpp index e326029b8..051935247 100644 --- a/IARURegions.cpp +++ b/IARURegions.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #include "moc_IARURegions.cpp" diff --git a/IARURegions.hpp b/IARURegions.hpp index 00069acff..93291e081 100644 --- a/IARURegions.hpp +++ b/IARURegions.hpp @@ -66,7 +66,7 @@ public: // that can be streamed and queued as a signal argument as well as // showing the human readable string when output to debug streams. #if QT_VERSION < 0x050500 -// Qt 5.6 introduces the Q_ENUM macro which automatically registers +// Qt 5.5 introduces the Q_ENUM macro which automatically registers // the meta-type Q_DECLARE_METATYPE (IARURegions::Region); #endif diff --git a/MetaDataRegistry.cpp b/MetaDataRegistry.cpp index fdf64c8a4..8a3404dbb 100644 --- a/MetaDataRegistry.cpp +++ b/MetaDataRegistry.cpp @@ -12,6 +12,7 @@ #include "Transceiver.hpp" #include "TransceiverFactory.hpp" #include "WFPalette.hpp" +#include "IARURegions.hpp" #include "FrequencyLineEdit.hpp" @@ -79,4 +80,10 @@ void register_types () // Waterfall palette qRegisterMetaTypeStreamOperators ("Colours"); + + // IARURegions +#if QT_VERSION < 0x050500 + qRegisterMetaType ("IARURegions::Region"); +#endif + qRegisterMetaTypeStreamOperators ("IARURegions::Region"); } diff --git a/Modes.hpp b/Modes.hpp index 4c0831053..8504cda61 100644 --- a/Modes.hpp +++ b/Modes.hpp @@ -73,7 +73,7 @@ public: // be streamed and queued as a signal argument as well as showing the // human readable string when output to debug streams. #if QT_VERSION < 0x050500 -// Qt 5.6 introduces the Q_ENUM macro which automatically registers +// Qt 5.5 introduces the Q_ENUM macro which automatically registers // the meta-type Q_DECLARE_METATYPE (Modes::Mode); #endif