[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec

Maximiliano Curia maxy at moszumanska.debian.org
Sat May 28 00:25:04 UTC 2016


Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=e0c2a17

The following commit has been merged in the master branch:
commit e0c2a17c9cf52f4e89267755b4aafd5bc34987da
Author: Martin Klapetek <mklapetek at kde.org>
Date:   Fri Jan 9 16:45:59 2015 +0100

    [lib] Get rid of KLocale
    
    Replaced either by KLocalizedString or by QLocale where applicable
---
 lib/adium-theme-view.cpp     | 16 +++++++---------
 lib/authenticationwizard.cpp |  2 +-
 lib/chat-search-bar.cpp      |  2 +-
 lib/chat-window-style.cpp    |  3 +--
 lib/contact-delegate.cpp     |  1 -
 lib/proxy-service.cpp        |  2 +-
 6 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 6c633d6..3a19b57 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -40,10 +40,10 @@
 #include <QWebInspector>
 #include <QWebSettings>
 #include <QApplication>
+#include <QLocale>
 
 #include <KAction>
 #include <KEmoticonsTheme>
-#include <KGlobal>
 #include <KConfig>
 #include <KConfigGroup>
 #include <KMessageBox>
@@ -669,16 +669,16 @@ QString AdiumThemeView::replaceHeaderKeywords(QString htmlTemplate, const AdiumT
     htmlTemplate.replace(QLatin1String("%destinationDisplayName%"), info.destinationDisplayName());
     htmlTemplate.replace(QLatin1String("%incomingIconPath%"), (!info.incomingIconPath().isEmpty() ? info.incomingIconPath().toString() : m_defaultAvatar));
     htmlTemplate.replace(QLatin1String("%outgoingIconPath%"), (!info.outgoingIconPath().isEmpty() ? info.outgoingIconPath().toString() : m_defaultAvatar));
-    htmlTemplate.replace(QLatin1String("%timeOpened%"), KGlobal::locale()->formatTime(info.timeOpened().time()));
-    htmlTemplate.replace(QLatin1String("%dateOpened%"), KGlobal::locale()->formatDate(info.timeOpened().date(), KLocale::LongDate));
+    htmlTemplate.replace(QLatin1String("%timeOpened%"), QLocale::system().toString(info.timeOpened().time()));
+    htmlTemplate.replace(QLatin1String("%dateOpened%"), QLocale::system().toString(info.timeOpened().date(), QLocale::LongFormat));
 
     //KTp-Renkoo specific hack to make "Conversation Began" translatable
     htmlTemplate.replace(QLatin1String("%conversationBegan%"), i18nc("Header at top of conversation view. %1 is the time format",
-                                                                     "Conversation began %1", KGlobal::locale()->formatTime(info.timeOpened().time())));
+                                                                     "Conversation began %1", QLocale::system().toString(info.timeOpened().time())));
 
     //KTp-WoshiChat specific hack to make "Joined at" translatable
     htmlTemplate.replace(QLatin1String("%conversationJoined%"), i18nc("Header at top of conversation view. %1 is the time format",
-                                                                      "Joined at %1", KGlobal::locale()->formatTime(info.timeOpened().time())));
+                                                                      "Joined at %1", QLocale::system().toString(info.timeOpened().time())));
 
     htmlTemplate.replace(QLatin1String("%groupChatIcon%"), KIconLoader::global()->iconPath(QLatin1String("telepathy-kde"), -48));
 
@@ -745,9 +745,9 @@ QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const Adiu
     //service
     htmlTemplate.replace(QLatin1String("%service%"), m_service);
     //time
-    htmlTemplate.replace(QLatin1String("%time%"), KGlobal::locale()->formatLocaleTime(info.time().time()));
+    htmlTemplate.replace(QLatin1String("%time%"), QLocale::system().toString(info.time().time()));
     //shortTime
-    htmlTemplate.replace(QLatin1String("%shortTime%"), KGlobal::locale()->formatLocaleTime(info.time().time(), KLocale::TimeWithoutSeconds | KLocale::TimeWithoutAmPm));
+    htmlTemplate.replace(QLatin1String("%shortTime%"), QLocale::system().toString(info.time().time(), QLocale::ShortFormat));
     //time{X}
     QRegExp timeRegExp(QLatin1String("%time\{([^}]*)\}%"));
     int pos = 0;
@@ -839,5 +839,3 @@ const QString AdiumThemeView::variantPath() const
 {
     return m_variantPath;
 }
-
-
diff --git a/lib/authenticationwizard.cpp b/lib/authenticationwizard.cpp
index d1b50c1..3be8a5a 100644
--- a/lib/authenticationwizard.cpp
+++ b/lib/authenticationwizard.cpp
@@ -23,7 +23,7 @@
 #include "ktp-debug.h"
 
 #include <KTp/OTR/channel-adapter.h>
-#include <KLocale>
+#include <KLocalizedString>
 #include <KNotification>
 #include <KIconLoader>
 #include <KWindowSystem>
diff --git a/lib/chat-search-bar.cpp b/lib/chat-search-bar.cpp
index 1c232ea..2eb2649 100644
--- a/lib/chat-search-bar.cpp
+++ b/lib/chat-search-bar.cpp
@@ -22,7 +22,7 @@
 #include <KAction>
 #include <KColorScheme>
 #include <KLineEdit>
-#include <KLocale>
+#include <KLocalizedString>
 #include <KPushButton>
 
 #include <QCheckBox>
diff --git a/lib/chat-window-style.cpp b/lib/chat-window-style.cpp
index f0dde49..96ea242 100644
--- a/lib/chat-window-style.cpp
+++ b/lib/chat-window-style.cpp
@@ -31,8 +31,7 @@
 #include <QFont>
 #include <QFontDatabase>
 
-// KDE includes
-#include <KLocale>
+#include <KLocalizedString>
 
 class ChatWindowStyle::Private
 {
diff --git a/lib/contact-delegate.cpp b/lib/contact-delegate.cpp
index b6e7959..5f0651b 100644
--- a/lib/contact-delegate.cpp
+++ b/lib/contact-delegate.cpp
@@ -31,7 +31,6 @@
 #include <QFontDatabase>
 
 #include <KIconLoader>
-#include <KLocale>
 
 #include <KTp/types.h>
 
diff --git a/lib/proxy-service.cpp b/lib/proxy-service.cpp
index 8ac4e25..0bd1fc9 100644
--- a/lib/proxy-service.cpp
+++ b/lib/proxy-service.cpp
@@ -25,7 +25,7 @@
 #include <QScopedPointer>
 #include <QCloseEvent>
 #include <KDialog>
-#include <KLocale>
+#include <KLocalizedString>
 
 class KeyGenDialog : public KDialog
 {

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list