lint: Check for missing braces

The `eek/layersurface.c` file should be excluded because it's an imported, "foreign" source, but clang-tidy doesn't seem to have an annotation for that.

An alternative would have been to exclude it in Meson and do the check there, but that requires clang-tidy, raising the barrier to contribute of Squeekboard even more (it already requires libfeedback, which isn't packaged widely).
This commit is contained in:
Dorota Czaplejewicz
2020-10-20 10:43:54 +00:00
parent c0b6ea51fa
commit 153f9c39e5
8 changed files with 67 additions and 37 deletions

View File

@ -129,11 +129,12 @@ eek_gtk_keyboard_real_size_allocate (GtkWidget *self,
eekboard_context_service_use_layout(priv->eekboard_context, priv->layout, time);
}
if (priv->renderer)
if (priv->renderer) {
eek_renderer_set_allocation_size (priv->renderer,
priv->keyboard->layout,
allocation->width,
allocation->height);
}
GTK_WIDGET_CLASS (eek_gtk_keyboard_parent_class)->
size_allocate (self, allocation);
@ -355,10 +356,11 @@ eek_gtk_keyboard_init (EekGtkKeyboard *self)
EekGtkKeyboardPrivate *priv = eek_gtk_keyboard_get_instance_private (EEK_GTK_KEYBOARD (self));
g_autoptr(GError) err = NULL;
if (lfb_init(SQUEEKBOARD_APP_ID, &err))
if (lfb_init(SQUEEKBOARD_APP_ID, &err)) {
priv->event = lfb_event_new ("button-pressed");
else
} else {
g_warning ("Failed to init libfeedback: %s", err->message);
}
GtkIconTheme *theme = gtk_icon_theme_get_default ();