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
667aa7e1
Commit
667aa7e1
authored
Jun 12, 2017
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ui/views/App/Settings/SettingsVideo): fix a crash if the app was built without video support
parent
6e440461
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
SettingsModel.cpp
linphone-desktop/src/components/settings/SettingsModel.cpp
+10
-0
SettingsVideo.qml
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
+4
-4
linphone
submodules/linphone
+1
-1
No files found.
linphone-desktop/src/components/settings/SettingsModel.cpp
View file @
667aa7e1
...
@@ -182,6 +182,16 @@ void SettingsModel::setVideoFramerate (int framerate) {
...
@@ -182,6 +182,16 @@ void SettingsModel::setVideoFramerate (int framerate) {
inline
QVariantMap
createMapFromVideoDefinition
(
const
shared_ptr
<
const
linphone
::
VideoDefinition
>
&
definition
)
{
inline
QVariantMap
createMapFromVideoDefinition
(
const
shared_ptr
<
const
linphone
::
VideoDefinition
>
&
definition
)
{
QVariantMap
map
;
QVariantMap
map
;
if
(
!
definition
)
{
Q_ASSERT
(
!
CoreManager
::
getInstance
()
->
getCore
()
->
videoSupported
());
map
[
"name"
]
=
QStringLiteral
(
"Bad EGG"
);
map
[
"width"
]
=
QStringLiteral
(
"?????"
);
map
[
"height"
]
=
QStringLiteral
(
"?????"
);
return
map
;
}
map
[
"name"
]
=
::
Utils
::
coreStringToAppString
(
definition
->
getName
());
map
[
"name"
]
=
::
Utils
::
coreStringToAppString
(
definition
->
getName
());
map
[
"width"
]
=
definition
->
getWidth
();
map
[
"width"
]
=
definition
->
getWidth
();
map
[
"height"
]
=
definition
->
getHeight
();
map
[
"height"
]
=
definition
->
getHeight
();
...
...
linphone-desktop/ui/views/App/Settings/SettingsVideo.qml
View file @
667aa7e1
...
@@ -28,9 +28,9 @@ TabContainer {
...
@@ -28,9 +28,9 @@ TabContainer {
label
:
qsTr
(
'
videoInputDeviceLabel
'
)
label
:
qsTr
(
'
videoInputDeviceLabel
'
)
ComboBox
{
ComboBox
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
device
)
{
currentIndex
:
Number
(
Utils
.
findIndex
(
model
,
function
(
device
)
{
return
device
===
SettingsModel
.
videoDevice
return
device
===
SettingsModel
.
videoDevice
})
})
)
// Number cast => Index is null if app does not support video.
model
:
SettingsModel
.
videoDevices
model
:
SettingsModel
.
videoDevices
onActivated
:
SettingsModel
.
videoDevice
=
model
[
index
]
onActivated
:
SettingsModel
.
videoDevice
=
model
[
index
]
...
@@ -74,9 +74,9 @@ TabContainer {
...
@@ -74,9 +74,9 @@ TabContainer {
label
:
qsTr
(
'
videoSizeLabel
'
)
label
:
qsTr
(
'
videoSizeLabel
'
)
ComboBox
{
ComboBox
{
currentIndex
:
Utils
.
findIndex
(
model
,
function
(
definition
)
{
currentIndex
:
Number
(
Utils
.
findIndex
(
model
,
function
(
definition
)
{
return
definition
.
value
.
name
===
SettingsModel
.
videoDefinition
.
name
return
definition
.
value
.
name
===
SettingsModel
.
videoDefinition
.
name
})
})
)
// Number cast => Index is null if app does not support video.
model
:
SettingsModel
.
supportedVideoDefinitions
.
map
(
function
(
definition
)
{
model
:
SettingsModel
.
supportedVideoDefinitions
.
map
(
function
(
definition
)
{
return
{
return
{
key
:
definition
.
name
+
'
(
'
+
definition
.
width
+
'
x
'
+
definition
.
height
+
'
)
'
,
key
:
definition
.
name
+
'
(
'
+
definition
.
width
+
'
x
'
+
definition
.
height
+
'
)
'
,
...
...
linphone
@
df4cc8d7
Subproject commit
2b93067a78a0373f24ee868d5bd0523f6be15d14
Subproject commit
df4cc8d7079e6191bf0bb389da809736c5607b70
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