author | jurikm |
Sun, 12 Feb 2012 14:04:10 +0000 | |
changeset 8245 | 383896da4129 |
parent 3684 | ce1a7a75c649 |
permissions | -rw-r--r-- |
3684
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
1 |
--- src/gui/image/qnativeimage.cpp.orig 2010-06-01 22:03:15.000000000 -0400 |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
2 |
+++ src/gui/image/qnativeimage.cpp 2010-07-11 13:21:55.000000000 -0400 |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
3 |
@@ -176,29 +176,26 @@ QNativeImage::QNativeImage(int width, in |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
4 |
IPC_CREAT | 0777); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
5 |
ok = xshminfo.shmid != -1; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
6 |
if (ok) { |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
7 |
- xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
8 |
- xshminfo.shmaddr = xshmimg->data; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
9 |
- if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
10 |
- qWarning() << "Error while marking the shared memory segment to be destroyed"; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
11 |
+ xshmimg->data = xshminfo.shmaddr = (char*)shmat(xshminfo.shmid, 0, 0); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
12 |
ok = (xshminfo.shmaddr != (char*)-1); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
13 |
if (ok) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
14 |
image = QImage((uchar *)xshmimg->data, width, height, format); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
15 |
} |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
16 |
xshminfo.readOnly = false; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
17 |
- if (ok) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
18 |
+ if (ok) { |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
19 |
ok = XShmAttach(X11->display, &xshminfo); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
20 |
+ XSync(X11->display, false); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
21 |
+ } |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
22 |
+ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
23 |
+ qWarning() << "QNativeImage: Error marking the shared memory segment to be destroyed"; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
24 |
if (!ok) { |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
25 |
- qWarning() << "QNativeImage: Unable to attach to shared memory segment."; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
26 |
- if (xshmimg->data) { |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
27 |
- free(xshmimg->data); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
28 |
- xshmimg->data = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
29 |
- } |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
30 |
+ qWarning() << "QNativeImage: X server was unable to attach to shared memory segment."; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
31 |
XDestroyImage(xshmimg); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
32 |
+ XSync(X11->display, false); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
33 |
+ xshmimg->data = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
34 |
xshmimg = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
35 |
- if (xshminfo.shmaddr) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
36 |
+ if (xshminfo.shmaddr != (char*)-1) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
37 |
shmdt(xshminfo.shmaddr); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
38 |
- if (xshminfo.shmid != -1) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
39 |
- shmctl(xshminfo.shmid, IPC_RMID, 0); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
40 |
return; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
41 |
} |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
42 |
if (X11->use_mitshm_pixmaps) { |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
43 |
@@ -221,11 +218,12 @@ QNativeImage::~QNativeImage() |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
44 |
xshmpm = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
45 |
} |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
46 |
XShmDetach(X11->display, &xshminfo); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
47 |
- xshmimg->data = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
48 |
XDestroyImage(xshmimg); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
49 |
+ XSync(X11->display, false); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
50 |
+ xshmimg->data = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
51 |
xshmimg = 0; |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
52 |
- shmdt(xshminfo.shmaddr); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
53 |
- shmctl(xshminfo.shmid, IPC_RMID, 0); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
54 |
+ if (xshminfo.shmaddr != (char*)-1) |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
55 |
+ shmdt(xshminfo.shmaddr); |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
56 |
} |
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
57 |
|
ce1a7a75c649
SFEqt-gpp.spec: move patches out of qt-gpp/ and rework, patch2+patch6 rework to avoid gcc 4.5.3+4.6.1 std::isinf std::isnan problem
tom68
parents:
diff
changeset
|
58 |
QImage::Format QNativeImage::systemFormat() |