summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2021-07-28 20:42:13 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-07-31 15:01:23 +0000
commitccb0792a243710d5cbdf7d4d4f597051826b45a6 (patch)
tree86f929a66d259e05a1a6dbcdc69bb64140021e43 /src
parent5f7b48fd0fcc47267ad8ca5d96636fb4cf1c21dd (diff)
QIODevice: fix converting OpenMode flag in debug output
Suppress error: src\corelib\io\qiodevice.cpp(791): error C2440: '<function-style-cast>': cannot convert from 'QIODeviceBase::OpenMode' to 'quint32' Change-Id: I6b6e94790942d3af62bc2f38afad97c0b3c80817 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> (cherry picked from commit 6e3897b9fa0e03c8fbb1e97341fd4109c5a31658) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/io/qiodevice.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index d07897141c..b0ac088da9 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -543,7 +543,7 @@ void QIODevice::setOpenMode(QIODeviceBase::OpenMode openMode)
{
Q_D(QIODevice);
#if defined QIODEVICE_DEBUG
- printf("%p QIODevice::setOpenMode(0x%x)\n", this, int(openMode));
+ printf("%p QIODevice::setOpenMode(0x%x)\n", this, openMode.toInt());
#endif
d->openMode = openMode;
d->accessMode = QIODevicePrivate::Unset;
@@ -788,7 +788,7 @@ bool QIODevice::open(QIODeviceBase::OpenMode mode)
d->setWriteChannelCount(isWritable() ? 1 : 0);
d->errorString.clear();
#if defined QIODEVICE_DEBUG
- printf("%p QIODevice::open(0x%x)\n", this, quint32(mode));
+ printf("%p QIODevice::open(0x%x)\n", this, mode.toInt());
#endif
return true;
}
@@ -937,7 +937,7 @@ bool QIODevice::atEnd() const
&& bytesAvailable() == 0));
#if defined QIODEVICE_DEBUG
printf("%p QIODevice::atEnd() returns %s, d->openMode == %d, d->pos == %lld\n", this,
- result ? "true" : "false", int(d->openMode), d->pos);
+ result ? "true" : "false", d->openMode.toInt(), d->pos);
#endif
return result;
}