on xenial help sign in
Remove debug code
commit9cb2b88f253a78431e51221b91b4f541bbcfe0fe authorJosh Arenson <joshua.arenson@canonical.com> dateFri 21 Aug 2015, 07:26 (11 years ago) parentca4ad59
1 file changed−32
qml/Shell.qml−32
qml/Shell.qml−32
@@ -160,38 +160,6 @@ Item {
160160 value: ApplicationManager
161161 }
162162
163−function serialize(object, maxDepth) {
164− function _processObject(object, maxDepth, level) {
165− var output = Array()
166− var pad = " "
167− if (maxDepth == undefined) {
168− maxDepth = -1
169− }
170− if (level == undefined) {
171− level = 0
172− }
173− var padding = Array(level + 1).join(pad)
174−
175− output.push((Array.isArray(object) ? "[" : "{"))
176− var fields = Array()
177− for (var key in object) {
178− var keyText = Array.isArray(object) ? "" : ("\"" + key + "\": ")
179− if (typeof (object[key]) == "object" && key != "parent" && maxDepth != 0) {
180− var res = _processObject(object[key], maxDepth > 0 ? maxDepth - 1 : -1, level + 1)
181− fields.push(padding + pad + keyText + res)
182− } else {
183− fields.push(padding + pad + keyText + "\"" + object[key] + "\"")
184− }
185− }
186− output.push(fields.join(",\n"))
187− output.push(padding + (Array.isArray(object) ? "]" : "}"))
188−
189− return output.join("\n")
190− }
191−
192− return _processObject(object, maxDepth)
193−}
194−
195163 Component.onCompleted: {
196164 Theme.name = "Ubuntu.Components.Themes.SuruGradient"
197165 if (ApplicationManager.count > 0) {