aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/debugger/watchhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/debugger/watchhandler.cpp')
-rw-r--r--src/plugins/debugger/watchhandler.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 3f47df4b887..0fd0d535f6c 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -844,33 +844,33 @@ static inline quint64 pointerValue(QString data)
}
// Return the type used for editing
-int WatchItem::editType() const
+QMetaType::Type WatchItem::editType() const
{
if (type == "bool")
- return QVariant::Bool;
+ return QMetaType::Bool;
if (isIntType(type))
- return type.contains('u') ? QVariant::ULongLong : QVariant::LongLong;
+ return type.contains('u') ? QMetaType::ULongLong : QMetaType::LongLong;
if (isFloatType(type))
- return QVariant::Double;
+ return QMetaType::Double;
// Check for pointers using hex values (0xAD00 "Hallo")
if (isPointerType(type) && value.startsWith("0x"))
- return QVariant::ULongLong;
- return QVariant::String;
+ return QMetaType::ULongLong;
+ return QMetaType::QString;
}
// Convert to editable (see above)
QVariant WatchItem::editValue() const
{
switch (editType()) {
- case QVariant::Bool:
+ case QMetaType::Bool:
return value != "0" && value != "false";
- case QVariant::ULongLong:
+ case QMetaType::ULongLong:
if (isPointerType(type)) // Fix pointer values (0xAD00 "Hallo" -> 0xAD00)
return QVariant(pointerValue(value));
return QVariant(value.toULongLong());
- case QVariant::LongLong:
+ case QMetaType::LongLong:
return QVariant(value.toLongLong());
- case QVariant::Double:
+ case QMetaType::Double:
return QVariant(value.toDouble());
default:
break;
@@ -2888,8 +2888,8 @@ public:
// Value column: Custom editor. Apply integer-specific settings.
if (index.column() == 1) {
- auto editType = QVariant::Type(item->editType());
- if (editType == QVariant::Bool)
+ const QMetaType::Type editType = item->editType();
+ if (editType == QMetaType::Bool)
return new BooleanComboBox(parent);
WatchLineEdit *edit = WatchLineEdit::create(editType, parent);