blob: 3c79d85413a946e0f26019e40935759aea381ded (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
Description: fix VNC platform plugin build on big-endian machines
Author: Shawn Rutledge <shawn.rutledge@digia.com>
Origin: https://codereview.qt-project.org/185248
Last-Update: 2017-02-16
--- a/src/plugins/platforms/vnc/qvncclient.cpp
+++ b/src/plugins/platforms/vnc/qvncclient.cpp
@@ -142,7 +142,7 @@
case 16: {
quint16 p = *reinterpret_cast<const quint16*>(src);
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- if (swapBytes)
+ if (m_swapBytes)
p = ((p & 0xff) << 8) | ((p & 0xff00) >> 8);
#endif
r = (p >> 11) & 0x1f;
@@ -484,7 +484,7 @@
m_sameEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) == !!m_pixelFormat.bigEndian;
m_needConversion = pixelConversionNeeded();
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- m_swapBytes = qvnc_screen->swapBytes();
+ m_swapBytes = server()->screen()->swapBytes();
#endif
}
}
@@ -639,7 +639,7 @@
return true;
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- if (qvnc_screen->swapBytes())
+ if (server()->screen()->swapBytes())
return true;
#endif
--- a/src/plugins/platforms/vnc/qvncscreen.cpp
+++ b/src/plugins/platforms/vnc/qvncscreen.cpp
@@ -43,6 +43,7 @@
#include <QtFbSupport/private/qfbcursor_p.h>
#include <QtGui/QPainter>
+#include <QtGui/QScreen>
#include <QtCore/QRegularExpression>
@@ -172,14 +173,18 @@
}
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
-bool QVNCScreen::swapBytes() const
+bool QVncScreen::swapBytes() const
{
+ return false;
+
+ /* TODO
if (depth() != 16)
return false;
if (screen())
return screen()->frameBufferLittleEndian();
return frameBufferLittleEndian();
+ */
}
#endif
--- a/src/plugins/platforms/vnc/qvncscreen.h
+++ b/src/plugins/platforms/vnc/qvncscreen.h
@@ -73,7 +73,7 @@
void clearDirty() { dirtyRegion = QRegion(); }
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
- bool swapBytes() const
+ bool swapBytes() const;
#endif
QStringList mArgs;
|