summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2012-12-30 16:47:37 (GMT)
committerRemko Tronçon <git@el-tramo.be>2012-12-30 18:03:54 (GMT)
commit96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch)
treed73db22e591e49f088f359b9876df232eb99c6a9 /Swift/QtUI/QtChatWindow.cpp
parentb19210aa48e7cea40929593daed997668fe789be (diff)
downloadswift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip
swift-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 28549f8..5d57184 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -576,6 +576,7 @@ std::string QtChatWindow::addAction(const std::string &message, const std::strin
return addMessage(" *" + linkimoticonify(P2QSTRING(message)) + "*", senderName, senderIsSelf, label, avatarPath, "font-style:italic ", time);
}
+// FIXME: Move this to a different file
std::string formatSize(const boost::uintmax_t bytes) {
static const char *siPrefix[] = {"k", "M", "G", "T", "P", "E", "Z", "Y", NULL};
int power = 0;
@@ -587,11 +588,11 @@ std::string formatSize(const boost::uintmax_t bytes) {
return str( boost::format("%.1lf %sB") % engBytes % (power > 0 ? siPrefix[power-1] : "") );
}
-QString encodeButtonArgument(const QString& str) {
+static QString encodeButtonArgument(const QString& str) {
return Qt::escape(P2QSTRING(Base64::encode(createByteArray(Q2PSTRING(str)))));
}
-QString decodeButtonArgument(const QString& str) {
+static QString decodeButtonArgument(const QString& str) {
return P2QSTRING(byteArrayToString(Base64::decode(Q2PSTRING(str))));
}