Changeset 46593 in webkit
- Timestamp:
- Jul 30, 2009 12:07:36 PM (15 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r46592 r46593 1 2009-07-30 Mike Fenton <mike.fenton@torchmobile.com> 2 3 Reviewed by Adam Treat. 4 5 Add previously defined out support to PopupMenuQt for marking entries as 6 disabled and for selecting the desired item. 7 8 https://bugs.webkit.org/show_bug.cgi?id=27772 9 10 * platform/qt/PopupMenuQt.cpp: 11 (WebCore::PopupMenu::populate): 12 1 13 2009-07-30 Darin Adler <darin@apple.com> 2 14 -
trunk/WebCore/platform/qt/PopupMenuQt.cpp
r46483 r46593 39 39 #include <QMenu> 40 40 #include <QPoint> 41 #include <QStandardItemModel> 41 42 #include <QWidgetAction> 42 43 … … 64 65 Q_ASSERT(client()); 65 66 67 QStandardItemModel* model = qobject_cast<QStandardItemModel*>(m_popup->model()); 68 Q_ASSERT(model); 69 66 70 int size = client()->listSize(); 67 71 for (int i = 0; i < size; i++) { 68 72 if (client()->itemIsSeparator(i)) 69 73 m_popup->insertSeparator(i); 70 else 74 else { 71 75 m_popup->insertItem(i, client()->itemText(i)); 76 77 if (model && !client()->itemIsEnabled(i)) 78 model->item(i)->setEnabled(false); 79 80 if (client()->itemIsSelected(i)) 81 m_popup->setCurrentIndex(i); 82 } 72 83 } 73 84 }
Note: See TracChangeset
for help on using the changeset viewer.