Commit 57f09e82 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

KDE paste protocol: Limit the title to 30 characters.



Task-number: QTCREATORBUG-11065
Change-Id: I3d801e09f021913c750ec88028346bf54abccbf9
Reviewed-by: default avatarRobert Loehning <robert.loehning@digia.com>
parent b748c1b3
......@@ -111,6 +111,8 @@ void StickyNotesPasteProtocol::paste(const QString &text,
const QString &comment,
const QString &description)
{
enum { maxDescriptionLength = 30 }; // Length of description is limited.
Q_UNUSED(username)
Q_UNUSED(comment);
QTC_ASSERT(!m_pasteReply, return);
......@@ -124,7 +126,7 @@ void StickyNotesPasteProtocol::paste(const QString &text,
pasteData += expiryParameter(expiryDays);
if (!description.isEmpty()) {
pasteData += "&title=";
pasteData += QUrl::toPercentEncoding(description);
pasteData += QUrl::toPercentEncoding(description.left(maxDescriptionLength));
}
m_pasteReply = httpPost(m_hostUrl + QLatin1String("api/xml/create"), pasteData);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment