[Webkit-unassigned] [Bug 27772] PopupMenuQt lacks disabled and selected support

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 30 09:41:07 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27772


Adam Treat <treat at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #33658|review?                     |review-
               Flag|                            |




--- Comment #2 from Adam Treat <treat at kde.org>  2009-07-30 09:41:06 PDT ---
(From update of attachment 33658)
> diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
> +    QStandardItemModel *model = qobject_cast<QStandardItemModel*>(m_popup->model());
> +    Q_ASSERT(model);

Style decoration problem.  See coding guidelines.

> +            if (client()->itemIsSelected(i))
> +                m_popup->setCurrentIndex(i);

The big fear I have is that QComboBox uses QStandardItemModel internally... if
they change that to using something else we'll be asserting.

How about this... Still ASSERT on the model, but further down replace with:

    if (model && !client()->itemIsEnabled())

That way we won't worry in release builds.

Sound ok?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list