Skip to content
Snippets Groups Projects
Commit 4e06de11 authored by Jérémy Quentin's avatar Jérémy Quentin
Browse files

[#1853] Edit before call does nothing on call history

[#1854] Edit before call calls even if user presses cancel
parent 80dcd40f
No related branches found
No related tags found
No related merge requests found
...@@ -1150,11 +1150,14 @@ void sflphone_kdeView::editBeforeCall() ...@@ -1150,11 +1150,14 @@ void sflphone_kdeView::editBeforeCall()
if(item) if(item)
{ {
Call * call = callList->findCallByHistoryItem(item); Call * call = callList->findCallByHistoryItem(item);
if(call)
{
name = call->getPeerName(); name = call->getPeerName();
number = call->getPeerPhoneNumber(); number = call->getPeerPhoneNumber();
} }
} }
if(stackedWidget_screen->currentWidget() == page_addressBook) }
else if(stackedWidget_screen->currentWidget() == page_addressBook)
{ {
QListWidgetItem * item = listWidget_addressBook->currentItem(); QListWidgetItem * item = listWidget_addressBook->currentItem();
if(item) if(item)
...@@ -1166,8 +1169,10 @@ void sflphone_kdeView::editBeforeCall() ...@@ -1166,8 +1169,10 @@ void sflphone_kdeView::editBeforeCall()
} }
else else
{ return; } { return; }
QString newNumber = QInputDialog::getText(this, i18n("Edit before call"), QString(), QLineEdit::Normal, number); bool ok;
QString newNumber = QInputDialog::getText(this, i18n("Edit before call"), QString(), QLineEdit::Normal, number, &ok);
if(ok)
{
action_history->setChecked(false); action_history->setChecked(false);
action_addressBook->setChecked(false); action_addressBook->setChecked(false);
stackedWidget_screen->setCurrentWidget(page_callList); stackedWidget_screen->setCurrentWidget(page_callList);
...@@ -1177,6 +1182,7 @@ void sflphone_kdeView::editBeforeCall() ...@@ -1177,6 +1182,7 @@ void sflphone_kdeView::editBeforeCall()
listWidget_callList->setCurrentRow(listWidget_callList->count() - 1); listWidget_callList->setCurrentRow(listWidget_callList->count() - 1);
action(call, CALL_ACTION_ACCEPT); action(call, CALL_ACTION_ACCEPT);
} }
}
void sflphone_kdeView::setAccountFirst(Account * account) void sflphone_kdeView::setAccountFirst(Account * account)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment