Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
885c16f9
Commit
885c16f9
authored
Sep 27, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(scripts/utils.js): fix indentation
parent
09b43034
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
46 deletions
+46
-46
utils.js
tests/ui/scripts/utils.js
+46
-46
No files found.
tests/ui/scripts/utils.js
View file @
885c16f9
...
...
@@ -10,44 +10,44 @@
//
// If exitHandler is used, window must implement exitStatus signal.
function
openWindow
(
window
,
parent
,
options
)
{
var
object
var
object
if
(
options
&&
options
.
isString
)
{
object
=
Qt
.
createQmlObject
(
window
,
parent
)
}
else
{
var
component
=
Qt
.
createComponent
(
'
qrc:/ui/views/
'
+
window
+
'
.qml
'
)
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
debug
(
'
Window not ready.
'
)
if
(
component
.
status
===
Component
.
Error
)
{
console
.
debug
(
'
Error:
'
+
component
.
errorString
())
}
return
// Error.
}
if
(
options
&&
options
.
isString
)
{
object
=
Qt
.
createQmlObject
(
window
,
parent
)
}
else
{
var
component
=
Qt
.
createComponent
(
'
qrc:/ui/views/
'
+
window
+
'
.qml
'
)
object
=
component
.
createObject
(
parent
)
if
(
component
.
status
!==
Component
.
Ready
)
{
console
.
debug
(
'
Window not ready.
'
)
if
(
component
.
status
===
Component
.
Error
)
{
console
.
debug
(
'
Error:
'
+
component
.
errorString
())
}
return
// Error.
}
console
.
debug
(
'
Open window.
'
)
object
=
component
.
createObject
(
parent
)
}
object
.
closing
.
connect
(
function
()
{
console
.
debug
(
'
Destroy window.
'
)
object
.
destroy
()
})
object
.
exitStatus
.
connect
(
function
(
status
)
{
console
.
debug
(
'
Exit status:
'
+
status
)
})
console
.
debug
(
'
Open window.
'
)
if
(
options
&&
options
.
exitHandler
)
{
object
.
exitStatus
.
connect
(
// Bind to access parent properties.
options
.
exitHandler
.
bind
(
parent
)
)
}
object
.
closing
.
connect
(
function
()
{
console
.
debug
(
'
Destroy window.
'
)
object
.
destroy
()
})
object
.
exitStatus
.
connect
(
function
(
status
)
{
console
.
debug
(
'
Exit status:
'
+
status
)
})
object
.
show
()
if
(
options
&&
options
.
exitHandler
)
{
object
.
exitStatus
.
connect
(
// Bind to access parent properties.
options
.
exitHandler
.
bind
(
parent
)
)
}
object
.
show
()
}
// -------------------------------------------------------------------
...
...
@@ -55,24 +55,24 @@ function openWindow (window, parent, options) {
// Display a simple ConfirmDialog component.
// Wrap the openWindow function.
function
openConfirmDialog
(
parent
,
options
)
{
openWindow
(
'
import QtQuick 2.7;
'
+
'
import
\'
qrc:/ui
/Linphone/Dialog
\'
;
'
+
'
ConfirmDialog {
'
+
'
descriptionText:
\'
'
+
options
.
descriptionText
+
'
\'
;
'
+
'
title:
\'
'
+
options
.
title
+
'
\'
'
+
'
}
'
,
parent
,
{
isString
:
true
,
exitHandler
:
options
.
exitHandler
}
)
openWindow
(
'
import QtQuick 2.7;
'
+
'
import
\'
qrc:/ui/modules
/Linphone/Dialog
\'
;
'
+
'
ConfirmDialog {
'
+
'
descriptionText:
\'
'
+
options
.
descriptionText
+
'
\'
;
'
+
'
title:
\'
'
+
options
.
title
+
'
\'
'
+
'
}
'
,
parent
,
{
isString
:
true
,
exitHandler
:
options
.
exitHandler
}
)
}
// -------------------------------------------------------------------
function
snakeToCamel
(
s
)
{
return
s
.
replace
(
/
(\_\w)
/g
,
function
(
matches
)
{
return
matches
[
1
].
toUpperCase
()
})
return
s
.
replace
(
/
(\_\w)
/g
,
function
(
matches
)
{
return
matches
[
1
].
toUpperCase
()
})
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment