Bug 100101 - symbols missing for PyKDE binding
Summary: symbols missing for PyKDE binding
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-23 17:51 UTC by Sok Ann Yap
Modified: 2005-03-02 13:00 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch to export symbols (3.45 KB, patch)
2005-02-23 17:52 UTC, Sok Ann Yap
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sok Ann Yap 2005-02-23 17:51:36 UTC
Version:            (using KDE KDE 3.3.92)
Installed from:    Gentoo Packages
Compiler:          gcc 3.4.3 
OS:                Linux

I got several undefined reference errors when trying to import kdeui, kio, kdesu, and kdeprint. After exporting the missing symbol, each PyKDE module can be imported successfully. Please review the following patch.
Comment 1 Sok Ann Yap 2005-02-23 17:52:30 UTC
Created attachment 9797 [details]
Proposed patch to export symbols
Comment 2 Stephan Kulow 2005-02-23 19:42:51 UTC
I assume the symbols aren't exported for a reason and the pykde bindings should be updated
Comment 3 Simon Edwards 2005-02-23 21:20:59 UTC
Thanks Sok Ann Yap for the patch. I don't think we will be using it directly, but it contains a lot of useful info (for me).

Now. I can get rid of the bindings that use depreciated or internal classes. That should fix most of the problems. There appear to be a couple of classes that probably *were* meant to be public. Anyone know what the story is?

--- kdeui/keditlistbox.h.orig	2005-02-21 08:22:12.002436840 -0600
+++ kdeui/keditlistbox.h	2005-02-21 08:11:45.297560096 -0600
@@ -64,7 +64,7 @@ public:
         CustomEditor( QWidget *repWidget, KLineEdit *edit )
             : m_representationWidget( repWidget ),
               m_lineEdit( edit ) {}
-        CustomEditor( KComboBox *combo );
+        KDEUI_EXPORT CustomEditor( KComboBox *combo );
 
         void setRepresentationWidget( QWidget *repWidget ) {
             m_representationWidget = repWidget;
--- kio/kio/kautomount.h.orig	2005-02-21 15:26:15.915910312 -0600
+++ kio/kio/kautomount.h	2005-02-21 15:26:26.013375264 -0600
@@ -83,7 +83,7 @@ private:
  *
  * @short This class implements synchronous unmounting of devices,
  */
-class KAutoUnmount : public QObject
+class KIO_EXPORT KAutoUnmount : public QObject
 {
   Q_OBJECT
   friend class gcc_gives_a_warning_without_this;
Comment 4 Stephan Kulow 2005-02-24 08:47:36 UTC
looks good, please comit
Comment 5 Dirk Mueller 2005-02-24 10:13:26 UTC
CVS commit by mueller: 

fix export
CCMAIL: 100101@bugs.kde.org


  M +1 -1      keditlistbox.h   1.25


--- kdelibs/kdeui/keditlistbox.h  #1.24:1.25
@@ -56,5 +56,5 @@ public:
      * @since 3.1
      **/
-    class CustomEditor
+    class KDEUI_EXPORT CustomEditor
     {
     public:


Comment 6 Simon Edwards 2005-02-24 13:13:45 UTC
What is the verdict for kio/kio/kautomount.h -> class KAutoUnmount? There is a KAutoMount class that *is* exported. KAutoUnmount looks likes KAutoMount's  counterpart, but it is currently *not* exported.

Coolo, I'm working on fixing the bindings for those depreciated/internal classes (testing/compiling on a PII-450!). Can I freely commit my fix when it is ready? (later today, CET).
Comment 7 Stephan Kulow 2005-02-24 14:44:32 UTC
JFYI: i reverted #5 as moc can't cope with it
Comment 8 Simon Edwards 2005-02-25 08:42:24 UTC
CVS commit by sedwards: 


BUGS:100101
CCBUGS:100101

Bindings for non-exported private/depreciated classes removed.


  M +1 -1      kdeprint/kdeprint-kdecvs.diff   1.2
  M +2 -2      kdeprint/kprinter.sip   1.4
  M +1 -1      kdesu/kdesumod.sip.in   1.3
  M +1 -1      kdeui/kaboutapplication.sip   1.4
  M +1 -1      kdeui/kdeuimod.sip.in   1.3
  M +18 -18    kdeui/keditlistbox.sip   1.4
  M +13 -13    kfile/knotifydialog.sip   1.4
  M +1 -1      kfile/kurlrequester.sip   1.4
  R            kdeprint/driver.sip   1.3
  R            kdesu/kcookie.sip   1.3
  R            kdeui/kdockwindow.sip   1.3



Comment 9 Simon Edwards 2005-02-25 08:42:25 UTC
CVS commit by sedwards: 


BUGS:100101
CCBUGS:100101

Bindings for non-exported private/depreciated classes removed.


  M +1 -1      kdeprint/kdeprint-kdecvs.diff   1.2
  M +2 -2      kdeprint/kprinter.sip   1.4
  M +1 -1      kdesu/kdesumod.sip.in   1.3
  M +1 -1      kdeui/kaboutapplication.sip   1.4
  M +1 -1      kdeui/kdeuimod.sip.in   1.3
  M +18 -18    kdeui/keditlistbox.sip   1.4
  M +13 -13    kfile/knotifydialog.sip   1.4
  M +1 -1      kfile/kurlrequester.sip   1.4
  R            kdeprint/driver.sip   1.3
  R            kdesu/kcookie.sip   1.3
  R            kdeui/kdockwindow.sip   1.3



Comment 10 thubble 2005-02-27 01:57:22 UTC
I needed this patch to get it to work with the latest CVS version:


--- sip/kio/kfileshare.sip.orig 2005-02-26 14:38:24.585654088 -0600
+++ sip/kio/kfileshare.sip      2005-02-26 14:39:07.931064584 -0600
@@ -24,27 +24,27 @@
 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


-%If ( KDE_3_1_0 -  )
+//%If ( KDE_3_1_0 -  )

-class KFileSharePrivate : QObject
-{
-%TypeHeaderCode
-#include <kfileshare.h>
-%End
+//class KFileSharePrivate : QObject
+//{
+//%TypeHeaderCode
+//#include <kfileshare.h>
+//%End


-public:
-                         KFileSharePrivate ();
-    KDirWatch*           m_watchFile;
-    static KFileSharePrivate* self ();
-    KFileSharePrivate*   _self;
+//public:
+//                         KFileSharePrivate ();
+//    KDirWatch*           m_watchFile;
+//    static KFileSharePrivate* self ();
+//    KFileSharePrivate*   _self;

-protected slots:
-    void                 slotFileChange (const QString&);
+//protected slots:
+//    void                 slotFileChange (const QString&);

-};  // class KFileSharePrivate
+//};  // class KFileSharePrivate

-%End
+//%End


 %If ( KDE_3_1_0 -  )
Comment 11 Simon Edwards 2005-02-28 20:19:17 UTC
thubble and anyone else who is having trouble, can you run the importTest.py program in python/pykde directory and tell me if any errors appear. importTest.py does a simple sanity check on the python bindings and check that they can in fact be loaded into the python interpreter.

Also, which distribution and compiler are you using?