Rename the test into org.kde.example.localetest

This commit is contained in:
Giorgos Tsiapaliwkas 2012-05-01 22:16:42 +03:00
parent 1d8b0c0714
commit 920a7a0649
6 changed files with 6 additions and 32 deletions

View File

@ -21,5 +21,5 @@ kde4_add_library(localebindingsplugin SHARED ${localebindings_SRCS})
target_link_libraries(localebindingsplugin ${QT_QTDECLARATIVE_LIBRARY} ${KDE4_KDECORE_LIBRARY})
install(TARGETS localebindingsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/locale)
install(TARGETS localebindingsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/locale)
install(FILES qmldir DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/locale)

View File

@ -78,11 +78,6 @@ QString Locale::currencyCode() const
return m_locale->currencyCode();
}
void Locale::setActiveCatalog(const QString &catalog)
{
m_locale->setActiveCatalog(catalog);
}
QString Locale::translateQt(const char *context, const char *sourceText, const char *comment) const
{
return m_locale->translateQt(context, sourceText, comment);
@ -251,11 +246,6 @@ QString Locale::formatDate(const QDate &date, Locale::DateFormat format) const
return m_locale->formatDate(date, (KLocale::DateFormat)format);
}
void Locale::setMainCatalog(const char *catalog)
{
KLocale::setMainCatalog(catalog);
}
double Locale::readNumber(const QString &_str) const
{
bool ok;

View File

@ -1350,12 +1350,6 @@ public:
*/
void setMeasureSystem(MeasureSystem value);
/**
* Sets the active catalog for translation lookup.
* @param catalog The catalog to activate.
*/
Q_INVOKABLE void setActiveCatalog(const QString &catalog);
/**
* Translates a message as a QTranslator is supposed to.
* The parameters are similar to i18n(), but the result
@ -1445,19 +1439,9 @@ public:
* @param modifier set to the modifer part of the locale
* @param charset set to the charset part of the locale
*/
Q_INVOKABLE static void splitLocale(const QString &locale, QString &language, QString &country,
Q_INVOKABLE void splitLocale(const QString &locale, QString &language, QString &country,
QString &modifier, QString &charset);
/**
* Use this as main catalog for *all* KLocales, if not the appname
* will be used. This function is best to be the very first instruction
* in your program's main function as it only has an effect before the
* first KLocale object is created.
*
* @param catalog Catalog to override all other main Catalogs.
*/
Q_INVOKABLE static void setMainCatalog(const char *catalog);
/**
* Returns the name of the internal language.
*

View File

@ -25,7 +25,7 @@
void LocaleBindingsPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.locale"));
Q_ASSERT(uri == QLatin1String("org.kde.locale"));
qmlRegisterType<Locale>(uri, 0, 1, "Locale");
qmlRegisterType<CalendarSystem>(uri, 0, 1, "CalendarSystem");

View File

@ -1,12 +1,12 @@
[Desktop Entry]
Name=KLocaleQMLtest
Name=org.kde.example.localetest
Type=Service
X-KDE-PluginInfo-Author=Giorgos Tsiapaliwkas
X-KDE-PluginInfo-Email=terietor@gmail.com
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-Name=org.kde.klocaleqmltest
X-KDE-PluginInfo-Name=org.kde.example.localetest
X-KDE-PluginInfo-Version=1
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
X-Plasma-DefaultSize=200,100
X-Plasma-MainScript=code/klocaleqmltest.qml
X-Plasma-MainScript=ui/localetest.qml