summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <remko@synopsys.com>2011-09-30 17:10:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-09-30 17:15:59 (GMT)
commit75818abb4baa26649baf8d3bf6709aefcda7195f (patch)
tree25cf8cc224100688d813ab57f3ccf32771f1bdf1 /Swift/QtUI/QtChatWindow.cpp
parenta98f648f5cfbf474c566bd63193047e5381e7d5e (diff)
downloadswift-contrib-75818abb4baa26649baf8d3bf6709aefcda7195f.zip
swift-contrib-75818abb4baa26649baf8d3bf6709aefcda7195f.tar.bz2
Fixed some Windows issues with FT.
Diffstat (limited to 'Swift/QtUI/QtChatWindow.cpp')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp8
1 files changed, 4 insertions, 4 deletions
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
@@ -531,43 +531,43 @@ void QtChatWindow::setFileTransferProgress(std::string id, const int percentageD
messageLog_->setFileTransferProgress(QString::fromStdString(id), percentageDone);
}
void QtChatWindow::setFileTransferStatus(std::string id, const FileTransferState state, const std::string& msg) {
messageLog_->setFileTransferStatus(QString::fromStdString(id), state, QString::fromStdString(msg));
}
void QtChatWindow::handleFileTransferCancel(QString id) {
qDebug() << "QtChatWindow::handleFileTransferCancel(" << id << ")";
- onFileTransferCancel(id.toStdString());
+ onFileTransferCancel(Q2PSTRING(id));
}
void QtChatWindow::handleFileTransferSetDescription(QString id) {
bool ok = false;
QString text = QInputDialog::getText(this, tr("File transfer description"),
tr("Description:"), QLineEdit::Normal, "", &ok);
if (ok) {
descriptions[id] = text;
}
}
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) {
qDebug() << "QtChatWindow::handleFileTransferAccept(" << id << ", " << filename << ")";
QString path = QFileDialog::getSaveFileName(this, tr("Save File"), filename);
if (!path.isEmpty()) {
- onFileTransferAccept(id.toStdString(), path.toStdString());
+ onFileTransferAccept(Q2PSTRING(id), Q2PSTRING(path));
}
}
void QtChatWindow::addErrorMessage(const std::string& errorMessage) {
if (isWidgetSelected()) {
onAllMessagesRead();
}
QString errorMessageHTML(Qt::escape(P2QSTRING(errorMessage)));
@@ -671,19 +671,19 @@ void QtChatWindow::moveEvent(QMoveEvent*) {
void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) {
if (event->mimeData()->hasUrls() && event->mimeData()->urls().size() == 1) {
// TODO: check whether contact actually supports file transfer
event->acceptProposedAction();
}
}
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.");
}
}
void QtChatWindow::replaceLastMessage(const std::string& message) {
messageLog_->replaceLastMessage(P2QSTRING(Linkify::linkify(message)));
}