| 508 | } |
| 509 | |
| 510 | void Container::statusIconChanged(Document* doc) |
| 511 | { |
| 512 | Q_D(Container); |
| 513 | |
| 514 | QHashIterator<QWidget*, View*> it = d->viewForWidget; |
| 515 | while (it.hasNext()) { |
| 516 | if (it.next().value()->document() == doc) { |
| 517 | d->fileStatus->setPixmap( doc->statusIcon().pixmap( QSize( 16,16 ) ) ); |
| 518 | int tabIndex = d->stack->indexOf(it.key()); |
| 519 | if (tabIndex != -1) { |
| 520 | d->tabBar->setTabIcon(tabIndex, doc->statusIcon()); |
| 521 | } |
| 522 | |
| 523 | // Update the document title's menu associated action |
| 524 | // using the View* index map |
| 525 | auto* const action = d->documentListActionForView.value(it.value()); |
| 526 | Q_ASSERT(action); |
| 527 | action->setIcon(doc->icon()); |
| 528 | break; |
| 529 | } |
| 530 | } |
| 531 | } |
| 532 | |
| 533 | void Container::documentTitleChanged(Sublime::Document* doc) |
| 534 | { |