summaryrefslogtreecommitdiffstats
path: root/src/qt3support
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2013-04-22 22:04:42 +0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-23 11:16:37 +0200
commit527a61afacabd0e0c83fd4f9a85404fc2513a988 (patch)
treedf36cf0be35f0f747879f5a85b609e5f00d0041b /src/qt3support
parent815d7f0ff36aa656ecfbf6a6d69fc9453d72e598 (diff)
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/qt3support')
-rw-r--r--src/qt3support/other/q3dragobject.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qt3support/other/q3dragobject.cpp b/src/qt3support/other/q3dragobject.cpp
index e089af1621..addfa6f637 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;