aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-04 21:05:40 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-04 21:05:40 -0400
commit00885c1ddd04819c44d6a0ca2c7f2af8a1298a97 (patch)
tree049e560e1c7086d0cbf045a647b47e8c588e813c /libqmenumodel
parent2a01b1cba8af5891bac632683286951e2c3f95f0 (diff)
downloadqmenumodel-00885c1ddd04819c44d6a0ca2c7f2af8a1298a97.tar.gz
qmenumodel-00885c1ddd04819c44d6a0ca2c7f2af8a1298a97.tar.bz2
qmenumodel-00885c1ddd04819c44d6a0ca2c7f2af8a1298a97.zip
unitymenumodel: expose isSeparator
Diffstat (limited to 'libqmenumodel')
-rw-r--r--libqmenumodel/src/unitymenumodel.cpp4
-rw-r--r--libqmenumodel/src/unitymenumodel.h3
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: