[PATCH] Fix --enable-final in kdebase HEAD

Ravikiran Rajagopal ravi at ee.eng.ohio-state.edu
Fri Feb 14 21:59:41 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
  I am submitting this here as I did not get any responses on kde-devel.

1. Defined name conflict in keditbookmarks. Patch:

- - --- /home/user1/rover/importers.cpp     2003-02-10 19:11:02.000000000 -0500
+++ konqueror/keditbookmarks/importers.cpp      2003-02-10 19:13:33.000000000 
- - -0500
@@ -37,6 +37,11 @@

 #include "importers.h"

+#ifdef KDE_USE_FINAL
+// top is defined in actionsimpl.cpp
+#undef top
+#endif
+
 QString ImportCommand::name() const {
    return i18n("Import %1 Bookmarks").arg(visibleName());
 }

2. Problem in ksmserver with "None". In kdelibs/kdecore/knotifyclient, "None" 
is #undef'ed. (I think this is bad practice in a header.) Since the protected 
header file Xlib.h has already been included in main.cpp, during compilation 
with --enable-final, it is undefined when server.cpp is compiled. This leads 
to a nasty problem which must be fixed in kdelibs, not ksmserver. As a short 
term workaround, here's a patch (value lifted from X11/X.h):

- - --- /home/user1/rover/server.cpp        2003-02-10 19:49:27.000000000 -0500
+++ server.cpp  2003-02-10 19:50:54.000000000 -0500
@@ -1490,6 +1490,12 @@
  * Legacy session management
  */

+#ifdef KDE_USE_FINAL
+#warning Enormous hack to get around kdelibs/kdecore/knotifyclient.h
+#warning PLEASE FIX ME
+#define None 0L
+#endif
+
 #ifndef NO_LEGACY_SESSION_MANAGEMENT
 const int WM_SAVE_YOURSELF_TIMEOUT = 4000;

Thank you for your attention,
Ravi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+TWbNbI8Y8y0oVXcRAofAAJ0fvKpIPbxVQO58V5maxzxf7r4FwwCeMUEt
ueIZIj2Ok4v/eR6We7W9m0Q=
=OeJc
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list