Commit 68f0a243 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Make it compiles against qt5.15 (endl other other use Qt:: namespace now)

parent 7a824493
......@@ -364,7 +364,18 @@ bool KTNEFParser::ParserPrivate::decodeAttachment()
default:
value = readTNEFAttribute(stream_, type, i);
qCDebug(KTNEF_LOG) << "Attachment unknown field: tag="
<< hex << tag << ", length=" << dec << i;
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< tag << ", length="
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< dec
#else
<< Qt::dec
#endif
<< i;
break;
}
stream_ >> u; // u <- checksum
......@@ -407,7 +418,12 @@ bool KTNEFParser::ParserPrivate::parseDevice()
if (i == TNEF_SIGNATURE) {
stream_ >> u;
qCDebug(KTNEF_LOG).nospace() << "Attachment cross reference key: 0x"
<< hex << qSetFieldWidth(4) << qSetPadChar(QLatin1Char('0')) << u;
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< qSetFieldWidth(4) << qSetPadChar(QLatin1Char('0')) << u;
//qCDebug(KTNEF_LOG) << "stream:" << device_->pos();
while (!stream_.atEnd()) {
stream_ >> c;
......@@ -627,7 +643,12 @@ QDateTime formatTime(quint32 lowB, quint32 highB)
dt = QDateTime::fromSecsSinceEpoch((unsigned int)u64);
} else {
qCWarning(KTNEF_LOG).nospace() << "Invalid date: low byte="
<< showbase << qSetFieldWidth(8) << qSetPadChar(QLatin1Char('0'))
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< showbase
#else
<< Qt::showbase
#endif
<< qSetFieldWidth(8) << qSetPadChar(QLatin1Char('0'))
<< lowB << ", high byte=" << highB;
}
return dt;
......@@ -888,7 +909,12 @@ bool KTNEFParser::ParserPrivate::readMAPIProperties(QMap<int, KTNEFProperty *> &
readMAPIValue(stream_, mapi);
if (mapi.type == MAPI_TYPE_NONE) {
qCDebug(KTNEF_LOG).nospace() << "MAPI unsupported: tag="
<< hex << mapi.tag << ", type=" << mapi.type;
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag << ", type=" << mapi.type;
clearMAPIValue(mapi);
return false;
}
......@@ -936,39 +962,81 @@ bool KTNEFParser::ParserPrivate::readMAPIProperties(QMap<int, KTNEFProperty *> &
switch (mapi.type & 0x0FFF) {
case MAPI_TYPE_UINT16:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI short" << mapiname.toLatin1().data()
<< ":" << hex << mapi.value.toUInt();
<< ":"
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.value.toUInt();
break;
case MAPI_TYPE_ULONG:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI long" << mapiname.toLatin1().data()
<< ":" << hex << mapi.value.toUInt();
<< ":"
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.value.toUInt();
break;
case MAPI_TYPE_BOOLEAN:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI boolean" << mapiname.toLatin1().data()
<< ":" << mapi.value.toBool();
break;
case MAPI_TYPE_TIME:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI time" << mapiname.toLatin1().data()
<< ":" << mapi.value.toString().toLatin1().data();
break;
case MAPI_TYPE_USTRING:
case MAPI_TYPE_STRING8:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI string" << mapiname.toLatin1().data()
<< ":size=" << mapi.value.toByteArray().size()
<< mapi.value.toString();
break;
case MAPI_TYPE_BINARY:
qCDebug(KTNEF_LOG).nospace() << "(tag="
<< hex << mapi.tag
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
<< hex
#else
<< Qt::hex
#endif
<< mapi.tag
<< ") MAPI binary" << mapiname.toLatin1().data()
<< ":size=" << mapi.value.toByteArray().size();
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment