Issue 66722 - m173: other directories that need EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
Summary: m173: other directories that need EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: current
Hardware: All All
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0.4
Assignee: ebischoff
QA Contact: issues@tools
URL:
Keywords:
Depends on:
Blocks: 66757
  Show dependency tree
 
Reported: 2006-06-24 21:11 UTC by pavel
Modified: 2006-08-02 08:36 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
full log from dmake in kdebe directory (16.76 KB, text/plain)
2006-07-11 05:31 UTC, pavel
no flags Details
This was enough here - patch for kdebe dir (4.00 KB, patch)
2006-07-20 11:39 UTC, pavel
no flags Details | Diff
Single header file for all KDE/Qt includes that generate warnings (2.11 KB, text/plain)
2006-07-20 14:07 UTC, ebischoff
no flags Details
Here is the merged header file (wrapper for 37 KDE and Qt headers) (4.48 KB, text/plain)
2006-07-21 12:21 UTC, ebischoff
no flags Details
Version without the #define's (2.81 KB, text/plain)
2006-07-24 10:07 UTC, ebischoff
no flags Details
Final patch for "vcl" module (untested) (6.41 KB, patch)
2006-07-24 21:42 UTC, ebischoff
no flags Details | Diff
Final patch for "connectivity" module (untested) (5.85 KB, patch)
2006-07-24 21:44 UTC, ebischoff
no flags Details | Diff
Final patch for "shell" module (untested) (4.27 KB, patch)
2006-07-24 21:45 UTC, ebischoff
no flags Details | Diff
Upon pavel's request (still untested) (3.52 KB, application/x-tar)
2006-07-25 10:04 UTC, ebischoff
no flags Details
This one has been tested and compiles fine. It can be considered as final version. (3.66 KB, application/x-tar)
2006-07-26 06:23 UTC, ebischoff
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2006-06-24 21:11:47 UTC
Hi,

this is the list of other directories that need

EXTERNAL_WARNINGS_NOT_ERRORS=TRUE

in their makefile.mk (at least on my build system):

 #i66713#: rsc/source/parser/makefile.mk

 shell/source/backends/gconfbe/makefile.mk:

In file included from /opt/gnome/include/orbit-2.0/orbit/dynamic/dynamic.h:1,
                 from /opt/gnome/include/orbit-2.0/orbit/orbit.h:17,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/shell/source/backends/gconfbe/gconfbecdef.cxx:58:
/opt/gnome/include/orbit-2.0/orbit/dynamic/dynamic-defs.h:665: warning:
`CORBA_TypeCode_struct* DynamicAny_DynAny_type(DynamicAny_DynAny_type*,
CORBA_Environment*)' hides constructor for `struct DynamicAny_DynAny_type'
dmake:  Error code 1, while making '../../../unxlngi6.pro/slo/gconfbecdef.obj'

 shell/source/backends/kdebe/makefile.mk

In file included from /usr/lib/qt3/include/qcstring.h:43,
                 from /usr/lib/qt3/include/qstring.h:42,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/shell/source/backends/kdebe/kdeinetlayer.hxx:31,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/shell/source/backends/kdebe/kdebackend.cxx:42:
/usr/lib/qt3/include/qmemarray.h: In constructor `QMemArray<type>::QMemArray(int)':
/usr/lib/qt3/include/qmemarray.h:59: warning: declaration of 'size' shadows a
member of 'this'
/usr/lib/qt3/include/qmemarray.h: In member function `bool
QMemArray<type>::resize(uint)':
/usr/lib/qt3/include/qmemarray.h:70: warning: declaration of 'size' shadows a
member of 'this'
/usr/lib/qt3/include/qmemarray.h: In member function `bool
QMemArray<type>::resize(uint, QGArray::Optimization)':
/usr/lib/qt3/include/qmemarray.h:71: warning: declaration of 'size' shadows a
member of 'this'
/usr/lib/qt3/include/qmemarray.h: In member function `bool
QMemArray<type>::fill(const type&, int)':
/usr/lib/qt3/include/qmemarray.h:74: warning: declaration of 'size' shadows a
member of 'this'
In file included from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/shell/source/backends/kdebe/kdeinetlayer.hxx:31,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/shell/source/backends/kdebe/kdebackend.cxx:42:
/usr/lib/qt3/include/qstring.h: In member function `void QChar::setCell(uchar)':
/usr/lib/qt3/include/qstring.h:215: warning: declaration of 'cell' shadows a
member of 'this'
/usr/lib/qt3/include/qstring.h: In member function `void QChar::setRow(uchar)':
/usr/lib/qt3/include/qstring.h:216: warning: declaration of 'row' shadows a
member of 'this'
dmake:  Error code 1, while making '../../../unxlngi6.pro/slo/kdebackend.obj'

 vcl/unx/kde/makefile.mk                   |    1 +

The first warning is:

In file included from /usr/lib/qt3/include/qcstring.h:43,
                 from /usr/lib/qt3/include/qiodevice.h:43,
                 from /usr/lib/qt3/include/qtextstream.h:42,
                 from /usr/lib/qt3/include/qtl.h:43,
                 from /usr/lib/qt3/include/qvaluelist.h:42,
                 from /opt/kde3/include/kaboutdata.h:22,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/vcl/unx/kde/kdedata.cxx:39:
/usr/lib/qt3/include/qmemarray.h: In constructor `QMemArray<type>::QMemArray(int)':
/usr/lib/qt3/include/qmemarray.h:59: warning: declaration of 'size' shadows a
member of 'this'

 vcl/unx/source/app/makefile.mk            |    1 +

In file included from
/disk3/oo/BuildDir/ooo_SRC680_m173_src/vcl/unx/source/app/saldata.cxx:75:
/usr/X11R6/include/X11/Xproto.h:244:1: "Window" redefined

 vcl/unx/source/gdi/makefile.mk            |    1 +

The same as above.

Hmm, looks like we will end with fixing X, Qt, Gnome, ... :-(
Comment 1 Stephan Bergmann 2006-06-26 16:53:20 UTC
- "rsc/source/parser/makefile.mk" is already tracked in issue 66713

- "shell/source/backends/gconfbe/makefile.mk" will be fixed as part of issue
66577 by wrapping #include of <orbit/orbit.hxx> in a local file that disables
warnings and delegates

- "shell/source/backends/kdebe/makefile.mk" can similarly be fixed by wrapping
#include <qstring.h>

- "vcl/unx/kde/makefile.mk" can similarly be fixed by wrapping #include
<kaboutdata.h> (etc.?)

- "vcl/unx/kde/makefile.mk" will be fixed as part of issue 66577 by wrapping
#include of <X11/Xproto.h> in a local file that disables warnings and delegates
Comment 2 Stephan Bergmann 2006-06-27 15:02:57 UTC
The last paragraph of the previous comments of course must read:

- "vcl/unx/source/app/makefile.mk", "vcl/unx/source/gdi/makefile.mk" will be
fixed as part of issue 66577 by wrapping #include of <X11/Xproto.h> in a local
file that disables warnings and delegates
Comment 3 Stephan Bergmann 2006-06-27 15:17:17 UTC
Fixed "shell/source/backends/kdebe/makefile.mk" and "vcl/unx/kde/makefile.mk" on
CWS warningfixes01 so that all the problems from the initial description should
now be addressed either directly in this issue or in some other issue.

shell/source/backends/kdebe/kdeinettags.hxx:1.2.10.1
shell/source/backends/kdebe/qstring_wrapper.h:1.1.2.1
vcl/unx/kde/kdedata.cxx:1.12.12.1
vcl/unx/kde/Attic/kdewrapper.h:1.1.2.1
vcl/unx/kde/salnativewidgets-kde.cxx:1.13.12.1
Comment 4 Stephan Bergmann 2006-06-27 15:18:06 UTC
.
Comment 5 Stephan Bergmann 2006-06-29 10:22:39 UTC
@pjanik:  Please verify that this issue's fixes actually help in your build
environment.
Comment 6 Stephan Bergmann 2006-07-06 14:10:08 UTC
Setting to VERIFIED so that CWS integration can proceed.  The fix for this issue
is known to cause no problems on the standard platforms.
Comment 7 pavel 2006-07-11 05:23:50 UTC
still doesn't work here:

Making: ../../../unxlngi6.pro/slo/kdebecdef.obj
/disk3/oo/BuildDir/bin/ccache /disk2/OpenOffice.org/GCC341/bin/g++
-fmessage-length=0 -c -Os -fno-strict-aliasing   -I/usr/lib/qt3/include
-I/opt/kde3/include -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -I. 
-I../../../unxlngi6.pro/inc/kdebe -I../../../unxlngi6.pro/inc/kdebe -I../inc
-I../../../inc -I../../../unx/inc -I../../../unxlngi6.pro/inc -I.
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/stl
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/external
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/unxlngi6/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/res
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/stl
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/inc/Xp31
-I/usr/lib/SunJava2/include -I/usr/lib/SunJava2/include/linux
-I/usr/lib/SunJava2/include/native_threads/include -I/usr/X11R6/include    
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/offuh -I.
-I../../../res -I. -pipe -mtune=pentiumpro -fvisibility-inlines-hidden -g
-fexceptions -fno-enforce-eh-specs -Wall -Wextra -Wendif-labels -Wshadow
-Wno-ctor-dtor-privacy     -Wno-non-virtual-dtor -Werror   -fpic -DLINUX -DUNX
-DVCL -DGCC -DC341 -DINTEL -DCVER=C341  -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT
-DNEW_SOLAR -D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400
-DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE -DUNIX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/disk2/OpenOffice.org/GCC341/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../include/c++/3.4.1
-DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE
-DEXCEPTIONS_ON -DCUI -DSOLAR_JAVA -DSRC680=SRC680   -DSHAREDLIB -D_DLL_ 
-DMULTITHREAD  -o ../../../unxlngi6.pro/slo/kdebecdef.o
/disk3/oo/BuildDir/ooo_SRC680_m175_src/shell/source/backends/kdebe/kdebecdef.cxx 
In file included from /usr/lib/qt3/include/qcstring.h:43,
                 from /usr/lib/qt3/include/qstring.h:42,
                 from /usr/lib/qt3/include/qwindowdefs.h:44,
                 from /usr/lib/qt3/include/qwidget.h:42,
                 from /usr/lib/qt3/include/qdesktopwidget.h:40,
                 from /usr/lib/qt3/include/qapplication.h:42,
                 from /opt/kde3/include/kapplication.h:39,
                 from
/disk3/oo/BuildDir/ooo_SRC680_m175_src/shell/source/backends/kdebe/kdebecdef.cxx:52:
/usr/lib/qt3/include/qmemarray.h: In constructor `QMemArray<type>::QMemArray(int)':
/usr/lib/qt3/include/qmemarray.h:59: warning: declaration of 'size' shadows a
member of 'this'

Attaching full log of

oo@oo:~/BuildDir/ooo_SRC680_m175_src/shell/source/backends/kdebe> dmake
>/tmp/ssbk_dmake.log 2>&1
Comment 8 pavel 2006-07-11 05:24:37 UTC
.
Comment 9 pavel 2006-07-11 05:31:15 UTC
Created attachment 37646 [details]
full log from dmake in kdebe directory
Comment 10 pavel 2006-07-11 05:33:10 UTC
the same in vcl/unx/kde:

oo@oo:~/BuildDir/ooo_SRC680_m175_src/vcl/unx/kde> dmake
------------------------------
Making: ../../unxlngi6.pro/slo/kdedata.obj
/disk3/oo/BuildDir/bin/ccache /disk2/OpenOffice.org/GCC341/bin/g++
-fmessage-length=0 -c -Os -fno-strict-aliasing   -fvisibility=hidden
-I/usr/lib/qt3/include -I/opt/kde3/include -DQT_CLEAN_NAMESPACE
-DQT_THREAD_SUPPORT -I.  -I../../unxlngi6.pro/inc/kdeplug -I../inc -I../../inc
-I../../unx/inc -I../../unxlngi6.pro/inc -I.
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/stl
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/external
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/unxlngi6/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/inc
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/res
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/stl
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solenv/inc/Xp31
-I/usr/lib/SunJava2/include -I/usr/lib/SunJava2/include/linux
-I/usr/lib/SunJava2/include/native_threads/include -I/usr/X11R6/include    
-I/disk3/oo/BuildDir/ooo_SRC680_m175_src/solver/680/unxlngi6.pro/inc/offuh -I.
-I../../res -I. -pipe -mtune=pentiumpro -fvisibility-inlines-hidden -g
-fno-exceptions -Wall -Wextra -Wendif-labels -Wshadow -Wno-ctor-dtor-privacy   
 -Wno-non-virtual-dtor -Werror   -fpic -DLINUX -DUNX -DVCL -DGCC -DC341 -DINTEL
-DCVER=C341  -DGLIBC=2 -DX86 -D_PTHREADS -D_REENTRANT -DNEW_SOLAR
-D_USE_NAMESPACE=1 -DSTLPORT_VERSION=400 -DHAVE_GCC_VISIBILITY_FEATURE -D__DMAKE
-DUNIX -DCPPU_ENV=gcc3
-DGXX_INCLUDE_PATH=/disk2/OpenOffice.org/GCC341/lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../include/c++/3.4.1
-DSUPD=680 -DPRODUCT -DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE
-DEXCEPTIONS_OFF -DCUI -DSOLAR_JAVA -DSRC680=SRC680 -DUSE_BUILTIN_RASTERIZER 
-DVCL_DLLIMPLEMENTATION -DSHAREDLIB -D_DLL_  -DMULTITHREAD  -o
../../unxlngi6.pro/slo/kdedata.o
/disk3/oo/BuildDir/ooo_SRC680_m175_src/vcl/unx/kde/kdedata.cxx 
/usr/lib/qt3/include/qmemarray.h: In constructor
`QMemArray<type>::QMemArray(int) [with type = QPoint]':
/usr/lib/qt3/include/qpointarray.h:56:   instantiated from here
/usr/lib/qt3/include/qmemarray.h:59: warning: declaration of 'size' shadows a
member of 'this'
dmake:  Error code 1, while making '../../unxlngi6.pro/slo/kdedata.obj'
'---* tg_merge.mk *---'
oo@oo:~/BuildDir/ooo_SRC680_m175_src/vcl/unx/kde> 
Comment 11 Stephan Bergmann 2006-07-12 10:22:06 UTC
@pjanik:

1  shell/source/backends/kdebe is easy to solve, just create a
shell/source/backends/kdebe/kapplication_wrapper.h and include that in
shell/source/backends/kdebe/kdebecdef.cxx, similar to
shell/source/backends/kdebe/qstring_wrapper.h:1.2 and
shell/source/backends/kdebe/kdeinetlayer.hxx:1.3.  Can you take care of this? 
(I do not have any appropriate CWS open at the moment, either; but let me know
if this is a problem for you.)

2  vcl/unx/kde is more tricky, GCC appears to emit a warning here only at the
end of the compilation unit.  Could you please try whether the following patch
helps:

RCS file: /cvs/gsl/vcl/unx/kde/kdewrapper.h,v
retrieving revision 1.2
diff -u -r1.2 kdewrapper.h
--- kdewrapper.h        6 Jul 2006 14:32:09 -0000       1.2
+++ kdewrapper.h        12 Jul 2006 09:21:21 -0000
@@ -81,4 +81,10 @@

 #undef Region

+// Explicit instantiation to get warnings within this header instead of at end
+// of compilation unit:
+#if defined __GNUC__
+template QMemArray<QPoint>::QMemArray(int);
+#endif
+
 #endif
Comment 12 pavel 2006-07-13 07:58:26 UTC
sb: 1. (shell/source/...)

   I tried. First with kapplication, then with kemailsettings, then with ... No
way. We can't create wrappers for every KDE header :-( This is silly.

2. patch applied, doesn't work:

/usr/lib/qt3/include/qmemarray.h: In constructor
`QMemArray<type>::QMemArray(int) [with type = QPoint]':
/usr/lib/qt3/include/qpointarray.h:56:   instantiated from here
/usr/lib/qt3/include/qmemarray.h:59: warning: declaration of 'size' shadows a
member of 'this'
dmake:  Error code 1, while making '../../unxlngi6.pro/slo/kdedata.obj'
'---* tg_merge.mk *---'
oo@oo:~/BuildDir/ooo_SRC680_m176_src/vcl/unx/kde> grep QMemArray *
kdewrapper.h:template QMemArray<QPoint>::QMemArray(int);
oo@oo:~/BuildDir/ooo_SRC680_m176_src/vcl/unx/kde> 
Comment 13 Stephan Bergmann 2006-07-13 09:44:21 UTC
1 shell/source/backends/kdebe:  I see four possible solutions, but would like
those who feel responsible for the code (ebischoff, kendy?) to decide which to
choose:

1.1  Thre road already taken with qstring_wrapper.h (but rejected by pjanik), of
individually wrapping unclean external headers in "#pragma GCC system_header." 
A "grep '[<"][kq]' shell/source/backends/kdebe/*" brings up seven hits for
potentially unclean external headers: kapplication.h, kprotocolmanager.h,
kemailsettings.h, kglobalsettings.h qstring.h, qglobal.h, qaccessible.h.  This
fix would be the most specific.

1.2  Similar to 1.1, but create a single wrapper that includes all the unclean
external headers (if this does not cause other problems).

1.3  Disable "warnings are errors" for all warnings in
shell/source/backends/kdebe/ by adding EXTERNAL_WARNINGS_NOT_ERRORS=TRUE to
shell/source/backends/kdebe/makefile.mk:1.2.  This fix would be the least
specific and IMO only a last resort.

1.4  There obviously are clean versions of the included headers (i.e., at Sun
Hamburg we do not get any warnings in shell/source/backends/kdebe).  Require
those versions as a prerequisite for building OOo.  (Probably not feasible.)

When doing any of 1.2--1.4, the introduction of qstring_wrapper.h should be undone.


2 vcl/unx/kde:  That is strange, as in a small test scenario the explicit
instantiation did help.  Anyway, it seems the only feasible solution here is the
analogue to 1.3 above, then.  pl, any opinion?  pjanik, can you do the necessary
changes?
Comment 14 pavel 2006-07-13 21:31:41 UTC
sb: sure, when we agree on some solution, I can test it and even commit.
Comment 15 Stephan Bergmann 2006-07-14 12:17:23 UTC
2 vcl/unx/kde:  I think the below patch is the best solution, given that the
explicit instantiation trick did not help.

Index: makefile.mk
===================================================================
RCS file: /cvs/gsl/vcl/unx/kde/makefile.mk,v
retrieving revision 1.7
diff -u -r1.7 makefile.mk
--- makefile.mk 19 Dec 2005 17:21:42 -0000      1.7
+++ makefile.mk 14 Jul 2006 11:16:45 -0000
@@ -47,6 +47,13 @@
 .INCLUDE :  settings.mk
 .INCLUDE :  $(PRJ)$/util$/makefile2.pmk

+# For some of the included external KDE headers, GCC complains about shadowed
+# symbols in instantiated template code only at the end of a compilation unit,
+# so the only solution is to disable that warning here:
+.IF "$(COM)" == "GCC"
+CFLAGSCXX += -Wno-shadow
+.ENDIF
+
 # --- Files --------------------------------------------------------

 .IF "$(GUIBASE)"!="unx"
Comment 16 Stephan Bergmann 2006-07-14 15:09:35 UTC
@ebischoff:  Please give input how you want (1) solved.

@pjanik:  Can you verify whether my last patch for (2) actually works, and if
yes commit it to pj55?  Thanks.
Comment 17 pavel 2006-07-14 16:56:48 UTC
sb: vcl/unx/kde/makefile.mk patch works. Thanks.
Comment 18 kendy 2006-07-14 17:03:37 UTC
sb: ebischoff is on vacation, IIRC.  For me, 'CFLAGSCXX += -Wno-shadow' is 
OK ;-)  Please go ahead & commit - we can redo it later, if there's need for a 
better/other solution, I think.
Comment 19 kendy 2006-07-14 17:20:44 UTC
Hmm, pjanik just pinged me that I answered 2) instead of 1) - sorry ;-)

So - there already is a KDE wrapper header file - vcl/unx/kde/kdewrapper.h; 
what about to make it more public (move it eg. to sal?) and deliver to the 
solver & include it in the KDE-related .cxx's?  What do you think?
Comment 20 Stephan Bergmann 2006-07-17 12:20:15 UTC
@kendy:  But vcl/unx/kde/kdewrapper.h wraps completely different headers than
the ones used here (kapplication.h, kprotocolmanager.h, kemailsettings.h,
kglobalsettings.h qstring.h, qglobal.h, qaccessible.h).
Comment 21 kendy 2006-07-17 12:34:18 UTC
sb: Not entirely 'completely' ;-)  kapplication.h is there, qstring.h, 
qglobal.h are covered by other includes there I think, the rest could be added.  
I do not think it's an issue to include a bit more than necessary; or is it?  
If yes, I'd go 1.2 way then - a single wrapper for KDEBackend similar to the 
one in vcl.
Comment 22 Stephan Bergmann 2006-07-17 13:09:29 UTC
Pavel, can you do that (on pj55) and see that it indeed solves your problem? 
Thanks.
Comment 23 pavel 2006-07-20 11:39:18 UTC
Created attachment 37914 [details]
This was enough here - patch for kdebe dir
Comment 24 pavel 2006-07-20 11:40:12 UTC
The attached patch made it work here.

It is ugly though. I do not like it at all.
Comment 25 ebischoff 2006-07-20 14:03:45 UTC
Sorry to jump in the discussion late, but I was on vacation.   
   
Yes, you can consider me as responsible for the kdebe part of this issue.   
 
I already chose the 1.2 way (one single wrapper) in 
connectivity/source/drivers/kab/ and it is already implemented in the kabparam 
CWS. I like this solution because it rejects the problem where it belongs to : 
to Qt and KDE libraries.   
   
I am attaching the header file for the kab case, so you can see a trick based  
on #define's to make it easy with one single header. In the calling file one  
may find things like; 
    #define KDE_HEADERS_WANT_KAPPLICATION  
    #define KDE_HEADERS_WANT_KCMDLINEARGS  
    #include "kde_headers.hxx"  
   
1.4 is conceptually clean too, but puts a constraint on the person building 
and that's not too good. 
 
So my vote goes to 1.2. The kde_headers.hxx file from kab/ driver could ven be 
made very general for all KDE-related stuff. kendy, do you agree? 
 
Comment 26 ebischoff 2006-07-20 14:07:09 UTC
Created attachment 37918 [details]
Single header file for all KDE/Qt includes that generate warnings
Comment 27 ebischoff 2006-07-20 15:25:17 UTC
Oops, I missed kendy's remarks about a common KDE headers files that already  
exists in vcl/.  
    
Yes, I fully agree with kendy. A common wrapper file shared somewhere for all  
KDE stuff (vcl, connectivity, shell, ...) looks to me as the right thing to  
do. We can put all KDE headers in it, the trick of   
  #define KDE_HEADERS_WANT_SOMEKDECLASS   
in the source file should avoid that we include 95% of KDE headers when only  
one single header is needed ;-).   
   
So I vote for merging my "connectivity/source/drivers/kab/kde_headers.hxx" 
with kendy's "vcl/unx/kde/kdewrapper.h", and for using it in replacement of  
"shell/source/backends/kdebe/qstring_wrapper.h". 
 
One file to rule them all ;-).  
  
Opinions?  
 
Comment 28 Stephan Bergmann 2006-07-21 08:33:46 UTC
Sounds good for me.
Comment 29 ebischoff 2006-07-21 12:21:22 UTC
Created attachment 37945 [details]
Here is the merged header file (wrapper for 37 KDE and Qt headers)
Comment 30 ebischoff 2006-07-21 12:32:10 UTC
Pavel suggested the merged wrapper should reside in sal/.       
       
When implementing, please don't forget to remove      
shell/source/backends/kdebe/qstring_wrapper.h.      
      
Use it as you would write normal includes:     
   #include <kaboutbox.h>    
   #include <kapplication.h>   
=>   
   #define KDE_HEADERS_INCLUDE_KABOUTBOX   
   #define KDE_HEADERS_INCLUDE_KAPPLICATION   
   #include "sal/kde_headers.h"   
 
Places where to use it:  
  vcl/unx/kde/ 
  connectivity/source/drivers/kab/  
  shell/source/backends/kdebe 
(and more ?) 
 
Comment 31 kendy 2006-07-21 12:44:40 UTC
As I said on IRC already ;-) - I don't like the #ifdefs for each and every KDE 
include (and the need of #defines before #include <sal/kde_headers.hxx>) - and 
now when I see it, I'm getting even more opposed :-)  The common KDE header 
will be used in just about 10-20 .cxx's, so the compilation time is irrelevant 
& inclusion of more include files than the minimum is not a problem.  But 
kde_headers.hxx loses readability & is harder to use.

Eric arguments that it will force the developers to think more if they really 
need a class/header or not - but every piece of code goes through IssueZilla & 
code review anyway - so I think it's not an issue either...

sb: I let it on you - decide, please ;-)
Comment 32 ebischoff 2006-07-21 13:59:03 UTC
Thanks kendy for presenting your position. I will try to present mine, so that 
sb can chose with knowledge of both points of views. 
 
"The common KDE header will be used in just about 10-20 .cxx's" 
... yes, and it already refers 37 headers. When doing the multiplication, 
one can see that the impact on compilation time will be non neglectable if 
we include every KDE and Qt header without distinction. 
 
The other advantage of the #ifdef's is to force the same semantics as usual 
#includes. It's the same situation as declaring your variables: carefully 
choosing the files which you will include makes you code better. With code 
review or not ;-). 
 
It's not harder to use kde_headers.h than to use usual #includes... Oh, well, 
there are n+1 lines where you would have used n. No big story, I think. 
 
 
In any case, with #ifdef's or not, the common wrapper seems a good thing to 
me. So whatever sb decides we will move forward :-). 
 
Comment 33 Stephan Bergmann 2006-07-24 07:14:09 UTC
I would agree with kendy that without the #defines it is simpler, and with the
relative few included KDE headers and relative few places where they are
included, it is probably best to stick with the simplest possible solution.

However, please do not put that wrapper header in sal (one reason is that sal is
part of the UNO API, where this kind of functionality does not really belong). 
I would suggest putting it into the lowest of the modules that need it (vcl,
connectivity, shell; where vcl probably is the lowest) and delivering it from there.
Comment 34 ebischoff 2006-07-24 10:07:27 UTC
Created attachment 37979 [details]
Version without the #define's
Comment 35 ebischoff 2006-07-24 10:09:06 UTC
Okay for me to put it in vcl/. 
 
I have attached a version without the #define's. 
 
Who does the CWS? 
Comment 36 Stephan Bergmann 2006-07-24 14:32:01 UTC
You can probably include this in pjanik's pj55.

(Two minor nits about the attached Jul 24 kde_headers.h:  Use
INCLUDED_VCL_KDE_HEADERS_H instead of KDE_HEADERS_WRAPPER_H if the file is
vcl/inc/kde_headers.h.  I do not understand the "Suppress warnings:if needed"
comment before including sal/config.h.)
Comment 37 ebischoff 2006-07-24 15:04:18 UTC
OK for the INCLUDED_VCL_KDE_HEADERS_H symbol used for unique inclusion.   
   
The "Suppress warnings if needed" comment means that this header file  
suppresses the warnings if gcc is used. The colon ":" is a typo. Please 
rephrase if you find something  
better.  
  
Pavel, ok to be the victim? ;-)  
 
Comment 38 ebischoff 2006-07-24 21:42:43 UTC
Created attachment 37996 [details]
Final patch for "vcl" module (untested)
Comment 39 ebischoff 2006-07-24 21:44:00 UTC
Created attachment 37997 [details]
Final patch for "connectivity" module (untested)
Comment 40 ebischoff 2006-07-24 21:45:25 UTC
Created attachment 37998 [details]
Final patch for "shell" module (untested)
Comment 41 Stephan Bergmann 2006-07-25 08:35:44 UTC
["Suppress warnings if needed" comment:  I had assumed the comment belong to the
#include directly following it without intervening vertical whitespace, so had
been confused.]

The patches look good, but I spotted two issues:

- If the new file is vcl/inc/kde_headers.h, "+hedabu: ..\unx\inc\kde_headers.h
%_DEST%\inc%_EXT%\vcl\kde_headers.h" in vcl/prj/d.lst is wrong.

- In shell/source/backends/kdebe/kdebecdef.cxx, please do not change the (unrelated)
  #include "uno/current_context.hxx"
to
  #include <uno/current_context.hxx>
Some people have not yet been convinced :) that "..." is the better style for
everything but system headers, so you see both styles in the OOo code body. 
However, in any case, changing lines not directly related to the problem in a
patch is not a good idea.
Comment 42 Stephan Bergmann 2006-07-25 08:41:30 UTC
One further problem:  It looks like shell is not yet marked as depending on vcl
(first line of shell/prj/build.lst:1.27).  (connectivity/prj/build.lst:1.30 also
does not mention vcl explicitly, but implicitly via svtools -> toolkit -> vcl,
which is considered ok as far as I understand.)
Comment 43 ebischoff 2006-07-25 09:45:44 UTC
Oooops, sorry, the header file is of course in vcl/unx/inc. I typed the path  
manually (I do not know how to create the cvs diff for an file that is added)  
and I forgot the "unx".  
  
OK for the change from "uno/current_context.hxx" to <uno/current_context.hxx>, 
it was not necessary. Yes it is indeed most confusing to see both styles. 
 
OK for the missing dependancy. I thought at it and then forgot to add it :-(. 
 
Pavel, you do not need new patches for these three corrections? You can do 
that manually? 
 
Please notice that this is all untested stuff :-(. I am experiencing 
difficulties in recompiling m178 (Pavel is porting pj55 to m178). 
 
Comment 44 ebischoff 2006-07-25 10:04:24 UTC
Created attachment 38010 [details]
Upon pavel's request (still untested)
Comment 45 ebischoff 2006-07-26 06:23:21 UTC
Created attachment 38028 [details]
This one has been tested and compiles fine. It can be considered as final version.
Comment 46 Stephan Bergmann 2006-07-26 08:57:41 UTC
Tue Jul 25 22:23:00 -0700 2006: kdewarnings.tgz, vcl/unx/inc/kde_headers.h:
INCLUDED_VCL_KDE_HEADERS_H vs KDE_HEADERS_WRAPPER_H
Comment 47 ebischoff 2006-07-26 21:02:36 UTC
sb: yes of course, sorry. 
 
Marking (a bit late) the issue as STARTED 
Comment 48 ebischoff 2006-07-28 15:54:33 UTC
Finally did it in CWS kdeheaders and not in pj55 
 
Comment 49 pavel 2006-08-02 08:36:04 UTC
Verified, seen on master -> CLOSED.