aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmllocalstorage
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-21 11:09:03 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-01-21 12:59:10 +0100
commit2fdf354c66cb650605e0349ebf1228f3aa43dacc (patch)
tree5c2d9802fa4d8577f513f608ea4f6f65def7d34f /src/qmllocalstorage
parenteb5bb9e7f547a7e222b5dbb848774639ab11f243 (diff)
Silence warnings about deprecated QString::QString(const char*)
Fix warnings like: src/qmllocalstorage/qqmllocalstorage.cpp:81:62: warning: QString::QString(const char*) is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] src/src/labs/settings/qqmlsettings.cpp:335:87: warning: QString::QString(const char*) is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] src/labs/settings/qqmlsettings.cpp:346:50: warning: QString::QString(const char*) is deprecated: Use fromUtf8, QStringLiteral, or n1String [-Wdeprecated-declarations] src/labs/settings/qqmlsettings.cpp:361:50: warning: QString::QString(const char*) is deprecated: Use fromUtf8, QStringLiteral, or n1String [-Wdeprecated-declarations] src/quicklayouts/qquicklayout.cpp:1241:61: warning: QString::QString(const char*) is deprecated: Use fromUtf8, QStringLiteral, or QLatin1String [-Wdeprecated-declarations] Change-Id: I87d7e28842a4f7f75b02c1e78eb3df400adcab94 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmllocalstorage')
-rw-r--r--src/qmllocalstorage/qqmllocalstorage.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qmllocalstorage/qqmllocalstorage.cpp b/src/qmllocalstorage/qqmllocalstorage.cpp
index 56b48189ba..8ab7c75ef7 100644
--- a/src/qmllocalstorage/qqmllocalstorage.cpp
+++ b/src/qmllocalstorage/qqmllocalstorage.cpp
@@ -78,7 +78,7 @@ QT_BEGIN_NAMESPACE
}
#define V4THROW_REFERENCE(string) { \
- QV4::ScopedString v(scope, scope.engine->newString(string)); \
+ QV4::ScopedString v(scope, scope.engine->newString(QLatin1String(string))); \
scope.engine->throwReferenceError(v); \
RETURN_UNDEFINED(); \
}
@@ -335,9 +335,12 @@ static ReturnedValue qmlsqldatabase_executeSql(const FunctionObject *b, const Va
// XXX optimize
ScopedString s(scope);
ScopedValue v(scope);
- resultObject->put((s = scope.engine->newIdentifier("rowsAffected")).getPointer(), (v = Value::fromInt32(query.numRowsAffected())));
- resultObject->put((s = scope.engine->newIdentifier("insertId")).getPointer(), (v = scope.engine->newString(query.lastInsertId().toString())));
- resultObject->put((s = scope.engine->newIdentifier("rows")).getPointer(), rows);
+ resultObject->put((s = scope.engine->newIdentifier(QLatin1String("rowsAffected"))).getPointer(),
+ (v = Value::fromInt32(query.numRowsAffected())));
+ resultObject->put((s = scope.engine->newIdentifier(QLatin1String("insertId"))).getPointer(),
+ (v = scope.engine->newString(query.lastInsertId().toString())));
+ resultObject->put((s = scope.engine->newIdentifier(QLatin1String("rows"))).getPointer(),
+ rows);
} else {
err = true;
}