[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Problems building kabc/secrecy.cpp from 3.3.1 on AIX 5.2
From:       Albert Chin <kde-devel () mlists ! thewrittenword ! com>
Date:       2004-12-05 16:15:53
Message-ID: 20041205161553.GA97182 () mail1 ! thewrittenword ! com
[Download RAW message or body]

On Sat, Dec 04, 2004 at 05:17:57PM -0600, Albert Chin wrote:
> Received an error building kabc/secrecy.cpp in 3.3.1 on AIX 5.2 with
> the IBM C++ compiler:
>   "secrecy.cpp", line 90.14: 1540-0432 (S) The qualified declarator
>   "KABC::operator<<" must refer to an existing declaration.
>   "secrecy.cpp", line 95.14: 1540-0432 (S) The qualified declarator
>   "KABC::operator>>" must refer to an existing declaration.
> 
> As kabc/secrecy.cpp already has:
>   using namespace KABC;
> I changed the offending lines from:
>   QDataStream &KABC::operator<<( QDataStream &s, const Secrecy &secrecy )
>   {
>       return s << secrecy.mType;
>   }
> 
>   QDataStream &KABC::operator>>( QDataStream &s, Secrecy &secrecy )
>   {
>       s >> secrecy.mType;
> 
>       return s;
>   }
> to:
>   QDataStream &operator<<( QDataStream &s, const Secrecy &secrecy )
>   {
>       return s << secrecy.mType;
>   }
> 
>   QDataStream &operator>>( QDataStream &s, Secrecy &secrecy )
>   {
>       s >> secrecy.mType;
> 
>       return s;
>   }
> and now get the following error:
>   "secrecy.cpp", line 92.24: 1540-0300 (S) The "private" member
>   "KABC::Secrecy::mType" cannot be accessed.
>   "secrecy.cpp", line 97.17: 1540-0300 (S) The "private" member
>   "KABC::Secrecy::mType" cannot be accessed.
> 
> Any ideas?

The patch below fixes this but it looks like a compiler bug.

-- 
albert chin (china@thewrittenword.com)

-- snip snip
--- secrecy.cpp.orig	2004-12-04 17:13:24.000000000 -0600
+++ secrecy.cpp	2004-12-05 10:08:07.000000000 -0600
@@ -22,7 +22,7 @@
 
 #include "secrecy.h"
 
-using namespace KABC;
+namespace KABC {
 
 Secrecy::Secrecy( int type )
   : mType( type )
@@ -87,14 +87,16 @@
   return typeLabel( mType );
 }
 
-QDataStream &KABC::operator<<( QDataStream &s, const Secrecy &secrecy )
+QDataStream &operator<<( QDataStream &s, const Secrecy &secrecy )
 {
     return s << secrecy.mType;
 }
 
-QDataStream &KABC::operator>>( QDataStream &s, Secrecy &secrecy )
+QDataStream &operator>>( QDataStream &s, Secrecy &secrecy )
 {
     s >> secrecy.mType;
 
     return s;
 }
+
+}
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic