summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Richardson <arichardson.kde@gmail.com>2015-05-25 15:27:45 (GMT)
committerAlex Richardson <arichardson.kde@gmail.com>2015-08-19 14:14:25 (GMT)
commit64afe09e883f09a320f789db415524bd5325a242 (patch)
tree7eef9f67f0703b636eeac51ca986ed295bb8f377
parent81d4b984a4b88bb8ffcaddebe62d21adb456fa75 (diff)
Port away from KLocale
-rw-r--r--core/script/kjs_app.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/script/kjs_app.cpp b/core/script/kjs_app.cpp
index ab55fa4..a7bba0c 100644
--- a/core/script/kjs_app.cpp
+++ b/core/script/kjs_app.cpp
@@ -16,8 +16,9 @@
#include <qapplication.h>
-#include <kglobal.h>
-#include <klocale.h>
+#include <QLocale>
+
+#include <KLocalizedString>
#include "../document_p.h"
#include "kjs_fullscreen_p.h"
@@ -53,11 +54,9 @@ static KJSObject appGetFormsVersion( KJSContext *, void * )
static KJSObject appGetLanguage( KJSContext *, void * )
{
- QString lang;
- QString country;
- QString dummy;
- KLocale::splitLocale( KLocale::global()->language(),
- lang, country, dummy, dummy );
+ QLocale locale;
+ QString lang = QLocale::languageToString(locale.language());
+ QString country = QLocale::countryToString(locale.country());
QString acroLang = QString::fromLatin1( "ENU" );
if ( lang == QLatin1String( "da" ) )
acroLang = QString::fromLatin1( "DAN" ); // Danish