From 393947067931ccc6f72a3d9619d46102ba01d211 Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 18 Jul 2019 04:38:22 -0400 Subject: [PATCH] Add "use strict" directive to all .js files --- src/qml/EventHandlers/app.js | 2 ++ src/qml/EventHandlers/includes.js | 2 ++ src/qml/EventHandlers/rooms.js | 2 ++ src/qml/EventHandlers/users.js | 2 ++ src/qml/utils.js | 2 ++ 5 files changed, 10 insertions(+) diff --git a/src/qml/EventHandlers/app.js b/src/qml/EventHandlers/app.js index d026ada8..d199c65d 100644 --- a/src/qml/EventHandlers/app.js +++ b/src/qml/EventHandlers/app.js @@ -1,6 +1,8 @@ // Copyright 2019 miruka // This file is part of harmonyqml, licensed under LGPLv3. +"use strict" + function onExitRequested(exitCode) { Qt.exit(exitCode) } diff --git a/src/qml/EventHandlers/includes.js b/src/qml/EventHandlers/includes.js index 4f56e77a..fd673974 100644 --- a/src/qml/EventHandlers/includes.js +++ b/src/qml/EventHandlers/includes.js @@ -1,6 +1,8 @@ // Copyright 2019 miruka // This file is part of harmonyqml, licensed under LGPLv3. +"use strict" + // FIXME: Obsolete method, but need Qt 5.12+ for standard JS modules import Qt.include("app.js") Qt.include("users.js") diff --git a/src/qml/EventHandlers/rooms.js b/src/qml/EventHandlers/rooms.js index 241610a8..3ccf8aa4 100644 --- a/src/qml/EventHandlers/rooms.js +++ b/src/qml/EventHandlers/rooms.js @@ -1,6 +1,8 @@ // Copyright 2019 miruka // This file is part of harmonyqml, licensed under LGPLv3. +"use strict" + Qt.include("../utils.js") function typingTextFor(members, ourUserId) { diff --git a/src/qml/EventHandlers/users.js b/src/qml/EventHandlers/users.js index c166812a..9d0c2f9a 100644 --- a/src/qml/EventHandlers/users.js +++ b/src/qml/EventHandlers/users.js @@ -1,6 +1,8 @@ // Copyright 2019 miruka // This file is part of harmonyqml, licensed under LGPLv3. +"use strict" + function onAccountUpdated(userId) { accounts.append({userId}) } diff --git a/src/qml/utils.js b/src/qml/utils.js index 2e403d95..7b6d2c52 100644 --- a/src/qml/utils.js +++ b/src/qml/utils.js @@ -1,6 +1,8 @@ // Copyright 2019 miruka // This file is part of harmonyqml, licensed under LGPLv3. +"use strict" + function hsl(hue, saturation, lightness) { return hsla(hue, saturation, lightness)