forked from qt-creator/qt-creator
Debugger: Replace some uses of deprecated QVariant::type
Change-Id: I2225668b51d82e017cda305737f8c93fdaf97bd7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -776,7 +776,7 @@ void QmlEngine::assignValueInDebugger(WatchItem *item,
|
|||||||
const QString &expression, const QVariant &editValue)
|
const QString &expression, const QVariant &editValue)
|
||||||
{
|
{
|
||||||
if (!expression.isEmpty()) {
|
if (!expression.isEmpty()) {
|
||||||
QTC_CHECK(editValue.type() == QVariant::String);
|
QTC_CHECK(editValue.typeId() == QVariant::String);
|
||||||
QVariant value;
|
QVariant value;
|
||||||
QString val = editValue.toString();
|
QString val = editValue.toString();
|
||||||
if (item->type == "boolean")
|
if (item->type == "boolean")
|
||||||
@@ -855,7 +855,7 @@ static ConsoleItem *constructLogItemTree(const QVariant &result,
|
|||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
ConsoleItem *item = nullptr;
|
ConsoleItem *item = nullptr;
|
||||||
if (result.type() == QVariant::Map) {
|
if (result.typeId() == QVariant::Map) {
|
||||||
if (key.isEmpty())
|
if (key.isEmpty())
|
||||||
text = "Object";
|
text = "Object";
|
||||||
else
|
else
|
||||||
|
@@ -221,7 +221,7 @@ void QmlInspectorAgent::onResult(quint32 queryId, const QVariant &value,
|
|||||||
|
|
||||||
if (m_objectTreeQueryIds.contains(queryId)) {
|
if (m_objectTreeQueryIds.contains(queryId)) {
|
||||||
m_objectTreeQueryIds.removeOne(queryId);
|
m_objectTreeQueryIds.removeOne(queryId);
|
||||||
if (value.type() == QVariant::List) {
|
if (value.typeId() == QVariant::List) {
|
||||||
const QVariantList objList = value.toList();
|
const QVariantList objList = value.toList();
|
||||||
for (const QVariant &var : objList) {
|
for (const QVariant &var : objList) {
|
||||||
// TODO: check which among the list is the actual
|
// TODO: check which among the list is the actual
|
||||||
@@ -289,7 +289,7 @@ static void sortChildrenIfNecessary(WatchItem *propertiesWatch)
|
|||||||
|
|
||||||
static bool insertChildren(WatchItem *parent, const QVariant &value)
|
static bool insertChildren(WatchItem *parent, const QVariant &value)
|
||||||
{
|
{
|
||||||
switch (value.type()) {
|
switch (value.typeId()) {
|
||||||
case QVariant::Map: {
|
case QVariant::Map: {
|
||||||
const QVariantMap map = value.toMap();
|
const QVariantMap map = value.toMap();
|
||||||
for (auto it = map.begin(), end = map.end(); it != end; ++it) {
|
for (auto it = map.begin(), end = map.end(); it != end; ++it) {
|
||||||
|
Reference in New Issue
Block a user