s/QVariantHash/QVariantMap.

QVariantHash isn't consumable from QML
This commit is contained in:
Giorgos Tsiapaliokas 2013-07-29 19:09:06 +03:00
parent 66bcd2ba95
commit 6d000fe183
2 changed files with 6 additions and 6 deletions

View File

@ -80,9 +80,9 @@ bool CalendarSystem::isValid(const QDate &date) const
return m_calendarSystem->isValid(date);
}
QVariantHash CalendarSystem::getDate(const QDate date) const
QVariantMap CalendarSystem::getDate(const QDate date) const
{
QVariantHash hash;
QVariantMap hash;
int year;
int month;
@ -143,9 +143,9 @@ QDate CalendarSystem::addDays(const QDate &date, int numDays) const
return m_calendarSystem->addDays(date, numDays);
}
QVariantHash CalendarSystem::dateDifference(const QDate &fromDate, const QDate &toDate) const
QVariantMap CalendarSystem::dateDifference(const QDate &fromDate, const QDate &toDate) const
{
QVariantHash hash;
QVariantMap hash;
int yearsDiff;
int monthsDiff;

View File

@ -252,7 +252,7 @@ public:
* ["day"] the day of the date
* @param date date to get year, month and day for
*/
Q_INVOKABLE QVariantHash getDate(const QDate date) const;
Q_INVOKABLE QVariantMap getDate(const QDate date) const;
/**
* Returns the year portion of a given date in the current calendar system
@ -355,7 +355,7 @@ public:
* @param fromDate The date to start from
* @param toDate The date to end at
*/
Q_INVOKABLE QVariantHash dateDifference(const QDate &fromDate, const QDate &toDate)const;
Q_INVOKABLE QVariantMap dateDifference(const QDate &fromDate, const QDate &toDate)const;
/**
* Returns the difference between two dates in completed calendar years.