Commit 0b4a1725 authored by Ronan's avatar Ronan
Browse files

fix(ui/scripts/Utils/utils): Qt (5.7.1) crash when a variable in a js file is compared to null

parent 265965da
......@@ -3,7 +3,7 @@ import QtTest 1.1
import Utils 1.0
// ===================================================================
// =============================================================================
Rectangle {
id: root
......@@ -54,7 +54,7 @@ Rectangle {
compare(spy.count, 0, '`pressed` signal was emitted')
}
// ---------------------------------------------------------------
// -------------------------------------------------------------------------
function test_randomClickOutsideMouseArea () {
Utils.times(50, function () {
......@@ -80,7 +80,7 @@ Rectangle {
})
}
// ---------------------------------------------------------------
// -------------------------------------------------------------------------
function test_clickInsideMouseArea_data () {
return [
......@@ -98,7 +98,7 @@ Rectangle {
compare(spy.count, 0, '`pressed` signal was emitted')
}
// ---------------------------------------------------------------
// -------------------------------------------------------------------------
function test_clickOutsideMouseArea_data () {
return [
......
......@@ -34,7 +34,7 @@ function connectOnce (signal, cb) {
function encodeTextToQmlRichFormat (text, options) {
var images = ''
if (options == null) {
if (!options) {
options = {}
}
......@@ -218,7 +218,7 @@ function setTimeout (parent, delay, cb) {
// ===================================================================
function _computeOptimizedCb (func, context) {
return (context != null)
return context
? (function () {
return func.apply(context, arguments)
}) : func
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment