diff options
author | Tobias Markmann <tm@ayena.de> | 2015-03-30 13:49:56 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2015-04-10 14:06:42 (GMT) |
commit | 69dce2c01bf46cca3db68a113f49bb31e7be4b03 (patch) | |
tree | 55b983a139292cb0b96e498872c4f7e8a93d1520 /Swift/QtUI | |
parent | 89e5dd08171366ccfb1f598e6e5f140a166b0680 (diff) | |
download | swift-69dce2c01bf46cca3db68a113f49bb31e7be4b03.zip swift-69dce2c01bf46cca3db68a113f49bb31e7be4b03.tar.bz2 |
Introduce FeatureOracle class for contact feature support detection
This modifies the feature detection in the ChatController to try to use
the common features of all available resources feature detection if no
full JID has been bound to the chat yet.
Test-Information:
Tested with two Swift instances. Tested
a) the initial chat start case and,
b) the offline/online.
In case a) Swift used to initally show a yellow warning about no support
for message receipts. This warning is gone now.
In case b), after a user gone offline and online again in a running chat,
Swift used to show a warning about missing support for message receipts.
This warning is gone now.
Change-Id: I7a769fde8d14847b180503aeaa58280c572d81b3
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index b1b9f83..88df2e9 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -15,6 +15,7 @@ #include <QCloseEvent> #include <QComboBox> #include <QCursor> +#include <QDebug> #include <QFileDialog> #include <QFileInfo> #include <QInputDialog> @@ -34,8 +35,6 @@ #include <QToolButton> #include <QUrl> -#include <qdebug.h> - #include <Swiften/Base/Log.h> #include <Swift/Controllers/Roster/ContactRosterItem.h> @@ -289,10 +288,10 @@ void QtChatWindow::handleKeyPressEvent(QKeyEvent* event) { void QtChatWindow::beginCorrection() { boost::optional<AlertID> newCorrectingAlert; - if (correctionEnabled_ == ChatWindow::Maybe) { + if (correctionEnabled_ == Maybe) { newCorrectingAlert = addAlert(Q2PSTRING(tr("This chat may not support message correction. If you send a correction anyway, it may appear as a duplicate message"))); } - else if (correctionEnabled_ == ChatWindow::No) { + else if (correctionEnabled_ == No) { newCorrectingAlert = addAlert(Q2PSTRING(tr("This chat does not support message correction. If you send a correction anyway, it will appear as a duplicate message"))); } @@ -613,7 +612,7 @@ void QtChatWindow::dragEnterEvent(QDragEnterEvent *event) { } void QtChatWindow::dropEvent(QDropEvent *event) { - if (fileTransferEnabled_ == ChatWindow::Yes && event->mimeData()->hasUrls()) { + if (fileTransferEnabled_ == Yes && event->mimeData()->hasUrls()) { if (event->mimeData()->urls().size() == 1) { onSendFileRequest(Q2PSTRING(event->mimeData()->urls().at(0).toLocalFile())); } |