Namespaces in libkdecore

Scott Wheeler wheeler at
Sat May 1 18:57:30 BST 2004

Hash: SHA1

On Saturday 01 May 2004 19:17, Thiago Macieira wrote:
> While talking to some other developers, it seems that the use of 
> namespaces throughout KDE libraries is a wanted feature, despite the 
> fact that it would break source compatibility.

It needn't break source compatibility.

namespace KDE {
  namespace UI {
    class LineEdit;

typedef KDE::UI::LineEdit KLineEdit;

Or as I would prefer:

namespace KDE3 {
  typedef KDE::UI::LineEdit KLineEdit;

Then people could pretty easily make things work with a "using namespace 

This also brings up something else that I've been meaning to bring up (which 
went around a bit after some discussion on kde-cvs last week):

What do folks think about doing a compatibility lib with KDE 4 for deprecated 
KDE 3 classes?  I'd prefer to get them out of our public API that we expose 
to authors of new KDE applications (since our public API now contains ~3000 
classes), but if they were in a compatibility lib we would be be able to 
provide them to keep old sources working.  It seems that Trolltech will be 
doing this for Qt 4 with the deprecated classes like QCString, QListView, 

- -Scott

- -- 
If you want to get laid, go to college, but if you want an education, go to 
the library.
- --Frank Zappa
Version: GnuPG v1.0.7 (GNU/Linux)


More information about the kde-core-devel mailing list