[SCM] ktp-approver packaging branch, master, updated. debian/15.12.1-1-299-g62cbbd7
Maximiliano Curia
maxy at moszumanska.debian.org
Fri May 27 09:13:31 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-approver.git;a=commitdiff;h=9b770a0
The following commit has been merged in the master branch:
commit 9b770a052db1d43d00ca19ee92eb08391147b586
Author: Matthias Klumpp <matthias at tenstral.net>
Date: Thu Mar 29 22:00:23 2012 +0200
Remove empty lines and line-breaks from KNotify chat messages
Apply QString::simplified() on the chat message before
displaying it.
---
src/textchannelapprover.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/textchannelapprover.cpp b/src/textchannelapprover.cpp
index 0540335..0e06a01 100644
--- a/src/textchannelapprover.cpp
+++ b/src/textchannelapprover.cpp
@@ -74,12 +74,14 @@ void TextChannelApprover::onMessageReceived(const Tp::ReceivedMessage & msg)
connect(m_notification.data(), SIGNAL(action1Activated()), SIGNAL(channelAccepted()));
}
- if (msg.text().length() > 170) {
+ // Remove empty lines from message
+ QString notifyText = msg.text().simplified();
+ if (notifyText.length() > 170) {
//search for the closest space in text
- QString truncatedMsg = msg.text().left(msg.text().indexOf(QLatin1Char(' '), 150)).append(QLatin1String("..."));
+ QString truncatedMsg = notifyText.left(notifyText.indexOf(QLatin1Char(' '), 150)).append(QLatin1String("..."));
m_notification.data()->setText(truncatedMsg);
} else {
- m_notification.data()->setText(msg.text());
+ m_notification.data()->setText(notifyText);
}
m_notification.data()->sendEvent();
}
--
ktp-approver packaging
More information about the pkg-kde-commits
mailing list