Commit 6a785af7 authored by Edric Milaret's avatar Edric Milaret

fix for out of call messaging

- Duplicate signal and control name leads to
only in call messaging widget functionning properly

This is a bug caused by #3752

Tuleap: #429
Change-Id: I9cd7b4af9f769cf99e51d2ff50b2b2a52b7312c9
parent c7b8e4b0
......@@ -616,25 +616,25 @@ CallWidget::showIMOutOfCall(const QModelIndex& nodeIdx)
}
void
CallWidget::on_sendButton_clicked()
CallWidget::on_sendIMButton_clicked()
{
if (ui->messageEdit->text().trimmed().isEmpty())
if (ui->imMessageEdit->text().trimmed().isEmpty())
return;
auto number = ui->contactMethodComboBox->currentText();
if (auto cm = PhoneDirectoryModel::instance().getNumber(number)) {
QMap<QString, QString> msg;
msg["text/plain"] = ui->messageEdit->text();
msg["text/plain"] = ui->imMessageEdit->text();
cm->sendOfflineTextMessage(msg);
ui->messageEdit->clear();
ui->imMessageEdit->clear();
} else {
qWarning() << "Contact Method not found for " << number;
}
}
void
CallWidget::on_messageEdit_returnPressed()
CallWidget::on_imMessageEdit_returnPressed()
{
on_sendButton_clicked();
on_sendIMButton_clicked();
}
void
......
......@@ -74,8 +74,8 @@ private slots:
void on_cancelButton_clicked();
void on_smartList_doubleClicked(const QModelIndex& index);
void on_historyList_doubleClicked(const QModelIndex& index);
void on_sendButton_clicked();
void on_messageEdit_returnPressed();
void on_sendIMButton_clicked();
void on_imMessageEdit_returnPressed();
void on_contactMethodComboBox_currentIndexChanged(const QString& number);
void on_ringContactLineEdit_textChanged(const QString& text);
void on_imBackButton_clicked();
......
......@@ -993,7 +993,7 @@
<number>6</number>
</property>
<item>
<widget class="QLineEdit" name="messageEdit">
<widget class="QLineEdit" name="imMessageEdit">
<property name="minimumSize">
<size>
<width>0</width>
......@@ -1008,7 +1008,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="sendButton">
<widget class="QPushButton" name="sendIMButton">
<property name="minimumSize">
<size>
<width>30</width>
......@@ -1017,8 +1017,8 @@
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
<width>30</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
......
......@@ -75,7 +75,7 @@ QListView#listMessageView{
border-top: 1px solid rgb(229, 229, 229);
}
QLineEdit#messageEdit{
QLineEdit#messageEdit, QLineEdit#imMessageEdit{
border-color: rgb(0, 192, 212);
border-radius: 5px;
border-width: 1px;
......@@ -138,29 +138,26 @@ QPushButton#imBackButton:pressed, QPushButton#copyCMButton:pressed, QPushButton#
background-color: #313131;
}
QPushButton#sendButton{
background-color: #3AC0D2;
border-radius: 18px;
border:solid 1px;
}
QPushButton#btnvideo{
background-color: #3AC0D2;
border-radius: 15px;
border:solid 1px;
}
QPushButton#btnCall, QPushButton#btnComBarVideo, QPushButton#sendButton{
QPushButton#btnCall, QPushButton#btnComBarVideo,
QPushButton#sendButton, QPushButton#sendIMButton{
background-color: #3AC0D2;
border-radius: 15px;
border:solid 1px;
}
QPushButton#btnCall:hover, QPushButton#sendButton:hover, QPushButton#btnComBarVideo:hover{
QPushButton#btnCall:hover, QPushButton#sendButton:hover,
QPushButton#sendIMButton:hover, QPushButton#btnComBarVideo:hover{
background-color: #4dc6d6;
}
QPushButton#sendButton:pressed, QPushButton#btnCall:pressed, QPushButton#sendButton:pressed, QPushButton#btnComBarVideo:pressed{
QPushButton#btnCall:pressed, QPushButton#sendButton:pressed,
QPushButton#sendIMButton:pressed, QPushButton#btnComBarVideo:pressed{
background-color: #34acbd;
}
......
......@@ -315,6 +315,8 @@ VideoView::mousePressEvent(QMouseEvent* event)
void
VideoView::mouseReleaseEvent(QMouseEvent* event)
{
Q_UNUSED(event)
draggingPreview_ = false;
resizingPreview_ = false;
QApplication::setOverrideCursor(Qt::ArrowCursor);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment