The implicit conversion operators are deprecated.
Change-Id: I0e94c0671413da1ab58c6c7b8bb31614e2696409
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
switch (d->type) {
#ifndef QT_NO_SHORTCUT
case QVariant::KeySequence:
- *str = QString(*v_cast<QKeySequence>(d));
+ *str = (*v_cast<QKeySequence>(d)).toString(QKeySequence::NativeText);
return true;
#endif
case QVariant::Font:
#ifndef QT_NO_SHORTCUT
case QVariant::Int:
if (d->type == QVariant::KeySequence) {
- *static_cast<int *>(result) = (int)(*(v_cast<QKeySequence>(d)));
+ const QKeySequence &seq = *v_cast<QKeySequence>(d);
+ *static_cast<int *>(result) = seq.isEmpty() ? 0 : seq[0];
return true;
}
break;