Skip to content
Snippets Groups Projects
Commit 09e52890 authored by Emmanuel Lepage's avatar Emmanuel Lepage
Browse files

[ #12352 ] Fix deleting account

parent 92bd5ce8
Branches
Tags
No related merge requests found
...@@ -275,7 +275,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime ...@@ -275,7 +275,7 @@ bool CallView::phoneNumberToCall(QTreeWidgetItem *parent, int index, const QMime
Q_UNUSED(action) Q_UNUSED(action)
QByteArray encodedPhoneNumber = data->data( MIME_PHONENUMBER ); QByteArray encodedPhoneNumber = data->data( MIME_PHONENUMBER );
if (!QString(encodedPhoneNumber).isEmpty()) { if (!QString(encodedPhoneNumber).isEmpty()) {
Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(encodedPhoneNumber); Contact* contact = AkonadiBackend::getInstance()->getContactByPhone(encodedPhoneNumber,true);
QString name; QString name;
name = (contact)?contact->getFormattedName():i18n("Unknown"); name = (contact)?contact->getFormattedName():i18n("Unknown");
Call* call2 = SFLPhone::model()->addDialingCall(name, AccountList::getCurrentAccount()); Call* call2 = SFLPhone::model()->addDialingCall(name, AccountList::getCurrentAccount());
......
...@@ -586,6 +586,7 @@ void DlgAccounts::on_button_accountRemove_clicked() ...@@ -586,6 +586,7 @@ void DlgAccounts::on_button_accountRemove_clicked()
{ {
kDebug() << "on_button_accountRemove_clicked"; kDebug() << "on_button_accountRemove_clicked";
AccountList::getInstance()->removeAccount(listView_accountList->currentIndex()); AccountList::getInstance()->removeAccount(listView_accountList->currentIndex());
listView_accountList->setCurrentIndex(listView_accountList->model()->index(0,0));
} }
void DlgAccounts::on_edit1_alias_textChanged(const QString & text) void DlgAccounts::on_edit1_alias_textChanged(const QString & text)
...@@ -636,6 +637,7 @@ void DlgAccounts::updateAccountStates() ...@@ -636,6 +637,7 @@ void DlgAccounts::updateAccountStates()
void DlgAccounts::updateStatusLabel(QModelIndex item) void DlgAccounts::updateStatusLabel(QModelIndex item)
{ {
kDebug() << "MODEL index is" << item.row();
if(!item.isValid()) { if(!item.isValid()) {
return; return;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment