diff options
author | David Schulz <david.schulz@qt.io> | 2020-01-17 14:37:08 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2020-01-17 13:50:57 +0000 |
commit | 7021b1f078cc9d10ea943b6fbca85b679b3376a0 (patch) | |
tree | 5082ee42f35868b858823e4ea290780789256b5f /src/plugins/git/gerrit | |
parent | 37e7b72609e57331dad8de22989e5672ae6f45ea (diff) |
Workaround 5.15 deprecations in QTextStreams
Change-Id: Ifc2b7fd353e7c12346e9716115e830679cea7666
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/git/gerrit')
-rw-r--r-- | src/plugins/git/gerrit/authenticationdialog.cpp | 6 | ||||
-rw-r--r-- | src/plugins/git/gerrit/gerritmodel.cpp | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/plugins/git/gerrit/authenticationdialog.cpp b/src/plugins/git/gerrit/authenticationdialog.cpp index bb9d267ca7d..ba0516df594 100644 --- a/src/plugins/git/gerrit/authenticationdialog.cpp +++ b/src/plugins/git/gerrit/authenticationdialog.cpp @@ -39,8 +39,6 @@ #include <QTextStream> #include <QTimer> -using namespace Qt; - namespace Gerrit { namespace Internal { @@ -152,10 +150,10 @@ bool AuthenticationDialog::setupCredentials() replaceEntry(line, "login", user); replaceEntry(line, "password", password); } - out << line << endl; + out << line << '\n'; } if (!found) - out << "machine " << m_server->host << " login " << user << " password " << password << endl; + out << "machine " << m_server->host << " login " << user << " password " << password << '\n'; Utils::FileSaver saver(m_netrcFileName, QFile::WriteOnly | QFile::Truncate | QFile::Text); saver.write(netrcContents.toUtf8()); return saver.finalize(); diff --git a/src/plugins/git/gerrit/gerritmodel.cpp b/src/plugins/git/gerrit/gerritmodel.cpp index c1bb78a854d..a9be6358ccb 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 href=\"mailto:" << a.reviewer.email << "\">" << a.reviewer.email << "</a>"; - str << ": " << forcesign << a.approval << noforcesign; + str << ": "; + if (a.approval >= 0) + str << '+'; + str << a.approval; } str << "</tr>\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; } |