summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtChatView.cpp3
-rw-r--r--Swift/QtUI/QtChatWindow.cpp8
-rw-r--r--Swift/QtUI/Roster/QtRosterWidget.cpp2
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp2
4 files changed, 8 insertions, 7 deletions
diff --git a/Swift/QtUI/QtChatView.cpp b/Swift/QtUI/QtChatView.cpp
index cb7f901..7bb5818 100644
--- a/Swift/QtUI/QtChatView.cpp
+++ b/Swift/QtUI/QtChatView.cpp
@@ -22,6 +22,7 @@
#include "QtWebView.h"
#include "QtChatTheme.h"
+#include "QtSwiftUtil.h"
namespace Swift {
@@ -302,7 +303,7 @@ void QtChatView::setFileTransferProgress(QString id, const int percentageDone) {
void QtChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& /* msg */) {
QWebElement ftElement = findDivElementWithID(document_, id);
if (ftElement.isNull()) {
- SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << id.toStdString() << std::endl;
+ SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl;
return;
}
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 496c42c..07ff47e 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -537,7 +537,7 @@ void QtChatWindow::setFileTransferStatus(std::string id, const FileTransferState
void QtChatWindow::handleFileTransferCancel(QString id) {
qDebug() << "QtChatWindow::handleFileTransferCancel(" << id << ")";
- onFileTransferCancel(id.toStdString());
+ onFileTransferCancel(Q2PSTRING(id));
}
void QtChatWindow::handleFileTransferSetDescription(QString id) {
@@ -553,7 +553,7 @@ void QtChatWindow::handleFileTransferStart(QString id) {
qDebug() << "QtChatWindow::handleFileTransferStart(" << id << ")";
QString text = descriptions.find(id) == descriptions.end() ? QString() : descriptions[id];
- onFileTransferStart(id.toStdString(), text.toStdString());
+ onFileTransferStart(Q2PSTRING(id), Q2PSTRING(text));
}
void QtChatWindow::handleFileTransferAccept(QString id, QString filename) {
@@ -561,7 +561,7 @@ void QtChatWindow::handleFileTransferAccept(QString id, QString filename) {
QString path = QFileDialog::getSaveFileName(this, tr("Save File"), filename);
if (!path.isEmpty()) {
- onFileTransferAccept(id.toStdString(), path.toStdString());
+ onFileTransferAccept(Q2PSTRING(id), Q2PSTRING(path));
}
}
@@ -677,7 +677,7 @@ void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) {
void QtChatWindow::dropEvent(QDropEvent *event) {
if (event->mimeData()->urls().size() == 1) {
- onSendFileRequest(event->mimeData()->urls().at(0).toLocalFile().toStdString());
+ onSendFileRequest(Q2PSTRING(event->mimeData()->urls().at(0).toLocalFile()));
} else {
addSystemMessage("Sending of multiple files at once isn't supported at this time.");
}
diff --git a/Swift/QtUI/Roster/QtRosterWidget.cpp b/Swift/QtUI/Roster/QtRosterWidget.cpp
index 3d9b273..4c96695 100644
--- a/Swift/QtUI/Roster/QtRosterWidget.cpp
+++ b/Swift/QtUI/Roster/QtRosterWidget.cpp
@@ -75,7 +75,7 @@ void QtRosterWidget::contextMenuEvent(QContextMenuEvent* event) {
else if (sendFile && result == sendFile) {
QString fileName = QFileDialog::getOpenFileName(this, tr("Send File"), "", tr("All Files (*);;"));
if (!fileName.isEmpty()) {
- eventStream_->send(boost::make_shared<SendFileUIEvent>(contact->getJID(), fileName.toStdString()));
+ eventStream_->send(boost::make_shared<SendFileUIEvent>(contact->getJID(), Q2PSTRING(fileName)));
}
}
#endif
diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp
index 2e37ba2..690515d 100644
--- a/Swift/QtUI/Roster/QtTreeWidget.cpp
+++ b/Swift/QtUI/Roster/QtTreeWidget.cpp
@@ -124,7 +124,7 @@ void QtTreeWidget::dropEvent(QDropEvent *event) {
if (contact->supportsFeature(ContactRosterItem::FileTransferFeature)) {
QString filename = event->mimeData()->urls().at(0).toLocalFile();
if (!filename.isEmpty()) {
- eventStream_->send(boost::make_shared<SendFileUIEvent>(contact->getJID(), filename.toStdString()));
+ eventStream_->send(boost::make_shared<SendFileUIEvent>(contact->getJID(), Q2PSTRING(filename)));
}
}
}