Fix capitalization of "Pastebin.Ca".

Task-number: QTCREATORBUG-9997

Change-Id: Ia68c927723b31baa8ba83cbc2115e25a28d732e1
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
This commit is contained in:
Friedemann Kleint
2013-08-22 15:31:19 +02:00
parent 3416ecc594
commit f1583c98fe
2 changed files with 10 additions and 4 deletions

View File

@@ -37,6 +37,7 @@
#include <QStringList>
static const char urlC[] = "http://pastebin.ca/";
static const char protocolNameC[] = "Pastebin.Ca";
namespace CodePaster {
PasteBinDotCaProtocol::PasteBinDotCaProtocol() :
@@ -47,6 +48,11 @@ PasteBinDotCaProtocol::PasteBinDotCaProtocol() :
{
}
QString PasteBinDotCaProtocol::protocolName()
{
return QLatin1String(protocolNameC);
}
unsigned PasteBinDotCaProtocol::capabilities() const
{
return ListCapability | PostDescriptionCapability | PostUserNameCapability;
@@ -115,7 +121,7 @@ void PasteBinDotCaProtocol::paste(const QString &text,
void PasteBinDotCaProtocol::pasteFinished()
{
if (m_pasteReply->error()) {
qWarning("Pastebin.ca protocol error: %s", qPrintable(m_pasteReply->errorString()));
qWarning("%s protocol error: %s", protocolNameC, qPrintable(m_pasteReply->errorString()));
} else {
/// returns ""SUCCESS:[id]""
const QByteArray data = m_pasteReply->readAll();
@@ -134,7 +140,7 @@ void PasteBinDotCaProtocol::fetchFinished()
if (error) {
content = m_fetchReply->errorString();
} else {
title = QString::fromLatin1("Pastebin.ca: %1").arg(m_fetchId);
title = name() + QLatin1String(": ") + m_fetchId;
const QByteArray data = m_fetchReply->readAll();
content = QString::fromUtf8(data);
content.remove(QLatin1Char('\r'));
@@ -220,7 +226,7 @@ void PasteBinDotCaProtocol::listFinished()
{
const bool error = m_listReply->error();
if (error)
qWarning("pastebin.ca list failed: %s", qPrintable(m_listReply->errorString()));
qWarning("%s list failed: %s", protocolNameC, qPrintable(m_listReply->errorString()));
else
emit listDone(name(), parseLists(m_listReply));
m_listReply->deleteLater();

View File

@@ -39,7 +39,7 @@ class PasteBinDotCaProtocol : public NetworkProtocol
public:
explicit PasteBinDotCaProtocol();
static QString protocolName() { return QLatin1String("Pastebin.Ca"); }
static QString protocolName();
QString name() const { return protocolName(); }
virtual bool hasSettings() const { return false; }