From 77922fa33547ce24535f2e514c9a112dcb496f18 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Mon, 16 Nov 2020 21:54:50 +0100 Subject: New upstream version 2.3.0~rc2+repack --- models/DecodeHighlightingModel.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'models/DecodeHighlightingModel.cpp') 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 #include #include - #include +#include #include #include +#include #include #include #include @@ -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 -- cgit v1.2.3