Commit b914c8ca authored by Joachim Wilke's avatar Joachim Wilke
Browse files

Call list now resolves all occurences of the same number

- Updated libfritz++
- Improved KFritzWindow::resolveNumber() to check all entries

BUG: 277229
FIXED-IN: 0.0.8
parent 2d13702c
......@@ -634,17 +634,19 @@ void KFritzWindow::pasteEntry() {
void KFritzWindow::resolveNumber() {
ContainerWidget *container = static_cast<ContainerWidget *>(tabWidget->currentWidget());
QAdaptTreeView *treeView = container->getTreeView();
if (container->isCalllist()) {
std::string currentNumber = getCurrentNumber();
fritz::Fonbook::sResolveResult result = fritz::FonbookManager::GetFonbook()->ResolveToName(currentNumber);
if (!result.name.compare(currentNumber)) {
statusBar()->showMessage(i18n("%1 did not resolve.", toUnicode(currentNumber)), 0);
} else {
fritz::CallEntry *entry = container->getCalllistModel()->retrieveCallEntry(treeView->currentIndex());
entry->remoteName = result.name;
//TODO: change all calllist entries with this number
statusBar()->showMessage(i18n("%1 resolves to \"%2\".", toUnicode(currentNumber), toUnicode(result.name), 0));
KCalllistProxyModel *model = container->getCalllistModel();
for (int pos = 0; pos < model->rowCount(QModelIndex()); pos++) {
fritz::CallEntry *entry = model->retrieveCallEntry(model->index(pos, 0, QModelIndex()));
if (entry->MatchesRemoteNumber(currentNumber))
entry->remoteName = result.name;
}
statusBar()->showMessage(i18n("%1 resolves to \"%2\".", toUnicode(currentNumber), toUnicode(result.name), 0));
}
}
}
......
libfritz++ @ 627c22fb
Subproject commit 57ed64f2b287151e086a3386486fdabafe5dc258
Subproject commit 627c22fb68ed87e61bfecd15739fcbd1cd555386
Supports Markdown
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