diff --git a/src/contactmethod.cpp b/src/contactmethod.cpp index 2af2812afa766981739f5f18f074f13a2d6584f0..b21f3febfc30798ba8271f14c0c4f20fba6006be 100644 --- a/src/contactmethod.cpp +++ b/src/contactmethod.cpp @@ -494,6 +494,8 @@ QVariant ContactMethod::roleData(int role) const case static_cast<int>(Call::Role::FormattedDate): cat = !lastCall ? QVariant() : HistoryTimeCategoryModel::timeToHistoryCategory(lastCall->startTimeStamp()); break; + case static_cast<int>(Ring::Role::IndexedLastUsed): + return QVariant(static_cast<int>(HistoryTimeCategoryModel::timeToHistoryConst(lastCall->startTimeStamp()))); case static_cast<int>(Call::Role::HasAVRecording): cat = cat = !lastCall ? QVariant() : lastCall->isAVRecording(); break; diff --git a/src/itemdataroles.h b/src/itemdataroles.h index 2c9334e6310ef83ea4fb9179d6d69177500512bc..30b163d923f6e58ec3f5ebfaae12132ed4019dae 100644 --- a/src/itemdataroles.h +++ b/src/itemdataroles.h @@ -41,6 +41,7 @@ enum class Role Number , LastUsed , FormattedLastUsed , + IndexedLastUsed , State , FormattedState , DropState , diff --git a/src/person.cpp b/src/person.cpp index ee205f0ef2c879e856bd1509be58e168f652aca3..063f5bff619c9c0187cc03a06d472477308405d5 100644 --- a/src/person.cpp +++ b/src/person.cpp @@ -568,6 +568,7 @@ QVariant Person::roleData(int role) const case static_cast<int>(Ring::Role::FormattedLastUsed): case static_cast<int>(Person::Role::FormattedLastUsed): return QVariant(HistoryTimeCategoryModel::timeToHistoryCategory(lastUsedTime())); + case static_cast<int>(Ring::Role::IndexedLastUsed): case static_cast<int>(Person::Role::IndexedLastUsed): return QVariant(static_cast<int>(HistoryTimeCategoryModel::timeToHistoryConst(lastUsedTime()))); case static_cast<int>(Ring::Role::Object):