Fix warnings when compiling with QT_NO_XMLSTREAM

Some of function arguments were unused.

Change-Id: I29e8e4acbed87836044cac4f0b7ac59168181f5a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Jędrzej Nowacki 2019-02-28 14:06:47 +01:00
parent eea3947842
commit fa1b8442b8
2 changed files with 3 additions and 1 deletions

View File

@ -458,6 +458,7 @@ void QMimeBinaryProvider::addAllMimeTypes(QList<QMimeType> &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

View File

@ -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;