diff options
| author | Christoph Berg <myon@debian.org> | 2020-11-16 21:55:31 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2020-11-16 21:55:31 +0100 |
| commit | 62b7139bfe06fb6555de9a62ee3e62ccfd6e6cf1 (patch) | |
| tree | 3d9e4579a69060d2767ec2e9153b0ec60f78cb54 /models/DecodeHighlightingModel.cpp | |
| parent | 8bf7a33f24073bbed51789cb9aaf36ef9126e543 (diff) | |
| parent | 77922fa33547ce24535f2e514c9a112dcb496f18 (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/DecodeHighlightingModel.cpp')
| -rw-r--r-- | models/DecodeHighlightingModel.cpp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/models/DecodeHighlightingModel.cpp b/models/DecodeHighlightingModel.cpp index d6c7a028..01b039e6 100644 --- a/models/DecodeHighlightingModel.cpp +++ b/models/DecodeHighlightingModel.cpp @@ -5,9 +5,10 @@ #include <QList> #include <QBrush> #include <QColor> - #include <QFont> +#include <QFont> #include <QMap> #include <QVector> +#include <QTextStream> #include <QDataStream> #include <QMetaType> #include <QDebug> @@ -72,16 +73,23 @@ QDataStream& operator >> (QDataStream& is, DecodeHighlightingModel::HighlightInf >> item.background_; } +QString DecodeHighlightingModel::HighlightInfo::toString () const +{ + QString string; + QTextStream ots {&string}; + ots << "HighlightInfo(" + << highlight_name (type_) << ", " + << enabled_ << ", " + << foreground_.color ().name () << ", " + << background_.color ().name () << ')'; + return string; +} + #if !defined (QT_NO_DEBUG_STREAM) QDebug operator << (QDebug debug, DecodeHighlightingModel::HighlightInfo const& item) { QDebugStateSaver save {debug}; - debug.nospace () << "HighlightInfo(" - << item.type_ << ", " - << item.enabled_ << ", " - << item.foreground_ << ", " - << item.background_ << ')'; - return debug; + return debug.nospace () << item.toString (); } #endif |
