forked from qt-creator/qt-creator
Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15 Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -372,7 +372,7 @@ void ObjectNodeInstance::reparent(const ObjectNodeInstance::Pointer &oldParentIn
|
||||
QVariant ObjectNodeInstance::convertSpecialCharacter(const QVariant& value) const
|
||||
{
|
||||
QVariant specialCharacterConvertedValue = value;
|
||||
if (value.typeId() == QVariant::String) {
|
||||
if (value.typeId() == QMetaType::QString) {
|
||||
QString string = value.toString();
|
||||
string.replace(QLatin1String("\\n"), QLatin1String("\n"));
|
||||
string.replace(QLatin1String("\\t"), QLatin1String("\t"));
|
||||
|
||||
@@ -604,7 +604,7 @@ static QString qmlDesignerRCPath()
|
||||
|
||||
QVariant fixResourcePaths(const QVariant &value)
|
||||
{
|
||||
if (value.typeId() == QVariant::Url) {
|
||||
if (value.typeId() == QMetaType::QUrl) {
|
||||
const QUrl url = value.toUrl();
|
||||
if (url.scheme() == QLatin1String("qrc")) {
|
||||
const QString path = QLatin1String("qrc:") + url.path();
|
||||
@@ -625,7 +625,7 @@ QVariant fixResourcePaths(const QVariant &value)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (value.typeId() == QVariant::String) {
|
||||
if (value.typeId() == QMetaType::QString) {
|
||||
const QString str = value.toString();
|
||||
if (str.contains(QLatin1String("qrc:"))) {
|
||||
if (!qmlDesignerRCPath().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user