diff --git a/declarativeimports/locale/locale.cpp b/declarativeimports/locale/locale.cpp index 534521dc9..f8bd19437 100644 --- a/declarativeimports/locale/locale.cpp +++ b/declarativeimports/locale/locale.cpp @@ -255,13 +255,15 @@ void Locale::setMainCatalog(const char *catalog) KLocale::setMainCatalog(catalog); } -double Locale::readNumber(const QString &_str, bool * ok) const +double Locale::readNumber(const QString &_str) const { + bool *ok; return m_locale->readNumber(_str, ok); } -double Locale::readMoney(const QString &_str, bool *ok) const +double Locale::readMoney(const QString &_str) const { + bool *ok; return m_locale->readMoney(_str, ok); } diff --git a/declarativeimports/locale/locale.h b/declarativeimports/locale/locale.h index 0ec758cdc..4fbcaeb64 100644 --- a/declarativeimports/locale/locale.h +++ b/declarativeimports/locale/locale.h @@ -910,18 +910,15 @@ public: * * @return The string converted to a double */ - Q_INVOKABLE double readMoney(const QString &numStr, bool * ok = 0) const; + Q_INVOKABLE double readMoney(const QString &numStr) const; /** * Converts a localized numeric string to a double. * * @param numStr the string we want to convert. - * @param ok the boolean that is set to false if it's not a number. - * If @p ok is 0, it will be ignored - * * @return The string converted to a double */ - Q_INVOKABLE double readNumber(const QString &numStr, bool * ok = 0) const; + Q_INVOKABLE double readNumber(const QString &numStr) const; /** * Flags for readDate() diff --git a/declarativeimports/locale/tests/contents/code/klocaleqmltest.qml b/declarativeimports/locale/tests/contents/code/klocaleqmltest.qml index 441713d1d..a77c6778a 100644 --- a/declarativeimports/locale/tests/contents/code/klocaleqmltest.qml +++ b/declarativeimports/locale/tests/contents/code/klocaleqmltest.qml @@ -186,7 +186,6 @@ Item { console.log("readMoney:" + locale.readMoney("$ 21")) - console.log("readNumber:" + locale.readNumber(locale.convertDigits(locale.digitSet, Locale.ArabicDigits))) console.log("readNumber:" + locale.readNumber(10.0,3)) console.log("readDate:" + locale.readDate("2004-02-01", Locale.IsoFormat))