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
8d46bcb1
Commit
8d46bcb1
authored
Jul 16, 2017
by
Wescoeur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(Colors): do not override if config is null
parent
62ee52c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Colors.cpp
src/components/other/colors/Colors.cpp
+4
-1
No files found.
src/components/other/colors/Colors.cpp
View file @
8d46bcb1
...
@@ -66,12 +66,15 @@ void Colors::useConfig (const shared_ptr<linphone::Config> &config) {
...
@@ -66,12 +66,15 @@ void Colors::useConfig (const shared_ptr<linphone::Config> &config) {
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
void
Colors
::
overrideColors
(
const
shared_ptr
<
linphone
::
Config
>
&
config
)
{
void
Colors
::
overrideColors
(
const
shared_ptr
<
linphone
::
Config
>
&
config
)
{
if
(
!
config
)
return
;
const
QMetaObject
*
info
=
metaObject
();
const
QMetaObject
*
info
=
metaObject
();
for
(
int
i
=
info
->
propertyOffset
();
i
<
info
->
propertyCount
();
++
i
)
{
for
(
int
i
=
info
->
propertyOffset
();
i
<
info
->
propertyCount
();
++
i
)
{
const
QMetaProperty
metaProperty
=
info
->
property
(
i
);
const
QMetaProperty
metaProperty
=
info
->
property
(
i
);
const
string
colorName
=
metaProperty
.
name
();
const
string
colorName
=
metaProperty
.
name
();
const
string
colorValue
=
config
?
config
->
getString
(
COLORS_SECTION
,
colorName
,
""
)
:
""
;
const
string
colorValue
=
config
->
getString
(
COLORS_SECTION
,
colorName
,
""
)
;
if
(
!
colorValue
.
empty
())
if
(
!
colorValue
.
empty
())
setProperty
(
colorName
.
c_str
(),
QColor
(
::
Utils
::
coreStringToAppString
(
colorValue
)));
setProperty
(
colorName
.
c_str
(),
QColor
(
::
Utils
::
coreStringToAppString
(
colorValue
)));
...
...
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