tr(...) methods in PyKDE and Socket classes

tr() methods

In a normal Qt installation, every descendant of QObject inherits two methods (tr (const char *) and tr (const char *, const char *) from QObject explicitly and also overloads these methods via the moc mechanism (by defining Q_OBJECT in the class declaration). KDE however is compiled with -DQT_NO_TRANSLATION, which prevents moc from creating the overloading tr() methods, and also produces side-effects with a normal Qt installation which was compiled without the -DQT_NO_TRANSLATION switch.

PyKDE handles this situation by NOT providing tr() methods (either the inherited methods from QObject or the moc generated methods) for any KDE based QObject descendant. The tr() methods are static, so QObject::tr () methods are available via PyQt, as are tr() methods for any PyQt QObject descendant. PyKDE's handling of these methods has no effect on PyQt.

Instead of the tr() methods, KDE uses corresponding i18n() methods for translating. These methods are available in the kdecore module of PyKDE. For compatibility with KDE, you should use the i18n methods.

Socket classes

The following classes (introduced in KDE2.2.0) are NOT yet implemented:

KAddressInfo
KExtendedSocket
KInetSocketAddress
KSocketAddress
KUnixSocketAddress
KSocks

Most of their functionality already exists in the Python socket class or in the KSocket class (kdecore module). These classes may be implemented at a future date (they require support for C socket structures and careful handling to avoid buffer overflow problems/exploits)