From cdd2803498576422424f0bcae03df4ae312ba71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org> Date: Thu, 31 Jan 2019 20:38:24 +0100 Subject: [PATCH] Don't mistake GObject.registerClass() for a constructor Those slipped through when porting from Lang.Class to ES6 classes. Very indirectly spotted by eslint. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/388 --- js/ui/kbdA11yDialog.js | 2 +- js/ui/keyboard.js | 2 +- js/ui/messageList.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/ui/kbdA11yDialog.js b/js/ui/kbdA11yDialog.js index d789abac5..c09466b4f 100644 --- a/js/ui/kbdA11yDialog.js +++ b/js/ui/kbdA11yDialog.js @@ -8,7 +8,7 @@ const KEYBOARD_A11Y_SCHEMA = 'org.gnome.desktop.a11y.keyboard'; const KEY_STICKY_KEYS_ENABLED = 'stickykeys-enable'; const KEY_SLOW_KEYS_ENABLED = 'slowkeys-enable'; -var KbdA11yDialog = new GObject.registerClass( +var KbdA11yDialog = GObject.registerClass( class KbdA11yDialog extends GObject.Object { _init() { super._init(); diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index a57326361..c4b173e8c 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -54,7 +54,7 @@ const defaultKeysPost = [ [{ width: 1.5, action: 'languageMenu', extraClassName: 'layout-key' }, { width: 1.5, action: 'hide', extraClassName: 'hide-key' }] ], ]; -var KeyContainer = new GObject.registerClass( +var KeyContainer = GObject.registerClass( class KeyContainer extends St.Widget { _init() { let gridLayout = new Clutter.GridLayout({ orientation: Clutter.Orientation.HORIZONTAL, diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 510f1b007..29bf1c4e8 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -159,7 +159,7 @@ var URLHighlighter = class URLHighlighter { } }; -var ScaleLayout = new GObject.registerClass( +var ScaleLayout = GObject.registerClass( class ScaleLayout extends Clutter.BinLayout { _init(params) { this._container = null;