Port QTEXTSTREAM_DEBUG to modern QFlags
Its code was just casting to int, which no longer compiles. Call toInt() on the fiag first. Pick-to: 6.8 6.5 Change-Id: I74971f37841b44879cffdb480a173561798f8fa7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a9e2f5d0dc93bbc171b9c0d014f7b00c9e87a8f7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
7a8baa2583
commit
dc3659f70f
@ -928,7 +928,7 @@ QTextStream::QTextStream(QString *string, OpenMode openMode)
|
||||
{
|
||||
#if defined (QTEXTSTREAM_DEBUG)
|
||||
qDebug("QTextStream::QTextStream(QString *string == *%p, openMode = %d)",
|
||||
string, int(openMode));
|
||||
string, int(openMode.toInt()));
|
||||
#endif
|
||||
Q_D(QTextStream);
|
||||
d->string = string;
|
||||
@ -946,7 +946,7 @@ QTextStream::QTextStream(QByteArray *array, OpenMode openMode)
|
||||
{
|
||||
#if defined (QTEXTSTREAM_DEBUG)
|
||||
qDebug("QTextStream::QTextStream(QByteArray *array == *%p, openMode = %d)",
|
||||
array, int(openMode));
|
||||
array, int(openMode.toInt()));
|
||||
#endif
|
||||
Q_D(QTextStream);
|
||||
d->device = new QBuffer(array);
|
||||
@ -973,7 +973,7 @@ QTextStream::QTextStream(const QByteArray &array, OpenMode openMode)
|
||||
{
|
||||
#if defined (QTEXTSTREAM_DEBUG)
|
||||
qDebug("QTextStream::QTextStream(const QByteArray &array == *(%p), openMode = %d)",
|
||||
&array, int(openMode));
|
||||
&array, int(openMode.toInt()));
|
||||
#endif
|
||||
QBuffer *buffer = new QBuffer;
|
||||
buffer->setData(array);
|
||||
@ -1004,7 +1004,7 @@ QTextStream::QTextStream(FILE *fileHandle, OpenMode openMode)
|
||||
{
|
||||
#if defined (QTEXTSTREAM_DEBUG)
|
||||
qDebug("QTextStream::QTextStream(FILE *fileHandle = %p, openMode = %d)",
|
||||
fileHandle, int(openMode));
|
||||
fileHandle, int(openMode.toInt()));
|
||||
#endif
|
||||
QFile *file = new QFile;
|
||||
// Discarding the return value of open; even if it failed
|
||||
|
Loading…
x
Reference in New Issue
Block a user