diff options
Diffstat (limited to 'Swift/QtUI/QtWebKitChatView.cpp')
| -rw-r--r-- | Swift/QtUI/QtWebKitChatView.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index 57706d4..0c82e73 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.cpp | |||
| @@ -416,10 +416,11 @@ static QWebElement findElementWithID(QWebElement document, QString elementName, | |||
| 416 | } | 416 | } |
| 417 | return QWebElement(); | 417 | return QWebElement(); |
| 418 | } | 418 | } |
| 419 | 419 | ||
| 420 | void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageDone) { | 420 | void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageDone) { |
| 421 | rememberScrolledToBottom(); | ||
| 421 | QWebElement ftElement = findElementWithID(document_, "div", id); | 422 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 422 | if (ftElement.isNull()) { | 423 | if (ftElement.isNull()) { |
| 423 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!" << std::endl; | 424 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id!" << std::endl; |
| 424 | return; | 425 | return; |
| 425 | } | 426 | } |
| @@ -429,10 +430,11 @@ void QtWebKitChatView::setFileTransferProgress(QString id, const int percentageD | |||
| 429 | QWebElement progressBarValue = ftElement.findFirst("div.progressbar-value"); | 430 | QWebElement progressBarValue = ftElement.findFirst("div.progressbar-value"); |
| 430 | progressBarValue.setInnerXml(QString::number(percentageDone) + " %"); | 431 | progressBarValue.setInnerXml(QString::number(percentageDone) + " %"); |
| 431 | } | 432 | } |
| 432 | 433 | ||
| 433 | void QtWebKitChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& /* msg */) { | 434 | void QtWebKitChatView::setFileTransferStatus(QString id, const ChatWindow::FileTransferState state, const QString& /* msg */) { |
| 435 | rememberScrolledToBottom(); | ||
| 434 | QWebElement ftElement = findElementWithID(document_, "div", id); | 436 | QWebElement ftElement = findElementWithID(document_, "div", id); |
| 435 | if (ftElement.isNull()) { | 437 | if (ftElement.isNull()) { |
| 436 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl; | 438 | SWIFT_LOG(debug) << "Tried to access FT UI via invalid id! id = " << Q2PSTRING(id) << std::endl; |
| 437 | return; | 439 | return; |
| 438 | } | 440 | } |
Swift