From fbe49bbfd45e75d9aa2f3b1a49688002e63ef3de Mon Sep 17 00:00:00 2001
From: David Rowe
Date: Sat, 27 Apr 2019 10:20:35 +1200
Subject: [PATCH] Doc review
---
interface/src/scripting/MenuScriptingInterface.h | 11 ++++++-----
libraries/script-engine/src/MenuItemProperties.cpp | 6 +++---
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/interface/src/scripting/MenuScriptingInterface.h b/interface/src/scripting/MenuScriptingInterface.h
index 1ab691ac59..6c2634b1de 100644
--- a/interface/src/scripting/MenuScriptingInterface.h
+++ b/interface/src/scripting/MenuScriptingInterface.h
@@ -26,7 +26,7 @@ class MenuItemProperties;
* A "grouping" provides a way to group a set of menus or menu items together so that they can all be set visible or invisible
* as a group.
There is currently only one available group: "Developer"
. This grouping can be toggled in the
* "Settings" menu.
- * If a menu item doesn't belong to a group it is always displayed.
+ * If a menu item doesn't belong to a group, it is always displayed.
*
* @namespace Menu
*
@@ -85,7 +85,7 @@ public slots:
/**jsdoc
* Checks whether a top-level menu exists.
* @function Menu.menuExists
- * @param {string} menuName - Name of the menu to check for existence.
+ * @param {string} menuName - Name of the menu to check exists.
* @returns {boolean} true
if the menu exists, otherwise false
.
* @example Check if the "Developer" menu exists.
* if (Menu.menuExists("Developer")) {
@@ -98,7 +98,7 @@ public slots:
* Adds a separator with an unclickable label below it. The separator will be placed at the bottom of the menu. To add a
* separator at a specific point in the menu, use {@link Menu.addMenuItem} with {@link Menu.MenuItemProperties} instead.
* @function Menu.addSeparator
- * @param {string} menuName - Name of the menu to add a separator to.
+ * @param {string} menuName - Name of the menu to add the separator to.
* @param {string} separatorName - Name of the separator that will be displayed as the label below the separator line.
* @example Add a separator.
* Menu.addSeparator("Developer", "Test Separator");
@@ -119,7 +119,7 @@ public slots:
* Adds a new menu item to a menu. The menu item is specified using {@link Menu.MenuItemProperties}.
* @function Menu.addMenuItem
* @param {Menu.MenuItemProperties} properties - Properties of the menu item to create.
- * @example Add a menu item at a particular position in the "Develope"r menu.
+ * @example Add a menu item at a particular position in the "Developer" menu.
* Menu.addMenuItem({
* menuName: "Developer",
* menuItemName: "Test",
@@ -133,7 +133,7 @@ public slots:
* Adds a new menu item to a menu. The new item is added at the end of the menu.
* @function Menu.addMenuItem
* @variation 0
- * @param {string} menuName - Name of the menu to add a menu item to.
+ * @param {string} menuName - Name of the menu to add the menu item to.
* @param {string} menuItem - Name of the menu item. This is what will be displayed in the menu.
* @param {string} [shortcutKey] A shortcut key that can be used to trigger the menu item.
* @example Add a menu item to the end of the "Developer" menu.
@@ -147,6 +147,7 @@ public slots:
* @function Menu.removeMenuItem
* @param {string} menuName - Name of the menu to remove a menu item from.
* @param {string} menuItem - Name of the menu item to remove.
+ * @example Remove a menu item from the "Developer" menu.
* Menu.removeMenuItem("Developer", "Test");
*/
void removeMenuItem(const QString& menuName, const QString& menuitem);
diff --git a/libraries/script-engine/src/MenuItemProperties.cpp b/libraries/script-engine/src/MenuItemProperties.cpp
index 31aa0dd81c..af9c4a3d0a 100644
--- a/libraries/script-engine/src/MenuItemProperties.cpp
+++ b/libraries/script-engine/src/MenuItemProperties.cpp
@@ -53,11 +53,11 @@ QScriptValue menuItemPropertiesToScriptValue(QScriptEngine* engine, const MenuIt
/**jsdoc
* A set of properties that can be passed to {@link Menu.addMenuItem} to create a new menu item.
*
- * If none of position
, beforeItem
, afterItem
, or grouping
are specified,
- * the menu item will be placed at the end of the menu.
+ * If none of the properties, position
, beforeItem
, afterItem
, or grouping
+ * are specified, the menu item will be placed at the end of the menu.
*
* @typedef {object} Menu.MenuItemProperties
- * @property {string} menuName - Name of the menu. Nested menus can be described using the ">" symbol.
+ * @property {string} menuName - Name of the menu. Nested menus can be described using the ">" character.
* @property {string} menuItemName - Name of the menu item.
* @property {boolean} [isCheckable=false] - Whether or not the menu item is checkable.
* @property {boolean} [isChecked=false] - Whether or not the menu item is checked.