dcopidl and const qualifier
Erwin Burgstaller
ber at fastrun.at
Fri Nov 15 18:45:46 GMT 2002
I'd like to have dcopidl recognizing the modern style of placing
"const", 'cause it's more logical to read. See
http://www.possibility.com/Cpp/Const.html for more information.
But unfortunately dcopidl quits with error on e.g. "QString const& foo".
So I've tried the following patch:
> diff -r yacc.yy orig/yacc.yy
589,595d588
< | type_name T_CONST T_AMPERSAND {
< if (dcop_area) {
< QString* tmp = new QString("<TYPE qleft=\"const\"
qright=\"" AMP_ENTITY "\">%1</TYPE>");
< *tmp = tmp->arg( *($1) );
< $$ = tmp;
< }
< }
601,605d593
< | type_name T_CONST {
< QString* tmp = new QString("<TYPE>%1</TYPE>");
< *tmp = tmp->arg( *($1) );
< $$ = tmp;
< }
And it works so far, so it seems to be easy to do. In stub and skeleton
there's still the old style const used. I tried to change
«qleft=\"const\" qright=\""» to «qleft=\"\" qright=\"const\""», but then
dcopidl2cpp is getting troubles:
ASSERT: "a.tagName() == "TYPE"" in ../../../dcop/dcopidl2cpp/skel.cpp
(116)
...
So I'm leaving this alone for the moment.
What do you think about having that improvement, who can add it?
Erwin
BTW: yacc.yy has to be converted with bison-1.35 (took me a while):
bison-1.35 -t -d -v -o yacc.cc yacc.yy
--
Erwin Burgstaller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021115/beb0697b/attachment.sig>
More information about the kde-core-devel
mailing list