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
4f304652
Commit
4f304652
authored
Jul 16, 2017
by
Wescoeur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore(CMakeLists.txt): old-style-cast is an error warn now
parent
e249bc3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
CMakeLists.txt
CMakeLists.txt
+1
-1
ChatModel.cpp
src/components/chat/ChatModel.cpp
+10
-12
No files found.
CMakeLists.txt
View file @
4f304652
...
...
@@ -46,10 +46,10 @@ if (NOT WIN32)
-Wcast-align \
-Wconversion \
-Werror=return-type \
-Werror=old-style-cast \
-Wextra \
-Wfloat-equal \
-Winit-self \
-Wold-style-cast \
-Woverloaded-virtual \
-Wpointer-arith \
-Wuninitialized \
...
...
src/components/chat/ChatModel.cpp
View file @
4f304652
...
...
@@ -78,28 +78,26 @@ inline void createThumbnail (const shared_ptr<linphone::ChatMessage> &message) {
int
rotation
=
0
;
QExifImageHeader
exifImageHeader
;
if
(
exifImageHeader
.
loadFromJpeg
(
thumbnailPath
))
{
rotation
=
(
int
)
exifImageHeader
.
value
(
QExifImageHeader
::
ImageTag
::
Orientation
).
toShort
();
}
if
(
exifImageHeader
.
loadFromJpeg
(
thumbnailPath
))
rotation
=
static_cast
<
int
>
(
exifImageHeader
.
value
(
QExifImageHeader
::
ImageTag
::
Orientation
).
toShort
());
QImage
thumbnail
=
image
.
scaled
(
THUMBNAIL_IMAGE_FILE_WIDTH
,
THUMBNAIL_IMAGE_FILE_HEIGHT
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
THUMBNAIL_IMAGE_FILE_WIDTH
,
THUMBNAIL_IMAGE_FILE_HEIGHT
,
Qt
::
KeepAspectRatio
,
Qt
::
SmoothTransformation
);
if
(
rotation
!=
0
)
{
QTransform
transform
;
if
(
rotation
==
3
||
rotation
==
4
)
{
if
(
rotation
==
3
||
rotation
==
4
)
transform
.
rotate
(
180
);
}
else
if
(
rotation
==
5
||
rotation
==
6
)
{
else
if
(
rotation
==
5
||
rotation
==
6
)
transform
.
rotate
(
90
);
}
else
if
(
rotation
==
7
||
rotation
==
8
)
{
else
if
(
rotation
==
7
||
rotation
==
8
)
transform
.
rotate
(
-
90
);
}
thumbnail
=
thumbnail
.
transformed
(
transform
);
if
(
rotation
==
2
||
rotation
==
4
||
rotation
==
5
||
rotation
==
7
)
{
if
(
rotation
==
2
||
rotation
==
4
||
rotation
==
5
||
rotation
==
7
)
thumbnail
=
thumbnail
.
mirrored
(
true
,
false
);
}
}
QString
uuid
=
QUuid
::
createUuid
().
toString
();
...
...
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