[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:21:06 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=f2d5cba
The following commit has been merged in the master branch:
commit f2d5cbab10d5c42fcd6d127d8657583015c5c140
Author: Lasath Fernando <kde at lasath.org>
Date: Thu Feb 2 13:32:04 2012 +1100
Remove commented code from AdiumThemeView::replaceMessageKeywords()
---
lib/adium-theme-view.cpp | 49 ------------------------------------------------
1 file changed, 49 deletions(-)
diff --git a/lib/adium-theme-view.cpp b/lib/adium-theme-view.cpp
index bb8ba20..86232c7 100644
--- a/lib/adium-theme-view.cpp
+++ b/lib/adium-theme-view.cpp
@@ -415,55 +415,6 @@ QString AdiumThemeView::replaceMessageKeywords(QString &htmlTemplate, const Adiu
//message
QString message = info.message();
-// // link detection
-// QRegExp linkRegExp(QLatin1String("\b(?:(\w+)://|(www\.))([^\s]+)"));
-// int index = 0;
-//
-// while ((index = linkRegExp.indexIn(message, index)) != -1) {
-// QString realUrl = linkRegExp.cap(0);
-// QString protocol = linkRegExp.cap(1);
-//
-// //if cap(1) is empty cap(2) was matched -> starts with www.
-// const bool startsWithWWW = linkRegExp.cap(1).isEmpty();
-//
-// kDebug() << "Found URL " << realUrl << "with protocol : " << (startsWithWWW ? QLatin1String("http") : protocol);
-//
-//
-// // if url has a supported protocol
-// if (startsWithWWW || KProtocolInfo::protocols().contains(protocol, Qt::CaseInsensitive)) {
-//
-// // text not wanted in a link ( <,> )
-// QRegExp unwanted(QLatin1String("(<|>)"));
-//
-// if (!realUrl.contains(unwanted)) {
-// // string to show to user
-// QString shownUrl = realUrl;
-//
-// // check for newline and cut link when found
-// if (realUrl.contains(QLatin1String(("<br/>")))) {
-// int findIndex = realUrl.indexOf(QLatin1String("<br/>"));
-// realUrl.truncate(findIndex);
-// shownUrl.truncate(findIndex);
-// }
-//
-// // check prefix
-// if (startsWithWWW) {
-// realUrl.prepend(QLatin1String("http://"));
-// }
-//
-// // if the url is changed, show in chat what the user typed in
-// QString link = QLatin1String("<a href='") + realUrl + QLatin1String("'>") + shownUrl + QLatin1String("</a>");
-// message.replace(index, shownUrl.length(), link);
-// // advance position otherwise I end up parsing the same link
-// index += link.length();
-// } else {
-// index += realUrl.length();
-// }
-// } else {
-// index += linkRegExp.matchedLength();
-// }
-// }
-
htmlTemplate.replace(QLatin1String("%message%"), message);
//service
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list