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
9f7f455a
Commit
9f7f455a
authored
Mar 06, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/views/App/Settings): avoid useless `Component.onCompleted` on `ComboBox`
parent
83bf254d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
19 deletions
+16
-19
SettingsAudio.qml
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
+6
-9
SettingsVideo.qml
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
+10
-10
No files found.
linphone-desktop/ui/views/App/Settings/SettingsAudio.qml
View file @
9f7f455a
...
...
@@ -16,11 +16,10 @@ TabContainer {
label
:
qsTr
(
'
playbackDeviceLabel
'
)
ComboBox
{
model
:
SettingsModel
.
audioDevices
Component.onCompleted
:
currentIndex
=
Utils
.
findIndex
(
model
,
function
(
device
)
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
playbackDevice
})
model
:
SettingsModel
.
audioDevices
onActivated
:
SettingsModel
.
playbackDevice
=
model
[
index
]
}
...
...
@@ -32,11 +31,10 @@ TabContainer {
label
:
qsTr
(
'
captureDeviceLabel
'
)
ComboBox
{
model
:
SettingsModel
.
audioDevices
Component.onCompleted
:
currentIndex
=
Utils
.
findIndex
(
model
,
function
(
device
)
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
captureDevice
})
model
:
SettingsModel
.
audioDevices
onActivated
:
SettingsModel
.
captureDevice
=
model
[
index
]
}
...
...
@@ -48,11 +46,10 @@ TabContainer {
label
:
qsTr
(
'
ringerDeviceLabel
'
)
ComboBox
{
model
:
SettingsModel
.
audioDevices
Component.onCompleted
:
currentIndex
=
Utils
.
findIndex
(
model
,
function
(
device
)
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
ringerDevice
})
model
:
SettingsModel
.
audioDevices
onActivated
:
SettingsModel
.
ringerDevice
=
model
[
index
]
}
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
View file @
9f7f455a
...
...
@@ -16,11 +16,10 @@ TabContainer {
label
:
qsTr
(
'
videoInputDeviceLabel
'
)
ComboBox
{
model
:
SettingsModel
.
videoDevices
Component.onCompleted
:
currentIndex
=
Utils
.
findIndex
(
model
,
function
(
device
)
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
videoDevice
})
model
:
SettingsModel
.
videoDevices
onActivated
:
SettingsModel
.
videoDevice
=
model
[
index
]
}
...
...
@@ -32,6 +31,14 @@ TabContainer {
label
:
qsTr
(
'
videoPresetLabel
'
)
ComboBox
{
currentIndex
:
{
var
preset
=
SettingsModel
.
videoPreset
return
Number
(
Utils
.
findIndex
([
'
default
'
,
'
high-fps
'
,
'
custom
'
],
function
(
value
)
{
return
preset
===
value
}))
}
model
:
ListModel
{
id
:
presets
...
...
@@ -53,13 +60,6 @@ TabContainer {
textRole
:
'
key
'
Component.onCompleted
:
{
var
preset
=
SettingsModel
.
videoPreset
currentIndex
=
Number
(
Utils
.
findIndex
([
'
default
'
,
'
high-fps
'
,
'
custom
'
],
function
(
value
)
{
return
preset
===
value
}))
}
onActivated
:
SettingsModel
.
videoPreset
=
presets
.
get
(
index
).
value
}
}
...
...
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