View Issue Details

IDProjectCategoryView StatusLast Update
0023885Open CASCADEOCCT:Visualizationpublic2013-04-29 15:24
ReporterdbvAssigned Todbv 
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformMacOSOS 
Target Version6.6.0Fixed in Version6.6.0 
Summary0023885: Inclusion of X11 header should be protected with macro
DescriptionCurrently OCCT can be built on Mac OS X without X11 support, but it still contain inclusion of X11 headers. Part of them will be removed in the context of 0023486 and 0022590 bug fixes. All others should be protected with macro.
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0023486 closedkgv Remove obsolete image manipulation classes 
related to 0022590 closedkgv Migration to FreeImage: revision of Xw and WNT packages 

Activities

dbv

2013-04-09 13:34

developer   ~0024043

Patch has been pushed to the occt and occt-wok git branches CR23885.

Please review.

kgv

2013-04-09 15:32

developer   ~0024050

Dear dbv,

Draw_Window.cxx
> // X11 specific part
> #if !defined(__APPLE__) || defined(MACOSX_USE_GLX)
>+#include <Draw_WindowBase.hxx>
>+#include <X11/XWDFile.h>
XWDFile should not be used in this file at all.
Please also move Draw_WindowBase.hxx content (Base_Window structure) into Draw_Window.cxx since it used nowhere else.
Also it seems that Draw_Window::base.gc is never released in code (requires XFreeGC according to documentation) - if this issue could not be trivially fixed please register dedicated bug.

QADraw.cxx, QAAISGetColorCoord()
> QAAISWindow = Handle(Xw_Window)::DownCast (QAAIS_MainView->V3d_View::Window());
> QAAISWindow->Size(QAAIS_WindowSize_X, QAAIS_WindowSize_Y);
there no need for cast at all - Size() method exists in Aspect_Window definition.

QADraw.cxx
>+# include <X11/Xlib.h>
>+# include <X11/Xutil.h>
>+# include <Xw_Cextern.hxx>
I doubt that these headers are really required within Linux/X11 implementation.
Please try to remove them (as well as Cocoa_Window.hxx for apples - QAAISGetColorCoord command is candidate for removal).

dbv

2013-04-09 17:05

developer   ~0024054

occt branch has been updated.

Please review.

kgv

2013-04-09 17:12

developer   ~0024055

Patch reviewed without remarks. Please test.

apn

2013-04-12 12:07

administrator   ~0024106

Last edited: 2013-04-12 13:16

Dear BugMaster,

Branch CR23885 (and products from GIT master) was compiled on Linux and Windows platforms and tested without rebase.
SHA-1: 1d350def58a1f0c477e870380e4828869eb6572c

Number of compiler warnings:

occt component:
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component:
Linux: 0 (0 on master)
Windows: 50 (50 on master)

Regressions:
No regressions

Improvements:
No improvements

Test case:
Not needed

Testing on Linux:
Total MEMORY difference: 244271680 / 244778948
Total CPU difference: 13470.579999999869 / 19943.769999999735

Testing on Windows:
Total MEMORY difference: 353921192 / 355691856
Total CPU difference: 17989.3125 / 20713.59375

There are not serious differences in images found by testdiff.

Related Changesets

occt: master 87225ffd

2013-04-12 09:44:46

dbv

Details Diff
0023885: Inclusion of X11 header should be protected with macro
X11 headers inclusions have been protected with macro
Remarks fix
Affected Issues
0023885
mod - src/AlienImage/AlienImage_X11XWDAlienData.cxx Diff File
mod - src/AlienImage/AlienImage_X11XWDFileHeader.cxx Diff File
mod - src/Aspect/Aspect_XWD.hxx Diff File
mod - src/Draw/Draw_Window.cxx Diff File
rm - src/Draw/Draw_WindowBase.hxx Diff File
mod - src/Draw/FILES Diff File
mod - src/QADraw/QADraw.cxx Diff File

Issue History

Date Modified Username Field Change
2013-04-08 10:36 dbv New Issue
2013-04-08 10:36 dbv Assigned To => san
2013-04-08 10:36 dbv Assigned To san => dbv
2013-04-08 10:36 dbv Status new => assigned
2013-04-08 10:36 dbv Relationship added related to 0023486
2013-04-08 10:36 dbv Relationship added related to 0022590
2013-04-09 13:34 dbv Note Added: 0024043
2013-04-09 13:34 dbv Assigned To dbv => abv
2013-04-09 13:34 dbv Status assigned => resolved
2013-04-09 15:32 kgv Note Added: 0024050
2013-04-09 15:43 kgv Assigned To abv => dbv
2013-04-09 15:43 kgv Status resolved => assigned
2013-04-09 17:05 dbv Note Added: 0024054
2013-04-09 17:05 dbv Assigned To dbv => kgv
2013-04-09 17:05 dbv Status assigned => resolved
2013-04-09 17:12 kgv Note Added: 0024055
2013-04-09 17:12 kgv Assigned To kgv => bugmaster
2013-04-09 17:12 kgv Status resolved => reviewed
2013-04-09 17:12 kgv Target Version => 6.6.0
2013-04-11 12:56 apn Test case number => Not needed
2013-04-11 12:56 apn Assigned To bugmaster => apn
2013-04-11 12:57 dbv Summary Inclusion of X11 header should be protected with marco => Inclusion of X11 header should be protected with macro
2013-04-12 12:07 apn Note Added: 0024106
2013-04-12 12:08 apn Assigned To apn => bugmaster
2013-04-12 12:08 apn Status reviewed => tested
2013-04-12 13:16 apn Note Edited: 0024106
2013-04-15 17:59 dbv Changeset attached => occt master 87225ffd
2013-04-15 17:59 dbv Assigned To bugmaster => dbv
2013-04-15 17:59 dbv Status tested => verified
2013-04-15 17:59 dbv Resolution open => fixed
2013-04-23 13:35 aiv Status verified => closed
2013-04-29 15:24 aiv Fixed in Version => 6.6.0