diff options
author | Raphael Kubo da Costa <rakuco@FreeBSD.org> | 2013-04-22 19:04:42 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-23 09:16:37 (GMT) |
commit | 527a61afacabd0e0c83fd4f9a85404fc2513a988 (patch) | |
tree | df36cf0be35f0f747879f5a85b609e5f00d0041b /src | |
parent | 815d7f0ff36aa656ecfbf6a6d69fc9453d72e598 (diff) | |
download | Qt-527a61afacabd0e0c83fd4f9a85404fc2513a988.zip Qt-527a61afacabd0e0c83fd4f9a85404fc2513a988.tar.gz Qt-527a61afacabd0e0c83fd4f9a85404fc2513a988.tar.bz2 |
Explicitly cast some shorts to ushorts.
This should fix some C++11 build errors, as clang was warning that r, g and
b were being narrowed from short to ushort.
Change-Id: I15333063bfdff3503d00e8baac18adcc343dba4b
Reviewed-by: David Faure (KDE) <faure@kde.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/qt3support/other/q3dragobject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp index e089af1..addfa6f 100644 --- a/src/qt3support/other/q3dragobject.cpp +++ b/src/qt3support/other/q3dragobject.cpp @@ -1505,7 +1505,9 @@ void Q3ColorDrag::setColor(const QColor &col) b = htons(b); ushort rgba[4] = { - r, g, b, + static_cast<ushort>(r), + static_cast<ushort>(g), + static_cast<ushort>(b), 0xffff // Alpha not supported yet. }; QByteArray data; |