forked from qt-creator/qt-creator
Workaround 5.15 deprecations in QTextStreams
Change-Id: Ifc2b7fd353e7c12346e9716115e830679cea7666 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user