@@ -82,7 +82,7 @@ HudClient::HudClient()
82 m_results = new DeeListModel();
82 m_results = new DeeListModel();
83 m_clientQuery = hud_client_query_new("");
83 m_clientQuery = hud_client_query_new("");
84 m_toolBarModel = new HudToolBarModel(m_clientQuery);
84 m_toolBarModel = new HudToolBarModel(m_clientQuery);
85− m_currentActionParam = NULL;
85+ m_currentActionParam = nullptr;
86 m_results->setModel(hud_client_query_get_results_model(m_clientQuery));
86 m_results->setModel(hud_client_query_get_results_model(m_clientQuery));
88 g_signal_connect(G_OBJECT(m_clientQuery), "voice-query-loading", G_CALLBACK(loadingCB), this);
88 g_signal_connect(G_OBJECT(m_clientQuery), "voice-query-loading", G_CALLBACK(loadingCB), this);
@@ -151,13 +151,13 @@ void HudClient::executeParametrizedAction(const QVariant &values)
151 updateParametrizedAction(values);
151 updateParametrizedAction(values);
152 hud_client_param_send_commit(m_currentActionParam);
152 hud_client_param_send_commit(m_currentActionParam);
153 g_object_unref(m_currentActionParam);
153 g_object_unref(m_currentActionParam);
154− m_currentActionParam = NULL;
154+ m_currentActionParam = nullptr;
155 Q_EMIT commandExecuted();
155 Q_EMIT commandExecuted();
158void HudClient::updateParametrizedAction(const QVariant &values)
158void HudClient::updateParametrizedAction(const QVariant &values)
160− if (m_currentActionParam != NULL) {
160+ if (m_currentActionParam != nullptr) {
161 const QVariantMap map = values.value<QVariantMap>();
161 const QVariantMap map = values.value<QVariantMap>();
162 GActionGroup *ag = hud_client_param_get_actions(m_currentActionParam);
162 GActionGroup *ag = hud_client_param_get_actions(m_currentActionParam);
@@ -179,10 +179,10 @@ void HudClient::updateParametrizedAction(const QVariant &values)
180void HudClient::cancelParametrizedAction()
180void HudClient::cancelParametrizedAction()
182− if (m_currentActionParam != NULL) {
182+ if (m_currentActionParam != nullptr) {
183 hud_client_param_send_cancel(m_currentActionParam);
183 hud_client_param_send_cancel(m_currentActionParam);
184 g_object_unref(m_currentActionParam);
184 g_object_unref(m_currentActionParam);
185− m_currentActionParam = NULL;
185+ m_currentActionParam = nullptr;
@@ -212,9 +212,9 @@ void HudClient::executeCommand(int index)
212 GVariant *is_parametrized = dee_model_get_value(model, iter, 7);
212 GVariant *is_parametrized = dee_model_get_value(model, iter, 7);
213 if (g_variant_get_boolean(is_parametrized)) {
213 if (g_variant_get_boolean(is_parametrized)) {
214 m_currentActionParam = hud_client_query_execute_param_command(m_clientQuery, command_key, /* timestamp */ 0);
214 m_currentActionParam = hud_client_query_execute_param_command(m_clientQuery, command_key, /* timestamp */ 0);
215− if (m_currentActionParam != NULL) {
215+ if (m_currentActionParam != nullptr) {
216 GMenuModel *menuModel = hud_client_param_get_model (m_currentActionParam);
216 GMenuModel *menuModel = hud_client_param_get_model (m_currentActionParam);
217− if (menuModel == NULL) {
217+ if (menuModel == nullptr) {
218 g_signal_connect(m_currentActionParam, HUD_CLIENT_PARAM_SIGNAL_MODEL_READY, G_CALLBACK(modelReadyCB), this);
218 g_signal_connect(m_currentActionParam, HUD_CLIENT_PARAM_SIGNAL_MODEL_READY, G_CALLBACK(modelReadyCB), this);
220 modelReady(false);
220 modelReady(false);
@@ -244,9 +244,9 @@ void HudClient::modelReady(bool needDisconnect)
246static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
246static void addAttribute(QVariantMap &properties, GMenuModel *menuModel, int item, const char *attribute) {
247− GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, NULL);
247+ GVariant *v = g_menu_model_get_item_attribute_value(menuModel, item, attribute, nullptr);
249− if (v == NULL)
249+ if (v == nullptr)
252 properties.insert(attribute, DeeListModel::VariantForData(v));
252 properties.insert(attribute, DeeListModel::VariantForData(v));
@@ -264,10 +264,10 @@ void HudClient::modelReallyReady(bool needDisconnect)
264 for (int i = 0; i < g_menu_model_get_n_items(menuModel); i++) {
264 for (int i = 0; i < g_menu_model_get_n_items(menuModel); i++) {
265 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, i, "parameter-type", G_VARIANT_TYPE_STRING);
265 GVariant *v = g_menu_model_get_item_attribute_value(menuModel, i, "parameter-type", G_VARIANT_TYPE_STRING);
267− if (v == NULL)
267+ if (v == nullptr)
268 continue;
268 continue;
270− const QString type = QString::fromUtf8(g_variant_get_string(v, NULL));
270+ const QString type = QString::fromUtf8(g_variant_get_string(v, nullptr));
271 if (type == "slider") {
271 if (type == "slider") {
272 const char *sliderAttributes[] = { "label", "min", "max", "step", "value", "live", "action" };
272 const char *sliderAttributes[] = { "label", "min", "max", "step", "value", "live", "action" };
273 QVariantMap properties;
273 QVariantMap properties;
@@ -283,7 +283,7 @@ void HudClient::modelReallyReady(bool needDisconnect)
283 DeeModel *model = hud_client_query_get_results_model(m_clientQuery);
283 DeeModel *model = hud_client_query_get_results_model(m_clientQuery);
284 DeeModelIter *iter = dee_model_get_iter_at_row(model, m_currentActionIndex);
284 DeeModelIter *iter = dee_model_get_iter_at_row(model, m_currentActionIndex);
285 GVariant *actionTextVariant = dee_model_get_value(model, iter, 1);
285 GVariant *actionTextVariant = dee_model_get_value(model, iter, 1);
286− const QString actionText = QString::fromUtf8(g_variant_get_string(actionTextVariant, NULL));
286+ const QString actionText = QString::fromUtf8(g_variant_get_string(actionTextVariant, nullptr));
287 g_variant_unref(actionTextVariant);
287 g_variant_unref(actionTextVariant);
288 Q_EMIT showParametrizedAction(actionText, QVariant::fromValue(items));
288 Q_EMIT showParametrizedAction(actionText, QVariant::fromValue(items));