summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
Diffstat (limited to 'Swift')
-rw-r--r--Swift/QtUI/QtChatWindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 29bf25a..b7ac05f 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -783,19 +783,22 @@ void QtChatWindow::handleActionButtonClicked() {
case ChatWindow::ChangeSubject: changeSubject = contextMenu.addAction(tr("Change subject")); break;
case ChatWindow::Configure: configure = contextMenu.addAction(tr("Configure room")); break;
case ChatWindow::Affiliations: affiliations = contextMenu.addAction(tr("Edit affiliations")); break;
case ChatWindow::Destroy: destroy = contextMenu.addAction(tr("Destroy room")); break;
case ChatWindow::Invite: invite = contextMenu.addAction(tr("Invite person to this room")); break;
}
}
QAction* result = contextMenu.exec(QCursor::pos());
- if (result == changeSubject) {
+ if (result == NULL) {
+ /* Skip processing. Note that otherwise, because the actions could be null they could match */
+ }
+ else if (result == changeSubject) {
bool ok;
QString subject = QInputDialog::getText(this, tr("Change room subject"), tr("New subject:"), QLineEdit::Normal, subject_->text(), &ok);
if (ok) {
onChangeSubjectRequest(Q2PSTRING(subject));
}
}
else if (result == configure) {
onConfigureRequest(Form::ref());
}