summaryrefslogtreecommitdiff
path: root/src/plugins/cpaster/pastebindotcomprotocol.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpaster/pastebindotcomprotocol.cpp')
-rw-r--r--src/plugins/cpaster/pastebindotcomprotocol.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/cpaster/pastebindotcomprotocol.cpp b/src/plugins/cpaster/pastebindotcomprotocol.cpp
index 8fceb8a8d5..031c8383c2 100644
--- a/src/plugins/cpaster/pastebindotcomprotocol.cpp
+++ b/src/plugins/cpaster/pastebindotcomprotocol.cpp
@@ -99,7 +99,7 @@ static inline QByteArray format(Protocol::ContentType ct)
}
void PasteBinDotComProtocol::paste(const QString &text,
- ContentType ct,
+ ContentType ct, int expiryDays,
const QString &username,
const QString &comment,
const QString &description)
@@ -111,14 +111,14 @@ void PasteBinDotComProtocol::paste(const QString &text,
// Format body
QByteArray pasteData = API_KEY;
pasteData += "api_option=paste&";
- pasteData += "api_paste_expire_date=1M&";
+ pasteData += "api_paste_expire_date=";
+ pasteData += QByteArray::number(expiryDays);
+ pasteData += "D&";
pasteData += format(ct);
pasteData += "api_paste_name=";
pasteData += QUrl::toPercentEncoding(username);
-
pasteData += "&api_paste_code=";
pasteData += QUrl::toPercentEncoding(fixNewLines(text));
-
// fire request
m_pasteReply = httpPost(QLatin1String(PASTEBIN_BASE) + QLatin1String(PASTEBIN_API), pasteData);
connect(m_pasteReply, SIGNAL(finished()), this, SLOT(pasteFinished()));