summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-08-22 15:31:19 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2013-08-22 16:00:04 +0200
commitf1583c98feca72540c43048c7387a4c06d629ce0 (patch)
treefb397e5bd7630fe878feb3e0373ea8767197320a
parent3416ecc5942985eda83d0ee02dd10f1d462eee3f (diff)
downloadqt-creator-f1583c98feca72540c43048c7387a4c06d629ce0.tar.gz
Fix capitalization of "Pastebin.Ca".
Task-number: QTCREATORBUG-9997 Change-Id: Ia68c927723b31baa8ba83cbc2115e25a28d732e1 Reviewed-by: Robert Loehning <robert.loehning@digia.com>
-rw-r--r--src/plugins/cpaster/pastebindotcaprotocol.cpp12
-rw-r--r--src/plugins/cpaster/pastebindotcaprotocol.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/src/plugins/cpaster/pastebindotcaprotocol.cpp b/src/plugins/cpaster/pastebindotcaprotocol.cpp
index 2b29416f9b..435e315142 100644
--- a/src/plugins/cpaster/pastebindotcaprotocol.cpp
+++ b/src/plugins/cpaster/pastebindotcaprotocol.cpp
@@ -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();
diff --git a/src/plugins/cpaster/pastebindotcaprotocol.h b/src/plugins/cpaster/pastebindotcaprotocol.h
index 181220f5d1..1a091e9a95 100644
--- a/src/plugins/cpaster/pastebindotcaprotocol.h
+++ b/src/plugins/cpaster/pastebindotcaprotocol.h
@@ -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; }