Add again Q_DECLARE_FLAGS and fix some typos
This commit is contained in:
parent
9581c33be2
commit
a7098018c5
@ -24,7 +24,7 @@
|
|||||||
Locale::Locale(QObject* parent)
|
Locale::Locale(QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
m_locale = new KLocale(KGlobal::locale());
|
m_locale = new KLocale(*KGlobal::locale());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -121,40 +121,18 @@ void Locale::translateRawFrom(const char *catname, const char *msg, QString *lan
|
|||||||
m_locale->translateRawFrom(catname, 0, msg, 0, 0, lang, trans);
|
m_locale->translateRawFrom(catname, 0, msg, 0, 0, lang, trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Locale::translateRaw(const char *msg, QString *lang, QString *trans) const
|
|
||||||
{
|
|
||||||
m_locale->translateRawFrom(0, 0, msg, 0, 0, lang, trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Locale::translateRawFrom(const char *catname, const char *ctxt, const char *msg, QString *lang,
|
void Locale::translateRawFrom(const char *catname, const char *ctxt, const char *msg, QString *lang,
|
||||||
QString *trans) const
|
QString *trans) const
|
||||||
{
|
{
|
||||||
m_locale->translateRawFrom(catname, ctxt, msg, 0, 0, lang, trans);
|
m_locale->translateRawFrom(catname, ctxt, msg, 0, 0, lang, trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Locale::translateRaw(const char *ctxt, const char *msg, QString *lang, QString *trans) const
|
|
||||||
{
|
|
||||||
m_locale->translateRawFrom(0, ctxt, msg, 0, 0, lang, trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Locale::translateRawFrom(const char *catname, const char *singular, const char *plural,
|
void Locale::translateRawFrom(const char *catname, const char *singular, const char *plural,
|
||||||
unsigned long n, QString *lang, QString *trans) const
|
unsigned long n, QString *lang, QString *trans) const
|
||||||
{
|
{
|
||||||
m_locale->translateRawFrom(catname, 0, singular, plural, n, lang, trans);
|
m_locale->translateRawFrom(catname, 0, singular, plural, n, lang, trans);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Locale::translateRaw(const char *singular, const char *plural, unsigned long n, QString *lang,
|
|
||||||
QString *trans) const
|
|
||||||
{
|
|
||||||
m_locale->translateRawFrom(0, 0, singular, plural, n, lang, trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Locale::translateRaw(const char *ctxt, const char *singular, const char *plural,
|
|
||||||
unsigned long n, QString *lang, QString *trans) const
|
|
||||||
{
|
|
||||||
m_locale->translateRawFrom(0, ctxt, singular, plural, n, lang, trans);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Locale::translateQt(const char *context, const char *sourceText, const char *comment) const
|
QString Locale::translateQt(const char *context, const char *sourceText, const char *comment) const
|
||||||
{
|
{
|
||||||
return m_locale->translateQt(context, sourceText, comment);
|
return m_locale->translateQt(context, sourceText, comment);
|
||||||
|
@ -688,8 +688,8 @@ public:
|
|||||||
* @see BinaryUnitDialect
|
* @see BinaryUnitDialect
|
||||||
*/
|
*/
|
||||||
QString formatByteSize(double size, int precision,
|
QString formatByteSize(double size, int precision,
|
||||||
BinaryUnitDialect dialect = KLocale::DefaultBinaryDialect,
|
BinaryUnitDialect dialect = Locale::DefaultBinaryDialect,
|
||||||
BinarySizeUnits specificUnit = KLocale::DefaultBinaryUnits) const;
|
BinarySizeUnits specificUnit = Locale::DefaultBinaryUnits) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the user's configured binary unit dialect.
|
* Returns the user's configured binary unit dialect.
|
||||||
@ -880,6 +880,8 @@ public:
|
|||||||
LongName /**< Long text format, e.g. Monday for Monday */
|
LongName /**< Long text format, e.g. Monday for Monday */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_FLAGS(DateTimeComponents, DateTimeComponent)
|
||||||
|
|
||||||
//KDE5 move to KDateTime namespace
|
//KDE5 move to KDateTime namespace
|
||||||
/**
|
/**
|
||||||
* Format for date string.
|
* Format for date string.
|
||||||
@ -934,6 +936,8 @@ public:
|
|||||||
Seconds = 0x02 /**< Include the seconds value */
|
Seconds = 0x02 /**< Include the seconds value */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_FLAGS(DateTimeFormatOptions, DateTimeFormatOption)
|
||||||
|
|
||||||
//KDE5 move to KDateTime namespace
|
//KDE5 move to KDateTime namespace
|
||||||
/**
|
/**
|
||||||
* Returns a string formatted to the current locale's conventions
|
* Returns a string formatted to the current locale's conventions
|
||||||
@ -980,6 +984,8 @@ public:
|
|||||||
///< "%I.%M.%S %p".
|
///< "%I.%M.%S %p".
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_FLAGS(TimeFormatOptions, TimeFormatOption)
|
||||||
|
|
||||||
//KDE5 move to KDateTime namespace
|
//KDE5 move to KDateTime namespace
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -991,7 +997,7 @@ public:
|
|||||||
* @return The time as a string
|
* @return The time as a string
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QString formatLocaleTime(const QTime &pTime,
|
Q_INVOKABLE QString formatLocaleTime(const QTime &pTime,
|
||||||
TimeFormatOptions options = KLocale::TimeDefault) const;
|
TimeFormatOptions options = Locale::TimeDefault) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -1214,6 +1220,8 @@ public:
|
|||||||
///< left out when entering a time string.
|
///< left out when entering a time string.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Q_DECLARE_FLAGS(TimeProcessingOptions, TimeProcessingOption)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Converts a localized time string to a QTime.
|
* Converts a localized time string to a QTime.
|
||||||
@ -1232,7 +1240,7 @@ public:
|
|||||||
* @return The string converted to a QTime
|
* @return The string converted to a QTime
|
||||||
*/
|
*/
|
||||||
Q_INVOKABLE QTime readLocaleTime(const QString &str, bool *ok = 0,
|
Q_INVOKABLE QTime readLocaleTime(const QString &str, bool *ok = 0,
|
||||||
TimeFormatOptions options = KLocale::TimeDefault,
|
TimeFormatOptions options = Locale::TimeDefault,
|
||||||
TimeProcessingOptions processing = ProcessNonStrict) const;
|
TimeProcessingOptions processing = ProcessNonStrict) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user