diff options
| author | Remko Tronçon <git@el-tramo.be> | 2012-11-18 12:51:22 (GMT) | 
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2013-04-05 17:57:48 (GMT) | 
| commit | b9ef4566d31219d66a615b1eae042a01828c8b7d (patch) | |
| tree | 49e7f254b0543146f86404773048101149c937a6 | |
| parent | 92640bf4e5ff215b9e83e64d78777c7b163409db (diff) | |
| download | swift-b9ef4566d31219d66a615b1eae042a01828c8b7d.zip swift-b9ef4566d31219d66a615b1eae042a01828c8b7d.tar.bz2 | |
Remove QString::fromStdString usage.
Change-Id: I27e91b18e64385bc28a5eee816293c66e34bfbb0
| -rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 10 | ||||
| -rw-r--r-- | Swift/QtUI/QtFileTransferListItemModel.cpp | 5 | ||||
| -rw-r--r-- | Swift/QtUI/QtFormResultItemModel.cpp | 2 | 
3 files changed, 9 insertions, 8 deletions
| diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index 0857455..237d78c 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -666,11 +666,11 @@ std::string QtChatWindow::addFileTransfer(const std::string& senderName, bool se  }  void QtChatWindow::setFileTransferProgress(std::string id, const int percentageDone) { -	messageLog_->setFileTransferProgress(QString::fromStdString(id), percentageDone); +	messageLog_->setFileTransferProgress(P2QSTRING(id), percentageDone);  }  void QtChatWindow::setFileTransferStatus(std::string id, const FileTransferState state, const std::string& msg) { -	messageLog_->setFileTransferStatus(QString::fromStdString(id), state, QString::fromStdString(msg)); +	messageLog_->setFileTransferStatus(P2QSTRING(id), state, P2QSTRING(msg));  }  std::string QtChatWindow::addWhiteboardRequest(bool senderIsSelf) { @@ -703,7 +703,7 @@ std::string QtChatWindow::addWhiteboardRequest(bool senderIsSelf) {  }  void QtChatWindow::setWhiteboardSessionStatus(std::string id, const ChatWindow::WhiteboardSessionState state) { -	messageLog_->setWhiteboardSessionStatus(QString::fromStdString(id), state); +	messageLog_->setWhiteboardSessionStatus(P2QSTRING(id), state);  }  void QtChatWindow::handleHTMLButtonClicked(QString id, QString encodedArgument1, QString encodedArgument2, QString encodedArgument3) { @@ -740,12 +740,12 @@ void QtChatWindow::handleHTMLButtonClicked(QString id, QString encodedArgument1,  	}  	else if (id.startsWith(ButtonWhiteboardSessionAcceptRequest)) {  		QString id = arg1; -		messageLog_->setWhiteboardSessionStatus(QString::fromStdString(Q2PSTRING(id)), ChatWindow::WhiteboardAccepted); +		messageLog_->setWhiteboardSessionStatus(id, ChatWindow::WhiteboardAccepted);  		onWhiteboardSessionAccept();  	}  	else if (id.startsWith(ButtonWhiteboardSessionCancel)) {  		QString id = arg1; -		messageLog_->setWhiteboardSessionStatus(QString::fromStdString(Q2PSTRING(id)), ChatWindow::WhiteboardTerminated); +		messageLog_->setWhiteboardSessionStatus(id, ChatWindow::WhiteboardTerminated);  		onWhiteboardSessionCancel();  	}  	else if (id.startsWith(ButtonWhiteboardShowWindow)) { diff --git a/Swift/QtUI/QtFileTransferListItemModel.cpp b/Swift/QtUI/QtFileTransferListItemModel.cpp index fac0761..9f7ccdc 100644 --- a/Swift/QtUI/QtFileTransferListItemModel.cpp +++ b/Swift/QtUI/QtFileTransferListItemModel.cpp @@ -14,6 +14,7 @@  #include <Swiften/Base/boost_bsignals.h>  #include <Swift/Controllers/FileTransfer/FileTransferController.h>  #include <Swift/Controllers/FileTransfer/FileTransferOverview.h> +#include "QtSwiftUtil.h"  namespace Swift { @@ -65,7 +66,7 @@ QVariant QtFileTransferListItemModel::data(const QModelIndex &index, int role) c  		return controller->isIncoming() ? QVariant(QObject::tr("Incoming")) : QVariant(QObject::tr("Outgoing"));  	}  	if (index.column() == OtherParty) { -		return QVariant(QString::fromStdString(controller->getOtherParty().toString())); +		return QVariant(P2QSTRING(controller->getOtherParty().toString()));  	}  	if (index.column() == State) {  		FileTransfer::State state = controller->getState(); @@ -91,7 +92,7 @@ QVariant QtFileTransferListItemModel::data(const QModelIndex &index, int role) c  		return QVariant(QString::number(controller->getProgress()));  	}  	if (index.column() == OverallSize) { -		return QVariant(QString::fromStdString(formatSize((controller->getSize())))); +		return QVariant(P2QSTRING(formatSize((controller->getSize()))));  	}  	return QVariant();  } diff --git a/Swift/QtUI/QtFormResultItemModel.cpp b/Swift/QtUI/QtFormResultItemModel.cpp index 5461f05..b052334 100644 --- a/Swift/QtUI/QtFormResultItemModel.cpp +++ b/Swift/QtUI/QtFormResultItemModel.cpp @@ -35,7 +35,7 @@ QVariant QtFormResultItemModel::headerData(int section, Qt::Orientation /*orient  	if (!formResult_) return QVariant();  	if (role != Qt::DisplayRole) return QVariant();  	if (static_cast<size_t>(section) >= formResult_->getReportedFields().size()) return QVariant(); -	return QVariant(QString::fromStdString(formResult_->getReportedFields().at(section)->getLabel())); +	return QVariant(P2QSTRING(formResult_->getReportedFields().at(section)->getLabel()));  }  int QtFormResultItemModel::rowCount(const QModelIndex &/*parent*/) const { | 
 Swift
 Swift