summaryrefslogtreecommitdiff
path: root/models/StationList.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/StationList.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/StationList.cpp')
-rw-r--r--models/StationList.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/models/StationList.cpp b/models/StationList.cpp
index 202cac0e..ff8d153f 100644
--- a/models/StationList.cpp
+++ b/models/StationList.cpp
@@ -13,6 +13,7 @@
#include <QMimeData>
#include <QDataStream>
#include <QByteArray>
+#include <QTextStream>
#include <QDebug>
#include <QDebugStateSaver>
@@ -26,14 +27,21 @@
QDebug operator << (QDebug debug, StationList::Station const& station)
{
QDebugStateSaver saver {debug};
- debug.nospace () << "Station("
- << station.band_name_ << ", "
- << station.offset_ << ", "
- << station.antenna_description_ << ')';
- return debug;
+ return debug.nospace () << station.toString ();
}
#endif
+QString StationList::Station::toString () const
+{
+ QString string;
+ QTextStream ots {&string};
+ ots << "Station("
+ << band_name_ << ", "
+ << Radio::frequency_MHz_string (offset_) << ", "
+ << antenna_description_ << ')';
+ return string;
+}
+
QDataStream& operator << (QDataStream& os, StationList::Station const& station)
{
return os << station.band_name_