[gnome-characters/wip/hadess/fix-deprecation-warnings-3-30: 2/2] searchProvider: Fix deprecation fixes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/wip/hadess/fix-deprecation-warnings-3-30: 2/2] searchProvider: Fix deprecation fixes
- Date: Thu, 11 Apr 2019 13:55:57 +0000 (UTC)
commit bd8b69bab4efb9354d7681863b9ced8767701954
Author: Jan Alexander Steffens (heftig) <jan steffens gmail com>
Date: Wed Mar 20 21:07:01 2019 +0000
searchProvider: Fix deprecation fixes
- `ByteArray` did not get imported and was missing.
- `String.prototype.toUpperCase` cannot be passed directly to `map`.
Fixes https://gitlab.gnome.org/GNOME/gnome-characters/issues/49
Conflicts:
src/searchProvider.js
src/searchProvider.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/searchProvider.js b/src/searchProvider.js
index 37d0e91..fca1de9 100644
--- a/src/searchProvider.js
+++ b/src/searchProvider.js
@@ -19,6 +19,7 @@
const {Gc, Gdk, Gio, GLib, GObject} = imports.gi;
+const ByteArray = imports.byteArray;
const Util = imports.util;
const MAX_SEARCH_RESULTS = 100;
@@ -47,7 +48,7 @@ var SearchProvider = GObject.registerClass({
this._cancellable.cancel();
this._cancellable.reset();
- let upper = keywords.map(String.prototype.toUpperCase);
+ let upper = keywords.map(x => x.toUpperCase());
let criteria = Gc.SearchCriteria.new_keywords(upper);
let context = new Gc.SearchContext({ criteria: criteria,
flags: Gc.SearchFlag.WORD });
@@ -153,4 +154,4 @@ var SearchProvider = GObject.registerClass({
this._activateAction('search', new GLib.Variant('as', terms),
timestamp);
}
-});
\ No newline at end of file
+});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]