mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-11 02:09:03 -04:00
Conversions to QString for user-defined Qt types
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include <QVector>
|
||||
#include <QStringList>
|
||||
#include <QMimeData>
|
||||
#include <QTextSTream>
|
||||
#include <QDataStream>
|
||||
#include <QByteArray>
|
||||
#include <QDebugStateSaver>
|
||||
@@ -347,14 +348,21 @@ namespace
|
||||
QDebug operator << (QDebug debug, FrequencyList_v2::Item const& item)
|
||||
{
|
||||
QDebugStateSaver saver {debug};
|
||||
debug.nospace () << "FrequencyItem("
|
||||
<< item.frequency_ << ", "
|
||||
<< item.region_ << ", "
|
||||
<< item.mode_ << ')';
|
||||
return debug;
|
||||
return debug.nospace () << item.toString ();
|
||||
}
|
||||
#endif
|
||||
|
||||
QString FrequencyList_v2::Item::toString () const
|
||||
{
|
||||
QString string;
|
||||
QTextStream qts {&string};
|
||||
qts << "FrequencyItem("
|
||||
<< Radio::frequency_MHz_string (frequency_) << ", "
|
||||
<< IARURegions::name (region_) << ", "
|
||||
<< Modes::name (mode_) << ')';
|
||||
return string;
|
||||
}
|
||||
|
||||
QDataStream& operator << (QDataStream& os, FrequencyList_v2::Item const& item)
|
||||
{
|
||||
return os << item.frequency_
|
||||
|
||||
Reference in New Issue
Block a user