From 920a7a0649a5607ee7203c031639b3369dba28db Mon Sep 17 00:00:00 2001 From: Giorgos Tsiapaliwkas Date: Tue, 1 May 2012 22:16:42 +0300 Subject: [PATCH] Rename the test into org.kde.example.localetest --- declarativeimports/locale/CMakeLists.txt | 2 +- declarativeimports/locale/locale.cpp | 10 ---------- declarativeimports/locale/locale.h | 18 +----------------- .../locale/localebindingsplugin.cpp | 2 +- .../klocaleqmltest.qml => ui/localetest.qml} | 0 .../locale/tests/metadata.desktop | 6 +++--- 6 files changed, 6 insertions(+), 32 deletions(-) rename declarativeimports/locale/tests/contents/{code/klocaleqmltest.qml => ui/localetest.qml} (100%) diff --git a/declarativeimports/locale/CMakeLists.txt b/declarativeimports/locale/CMakeLists.txt index dea3e1e5c..e36f2c97f 100644 --- a/declarativeimports/locale/CMakeLists.txt +++ b/declarativeimports/locale/CMakeLists.txt @@ -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) diff --git a/declarativeimports/locale/locale.cpp b/declarativeimports/locale/locale.cpp index 21fad1bae..17bbfc603 100644 --- a/declarativeimports/locale/locale.cpp +++ b/declarativeimports/locale/locale.cpp @@ -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; diff --git a/declarativeimports/locale/locale.h b/declarativeimports/locale/locale.h index 4fe68087f..7103ffebc 100644 --- a/declarativeimports/locale/locale.h +++ b/declarativeimports/locale/locale.h @@ -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. * diff --git a/declarativeimports/locale/localebindingsplugin.cpp b/declarativeimports/locale/localebindingsplugin.cpp index f8e292752..bee644682 100644 --- a/declarativeimports/locale/localebindingsplugin.cpp +++ b/declarativeimports/locale/localebindingsplugin.cpp @@ -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(uri, 0, 1, "Locale"); qmlRegisterType(uri, 0, 1, "CalendarSystem"); diff --git a/declarativeimports/locale/tests/contents/code/klocaleqmltest.qml b/declarativeimports/locale/tests/contents/ui/localetest.qml similarity index 100% rename from declarativeimports/locale/tests/contents/code/klocaleqmltest.qml rename to declarativeimports/locale/tests/contents/ui/localetest.qml diff --git a/declarativeimports/locale/tests/metadata.desktop b/declarativeimports/locale/tests/metadata.desktop index 797769bbe..f42171738 100644 --- a/declarativeimports/locale/tests/metadata.desktop +++ b/declarativeimports/locale/tests/metadata.desktop @@ -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