summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp3
-rw-r--r--Swift/QtUI/QtFileTransferListItemModel.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 760e481..e188e6a 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -17,18 +17,19 @@
#include "QtTextEdit.h"
#include "QtSettingsProvider.h"
#include "QtScaledAvatarCache.h"
#include "SwifTools/TabComplete.h"
#include <Swift/Controllers/UIEvents/UIEventStream.h>
#include <Swift/Controllers/UIEvents/SendFileUIEvent.h>
#include "QtFileTransferJSBridge.h"
+#include <boost/cstdint.hpp>
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
#include <QLabel>
#include <QInputDialog>
#include <QApplication>
#include <QBoxLayout>
#include <QCloseEvent>
#include <QComboBox>
@@ -465,19 +466,19 @@ void QtChatWindow::setAckState(std::string const& id, ChatWindow::AckState state
int QtChatWindow::getCount() {
return unreadCount_;
}
std::string QtChatWindow::addAction(const std::string &message, const std::string &senderName, bool senderIsSelf, boost::shared_ptr<SecurityLabel> label, const std::string& avatarPath, const boost::posix_time::ptime& time) {
return addMessage(" *" + message + "*", senderName, senderIsSelf, label, avatarPath, "font-style:italic ", time);
}
-std::string formatSize(const uintmax_t bytes) {
+std::string formatSize(const boost::uintmax_t bytes) {
static const char *siPrefix[] = {"k", "M", "G", "T", "P", "E", "Z", "Y", NULL};
int power = 0;
double engBytes = bytes;
while (engBytes >= 1000) {
++power;
engBytes = engBytes / 1000.0;
}
return str( boost::format("%.1lf %sB") % engBytes % (power > 0 ? siPrefix[power-1] : "") );
}
diff --git a/Swift/QtUI/QtFileTransferListItemModel.cpp b/Swift/QtUI/QtFileTransferListItemModel.cpp
index 1b8ec51..63dd45a 100644
--- a/Swift/QtUI/QtFileTransferListItemModel.cpp
+++ b/Swift/QtUI/QtFileTransferListItemModel.cpp
@@ -1,26 +1,27 @@
/*
* Copyright (c) 2011 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include "QtFileTransferListItemModel.h"
#include <boost/bind.hpp>
+#include <boost/cstdint.hpp>
#include <Swiften/Base/boost_bsignals.h>
#include <Swift/Controllers/FileTransfer/FileTransferController.h>
#include <Swift/Controllers/FileTransfer/FileTransferOverview.h>
namespace Swift {
-extern std::string formatSize(const uintmax_t bytes);
+extern std::string formatSize(const boost::uintmax_t bytes);
QtFileTransferListItemModel::QtFileTransferListItemModel(QObject *parent) : QAbstractItemModel(parent), fileTransferOverview(0) {
}
void QtFileTransferListItemModel::setFileTransferOverview(FileTransferOverview *overview) {
fileTransferOverview = overview;
fileTransferOverview->onNewFileTransferController.connect(boost::bind(&QtFileTransferListItemModel::handleNewFileTransferController, this, _1));
}