diff options
Diffstat (limited to 'libqmenumodel/src')
-rw-r--r-- | libqmenumodel/src/unitymenumodel.cpp | 4 | ||||
-rw-r--r-- | libqmenumodel/src/unitymenumodel.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp index 926d2f1..336b72a 100644 --- a/libqmenumodel/src/unitymenumodel.cpp +++ b/libqmenumodel/src/unitymenumodel.cpp @@ -119,6 +119,9 @@ QVariant UnityMenuModelPrivate::data(int position, int role) case UnityMenuModel::SensitiveRole: return gtk_menu_tracker_item_get_sensitive (item); + case UnityMenuModel::IsSeparatorRole: + return gtk_menu_tracker_item_get_is_separator (item); + default: return QVariant(); } @@ -275,6 +278,7 @@ QHash<int, QByteArray> UnityMenuModel::roleNames() const names[LabelRole] = "label"; names[ActionRole] = "action"; names[SensitiveRole] = "sensitive"; + names[IsSeparatorRole] = "isSeparator"; return names; } diff --git a/libqmenumodel/src/unitymenumodel.h b/libqmenumodel/src/unitymenumodel.h index 12a5891..75af13a 100644 --- a/libqmenumodel/src/unitymenumodel.h +++ b/libqmenumodel/src/unitymenumodel.h @@ -29,7 +29,8 @@ public: enum MenuRoles { ActionRole = Qt::DisplayRole + 1, LabelRole, - SensitiveRole + SensitiveRole, + IsSeparatorRole }; public: |