Is there a real error? (was: Released kde-3.3.0 beta 1 build problems )

Javier Marcet lists at marcet.info
Fri Jul 9 02:23:30 CEST 2004


* Segedunum <segedunum at actuaria.co.uk> [040708 23:15]:

>> My explanation: I used xdeltas to update from 3.2.90 to 3.2.91 and
>> stupidly enough, somehow I used my copy of kdelibs-3.2.90 as
>> kdelibs-3.2.91, everything else being with its correct kde-3.3.0_beta1
>> version.

>Well, I compiled the beta without problems, and I thought your problems were 
>rather strange.

>The lesson is to make sure that when you compile a new version, make sure you 
>get rid of or upgrade the old. Eliminate the silly problems first. If it 
>genuinely is a problem with that version, then everyone will have it :).


Yes, you're absolutely right. Yet there's always human hand in the
middle which can make some unexpected error. I hadn't realized I had
moved kdelibs-3.2.90.tar to kdelibs-3.2.91.tar while I updated all my
3.2.90 archives to 3.2.91 with xdelta.

On the other hand, I did have to make a small fix in order to complete
the compilation of kdebase with gcc 3.4 (which I guess is the only
difference I could now have in my system).

The first one is an obvious error.
Within kwin/kcmkwin/kwinrules/detectwidget.cpp getStringProperty() is
defined as a static function expecting three arguments, none of which
is given a default value, yet later in the file it is called with only
two. Namely, in lines:

    103:    role = getStringProperty( w, wm_role );
    109:    machine = getStringProperty( w, XA_WM_CLIENT_MACHINE );
    
Yes, it is declared in kwin/utils.h with the last argument given 0 as
default value, but utils.h is not included in getStringProperty() as
far as I could find out.

As to the second change,  it is my understanding that it is also an error,
but I might be wrong (being really a novice to C++).
There, getStringProperty() (another copy, independent from that within
detectwidget.cpp) is also declared as a static function, giving it file
scope. This time, however, the function is defined in utils.cpp and used
elsewhere, which is contrary to the file scope it was given in its
declaration in utils.h, as far as I understand it; indeed, during its
definition it is not given the static flag.

Note: I have not checked the Standard, I'm talking about what I learnt,
or so I thought, from what's become my reference C++ book,
'Thinking in C++' by Bruce Eckel.

--- kwin/kcmkwin/kwinrules/detectwidget.cpp.orig	2004-06-26 15:24:22.000000000 +0200
+++ kwin/kcmkwin/kwinrules/detectwidget.cpp	2004-07-08 13:54:29.561068240 +0200
@@ -55,7 +55,7 @@
         readWindow( window );
     }
 
-static QCString getStringProperty(WId w, Atom prop, char separator)
+static QCString getStringProperty(WId w, Atom prop, char separator=0)
     {
     Atom type;
     int format, status;
--- kwin/utils.h.orig	2004-06-26 15:24:03.000000000 +0200
+++ kwin/utils.h	2004-07-08 14:08:56.996198056 +0200
@@ -161,7 +161,7 @@
     };
 
 
-static QCString getStringProperty(WId w, Atom prop, char separator=0);
+QCString getStringProperty(WId w, Atom prop, char separator=0);
 void updateXTime();
 void grabXServer();
 void ungrabXServer();

I won't file another bug report before making sure it is not my error or
misunderstanding of something, though.


-- 
A political man can have as his aim the realization of freedom,
but he has no means to realize it other than through violence.
		-- Jean Paul Sartre

Javier Marcet <javier at marcet.info>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-quality/attachments/20040709/7c0e1125/attachment.pgp


More information about the kde-quality mailing list