Workaround 5.15 deprecations in QTextStreams

Change-Id: Ifc2b7fd353e7c12346e9716115e830679cea7666
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2020-01-17 14:37:08 +01:00
committed by hjk
parent 37e7b72609
commit 7021b1f078
9 changed files with 55 additions and 56 deletions

View File

@@ -42,13 +42,18 @@
#include <utils/qtcassert.h>
using namespace Qt;
// Read and write rectangle in X11 resource syntax "12x12+4+3"
static QString rectangleToString(const QRect &r)
{
QString result;
QTextStream(&result) << r.width() << 'x' << r.height() << forcesign << r.x() << r.y();
QTextStream str(&result);
str << r.width() << 'x' << r.height() << r.x() << r.y();
if (r.x() >= 0)
str << '+';
str << r.x();
if (r.y() >= 0)
str << '+';
str << r.y();
return result;
}