[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:19:36 UTC 2016


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

The following commit has been merged in the master branch:
commit 0ef3c005da57371211a73fbf90d7effdcb5830c4
Author: David Edmundson <kde at davidedmundson.co.uk>
Date:   Sat Jul 16 14:54:45 2011 +0100

    Fix date time replacement in text view, also vastly simplify code
    
    BUG: 275268
---
 lib/adium-theme-view.cpp | 19 ++-----------------
 1 file changed, 2 insertions(+), 17 deletions(-)

diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index 18bd30b..991bed3 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -446,24 +446,9 @@ void AdiumThemeView::appendNextMessage(QString &html)
 
 
 //taken from Kopete code
-QString AdiumThemeView::formatTime(const QString &_timeFormat, const QDateTime &dateTime)
+QString AdiumThemeView::formatTime(const QString &timeFormat, const QDateTime &dateTime)
 {
-    char buffer[256];
-#ifdef Q_WS_WIN
-    QString timeFormat = _timeFormat;
-    // some formats are not supported on windows (gnu extension?)
-    timeFormat = timeFormat.replace(QLatin1String("%e"), QLatin1String("%d"));
-    timeFormat = timeFormat.replace(QLatin1String("%T"), QLatin1String("%H:%M:%S"));
-#else
-    const QString timeFormat = _timeFormat;
-#endif
-    // Get current time
-    time_t timeT = dateTime.toTime_t();
-    // Convert it to local time representation.
-    struct tm* loctime = localtime(&timeT);
-    strftime(buffer, 256, timeFormat.toAscii(), loctime);
-
-    return QString(buffer);
+    return dateTime.toString(timeFormat);
 }
 
 const QString AdiumThemeView::variantName() const

-- 
ktp-text-ui packaging



More information about the pkg-kde-commits mailing list