summaryrefslogtreecommitdiff
path: root/models/FrequencyList.cpp
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-11-16 21:55:31 +0100
committerChristoph Berg <myon@debian.org>2020-11-16 21:55:31 +0100
commit62b7139bfe06fb6555de9a62ee3e62ccfd6e6cf1 (patch)
tree3d9e4579a69060d2767ec2e9153b0ec60f78cb54 /models/FrequencyList.cpp
parent8bf7a33f24073bbed51789cb9aaf36ef9126e543 (diff)
parent77922fa33547ce24535f2e514c9a112dcb496f18 (diff)
Update upstream source from tag 'upstream/2.3.0_rc2+repack'
Update to upstream version '2.3.0~rc2+repack' with Debian dir c40ed5d87e465612e7c15c7b67791946a5dcf64c
Diffstat (limited to 'models/FrequencyList.cpp')
-rw-r--r--models/FrequencyList.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/models/FrequencyList.cpp b/models/FrequencyList.cpp
index 7523b20a..3c4a4301 100644
--- a/models/FrequencyList.cpp
+++ b/models/FrequencyList.cpp
@@ -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_