diff --git a/declarativeimports/locale/locale.cpp b/declarativeimports/locale/locale.cpp index 8181dc1be..dcfd076f0 100644 --- a/declarativeimports/locale/locale.cpp +++ b/declarativeimports/locale/locale.cpp @@ -346,17 +346,15 @@ QTime Locale::readTime(const QString &intstr, bool *ok) const QTime Locale::readLocaleTime(const QString &intstr, bool *ok, TimeFormatOptions options, TimeProcessingOptions processing) const { - return m_locale->readLocaleTime(intstr, ok, (KLocale::TimeFormatOptions)options, (KLocale::TimeProcessingOptions)processing); -} - -QString Locale::formatTime(const QTime &time, bool includeSecs, bool isDuration) const -{ - return m_locale->formatTime(time, includeSecs, isDuration); + Q_UNUSED(options) + Q_UNUSED(processing) + return m_locale->readLocaleTime(intstr, ok); } QString Locale::formatLocaleTime(const QTime &time, TimeFormatOptions options) const { - return m_locale->formatLocaleTime(time, (KLocale::TimeFormatOptions)options); + Q_UNUSED(options) + return m_locale->formatLocaleTime(time); } bool Locale::use12Clock() const @@ -393,7 +391,9 @@ QString Locale::formatDateTime(const QDateTime &dateTime, Locale::DateFormat for QString Locale::formatDateTime(const KDateTime &dateTime, Locale::DateFormat format, DateTimeFormatOptions options) const { - return m_locale->formatDateTime(dateTime, (KLocale::DateFormat)format, (KLocale::DateTimeFormatOptions)options); + Q_UNUSED(format) + Q_UNUSED(options) + return m_locale->formatDateTime(dateTime); } void Locale::setDateFormat(const QString &format) diff --git a/declarativeimports/locale/locale.h b/declarativeimports/locale/locale.h index c13c175ed..7c4610554 100644 --- a/declarativeimports/locale/locale.h +++ b/declarativeimports/locale/locale.h @@ -22,18 +22,17 @@ #include #include -#include -class QStringList; +class QString; +class QStringList; //TODO will the QStringList invokable methods work in QML? class QTextCodec; class QDate; class QTime; class QDateTime; -class KDateTime; -class KCalendarSystem; -class KCurrencyCode; -//class KDayPeriod; +class KDateTime; //TODO will this work? +class KCalendarSystem;//TODO make it calendarSystem??? +class KCurrencyCode;//TODO will this work? /** * \file klocale.h @@ -1358,6 +1357,7 @@ public: * @see encoding * @see encodingMib */ + //TODO will this work? Q_INVOKABLE QTextCodec *codecForEncoding() const; /** @@ -2018,9 +2018,9 @@ Q_SIGNALS: void workingWeekEndDayChanged(); void workingWeekStartDayChanged(); }; - -Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::DateTimeFormatOptions) -Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::TimeFormatOptions) -Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::TimeProcessingOptions) +//TODO remove the above? +//Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::DateTimeFormatOptions) +//Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::TimeFormatOptions) +//Q_DECLARE_OPERATORS_FOR_FLAGS(Locale::TimeProcessingOptions) #endif