void QOfonoMessageWaiting::propertyChanged(const QString &property, const QVariant &value)
{
    SUPER::propertyChanged(property, value);
    if (property == QLatin1String("VoicemailWaiting")) {
        Q_EMIT voicemailWaitingChanged(value.toBool());
    } else if (property == QLatin1String("VoicemailMessageCount")) {
        Q_EMIT voicemailMessageCountChanged(value.toInt());
    } else if (property == QLatin1String("VoicemailMailboxNumber")) {
        Q_EMIT voicemailMailboxNumberChanged(value.toString());
    }
}
Пример #2
0
void QOfonoMessageWaiting::updateProperty(const QString& property, const QVariant& value)
{
    QVariant old = d_ptr->properties.value(property);

    d_ptr->properties.insert(property,value);

    if (qofono::safeVariantEq(old, value))
        return;

    if (property == QLatin1String("VoicemailWaiting")) {
        Q_EMIT voicemailWaitingChanged(value.value<bool>());
    } else if (property == QLatin1String("VoicemailMessageCount")) {
        Q_EMIT voicemailMessageCountChanged(value.value<int>());
    } else if (property == QLatin1String("VoicemailMailboxNumber")) {
        Q_EMIT voicemailMailboxNumberChanged(value.value<QString>());
    }
}