--runtime warnings
This commit is contained in:
parent
e008a5d7d4
commit
054a38b9d0
@ -127,11 +127,15 @@ void TimeTracker::propertyChanged()
|
||||
QMetaProperty prop = mo->property(i);
|
||||
if (prop.notifySignalIndex() == senderSignalIndex()) {
|
||||
QString val;
|
||||
if (prop.type() < QVariant::UserType) {
|
||||
QVariant var = prop.read(parent());
|
||||
if(var.canConvert<QString>()) {
|
||||
val = var.toString();
|
||||
} else {
|
||||
val = QString("<unknown %1>").arg(var.typeName());
|
||||
}
|
||||
}
|
||||
|
||||
if (val.isEmpty()) {
|
||||
val = QString("<unknown %1>").arg(prop.typeName());
|
||||
}
|
||||
m_history.events.append(TimeEvent { QDateTime::currentDateTime(), QString("property %1 changed to %2").arg(prop.name()).arg(val)});
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user