KDE 4 namespaces

Thiago Macieira thiago at kde.org
Mon May 9 12:27:34 BST 2005

David Faure wrote:
>* but for libs "above" those (KIO, KParts, KABC, etc.), we would use
> namespaces. We already mostly do, except for half of KIO.

In the case of KIO, I'd like to see the ioslave-related classes moved to 
another library. There's no need for SlaveBase, TCPSlaveBase & family to 
be in applications.

>On the other hand, a KIO-namespaced class can't move to kdecore later
> (like KSycoca did), so we have to make sure to get it right from the
> start. Let's see what this would look like:

We can, with some trickery :-)

namespace KIO
  class NewClass

/* the trick: */
typedef KIO::NewClass KNewClass;

The problem will be the Doxygen documentation.

>KArchive -> KIO::Archive, KDirLister -> KIO::DirLister, KMimeType ->
> KIO::MimeType. Why not? 

> With typedefs to ease the porting, only 
> signals/slots need to be fixed, and I don't think anyone passes any of
> those in a signal :)

Typedefs only in KDE3_COMPAT mode.

  Thiago Macieira  -  thiago (AT) macieira (DOT) info
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

4. And æfter se scieppend ingelogode, he wrát "cenn", ac eala! se 
rihtendgesamnung andswarode "cenn: ne wát hú cennan 'eall'. Ástynt."
-------------- 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/20050509/5c8f14e4/attachment.sig>

More information about the kde-core-devel mailing list