From 7021b1f078cc9d10ea943b6fbca85b679b3376a0 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Fri, 17 Jan 2020 14:37:08 +0100 Subject: Workaround 5.15 deprecations in QTextStreams Change-Id: Ifc2b7fd353e7c12346e9716115e830679cea7666 Reviewed-by: hjk --- src/plugins/git/gerrit/gerritmodel.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/plugins/git/gerrit/gerritmodel.cpp') diff --git a/src/plugins/git/gerrit/gerritmodel.cpp b/src/plugins/git/gerrit/gerritmodel.cpp index c1bb78a854..a9be6358cc 100644 --- a/src/plugins/git/gerrit/gerritmodel.cpp +++ b/src/plugins/git/gerrit/gerritmodel.cpp @@ -55,8 +55,6 @@ enum { debug = 0 }; using namespace VcsBase; -using namespace Qt; - namespace Gerrit { namespace Internal { @@ -124,7 +122,10 @@ QString GerritPatchSet::approvalsToHtml() const str << a.reviewer.fullName; if (!a.reviewer.email.isEmpty()) str << " " << a.reviewer.email << ""; - str << ": " << forcesign << a.approval << noforcesign; + str << ": "; + if (a.approval >= 0) + str << '+'; + str << a.approval; } str << "\n"; return result; @@ -166,7 +167,10 @@ QString GerritPatchSet::approvalsColumn() const for (TypeReviewMapConstIterator it = reviews.constBegin(); it != cend; ++it) { if (!result.isEmpty()) str << ' '; - str << it.key() << ": " << forcesign << it.value() << noforcesign; + str << it.key() << ": "; + if (it.value() >= 0) + str << '+'; + str << it.value(); } return result; } -- cgit v1.2.1