Bug 353898 - kbibtex failed to build on ARM since qreal is float instead of double
Summary: kbibtex failed to build on ARM since qreal is float instead of double
Status: RESOLVED FIXED
Alias: None
Product: KBibTeX
Classification: Applications
Component: Compiling/packaging (show other bugs)
Version: 0.6
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Thomas Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-14 14:35 UTC by Robin Lee
Modified: 2015-10-30 17:56 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix the ARM build (1.04 KB, patch)
2015-10-14 14:35 UTC, Robin Lee
Details
Migrating StarRating from double to float (5.08 KB, patch)
2015-10-16 19:37 UTC, Thomas Fischer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Lee 2015-10-14 14:35:24 UTC
Created attachment 94991 [details]
Patch to fix the ARM build

Please refer to the patch.

Use qreal instead of double

Since qreal is float on ARM, using double here will fail to compile.
Comment 1 Thomas Fischer 2015-10-16 19:37:56 UTC
Created attachment 95016 [details]
Migrating StarRating from double to float

Wouldn't a complete migration from double to float solve the problem as well? On x86/amd64, it works without a noticeable difference. How about ARM?

This patch does not only change all double/qreal cases to float, but also refactors percentForPosition into StarRating::Private.

Please test if this patch works on ARM, too.
Comment 2 Robin Lee 2015-10-30 17:36:30 UTC
The new patch looks great and also fixes the ARM build.
Comment 3 Thomas Fischer 2015-10-30 17:54:43 UTC
Git commit 80ff29053cf40a739ae5b3447eee16d7819d9f66 by Thomas Fischer.
Committed on 30/10/2015 at 17:50.
Pushed by thomasfischer into branch 'kbibtex/0.6'.

Migrating StarRating to float, solving ARM issues

As reported by Robin Lee in KDE bug 353898, qreal
is defined differently in Qt on different platforms.
Code that compiles on x86 platforms fails on ARM.
By consequently using float instead of qreal, this
issue can be avoided.

Beside fixing this bug, some code has been refactored
by moving a function from the class's public interface
(header) to a private class.

M  +15   -15   src/gui/widgets/starrating.cpp
M  +3    -4    src/gui/widgets/starrating.h

http://commits.kde.org/kbibtex/80ff29053cf40a739ae5b3447eee16d7819d9f66
Comment 4 Thomas Fischer 2015-10-30 17:55:42 UTC
Git commit 273dbbd019aa035b80d6bbfccb948dc9fb76b2d5 by Thomas Fischer.
Committed on 30/10/2015 at 17:55.
Pushed by thomasfischer into branch 'kbibtex/0.7'.

Migrating StarRating to float, solving ARM issues

As reported by Robin Lee in KDE bug 353898, qreal
is defined differently in Qt on different platforms.
Code that compiles on x86 platforms fails on ARM.
By consequently using float instead of qreal, this
issue can be avoided.

Beside fixing this bug, some code has been refactored
by moving a function from the class's public interface
(header) to a private class.

M  +15   -15   src/gui/widgets/starrating.cpp
M  +3    -4    src/gui/widgets/starrating.h

http://commits.kde.org/kbibtex/273dbbd019aa035b80d6bbfccb948dc9fb76b2d5
Comment 5 Thomas Fischer 2015-10-30 17:56:23 UTC
Git commit 51e64e0c22b6ff39d07843e34fe667ebf128c1a9 by Thomas Fischer.
Committed on 30/10/2015 at 17:56.
Pushed by thomasfischer into branch 'master'.

Migrating StarRating to float, solving ARM issues

As reported by Robin Lee in KDE bug 353898, qreal
is defined differently in Qt on different platforms.
Code that compiles on x86 platforms fails on ARM.
By consequently using float instead of qreal, this
issue can be avoided.

Beside fixing this bug, some code has been refactored
by moving a function from the class's public interface
(header) to a private class.

M  +15   -15   src/gui/widgets/starrating.cpp
M  +3    -4    src/gui/widgets/starrating.h

http://commits.kde.org/kbibtex/51e64e0c22b6ff39d07843e34fe667ebf128c1a9