From 67a535619fff140c8c151e6c8168bc233a072887 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Mon, 19 Mar 2018 12:38:12 +0100 Subject: [PATCH] fix typos as reported by Krazy2 --- doc/create-setupmethods.qdoc | 14 ++++++------ doc/jsonrpc-api.qdoc | 12 +++++----- doc/jsonrpc.qdoc | 10 ++++----- doc/nymea.qdoc | 2 +- doc/paramtypes-ui-elements.qdoc | 2 +- doc/plugin-json.qdoc | 12 +++++----- doc/setup-environment.qdoc | 6 ++--- doc/tutorial4.qdoc | 2 +- doc/tutorial5.qdoc | 12 +++++----- doc/tutorial6.qdoc | 2 +- doc/tutorials.qdoc | 4 ++-- .../bluetoothdiscoveryreplyimplementation.cpp | 2 +- ...bluetoothlowenergydeviceimplementation.cpp | 2 +- .../hardware/network/avahi/qtavahiservice.cpp | 4 ++-- .../upnp/upnpdiscoveryreplyimplementation.cpp | 2 +- .../network/upnp/upnpdiscoveryrequest.cpp | 2 +- .../plugintimermanagerimplementation.cpp | 4 ++-- .../plugintimermanagerimplementation.h | 2 +- .../radio433/radio433brennenstuhl.cpp | 2 +- libnymea-core/httpreply.cpp | 6 ++--- libnymea-core/httprequest.cpp | 4 ++-- libnymea-core/jsonrpc/jsonrpcserver.cpp | 2 +- libnymea-core/jsonrpc/ruleshandler.cpp | 6 ++--- libnymea-core/logging/logengine.cpp | 4 ++-- libnymea-core/nymeacore.cpp | 2 +- libnymea-core/rest/restserver.cpp | 2 +- libnymea-core/usermanager.cpp | 2 +- libnymea/coap/coap.cpp | 2 +- libnymea/coap/coappdu.h | 2 +- libnymea/coap/coapreply.cpp | 4 ++-- libnymea/devicemanager.cpp | 2 +- .../bluetoothdiscoveryreply.h | 2 +- .../bluetoothlowenergydevice.h | 2 +- libnymea/hardware/gpiomonitor.cpp | 2 +- libnymea/hardware/radio433/radio433.cpp | 4 ++-- libnymea/hardwareresource.cpp | 4 ++-- libnymea/network/upnp/upnpdiscoveryreply.cpp | 6 ++--- libnymea/network/upnp/upnpdiscoveryreply.h | 2 +- libnymea/plugintimer.cpp | 8 +++---- libnymea/types/action.cpp | 2 +- libnymea/types/deviceclass.cpp | 2 +- libnymea/types/param.cpp | 2 +- libnymea/types/paramtype.cpp | 2 +- nymea.pri | 2 +- server/qtservice/qtservice.cpp | 2 +- tests/auto/actions/testactions.cpp | 2 +- tests/auto/api.json | 8 +++---- tests/auto/coap/coaptests.cpp | 4 ++-- .../configurations/testconfigurations.cpp | 4 ++-- tests/auto/devices/testdevices.cpp | 4 ++-- tests/auto/events/testevents.cpp | 2 +- .../testrestdeviceclasses.cpp | 4 ++-- tests/auto/restdevices/testrestdevices.cpp | 4 ++-- tests/auto/restplugins/testrestplugins.cpp | 2 +- tests/auto/restrules/testrestrules.cpp | 6 ++--- tests/auto/restvendors/testrestvendors.cpp | 2 +- tests/auto/rules/testrules.cpp | 22 +++++++++---------- tests/auto/timemanager/testtimemanager.cpp | 2 +- 58 files changed, 122 insertions(+), 122 deletions(-) diff --git a/doc/create-setupmethods.qdoc b/doc/create-setupmethods.qdoc index c1bcfdaa..a73ad7e3 100644 --- a/doc/create-setupmethods.qdoc +++ b/doc/create-setupmethods.qdoc @@ -43,7 +43,7 @@ \list \li \b 1. | The main setup of the device in the plugin. \li \b 2. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 3. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 3. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -57,7 +57,7 @@ \li \b 1. | The main setup of the device in the plugin. \li \b 2. | If the status can not be determined immediately, we have to tell the \l{DeviceManager} that the status will be communicated later. \li \b 3. | Once the setup status is determined, the plugin can emit the signal \l{DevicePlugin::deviceSetupFinished} to inform the \l{DeviceManager} about the result. - \li \b 4. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 4. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -75,7 +75,7 @@ \list \li \b 3. | The plugin will be set up with the params of the auto discovered \l{DeviceDescriptor}. \li \b 4. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 5. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 5. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -95,7 +95,7 @@ \list \li \b 4. | The plugin will be set up with the params of the discovered \l{DeviceDescriptor}. \li \b 5. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 6. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 6. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -120,7 +120,7 @@ \list \li \b 7. | The plugin will be set up with the params of the paired \l{Device}. \li \b 8. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 9. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 9. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -145,7 +145,7 @@ \list \li \b 7. | The plugin will be set up with the params of the paired \l{Device}. \li \b 8. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 9. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 9. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist @@ -176,7 +176,7 @@ \list \li \b 9. | The plugin will be set up with the params (i.e. containing a \tt pin param) of the paired \l{Device}. \li \b 10. | If something goes wrong during the setup return \l{DeviceManager::DeviceSetupStatusFailure}, otherwise \l{DeviceManager::DeviceSetupStatusSuccess}. - \li \b 11. | If the device setup succeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. + \li \b 11. | If the device setup succeeded and the device is in the system, the \l{DeviceManager} will call the \l{DevicePlugin::postSetupDevice()}{postSetupDevice()} method. \endlist \endlist */ diff --git a/doc/jsonrpc-api.qdoc b/doc/jsonrpc-api.qdoc index 1ea6b686..e057eeda 100644 --- a/doc/jsonrpc-api.qdoc +++ b/doc/jsonrpc-api.qdoc @@ -1800,7 +1800,7 @@ Add a rule. You can describe rules by one or many EventDesciptors and a StateEva \endcode See also: \l{RuleError}, \l{RuleAction}, \l{TimeDescriptor}, \l{RuleAction}, \l{EventDescriptor}, \l{StateEvaluator} \section3 Rules.DisableRule -Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successfull, the notification "Rule.RuleConfigurationChanged" will be emitted. +Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successful, the notification "Rule.RuleConfigurationChanged" will be emitted. \section4 Params \code { @@ -1815,7 +1815,7 @@ Disable a rule. The rule won't be triggered by it's events or state changes whil \endcode See also: \l{RuleError} \section3 Rules.EditRule -Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods "Rules.EnableRule" and "Rules.DisableRule". If successfull, the notification "Rule.RuleConfigurationChanged" will be emitted. +Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods "Rules.EnableRule" and "Rules.DisableRule". If successful, the notification "Rule.RuleConfigurationChanged" will be emitted. \section4 Params \code { @@ -1845,7 +1845,7 @@ Edit the parameters of a rule. The configuration of the rule with the given rule \endcode See also: \l{RuleError}, \l{Rule}, \l{RuleAction}, \l{TimeDescriptor}, \l{RuleAction}, \l{EventDescriptor}, \l{StateEvaluator} \section3 Rules.EnableRule -Enabled a rule that has previously been disabled.If successfull, the notification "Rule.RuleConfigurationChanged" will be emitted. +Enabled a rule that has previously been disabled.If successful, the notification "Rule.RuleConfigurationChanged" will be emitted. \section4 Params \code { @@ -2889,7 +2889,7 @@ Emitted whenever a Rule was removed. } }, "Rules.DisableRule": { - "description": "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "ruleId": "Uuid" }, @@ -2898,7 +2898,7 @@ Emitted whenever a Rule was removed. } }, "Rules.EditRule": { - "description": "Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "actions": [ "$ref:RuleAction" @@ -2922,7 +2922,7 @@ Emitted whenever a Rule was removed. } }, "Rules.EnableRule": { - "description": "Enabled a rule that has previously been disabled.If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Enabled a rule that has previously been disabled.If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "ruleId": "Uuid" }, diff --git a/doc/jsonrpc.qdoc b/doc/jsonrpc.qdoc index 35215814..6939c321 100644 --- a/doc/jsonrpc.qdoc +++ b/doc/jsonrpc.qdoc @@ -61,7 +61,7 @@ \section1 Handshake - Once connected to the socket, the server will send immediatly a handshake message. The handshake message + Once connected to the socket, the server will send immediately a handshake message. The handshake message is a JSON object and contains all relevant information about the server and the API in order to start communicationg with the server. @@ -92,7 +92,7 @@ The field represents the API version of the server you are connected to. This should be used for API compatibility checks. \li \code "authenticationRequired": bool \endcode - If this property is true, a client must perform the authentication process before beeing able to interact with the API. See section \l{Authentication} for more information. + If this property is true, a client must perform the authentication process before being able to interact with the API. See section \l{Authentication} for more information. \li \code "initialSetupRequired": bool \endcode This property indicates if the server was set up already. A server is set up if a user has been created. If the \tt authenticationRequired property is \tt{false}, this field can be ignored. \li \code "pushButtonAuthAvailable": bool \endcode @@ -115,7 +115,7 @@ The JSON content should always be sent as a compack JSON Object (without spaces, tabs and new line characters within the object \tt{{...}}). At the end of this compact JSON string the payload must be terminated with the \tt{\n} character. This makes sure, that the parsing of the - message is easier and a single message can be splitted in multiple cunckes during the transport. The client parsing should work the same way. + message is easier and a single message can be split in multiple cunckes during the transport. The client parsing should work the same way. In order to demonstrate this with an example, the \l{JSONRPC.Hello} request could look like this: @@ -154,7 +154,7 @@ \li \code "notification": string \endcode The notification field holds the name of this notification. Notifications are grouped into namespaces like the methods. The notification string consists of two parts, the namespace and the notification name, separated by a dot. - This property can be used to check if a recived message is a response to a request or a notification. + This property can be used to check if a received message is a response to a request or a notification. \li \code "params": object \endcode The params contains any JSON object. This parameter is optional and differs according to each \l{Notifications}{notification}. \endlist @@ -184,7 +184,7 @@ \li \l{Push-button authentication} \endlist - If both authentication methods are available, the \l{Push-button authentication} should be prefered. + If both authentication methods are available, the \l{Push-button authentication} should be preferred. \section1 Username and password diff --git a/doc/nymea.qdoc b/doc/nymea.qdoc index 6054024f..8708f932 100644 --- a/doc/nymea.qdoc +++ b/doc/nymea.qdoc @@ -44,7 +44,7 @@ \list \li \l{JSON-RPC API}{The API description} \li \l{Interfaces for DeviceClasses} - \li \l{Paramtypes and the coresponding UI elements} + \li \l{Paramtypes and the corresponding UI elements} \endlist \section1 Quicklinks diff --git a/doc/paramtypes-ui-elements.qdoc b/doc/paramtypes-ui-elements.qdoc index cb057a68..248d58ec 100644 --- a/doc/paramtypes-ui-elements.qdoc +++ b/doc/paramtypes-ui-elements.qdoc @@ -1,6 +1,6 @@ /*! \page paramtypes-ui-elements.html - \title Paramtypes and the coresponding UI elements + \title Paramtypes and the corresponding UI elements On this page you can find different examples how a \l{ParamType} can be displayed in a client application. The images used for this examples were created with the Ubuntu SDK and are ment as an example, not as a directive. diff --git a/doc/plugin-json.qdoc b/doc/plugin-json.qdoc index 7143e8e5..4de4dc15 100644 --- a/doc/plugin-json.qdoc +++ b/doc/plugin-json.qdoc @@ -91,9 +91,9 @@ qCWarning(dcExample()) << "Warning the world!"; \endcode - Please start allways with a capital letter i.e. \tt {"idName": "Example"}. The logging category allowes you to categorise the debug output. It can be configured with the \tt -d argument of nymead (see \tt {$ man nymead}). + Please start always with a capital letter i.e. \tt {"idName": "Example"}. The logging category allowes you to categorise the debug output. It can be configured with the \tt -d argument of nymead (see \tt {$ man nymead}). \li - \underline{\e id:} The actual uuid (\l{PluginId}) of the plugin \unicode{0x2192} \l{DevicePlugin::pluginId()} - \li - \underline{\e paramTypes:} Optionl: A list of \l{ParamType}{ParamTypes} which define the paramters of this plugin \unicode{0x2192} \l{DevicePlugin::configuration()} (see section "\l{The ParamType definition}"). + \li - \underline{\e paramTypes:} Optionl: A list of \l{ParamType}{ParamTypes} which define the parameters of this plugin \unicode{0x2192} \l{DevicePlugin::configuration()} (see section "\l{The ParamType definition}"). \li - \underline{\e vendors:} The list of \l{Vendor}{Vendors} objects (see section "\l{The Vendor definition}"); \endlist @@ -212,7 +212,7 @@ \li - \underline{\e primaryStateTypeId:} Optional: Define which \l{StateType} is the primary \l{State} for this \l{Device}. This allowes a client developer to place the primary \l{State} value in the device overview. \li - \underline{\e primaryActionTypeId:} Optional: Define which \l{ActionType} is the primary \l{Action} for this \l{Device}. This allowes a client developer to place the primary \l{Action} element in the device overview. \li - \underline{\e discoveryParamTypes:} Optional: A list of \l{ParamType}{ParamTypes} which will be needed for discovering a device \unicode{0x2192} \l{DeviceClass::discoveryParamTypes()}. This parameter will only be used for devices with the \l{DeviceClass::CreateMethodDiscovery}{CreateMethodDiscovery} (see section "\l{The ParamType definition}"). - \li - \underline{\e paramTypes:} A list of \l{ParamType}{ParamTypes} which define the paramters of a device \unicode{0x2192} \l{DeviceClass::paramTypes()} (see section "\l{The ParamType definition}"). + \li - \underline{\e paramTypes:} A list of \l{ParamType}{ParamTypes} which define the parameters of a device \unicode{0x2192} \l{DeviceClass::paramTypes()} (see section "\l{The ParamType definition}"). \li - \underline{\e stateTypes:} Optional: A list of \l{StateType}{StateTypes} of the device \unicode{0x2192} \l{DeviceClass::stateTypes()} (see section "\l{The StateType definition}"). \li - \underline{\e actionTypes:} Optional: A list of \l{ActionType}{ActionTypes} of the device \unicode{0x2192} \l{DeviceClass::actionTypes()} (see section "\l{The ActionType definition}"). \li - \underline{\e eventTypes:} Optional: A list of \l{EventType}{EventTypes} of the device \unicode{0x2192} \l{DeviceClass::eventTypes()} (see section "\l{The EventType definition}"). @@ -249,8 +249,8 @@ \li - \underline{\e id:} The actual uuid (\l{ParamTypeId}) of the \l{ParamType} \unicode{0x2192} \l{ParamType::id()}. \li - \underline{\e name:} This parameter will be used to define the ParamTypeId variable named deviceClassNameParamTypeId in the plugininfo.h, so it can be used in the code. \li - \underline{\e displayName:} The visible name of the \l{ParamType} \unicode{0x2192} \l{ParamType::displayName()}. - \li - \underline{\e type:} The data type of this paramter \unicode{0x2192} \l{ParamType::type()}. - \li - \underline{\e inputType:} Optional: A paramter for clients to know which kind of \l{Types::InputType}{InputType} this. See enum \l{Types::InputType} for more information. The expected value for the \e inputType parameter matches the enum name like this: + \li - \underline{\e type:} The data type of this parameter \unicode{0x2192} \l{ParamType::type()}. + \li - \underline{\e inputType:} Optional: A parameter for clients to know which kind of \l{Types::InputType}{InputType} this. See enum \l{Types::InputType} for more information. The expected value for the \e inputType parameter matches the enum name like this: \tt {Types::InputTypeTextArea} \unicode{0x2192} \tt {"inputType": "TextArea"} @@ -303,7 +303,7 @@ A \l{StateType} has following parameters: "value" ], "o:writable": true, - "o:displayNameAction": "Name of the the created ActionType (translatable)" + "o:displayNameAction": "Name of the created ActionType (translatable)" } ] } diff --git a/doc/setup-environment.qdoc b/doc/setup-environment.qdoc index a27b3eb1..4b2f9358 100644 --- a/doc/setup-environment.qdoc +++ b/doc/setup-environment.qdoc @@ -5,9 +5,9 @@ \b{\unicode{0x2192} \underline{\l{https://www.youtube.com/watch?v=7a_k0C1Ib1A}{Video for this tutorial}}} - Assuming you are working on an Ubuntu system here are the steps how to set up the build environment. Basically you can choose your prefered SDK but all tutorials are based on the Qt Creator and we recommand to use that one. You can also use the Ubuntu SDK, which is basically a modified Qt Creator. + Assuming you are working on an Ubuntu system here are the steps how to set up the build environment. Basically you can choose your preferred SDK but all tutorials are based on the Qt Creator and we reccommend to use that one. You can also use the Ubuntu SDK, which is basically a modified Qt Creator. - \note Please take care that you are using the Qt version from the system for building. The nymea server will allways be built with the official Qt version for the appropriate system version. The plugin \underline{must} have the same version like the nymea server. + \note Please take care that you are using the Qt version from the system for building. The nymea server will always be built with the official Qt version for the appropriate system version. The plugin \underline{must} have the same version like the nymea server. \section2 Install Qt In the first step you need to install the Qt libraries: @@ -56,7 +56,7 @@ \list \li \underline{\e nymea} \unicode{0x2192} the \tt nymea package is a meta package and will install the \tt nymead, \tt libnymea1 and \tt nymea-plugins package so you can start the nymea daemon. \li \underline{\e nymea-webinterface} \unicode{0x2192} the \tt nymea-webinterface package will install the webinterface for nymea, which is accessable on \l{http://localhost:3333}. - \li \underline{\e nymea-cli} \unicode{0x2192} the \tt nymea-cli package will install the command line interface for the nymea JSON-RPC API. You can find more infomation \l{https://github.com/guh/nymea/wiki/nymea-cli}{here}. + \li \underline{\e nymea-cli} \unicode{0x2192} the \tt nymea-cli package will install the command line interface for the nymea JSON-RPC API. You can find more information \l{https://github.com/guh/nymea/wiki/nymea-cli}{here}. \li \underline{\e nymea-doc} \unicode{0x2192} the \tt nymea-doc package will install the offline documentation on your system (this homepage). You can access the documentation in your brwoser with \l{file:///usr/share/doc/nymea/html/index.html}{file:///usr/share/doc/nymea/html/index.html}. \li \underline{\e libnymea1-dev} \unicode{0x2192} the \tt libnymea1-dev package brings all development files of nymea (header files and lib) which will be needed to write a plugin. \endlist diff --git a/doc/tutorial4.qdoc b/doc/tutorial4.qdoc index a8e60989..2130e0c8 100644 --- a/doc/tutorial4.qdoc +++ b/doc/tutorial4.qdoc @@ -48,7 +48,7 @@ As you can see, there is only one \tt bool \l State which has the property \e {"writable"}. This property indicates, that this \l State is writable and we need an \l Action for doing that. You can find more details about this property in \l {The StateType definition} documentation. - We learnend in the previouse tutorial that a \l State will allways generate an \l Event when he changes his \e {value}. This \l Event has the same UUID as the \l State which generated the \l Event. The same thing happens with the \l Action if you make a \l State writable. The device manager defines a new \l ActionType which has the same UUID as the \l State which will be changed with the \l Action. + We learnend in the previouse tutorial that a \l State will always generate an \l Event when he changes his \e {value}. This \l Event has the same UUID as the \l State which generated the \l Event. The same thing happens with the \l Action if you make a \l State writable. The device manager defines a new \l ActionType which has the same UUID as the \l State which will be changed with the \l Action. \tt {\l{StateTypeId} == \l{EventTypeId} == \l{ActionTypeId}} diff --git a/doc/tutorial5.qdoc b/doc/tutorial5.qdoc index 4cb8d66d..eca2bf7a 100644 --- a/doc/tutorial5.qdoc +++ b/doc/tutorial5.qdoc @@ -369,7 +369,7 @@ In order to get started with our new \b {"Network Info"} plugin we use the minim \section1 Writing the plugin - Now we have our basic for starting to implement the new defined plugin. If you install the current plugin, start \tt nymead and add the a \b {Info about Network} device whith \b {\tt nymea-cli} you can check the device states and should see something like this: + Now we have our basic for starting to implement the new defined plugin. If you install the current plugin, start \tt nymead and add the a \b {Info about Network} device with \b {\tt nymea-cli} you can check the device states and should see something like this: \code ======================================================== @@ -427,7 +427,7 @@ parameter from \l{The Plugin JSON file}. // Call the GET method from the NetworkManager QNetworkReply *reply = networkManagerGet(locationRequest); - // Hash the reply, because we dont get the result immediately + // Hash the reply, because we don't get the result immediately m_asyncActionReplies.insert(reply, action.id()); // Hash the device for this action @@ -477,7 +477,7 @@ parameter from \l{The Plugin JSON file}. return; } - // The request was successfull, lets read the payload + // The request was successful, lets read the payload QByteArray data = reply->readAll(); // Important -> delete the reply to prevent a memory leak! @@ -496,7 +496,7 @@ parameter from \l{The Plugin JSON file}. void actionDataReady(const ActionId &actionId, const QByteArray &data); \endcode - First we have to check if the received data is a vaild JSON document. If not, the action execution \b "update" was not successfull and we have to report the error. Otherwise we read the data and set the state values of our device. + First we have to check if the received data is a valid JSON document. If not, the action execution \b "update" was not successful and we have to report the error. Otherwise we read the data and set the state values of our device. \code void DevicePluginNetworkInfo::actionDataReady(const ActionId &actionId, const QByteArray &data) @@ -555,7 +555,7 @@ parameter from \l{The Plugin JSON file}. qCDebug(dcNetworkInfo) << "Action" << actionId << "execution finished successfully."; - // Emit the successfull action execution result to the device manager + // Emit the successful action execution result to the device manager emit actionExecutionFinished(actionId, DeviceManager::DeviceErrorNoError); } \endcode @@ -580,7 +580,7 @@ parameter from \l{The Plugin JSON file}. \li Use nymea-cli to execute the \b update action: \tt "Devices" \unicode{0x2192} \tt "Execute action" \unicode{0x2192} \tt {"Your device name"} \unicode{0x2192} \tt {update} - \li Use nymea-cli to check if the device states were updated sucessfully: + \li Use nymea-cli to check if the device states were updated successfully: \tt "Devices" \unicode{0x2192} \tt "List..." \unicode{0x2192} \tt {"List device states"} \unicode{0x2192} \tt {"Your device name"}. diff --git a/doc/tutorial6.qdoc b/doc/tutorial6.qdoc index ad12f02b..ba820702 100644 --- a/doc/tutorial6.qdoc +++ b/doc/tutorial6.qdoc @@ -212,7 +212,7 @@ url.setPath("/.well-known/core"); CoapReply *reply = m_coap->get(CoapRequest(url)); - // Check imediatly if the there occured any error + // Check immediately if the there occurred any error if (reply->error() != CoapReply::NoError) { qCWarning(dcCoapClient) << "Could not discover CoAP server:" << reply->errorString(); reply->deleteLater(); diff --git a/doc/tutorials.qdoc b/doc/tutorials.qdoc index e589fbd9..79423522 100644 --- a/doc/tutorials.qdoc +++ b/doc/tutorials.qdoc @@ -5,7 +5,7 @@ \nextpage {Tutorial 1 - The "Minimal" plugin} \previouspage {Write your own plugin} - In order to getting started with your own \l DevicePlugin it is recommanded to walk trough following tutorials to understand how the mechanism works: + In order to getting started with your own \l DevicePlugin it is reccommended to walk trough following tutorials to understand how the mechanism works: - \annotatedlist tutorials + \annotatedlist tutorials */ diff --git a/libnymea-core/hardware/bluetoothlowenergy/bluetoothdiscoveryreplyimplementation.cpp b/libnymea-core/hardware/bluetoothlowenergy/bluetoothdiscoveryreplyimplementation.cpp index db5c4b65..be308300 100644 --- a/libnymea-core/hardware/bluetoothlowenergy/bluetoothdiscoveryreplyimplementation.cpp +++ b/libnymea-core/hardware/bluetoothlowenergy/bluetoothdiscoveryreplyimplementation.cpp @@ -51,7 +51,7 @@ void BluetoothDiscoveryReplyImplementation::setError(const BluetoothDiscoveryRep { m_error = error; if (m_error != BluetoothDiscoveryReplyErrorNoError) { - emit errorOccured(m_error); + emit errorOccurred(m_error); } } diff --git a/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp b/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp index aa21d763..73eca858 100644 --- a/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp +++ b/libnymea-core/hardware/bluetoothlowenergy/bluetoothlowenergydeviceimplementation.cpp @@ -157,7 +157,7 @@ void BluetoothLowEnergyDeviceImplementation::onDeviceError(const QLowEnergyContr if (connected()) qCWarning(dcBluetooth()) << "Device error:" << name() << address().toString() << ": " << error << m_controller->errorString(); - emit errorOccured(error); + emit errorOccurred(error); } } diff --git a/libnymea-core/hardware/network/avahi/qtavahiservice.cpp b/libnymea-core/hardware/network/avahi/qtavahiservice.cpp index 2114aa67..cd629123 100644 --- a/libnymea-core/hardware/network/avahi/qtavahiservice.cpp +++ b/libnymea-core/hardware/network/avahi/qtavahiservice.cpp @@ -32,7 +32,7 @@ This enum type specifies the state of a \l{QtAvahiService}. \value QtAvahiServiceStateUncomitted - The group has not yet been commited, the user must still call avahi_entry_group_commit(). + The group has not yet been committed, the user must still call avahi_entry_group_commit(). \value QtAvahiServiceStateRegistering The entries of the group are currently being registered. \value QtAvahiServiceStateEstablished @@ -211,7 +211,7 @@ bool QtAvahiService::updateTxtRecord(const QHash &txtRecords) return true; } -/*! Returns true if the service group was added and commited to the network without errors. */ +/*! Returns true if the service group was added and committed to the network without errors. */ bool QtAvahiService::isValid() const { return (d_ptr->group && !d_ptr->error); diff --git a/libnymea-core/hardware/network/upnp/upnpdiscoveryreplyimplementation.cpp b/libnymea-core/hardware/network/upnp/upnpdiscoveryreplyimplementation.cpp index e5d51111..97389f3e 100644 --- a/libnymea-core/hardware/network/upnp/upnpdiscoveryreplyimplementation.cpp +++ b/libnymea-core/hardware/network/upnp/upnpdiscoveryreplyimplementation.cpp @@ -69,7 +69,7 @@ void UpnpDiscoveryReplyImplementation::setError(const UpnpDiscoveryReplyImplemen { m_error = error; if (m_error != UpnpDiscoveryReplyErrorNoError) { - emit errorOccured(m_error); + emit errorOccurred(m_error); } } diff --git a/libnymea-core/hardware/network/upnp/upnpdiscoveryrequest.cpp b/libnymea-core/hardware/network/upnp/upnpdiscoveryrequest.cpp index a474dca4..0dc577b2 100644 --- a/libnymea-core/hardware/network/upnp/upnpdiscoveryrequest.cpp +++ b/libnymea-core/hardware/network/upnp/upnpdiscoveryrequest.cpp @@ -56,7 +56,7 @@ void UpnpDiscoveryRequest::discover(int timeout) void UpnpDiscoveryRequest::addDeviceDescriptor(const UpnpDeviceDescriptor &deviceDescriptor) { - // check if we allready have the device in the list + // check if we already have the device in the list bool isAlreadyInList = false; foreach (UpnpDeviceDescriptor upnpDeviceDescriptor, m_deviceList) { if (upnpDeviceDescriptor.uuid() == deviceDescriptor.uuid()) { diff --git a/libnymea-core/hardware/plugintimermanagerimplementation.cpp b/libnymea-core/hardware/plugintimermanagerimplementation.cpp index a6a66deb..5138d019 100644 --- a/libnymea-core/hardware/plugintimermanagerimplementation.cpp +++ b/libnymea-core/hardware/plugintimermanagerimplementation.cpp @@ -26,9 +26,9 @@ namespace nymeaserver { -PluginTimerImplementation::PluginTimerImplementation(int intervall, QObject *parent) : +PluginTimerImplementation::PluginTimerImplementation(int interval, QObject *parent) : PluginTimer(parent), - m_interval(intervall) + m_interval(interval) { connect(NymeaCore::instance()->timeManager(), &TimeManager::tick, this, &PluginTimerImplementation::tick); } diff --git a/libnymea-core/hardware/plugintimermanagerimplementation.h b/libnymea-core/hardware/plugintimermanagerimplementation.h index f5048065..305010a8 100644 --- a/libnymea-core/hardware/plugintimermanagerimplementation.h +++ b/libnymea-core/hardware/plugintimermanagerimplementation.h @@ -38,7 +38,7 @@ class PluginTimerImplementation : public PluginTimer friend class PluginTimerManagerImplementation; public: - explicit PluginTimerImplementation(int intervall, QObject *parent = nullptr); + explicit PluginTimerImplementation(int interval, QObject *parent = nullptr); int interval() const override; int currentTick() const override; diff --git a/libnymea-core/hardware/radio433/radio433brennenstuhl.cpp b/libnymea-core/hardware/radio433/radio433brennenstuhl.cpp index ebc75d96..e90076ee 100644 --- a/libnymea-core/hardware/radio433/radio433brennenstuhl.cpp +++ b/libnymea-core/hardware/radio433/radio433brennenstuhl.cpp @@ -39,7 +39,7 @@ important part. The second possibility to sent data to a 433 MHz device is the \l{http://www.brennenstuhl.de/de-DE/steckdosenleisten-schaltgeraete-und-adapter/brematic-hausautomation/brematic-home-automation-gateway-gwy-433-1.html} - {Brennenstuhl 433 MHz LAN Gateway}. If there is a Gateway in the local network, this class will automaticaly detect + {Brennenstuhl 433 MHz LAN Gateway}. If there is a Gateway in the local network, this class will automatically detect it and will be used. If both transmitter are available (Gateway + GPIO), each signal will be transmitted over both sender. \note: Radio 433 on GPIO's is by default disabled. If you want to enable it, you need to compile the source with the qmake config \tt{CONFIG+=radio433gpio} diff --git a/libnymea-core/httpreply.cpp b/libnymea-core/httpreply.cpp index 77110ed0..8a9913f4 100644 --- a/libnymea-core/httpreply.cpp +++ b/libnymea-core/httpreply.cpp @@ -40,7 +40,7 @@ \value Ok The request was understood and everything is Ok. \value Created - The resource was created sucessfully. + The resource was created successfully. \value Accepted The resource was accepted. \value NoContent @@ -278,7 +278,7 @@ QByteArray HttpReply::rawHeader() const return m_rawHeader; } -/*! Sets the \a close paramter of this \l{HttpReply}. If \a close is true, +/*! Sets the \a close parameter of this \l{HttpReply}. If \a close is true, the connection of the client will be closed after this reply was sent. */ void HttpReply::setCloseConnection(const bool &close) @@ -286,7 +286,7 @@ void HttpReply::setCloseConnection(const bool &close) m_closeConnection = close; } -/*! Returns the connection close paramter of this \l{HttpReply}. If close is true, the connection +/*! Returns the connection close parameter of this \l{HttpReply}. If close is true, the connection of the client will be closed after this reply was sent. */ bool HttpReply::closeConnection() const diff --git a/libnymea-core/httprequest.cpp b/libnymea-core/httprequest.cpp index 197e4eaf..933a14d0 100644 --- a/libnymea-core/httprequest.cpp +++ b/libnymea-core/httprequest.cpp @@ -87,7 +87,7 @@ QByteArray HttpRequest::rawHeader() const return m_rawHeader; } -/*! Returns the list of raw header splitted into key and value.*/ +/*! Returns the list of raw header as key and value pairs.*/ QHash HttpRequest::rawHeaderList() const { return m_rawHeaderList; @@ -235,7 +235,7 @@ void HttpRequest::validate() m_isComplete = false; return; } - // check if the content lenght bigger than header Content-Length + // check if the content length bigger than header Content-Length if (m_payload.size() > contentLength) { qCWarning(dcWebServer) << "Payload size greater than header Content-Length:"; qCWarning(dcWebServer) << " -> Content-Length:" << contentLength; diff --git a/libnymea-core/jsonrpc/jsonrpcserver.cpp b/libnymea-core/jsonrpc/jsonrpcserver.cpp index 5c80b779..17474a93 100644 --- a/libnymea-core/jsonrpc/jsonrpcserver.cpp +++ b/libnymea-core/jsonrpc/jsonrpcserver.cpp @@ -359,7 +359,7 @@ JsonReply *JsonRPCServer::KeepAlive(const QVariantMap ¶ms) return createReply(resultMap); } -/*! Returns the list of registred \l{JsonHandler}{JsonHandlers} and their name.*/ +/*! Returns the list of registered \l{JsonHandler}{JsonHandlers} and their name.*/ QHash JsonRPCServer::handlers() const { return m_handlers; diff --git a/libnymea-core/jsonrpc/ruleshandler.cpp b/libnymea-core/jsonrpc/ruleshandler.cpp index 931857ff..41643f45 100644 --- a/libnymea-core/jsonrpc/ruleshandler.cpp +++ b/libnymea-core/jsonrpc/ruleshandler.cpp @@ -103,7 +103,7 @@ RulesHandler::RulesHandler(QObject *parent) : params.clear(); returns.clear(); setDescription("EditRule", "Edit the parameters of a rule. The configuration of the rule with the given ruleId " "will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the " - "methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successfull, the notification \"Rule.RuleConfigurationChanged\" " + "methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successful, the notification \"Rule.RuleConfigurationChanged\" " "will be emitted."); params.insert("ruleId", JsonTypes::basicTypeToString(JsonTypes::Uuid)); params.insert("name", JsonTypes::basicTypeToString(JsonTypes::String)); @@ -135,7 +135,7 @@ RulesHandler::RulesHandler(QObject *parent) : params.clear(); returns.clear(); setDescription("EnableRule", "Enabled a rule that has previously been disabled." - "If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted."); + "If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted."); params.insert("ruleId", JsonTypes::basicTypeToString(JsonTypes::Uuid)); setParams("EnableRule", params); returns.insert("ruleError", JsonTypes::ruleErrorRef()); @@ -143,7 +143,7 @@ RulesHandler::RulesHandler(QObject *parent) : params.clear(); returns.clear(); setDescription("DisableRule", "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. " - "If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted."); + "If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted."); params.insert("ruleId", JsonTypes::basicTypeToString(JsonTypes::Uuid)); setParams("DisableRule", params); returns.insert("ruleError", JsonTypes::ruleErrorRef()); diff --git a/libnymea-core/logging/logengine.cpp b/libnymea-core/logging/logengine.cpp index 2a89aee5..e49fb795 100644 --- a/libnymea-core/logging/logengine.cpp +++ b/libnymea-core/logging/logengine.cpp @@ -27,7 +27,7 @@ \inmodule core The \l{LogEngine} creates a \l{https://sqlite.org/}{SQLite3} database to stores everything what's - happening in the system. The database can be accessed from the API's. To controll the size of the database the + happening in the system. The database can be accessed from the API's. To control the size of the database the limit of the databse are 8000 entries. @@ -68,7 +68,7 @@ \value LoggingErrorLogEntryNotFound The requested \l{LogEntry} could not be found. \value LoggingErrorInvalidFilterParameter - The given \l{LogFilter} contains an invalid paramter. + The given \l{LogFilter} contains an invalid parameter. */ /*! \enum nymeaserver::Logging::LoggingEventType diff --git a/libnymea-core/nymeacore.cpp b/libnymea-core/nymeacore.cpp index 56ecd081..60f51128 100644 --- a/libnymea-core/nymeacore.cpp +++ b/libnymea-core/nymeacore.cpp @@ -124,7 +124,7 @@ NymeaCore::~NymeaCore() { m_logger->logSystemEvent(m_timeManager->currentDateTime(), false); - // Make sure DeviceManager is teared down at first so plugins don't access any ressources any more. + // Make sure DeviceManager is teared down at first so plugins don't access any resources any more. qCDebug(dcApplication) << "Shutting down \"Device Manager\""; delete m_deviceManager; diff --git a/libnymea-core/rest/restserver.cpp b/libnymea-core/rest/restserver.cpp index d24801a5..70598650 100644 --- a/libnymea-core/rest/restserver.cpp +++ b/libnymea-core/rest/restserver.cpp @@ -27,7 +27,7 @@ The \l{RestServer} class provides the server interface for a REST API call. The \l{RestServer} will create a \l{WebServer} object. The \l{WebServer} will parse the \l{HttpRequest} and emits - the signal \l{WebServer::httpRequestReady()}. This signal will be catched from this \l{RestServer} + the signal \l{WebServer::httpRequestReady()}. This signal will be handled by this \l{RestServer} and processed by the corresponding \l{RestResource}. Once the \l{HttpRequest} is finished, the \l{RestServer} will send a \l{HttpReply} back to the client using \l{WebServer::sendHttpReply()}. diff --git a/libnymea-core/usermanager.cpp b/libnymea-core/usermanager.cpp index b3ddad71..6fe28cfa 100644 --- a/libnymea-core/usermanager.cpp +++ b/libnymea-core/usermanager.cpp @@ -256,7 +256,7 @@ bool UserManager::verifyToken(const QByteArray &token) return false; } if (!result.first()) { - qCDebug(dcUserManager) << "Authorisation failed for token" << token; + qCDebug(dcUserManager) << "Authorization failed for token" << token; return false; } //qCDebug(dcUserManager) << "Token authorized for user" << result.value("username").toString(); diff --git a/libnymea/coap/coap.cpp b/libnymea/coap/coap.cpp index 6be0f488..b970c03b 100644 --- a/libnymea/coap/coap.cpp +++ b/libnymea/coap/coap.cpp @@ -66,7 +66,7 @@ */ /*! \fn void Coap::notificationReceived(const CoapObserveResource &resource, const int ¬ificationNumber, const QByteArray &payload); - This signal is emitted when a value of an observed \a resource changed. The \a notificationNumber specifies the the count of the notification + This signal is emitted when a value of an observed \a resource changed. The \a notificationNumber specifies the count of the notification to keep the correct order. The value can be parsed from the \a payload parameter. */ diff --git a/libnymea/coap/coappdu.h b/libnymea/coap/coappdu.h index b81cd5e1..ffab2d48 100644 --- a/libnymea/coap/coappdu.h +++ b/libnymea/coap/coappdu.h @@ -62,7 +62,7 @@ public: // Methods: https://tools.ietf.org/html/rfc7252#section-5.8 // Respond codes: https://tools.ietf.org/html/rfc7252#section-12.1.2 enum StatusCode { - Empty = 0x00, // Empty mesage (ping) + Empty = 0x00, // Empty message (ping) Get = 0x01, // Method GET Post = 0x02, // Method POST Put = 0x03, // Method PUT diff --git a/libnymea/coap/coapreply.cpp b/libnymea/coap/coapreply.cpp index 994d6ed4..65cbdd1e 100644 --- a/libnymea/coap/coapreply.cpp +++ b/libnymea/coap/coapreply.cpp @@ -67,7 +67,7 @@ */ /*! \fn void CoapReply::error(const Error &code); - This signal is emitted when an error occured. The given \a code represents the \l{CoapReply::Error}. + This signal is emitted when an error occurred. The given \a code represents the \l{CoapReply::Error}. \sa error(), errorString() */ @@ -75,7 +75,7 @@ /*! \enum CoapReply::Error \value NoError - No error occured. Everything ok. + No error occurred. Everything ok. \value HostNotFoundError The remote host name was not found (invalid hostname). \value TimeoutError diff --git a/libnymea/devicemanager.cpp b/libnymea/devicemanager.cpp index e19ae4aa..e80a6051 100644 --- a/libnymea/devicemanager.cpp +++ b/libnymea/devicemanager.cpp @@ -534,7 +534,7 @@ DeviceManager::DeviceError DeviceManager::reconfigureDevice(const DeviceId &devi DeviceSetupStatus status = plugin->setupDevice(device); switch (status) { case DeviceSetupStatusFailure: - qCWarning(dcDeviceManager) << "Device reconfiguration failed. Not saving changes of device paramters. Device setup incomplete."; + qCWarning(dcDeviceManager) << "Device reconfiguration failed. Not saving changes of device parameters. Device setup incomplete."; return DeviceErrorSetupFailed; case DeviceSetupStatusAsync: m_asyncDeviceReconfiguration.append(device); diff --git a/libnymea/hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h b/libnymea/hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h index 2462890a..66b7eff3 100644 --- a/libnymea/hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h +++ b/libnymea/hardware/bluetoothlowenergy/bluetoothdiscoveryreply.h @@ -50,7 +50,7 @@ public: signals: void finished(); - void errorOccured(const BluetoothDiscoveryReplyError &error); + void errorOccurred(const BluetoothDiscoveryReplyError &error); }; diff --git a/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergydevice.h b/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergydevice.h index 4d5733a7..6efcfa7b 100644 --- a/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergydevice.h +++ b/libnymea/hardware/bluetoothlowenergy/bluetoothlowenergydevice.h @@ -58,7 +58,7 @@ signals: void connectedChanged(const bool &connected); void autoConnectingChanged(const bool &autoConnecting); void stateChanged(const QLowEnergyController::ControllerState &state); - void errorOccured(const QLowEnergyController::Error &error); + void errorOccurred(const QLowEnergyController::Error &error); void servicesDiscoveryFinished(); }; diff --git a/libnymea/hardware/gpiomonitor.cpp b/libnymea/hardware/gpiomonitor.cpp index 37008f91..5915de36 100644 --- a/libnymea/hardware/gpiomonitor.cpp +++ b/libnymea/hardware/gpiomonitor.cpp @@ -69,7 +69,7 @@ */ /*! \fn void GpioMonitor::valueChanged(const bool &value); - * This signal will be emited, if the monitored \l{Gpio}{Gpios} changed his \a value. */ + * This signal will be emitted, if the monitored \l{Gpio}{Gpios} changed his \a value. */ #include "gpiomonitor.h" #include "loggingcategories.h" diff --git a/libnymea/hardware/radio433/radio433.cpp b/libnymea/hardware/radio433/radio433.cpp index bd1d955d..c287c0e8 100644 --- a/libnymea/hardware/radio433/radio433.cpp +++ b/libnymea/hardware/radio433/radio433.cpp @@ -39,7 +39,7 @@ important part. The second possibility to sent data to a 433 MHz device is the \l{http://www.brennenstuhl.de/de-DE/steckdosenleisten-schaltgeraete-und-adapter/brematic-hausautomation/brematic-home-automation-gateway-gwy-433-1.html} - {Brennenstuhl 433 MHz LAN Gateway}. If there is a Gateway in the local network, this class will automaticaly detect + {Brennenstuhl 433 MHz LAN Gateway}. If there is a Gateway in the local network, this class will automatically detect it and will be used. If both transmitter are available (Gateway + GPIO), each signal will be transmitted over both sender. \note: Radio 433 on GPIO's is by default disabled. If you want to enable it, you need to compile the source with the qmake config \tt{CONFIG+=radio433gpio} @@ -51,7 +51,7 @@ */ /*! \fn bool Radio433::sendData(int delay, QList rawData, int repetitions); - Returns true if the given \a rawData can be sent to a RF 433MHz device with the given \a delay. The amount of packages to send can be configured with the paramter \a repetitions. + Returns true if the given \a rawData can be sent to a RF 433MHz device with the given \a delay. The amount of packages to send can be configured with the parameter \a repetitions. */ diff --git a/libnymea/hardwareresource.cpp b/libnymea/hardwareresource.cpp index 7ea8c605..16e50602 100644 --- a/libnymea/hardwareresource.cpp +++ b/libnymea/hardwareresource.cpp @@ -54,11 +54,11 @@ // Signals /*! \fn bool HardwareResource::enabledChanged(bool enabled); - This signal will be emited if the hardware resource was \a enabled or disabled. + This signal will be emitted if the hardware resource was \a enabled or disabled. */ /*! \fn bool HardwareResource::availableChanged(bool available); - This signal will be emited if the hardware resource \a available changed. + This signal will be emitted if the hardware resource \a available changed. */ #include "hardwareresource.h" diff --git a/libnymea/network/upnp/upnpdiscoveryreply.cpp b/libnymea/network/upnp/upnpdiscoveryreply.cpp index c541aa62..8cceb231 100644 --- a/libnymea/network/upnp/upnpdiscoveryreply.cpp +++ b/libnymea/network/upnp/upnpdiscoveryreply.cpp @@ -72,7 +72,7 @@ */ /*! \fn QList UpnpDiscoveryReply::deviceDescriptors() const; - Returns the list of found \l{UpnpDeviceDescriptor}{UpnpDeviceDescriptors}. This list will be empty if an error occured. + Returns the list of found \l{UpnpDeviceDescriptor}{UpnpDeviceDescriptors}. This list will be empty if an error occurred. \sa finished() */ @@ -82,8 +82,8 @@ This signal will be emitted once the UpnpDiscoveryReply is finished. */ -/*! \fn void UpnpDiscoveryReply::errorOccured(const UpnpDiscoveryReplyError &error); - This signal will be emitted once an UpnpDiscoveryReply \a error occured. +/*! \fn void UpnpDiscoveryReply::errorOccurred(const UpnpDiscoveryReplyError &error); + This signal will be emitted once an UpnpDiscoveryReply \a error occurred. */ #include "upnpdiscoveryreply.h" diff --git a/libnymea/network/upnp/upnpdiscoveryreply.h b/libnymea/network/upnp/upnpdiscoveryreply.h index e5664bc4..29703bc1 100644 --- a/libnymea/network/upnp/upnpdiscoveryreply.h +++ b/libnymea/network/upnp/upnpdiscoveryreply.h @@ -53,7 +53,7 @@ public: signals: void finished(); - void errorOccured(const UpnpDiscoveryReplyError &error); + void errorOccurred(const UpnpDiscoveryReplyError &error); }; diff --git a/libnymea/plugintimer.cpp b/libnymea/plugintimer.cpp index 25780534..3695e109 100644 --- a/libnymea/plugintimer.cpp +++ b/libnymea/plugintimer.cpp @@ -98,23 +98,23 @@ // Signals /*! \fn void PluginTimer::timeout(); - This signal will be emited if the timer timeouted. + This signal will be emitted if the timer timeouted. */ /*! \fn void PluginTimer::currentTickChanged(const int ¤tTick); - This signal will be emited whenever the \a currentTick of this PluginTimer changed. + This signal will be emitted whenever the \a currentTick of this PluginTimer changed. \sa currentTick() */ /*! \fn void PluginTimer::runningChanged(const bool &running); - This signal will be emited whenever the \a running status of this PluginTimer changed. + This signal will be emitted whenever the \a running status of this PluginTimer changed. \sa running() */ /*! \fn void PluginTimer::pausedChanged(const bool &paused); - This signal will be emited whenever the \a paused status of this PluginTimer changed. + This signal will be emitted whenever the \a paused status of this PluginTimer changed. \sa running() */ diff --git a/libnymea/types/action.cpp b/libnymea/types/action.cpp index 41718757..a38597c1 100644 --- a/libnymea/types/action.cpp +++ b/libnymea/types/action.cpp @@ -85,7 +85,7 @@ ParamList Action::params() const return m_params; } -/*! Set the the parameters for this Action. \a params must match the template in the \l{ActionType} +/*! Set the parameters for this Action. \a params must match the template in the \l{ActionType} * referred by \l{Action::actionTypeId()}. */ void Action::setParams(const ParamList ¶ms) { diff --git a/libnymea/types/deviceclass.cpp b/libnymea/types/deviceclass.cpp index cb16fe76..7bd053be 100644 --- a/libnymea/types/deviceclass.cpp +++ b/libnymea/types/deviceclass.cpp @@ -43,7 +43,7 @@ \value CreateMethodUser The user will specify the \l{Param}s. \value CreateMethodAuto - The device will be created automaticaly. + The device will be created automatically. \value CreateMethodDiscovery The device will be discovered and added by the user by selecting the DeviceDescriptorId from the list of discovered possible ones. */ diff --git a/libnymea/types/param.cpp b/libnymea/types/param.cpp index 8514e9b3..3737f60f 100644 --- a/libnymea/types/param.cpp +++ b/libnymea/types/param.cpp @@ -35,7 +35,7 @@ #include -/*! Constructs a \l Param with the given \a paramTypeId and \a value of the paramter. */ +/*! Constructs a \l Param with the given \a paramTypeId and \a value of the parameter. */ Param::Param(const ParamTypeId ¶mTypeId, const QVariant &value): m_paramTypeId(paramTypeId), m_value(value) diff --git a/libnymea/types/paramtype.cpp b/libnymea/types/paramtype.cpp index 079eed18..6cfe81d1 100644 --- a/libnymea/types/paramtype.cpp +++ b/libnymea/types/paramtype.cpp @@ -205,7 +205,7 @@ void ParamType::setReadOnly(const bool &readOnly) m_readOnly = readOnly; } -/*! Returns true if this ParamType is valid. A ParamType is valid, if the the id, the name and the data type is set. */ +/*! Returns true if this ParamType is valid. A ParamType is valid, if the id, the name and the data type is set. */ bool ParamType::isValid() const { return !m_id.isNull() && !m_name.isEmpty() && m_type != QVariant::Invalid; diff --git a/nymea.pri b/nymea.pri index c0772c22..5cac957d 100644 --- a/nymea.pri +++ b/nymea.pri @@ -6,7 +6,7 @@ NYMEA_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/ # define protocol versions JSON_PROTOCOL_VERSION_MAJOR=1 -JSON_PROTOCOL_VERSION_MINOR=3 +JSON_PROTOCOL_VERSION_MINOR=4 REST_API_VERSION=1 DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \ diff --git a/server/qtservice/qtservice.cpp b/server/qtservice/qtservice.cpp index 2e65edaa..9eba70ea 100644 --- a/server/qtservice/qtservice.cpp +++ b/server/qtservice/qtservice.cpp @@ -570,7 +570,7 @@ int QtServiceBasePrivate::run(bool asService, const QStringList &argList) \row \li -e \li -exec \li Execute the service as a standalone application (useful for debug purposes). This is a blocking call, the service will be executed like a normal application. - In this mode you will not be able to communicate with the service from the contoller. + In this mode you will not be able to communicate with the service from the controller. \row \li -t \li -terminate \li Stop the service. \row \li -p \li -pause \li Pause the service. \row \li -r \li -resume \li Resume a paused service. diff --git a/tests/auto/actions/testactions.cpp b/tests/auto/actions/testactions.cpp index 7dbb986f..f9b6d03d 100644 --- a/tests/auto/actions/testactions.cpp +++ b/tests/auto/actions/testactions.cpp @@ -145,7 +145,7 @@ void TestActions::getActionType() verifyDeviceError(response, error); if (error == DeviceManager::DeviceErrorNoError) { - QVERIFY2(ActionTypeId(response.toMap().value("params").toMap().value("actionType").toMap().value("id").toString()) == actionTypeId, "Didnt get reply for same actionTypeId as requested."); + QVERIFY2(ActionTypeId(response.toMap().value("params").toMap().value("actionType").toMap().value("id").toString()) == actionTypeId, "Didn't get a reply for the same actionTypeId as requested."); } } diff --git a/tests/auto/api.json b/tests/auto/api.json index 6889d646..a513206f 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -1,4 +1,4 @@ -1.3 +1.4 { "methods": { "Actions.ExecuteAction": { @@ -681,7 +681,7 @@ } }, "Rules.DisableRule": { - "description": "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Disable a rule. The rule won't be triggered by it's events or state changes while it is disabled. If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "ruleId": "Uuid" }, @@ -690,7 +690,7 @@ } }, "Rules.EditRule": { - "description": "Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Edit the parameters of a rule. The configuration of the rule with the given ruleId will be replaced with the new given configuration. In ordert to enable or disable a Rule, please use the methods \"Rules.EnableRule\" and \"Rules.DisableRule\". If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "actions": [ "$ref:RuleAction" @@ -714,7 +714,7 @@ } }, "Rules.EnableRule": { - "description": "Enabled a rule that has previously been disabled.If successfull, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", + "description": "Enabled a rule that has previously been disabled.If successful, the notification \"Rule.RuleConfigurationChanged\" will be emitted.", "params": { "ruleId": "Uuid" }, diff --git a/tests/auto/coap/coaptests.cpp b/tests/auto/coap/coaptests.cpp index 937fe7c3..099f9db7 100644 --- a/tests/auto/coap/coaptests.cpp +++ b/tests/auto/coap/coaptests.cpp @@ -448,7 +448,7 @@ void CoapTests::largeCreate() reply->deleteLater(); spy.clear(); - // check if the upload was realy successfull + // check if the upload was really successful reply = m_coap->get(request); spy.wait(20000); @@ -482,7 +482,7 @@ void CoapTests::largeUpdate() reply->deleteLater(); spy.clear(); - // check if the upload was successfull + // check if the upload was successful reply = m_coap->get(request); spy.wait(20000); diff --git a/tests/auto/configurations/testconfigurations.cpp b/tests/auto/configurations/testconfigurations.cpp index 432755f9..7d691720 100644 --- a/tests/auto/configurations/testconfigurations.cpp +++ b/tests/auto/configurations/testconfigurations.cpp @@ -246,7 +246,7 @@ void TestConfigurations::testLanguages() response = injectAndWait("Configuration.GetAvailableLanguages"); QVERIFY2(response.toMap().value("params").toMap().contains("languages"), "Did not get list of languages"); QVariantMap responseMap = response.toMap().value("params").toMap(); - QVERIFY2(responseMap.value("languages").toList().count() >= 2, "Avaliable languages list to short: " + responseMap.value("languages").toList().count()); + QVERIFY2(responseMap.value("languages").toList().count() >= 2, "Available languages list to short: " + responseMap.value("languages").toList().count()); QVariantList languageVariantList = responseMap.value("languages").toList(); foreach (const QVariant &languageVariant, languageVariantList) { @@ -263,7 +263,7 @@ void TestConfigurations::testLanguages() notificationSpy.wait(500); QVariantList languageChangedNotifications = checkNotifications(notificationSpy, "Configuration.LanguageChanged"); - // If the language did not change no notification should be emited + // If the language did not change no notification should be emitted if (basicConfigurationMap.value("language").toString() == languageVariant.toString()) { QVERIFY2(languageChangedNotifications.count() == 0, "Got Configuration.LanguageChanged notification but should have not."); } else { diff --git a/tests/auto/devices/testdevices.cpp b/tests/auto/devices/testdevices.cpp index a54cc6f4..ed1f355b 100644 --- a/tests/auto/devices/testdevices.cpp +++ b/tests/auto/devices/testdevices.cpp @@ -951,7 +951,7 @@ void TestDevices::reconfigureDevices() response = injectAndWait("Devices.ReconfigureDevice", editParams); verifyDeviceError(response, deviceError); - // if the edit should have been successfull + // if the edit should have been successful if (deviceError == DeviceManager::DeviceErrorNoError) { response = injectAndWait("Devices.GetConfiguredDevices", QVariantMap()); @@ -1167,7 +1167,7 @@ void TestDevices::reconfigureByDiscovery() QVERIFY2(reply->error(), "The old daemon is still running"); reply->deleteLater(); - // check if the daemon is realy running on the new port + // check if the daemon is really running on the new port request = QNetworkRequest(QUrl(QString("http://localhost:%1").arg(55556))); reply = nam.get(request); spy.wait(); diff --git a/tests/auto/events/testevents.cpp b/tests/auto/events/testevents.cpp index 4d635191..669fcde4 100644 --- a/tests/auto/events/testevents.cpp +++ b/tests/auto/events/testevents.cpp @@ -141,7 +141,7 @@ void TestEvents::getEventType() verifyDeviceError(response, error); if (error == DeviceManager::DeviceErrorNoError) { - QVERIFY2(EventTypeId(response.toMap().value("params").toMap().value("eventType").toMap().value("id").toString()) == eventTypeId, "Didnt get reply for same actionTypeId as requested."); + QVERIFY2(EventTypeId(response.toMap().value("params").toMap().value("eventType").toMap().value("id").toString()) == eventTypeId, "Didn't get a reply for the same actionTypeId as requested."); } } diff --git a/tests/auto/restdeviceclasses/testrestdeviceclasses.cpp b/tests/auto/restdeviceclasses/testrestdeviceclasses.cpp index 96e38176..ec7279b3 100644 --- a/tests/auto/restdeviceclasses/testrestdeviceclasses.cpp +++ b/tests/auto/restdeviceclasses/testrestdeviceclasses.cpp @@ -90,7 +90,7 @@ void TestRestDeviceClasses::getSupportedDevices() QUrl url("https://localhost:3333/api/v1/deviceclasses"); QVariant response = getAndWait(QNetworkRequest(url)); QVariantList deviceClassesList = response.toList(); - QVERIFY2(deviceClassesList.count() > 0, "Not enought deviceclasses."); + QVERIFY2(deviceClassesList.count() > 0, "Not enough deviceclasses."); // Get each of thouse devices individualy foreach (const QVariant &deviceClass, deviceClassesList) { @@ -110,7 +110,7 @@ void TestRestDeviceClasses::getSupportedDevices() response = getAndWait(QNetworkRequest(url)); deviceClassesList = response.toList(); - QVERIFY2(deviceClassesList.count() > 0, "Not enought deviceclasses."); + QVERIFY2(deviceClassesList.count() > 0, "Not enough deviceclasses."); // get with invalid vendor filter query.clear(); diff --git a/tests/auto/restdevices/testrestdevices.cpp b/tests/auto/restdevices/testrestdevices.cpp index e231dcd2..e1c1396a 100644 --- a/tests/auto/restdevices/testrestdevices.cpp +++ b/tests/auto/restdevices/testrestdevices.cpp @@ -99,7 +99,7 @@ void TestRestDevices::getConfiguredDevices() QVariant response = getAndWait(QNetworkRequest(QUrl("https://localhost:3333/api/v1/devices"))); QVERIFY2(!response.isNull(), "Could not get device"); QVariantList deviceList = response.toList(); - QVERIFY2(deviceList.count() >= 2, "not enought devices."); + QVERIFY2(deviceList.count() >= 2, "not enough devices."); // Get each of those devices individualy foreach (const QVariant &device, deviceList) { @@ -682,7 +682,7 @@ void TestRestDevices::reconfigureDevices() response = putAndWait(request, editParams, expectedStatusCode); QVERIFY2(!response.isNull(), "Could not read edit device response"); - // if the reconfigure should have been successfull + // if the reconfigure should have been successful if (expectedStatusCode == 200) { request.setUrl(QUrl(QString("https://localhost:3333/api/v1/devices/%1").arg(deviceId.toString()))); request.setHeader(QNetworkRequest::ContentTypeHeader, "text/json"); diff --git a/tests/auto/restplugins/testrestplugins.cpp b/tests/auto/restplugins/testrestplugins.cpp index feca0625..364c041c 100644 --- a/tests/auto/restplugins/testrestplugins.cpp +++ b/tests/auto/restplugins/testrestplugins.cpp @@ -82,7 +82,7 @@ void TestRestPlugins::getPlugins() // Get all plugins QVariant response = getAndWait(QNetworkRequest(QUrl("https://localhost:3333/api/v1/plugins"))); QVariantList pluginList = response.toList(); - QVERIFY2(pluginList.count() > 0, "Not enought plugins."); + QVERIFY2(pluginList.count() > 0, "Not enough plugins."); // Get each of thouse plugins individualy foreach (const QVariant &plugin, pluginList) { diff --git a/tests/auto/restrules/testrestrules.cpp b/tests/auto/restrules/testrestrules.cpp index e7e7b6a5..1a174eba 100644 --- a/tests/auto/restrules/testrestrules.cpp +++ b/tests/auto/restrules/testrestrules.cpp @@ -221,7 +221,7 @@ void TestRestRules::getRules() // Get all rules QVariant response = getAndWait(QNetworkRequest(QUrl("https://localhost:3333/api/v1/rules"))); QVariantList rulesList = response.toList(); - QVERIFY2(rulesList.count() == 0, "Not enought rules"); + QVERIFY2(rulesList.count() == 0, "Not enough rules"); foreach (const QVariant &rule, rulesList) { QVariantMap ruleMap = rule.toMap(); @@ -491,7 +491,7 @@ void TestRestRules::addRemoveRules_data() // Rules without exit actions QTest::newRow("valid rule. enabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << true << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << true << "TestRule"; - QTest::newRow("valid rule. diabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << true << "TestRule"; + QTest::newRow("valid rule. disabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << true << "TestRule"; QTest::newRow("valid rule. 2 EventDescriptors, 1 Action, name") << true << validActionNoParams << QVariantMap() << QVariantMap() << eventDescriptorList << validStateEvaluator << 200 << true << "TestRule"; QTest::newRow("invalid action") << true << invalidAction << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 400 << false << "TestRule"; QTest::newRow("invalid event descriptor") << true << validActionNoParams << QVariantMap() << invalidEventDescriptor << QVariantList() << validStateEvaluator << 400 << false << "TestRule"; @@ -723,7 +723,7 @@ void TestRestRules::editRules_data() // Rules without exit actions QTest::newRow("valid rule. enabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << true << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << "TestRule"; - QTest::newRow("valid rule. diabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << "TestRule"; + QTest::newRow("valid rule. disabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << 200 << "TestRule"; QTest::newRow("valid rule. 2 EventDescriptors, 1 Action, name") << true << validActionNoParams << QVariantMap() << QVariantMap() << eventDescriptorList << validStateEvaluator << 200 << "TestRule"; } diff --git a/tests/auto/restvendors/testrestvendors.cpp b/tests/auto/restvendors/testrestvendors.cpp index 8cf72d82..ba844234 100644 --- a/tests/auto/restvendors/testrestvendors.cpp +++ b/tests/auto/restvendors/testrestvendors.cpp @@ -77,7 +77,7 @@ void TestRestVendors::getVendors() // Get all vendors QVariant response = getAndWait(QNetworkRequest(QUrl("https://localhost:3333/api/v1/vendors"))); QVariantList vendorList = response.toList(); - QVERIFY2(vendorList.count() > 0, "Not enought vendors."); + QVERIFY2(vendorList.count() > 0, "Not enough vendors."); // Get each of thouse vendors individualy foreach (const QVariant &vendor, vendorList) { diff --git a/tests/auto/rules/testrules.cpp b/tests/auto/rules/testrules.cpp index 49421001..c67feaa2 100644 --- a/tests/auto/rules/testrules.cpp +++ b/tests/auto/rules/testrules.cpp @@ -492,7 +492,7 @@ void TestRules::addRemoveRules_data() // Rules without exit actions QTest::newRow("valid rule. enabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << true << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << true << "TestRule"; - QTest::newRow("valid rule. diabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << true << "TestRule"; + QTest::newRow("valid rule. disabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << true << "TestRule"; QTest::newRow("valid rule. 2 EventDescriptors, 1 Action, name") << true << validActionNoParams << QVariantMap() << QVariantMap() << eventDescriptorList << validStateEvaluator << RuleEngine::RuleErrorNoError << true << "TestRule"; QTest::newRow("invalid action") << true << invalidAction << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorActionTypeNotFound << false << "TestRule"; QTest::newRow("invalid event descriptor") << true << validActionNoParams << QVariantMap() << invalidEventDescriptor << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorEventTypeNotFound << false << "TestRule"; @@ -560,10 +560,10 @@ void TestRules::addRemoveRules() QVERIFY2(rule.value("enabled").toBool() == enabled, "Rule enabled state doesn't match"); QVariantList eventDescriptors = rule.value("eventDescriptors").toList(); if (!eventDescriptor.isEmpty()) { - QVERIFY2(eventDescriptors.count() == 1, "There shoud be exactly one eventDescriptor"); + QVERIFY2(eventDescriptors.count() == 1, "There should be exactly one eventDescriptor"); QVERIFY2(eventDescriptors.first().toMap() == eventDescriptor, "Event descriptor doesn't match"); } else if (eventDescriptorList.isEmpty()){ - QVERIFY2(eventDescriptors.count() == eventDescriptorList.count(), QString("There shoud be exactly %1 eventDescriptor").arg(eventDescriptorList.count()).toLatin1().data()); + QVERIFY2(eventDescriptors.count() == eventDescriptorList.count(), QString("There should be exactly %1 eventDescriptor").arg(eventDescriptorList.count()).toLatin1().data()); foreach (const QVariant &eventDescriptorVariant, eventDescriptorList) { bool found = false; foreach (const QVariant &replyEventDescriptorVariant, eventDescriptors) { @@ -733,7 +733,7 @@ void TestRules::editRules_data() // Rules without exit actions QTest::newRow("valid rule. enabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << true << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << "TestRule"; - QTest::newRow("valid rule. diabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << "TestRule"; + QTest::newRow("valid rule. disabled, 1 EventDescriptor, StateEvaluator, 1 Action, name") << false << validActionNoParams << QVariantMap() << validEventDescriptor1 << QVariantList() << validStateEvaluator << RuleEngine::RuleErrorNoError << "TestRule"; QTest::newRow("valid rule. 2 EventDescriptors, 1 Action, name") << true << validActionNoParams << QVariantMap() << QVariantMap() << eventDescriptorList << validStateEvaluator << RuleEngine::RuleErrorNoError << "TestRule"; } @@ -891,10 +891,10 @@ void TestRules::editRules() QVERIFY2(rule.value("enabled").toBool() == enabled, "Rule enabled state doesn't match"); QVariantList eventDescriptors = rule.value("eventDescriptors").toList(); if (!eventDescriptor.isEmpty()) { - QVERIFY2(eventDescriptors.count() == 1, "There shoud be exactly one eventDescriptor"); + QVERIFY2(eventDescriptors.count() == 1, "There should be exactly one eventDescriptor"); QVERIFY2(eventDescriptors.first().toMap() == eventDescriptor, "Event descriptor doesn't match"); } else if (eventDescriptorList.isEmpty()){ - QVERIFY2(eventDescriptors.count() == eventDescriptorList.count(), QString("There shoud be exactly %1 eventDescriptor").arg(eventDescriptorList.count()).toLatin1().data()); + QVERIFY2(eventDescriptors.count() == eventDescriptorList.count(), QString("There should be exactly %1 eventDescriptor").arg(eventDescriptorList.count()).toLatin1().data()); foreach (const QVariant &eventDescriptorVariant, eventDescriptorList) { bool found = false; foreach (const QVariant &replyEventDescriptorVariant, eventDescriptors) { @@ -1202,7 +1202,7 @@ void TestRules::loadStoreConfig() QVariantMap rule1 = response.toMap().value("params").toMap().value("rule").toMap(); QVariantList eventDescriptors = rule1.value("eventDescriptors").toList(); - QVERIFY2(eventDescriptors.count() == 2, "There shoud be exactly 2 eventDescriptors"); + QVERIFY2(eventDescriptors.count() == 2, "There should be exactly 2 eventDescriptors"); foreach (const QVariant &expectedEventDescriptorVariant, eventDescriptorList) { bool found = false; foreach (const QVariant &replyEventDescriptorVariant, eventDescriptors) { @@ -1221,7 +1221,7 @@ void TestRules::loadStoreConfig() QVERIFY2(rule1.value("name").toString() == "TestRule", "Loaded wrong name for rule"); QVariantMap replyStateEvaluator= rule1.value("stateEvaluator").toMap(); QVariantList replyChildEvaluators = replyStateEvaluator.value("childEvaluators").toList(); - QVERIFY2(replyChildEvaluators.count() == 2, "There shoud be exactly 2 childEvaluators"); + QVERIFY2(replyChildEvaluators.count() == 2, "There should be exactly 2 childEvaluators"); QVERIFY2(replyStateEvaluator.value("operator") == "StateOperatorAnd", "There should be the AND operator."); foreach (const QVariant &childEvaluator, replyChildEvaluators) { @@ -1262,7 +1262,7 @@ void TestRules::loadStoreConfig() QVariantMap replyStateEvaluator2= rule2.value("stateEvaluator").toMap(); QVariantList replyChildEvaluators2 = replyStateEvaluator.value("childEvaluators").toList(); QVERIFY2(replyStateEvaluator2.value("operator") == "StateOperatorAnd", "There should be the AND operator."); - QVERIFY2(replyChildEvaluators2.count() == 2, "There shoud be exactly 2 childEvaluators"); + QVERIFY2(replyChildEvaluators2.count() == 2, "There should be exactly 2 childEvaluators"); foreach (const QVariant &childEvaluator, replyChildEvaluators2) { QVERIFY2(childEvaluator.toMap().contains("stateDescriptor"), "StateDescriptor missing in StateEvaluator"); @@ -1322,7 +1322,7 @@ void TestRules::loadStoreConfig() qDebug() << rule3; QVariantList eventDescriptors3 = rule3.value("eventDescriptors").toList(); - QVERIFY2(eventDescriptors3.count() == 1, "There shoud be exactly 1 eventDescriptor"); + QVERIFY2(eventDescriptors3.count() == 1, "There should be exactly 1 eventDescriptor"); QVariantMap eventDescriptor = eventDescriptors3.first().toMap(); QVERIFY2(eventDescriptor.value("eventTypeId").toString() == mockEvent2Id.toString(), "Loaded the wrong eventTypeId in rule 3"); QVERIFY2(eventDescriptor.value("deviceId").toString() == m_mockDeviceId.toString(), "Loaded the wrong deviceId from eventDescriptor in rule 3"); @@ -1958,7 +1958,7 @@ void TestRules::testEventBasedAction() reply->deleteLater(); verifyRuleExecuted(mockActionIdWithParams); - // TODO: check if this action was realy executed with the int state value 42 + // TODO: check if this action was really executed with the int state value 42 } void TestRules::removePolicyUpdate() diff --git a/tests/auto/timemanager/testtimemanager.cpp b/tests/auto/timemanager/testtimemanager.cpp index 756cc053..1a68e1e4 100644 --- a/tests/auto/timemanager/testtimemanager.cpp +++ b/tests/auto/timemanager/testtimemanager.cpp @@ -1696,7 +1696,7 @@ void TestTimeManager::testEventItemYearly() NymeaCore::instance()->timeManager()->setTime(dateTime.addSecs(60)); verifyRuleNotExecuted(); - // Tick next year, one minute bofore, on time, one minute after + // Tick next year, one minute before, on time, one minute after QDateTime nextYear = dateTime.addYears(1); // not triggering