[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] [PATCH] kdepim/kaddressbook plugin factories
From:       Kevin Krammer <kevin.krammer () gmx ! at>
Date:       2007-10-08 11:56:18
Message-ID: 200710081356.18666.kevin.krammer () gmx ! at
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


In reference to this thread:
http://lists.kde.org/?t=119169130000001&r=1&w=2

Please review.

There is a similar issue with the XX port plugins, though the already use a 
macro which ends in a delegation to K_EXPORT_COMPONENT_FACTORY

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring

["kaddressbook-plugins.diff" (text/x-diff)]

Index: views/kaddressbookcardview.cpp
===================================================================
--- views/kaddressbookcardview.cpp	(revision 722995)
+++ views/kaddressbookcardview.cpp	(working copy)
@@ -61,12 +61,7 @@
     }
 };
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_cardview()
-  {
-    return ( new CardViewFactory );
-  }
-}
+K_EXPORT_PLUGIN(CardViewFactory)
 
 class AddresseeCardViewItem : public CardViewItem
 {
Index: views/kaddressbooktableview.cpp
===================================================================
--- views/kaddressbooktableview.cpp	(revision 722995)
+++ views/kaddressbooktableview.cpp	(working copy)
@@ -80,12 +80,7 @@
     }
 };
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_tableview()
-  {
-    return ( new TableViewFactory );
-  }
-}
+K_EXPORT_PLUGIN(TableViewFactory)
 
 KAddressBookTableView::KAddressBookTableView( KAB::Core *core,
                                               QWidget *parent )
Index: views/kaddressbookiconview.cpp
===================================================================
--- views/kaddressbookiconview.cpp	(revision 722995)
+++ views/kaddressbookiconview.cpp	(working copy)
@@ -59,12 +59,7 @@
     QString description() const { return i18n( "Icons represent contacts. Very simple view." ); }
 };
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_iconview()
-  {
-    return ( new IconViewFactory );
-  }
-}
+K_EXPORT_PLUGIN(IconViewFactory)
 
 AddresseeIconView::AddresseeIconView( QWidget *parent, const char *name )
   : K3IconView( parent, name )
Index: editors/cryptowidget.cpp
===================================================================
--- editors/cryptowidget.cpp	(revision 722995)
+++ editors/cryptowidget.cpp	(working copy)
@@ -46,12 +46,7 @@
 
 #include "cryptowidget.h"
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_cryptosettings()
-  {
-    return ( new CryptoWidgetFactory );
-  }
-}
+K_EXPORT_PLUGIN(CryptoWidgetFactory)
 
 CryptoWidgetFactory::CryptoWidgetFactory()
 {
Index: features/distributionlistwidget.cpp
===================================================================
--- features/distributionlistwidget.cpp	(revision 722995)
+++ features/distributionlistwidget.cpp	(working copy)
@@ -74,12 +74,7 @@
     }
 };
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_distributionlist()
-  {
-    return ( new DistributionListFactory );
-  }
-}
+K_EXPORT_PLUGIN(DistributionListFactory)
 
 /**
   We have to catch when the 'Del' key is pressed, otherwise
Index: features/resourceselection.cpp
===================================================================
--- features/resourceselection.cpp	(revision 722995)
+++ features/resourceselection.cpp	(working copy)
@@ -387,11 +387,6 @@
     }
 };
 
-extern "C" {
-  KDE_EXPORT void *init_libkaddrbk_resourceselection()
-  {
-    return ( new ResourceSelectionFactory );
-  }
-}
+K_EXPORT_PLUGIN(ResourceSelectionFactory)
 
 #include "resourceselection.moc"

["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic