From 57295fb967cd7d50a1e4113edf995b9592d1576f Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 14 Sep 2010 10:55:20 +0200 Subject: Fix compile warnings. Reviewed-by: Thomas Hartmann --- src/declarative/qml/qdeclarativeobjectscriptclass.cpp | 2 +- src/declarative/qml/qdeclarativescriptparser.cpp | 2 +- src/declarative/qml/qdeclarativexmlhttprequest.cpp | 4 ++-- src/gui/kernel/qaction.cpp | 3 ++- src/network/access/qnetworkreplyimpl.cpp | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 9d74238..ab6ff74 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -843,7 +843,7 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass:: for (int ii = 0; ii < argTypeNames.count(); ++ii) { argTypes[ii] = QMetaType::type(argTypeNames.at(ii)); if (argTypes[ii] == QVariant::Invalid) - argTypes[ii] = enumType(method->object->metaObject(), argTypeNames.at(ii)); + argTypes[ii] = enumType(method->object->metaObject(), QString::fromLatin1(argTypeNames.at(ii))); if (argTypes[ii] == QVariant::Invalid) return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii))))); } diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index c956051..57cc9ab 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -895,7 +895,7 @@ QList QDeclarativeScriptParser::errors() const static void replaceWithSpace(QString &str, int idx, int n) { QChar *data = str.data() + idx; - QChar space(' '); + const QChar space(QLatin1Char(' ')); for (int ii = 0; ii < n; ++ii) *data++ = space; } diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index d832638..332acc4 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -1640,8 +1640,8 @@ static QScriptValue qmlxmlhttprequest_responseXML(QScriptContext *context, QScri THROW_REFERENCE("Not an XMLHttpRequest object"); if (!request->receivedXml() || - request->readyState() != QDeclarativeXMLHttpRequest::Loading && - request->readyState() != QDeclarativeXMLHttpRequest::Done) + (request->readyState() != QDeclarativeXMLHttpRequest::Loading && + request->readyState() != QDeclarativeXMLHttpRequest::Done)) return engine->nullValue(); else return Document::load(engine, request->rawResponseBody()); diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index a6d2594..f7e0751 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -82,8 +82,9 @@ static QString qt_strippedText(QString s) QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0), visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false), forceEnabledInSoftkeys(false), menuActionSoftkeys(false), + iconVisibleInMenu(-1), menuRole(QAction::TextHeuristicRole), softKeyRole(QAction::NoSoftKey), - priority(QAction::NormalPriority), iconVisibleInMenu(-1) + priority(QAction::NormalPriority) { #ifdef QT3_SUPPORT static int qt_static_action_id = -1; diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 31ee2a4..5850494 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -588,6 +588,7 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data) void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) { + Q_UNUSED(data) // TODO implement // TODO call -- cgit v0.12