John Levon <[EMAIL PROTECTED]> writes:

|  void Menubar::Pimpl::update()
|  {
| -     // FIXME: handle special stuff to be updated.
| - 
| -     ItemMap::const_iterator cit = items_.begin();
| -     ItemMap::const_iterator end = items_.end();
| +     size_t i;

Why is this funciton wide?

| +     QMenuData const * bar(owner_->menuBar());
|  
| -     for (; cit != end; ++cit)
| -             updateItem(cit->second);
| +     for (i = 0; i < bar->count(); ++i) {

Just use: for (size_t i = 0; i < bar->count(); ++i) {

| +             bar->findItem(bar->idAt(i))->popup()->clear();
| +     }
| + 
| +     qApp->processEvents();
| + 
| +     i = 0;

drop this.

| + 
| +     Menu::const_iterator m = menubackend_.getMenubar().begin();
| +     Menu::const_iterator end = menubackend_.getMenubar().end();
| +     for (; m != end; ++m) {

Just use: for (size_t i = 0; m != end; ++m, ++i) {

| +             Menu tomenu;
| +             Menu const frommenu = menubackend_.getMenu(m->submenuname());
| +             menubackend_.expand(frommenu, tomenu, owner_->buffer());
| +             fillMenu(bar->findItem(bar->idAt(i))->popup(), tomenu);
| +             ++i;

drop this.

-- 
        Lgb

Reply via email to