From fa1b8442b8e6d01d0352a062a6aa8df6956f77f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Nowacki?= Date: Thu, 28 Feb 2019 14:06:47 +0100 Subject: [PATCH] Fix warnings when compiling with QT_NO_XMLSTREAM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of function arguments were unused. Change-Id: I29e8e4acbed87836044cac4f0b7ac59168181f5a Reviewed-by: Paul Olav Tvete Reviewed-by: MÃ¥rten Nordheim --- src/corelib/mimetypes/qmimeprovider.cpp | 1 + src/corelib/mimetypes/qmimetypeparser.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp index d5b8825972..5e1447aaa9 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -458,6 +458,7 @@ void QMimeBinaryProvider::addAllMimeTypes(QList &result) void QMimeBinaryProvider::loadMimeTypePrivate(QMimeTypePrivate &data) { #ifdef QT_NO_XMLSTREAMREADER + Q_UNUSED(data); qWarning("Cannot load mime type since QXmlStreamReader is not available."); return; #else diff --git a/src/corelib/mimetypes/qmimetypeparser.cpp b/src/corelib/mimetypes/qmimetypeparser.cpp index d10575cfe9..815e0aa03b 100644 --- a/src/corelib/mimetypes/qmimetypeparser.cpp +++ b/src/corelib/mimetypes/qmimetypeparser.cpp @@ -194,8 +194,9 @@ static CreateMagicMatchRuleResult createMagicMatchRule(const QXmlStreamAttribute bool QMimeTypeParserBase::parse(QIODevice *dev, const QString &fileName, QString *errorMessage) { #ifdef QT_NO_XMLSTREAMREADER + Q_UNUSED(dev); if (errorMessage) - *errorMessage = QString::fromLatin1("QXmlStreamReader is not available, cannot parse."); + *errorMessage = QString::fromLatin1("QXmlStreamReader is not available, cannot parse '%1'.").arg(fileName); return false; #else QMimeTypePrivate data;