diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-16 13:08:40 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-02-23 19:49:00 +0000 |
commit | cb0243d5078dcd9cebb2ce89621e4912ff57cebf (patch) | |
tree | 2a1dab22261f7df0fea54f57228e79d27044ca50 /src | |
parent | 4d417c7fbf8b9e00e260951e29cba16072272cc5 (diff) |
Fix deprecation warnings about constructing QString from const char*.
types/qqmlmodelindexvaluetype.cpp: In static member function 'static QString QQmlModelIndexValueType::propertiesString(const QModelIndex&)':
types/qqmlmodelindexvaluetype.cpp:47:56: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp: In member function 'virtual void QQuickImageBase::load()':
items/qquickimagebase.cpp:213:49: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
items/qquickimagebase.cpp:213:88: warning: 'QString::QString(const char*)' is deprecated (declared at qstring.h:649) [-Wdeprecated-declarations]
Change-Id: I03266aba589ade8228bc286cd3f3f237cd06a780
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/types/qqmlmodelindexvaluetype.cpp | 2 | ||||
-rw-r--r-- | src/quick/items/qquickimagebase.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/types/qqmlmodelindexvaluetype.cpp b/src/qml/types/qqmlmodelindexvaluetype.cpp index 03ae05b4b5..a8900c686b 100644 --- a/src/qml/types/qqmlmodelindexvaluetype.cpp +++ b/src/qml/types/qqmlmodelindexvaluetype.cpp @@ -44,7 +44,7 @@ QString QQmlModelIndexValueType::propertiesString(const QModelIndex &idx) return QLatin1String("()"); return QString(QLatin1String("(%1,%2,0x%3,%4(0x%5))")) .arg(idx.row()).arg(idx.column()).arg(idx.internalId(), 0, 16) - .arg(idx.model()->metaObject()->className()).arg(quintptr(idx.model()), 0, 16); + .arg(QLatin1String(idx.model()->metaObject()->className())).arg(quintptr(idx.model()), 0, 16); } /*! diff --git a/src/quick/items/qquickimagebase.cpp b/src/quick/items/qquickimagebase.cpp index 688cf57441..951532e8b9 100644 --- a/src/quick/items/qquickimagebase.cpp +++ b/src/quick/items/qquickimagebase.cpp @@ -210,7 +210,8 @@ void QQuickImageBase::load() QUrl loadUrl = d->url; if (d->url.scheme() == QStringLiteral("image") - || d->url.toString().endsWith(".svg") || d->url.toString().endsWith(".svgz")) { + || d->url.toString().endsWith(QLatin1String(".svg")) + || d->url.toString().endsWith(QLatin1String(".svgz"))) { // QQuickImageProvider and SVG can generate a high resolution image when // sourceSize is set. If sourceSize is not set then the provider default size // will be used, as usual. |