author | alwin <alwin> | 2005-03-16 13:13:24 (UTC) |
---|---|---|
committer | alwin <alwin> | 2005-03-16 13:13:24 (UTC) |
commit | 4fef85eb55dbef5f8546caee084e4f0ce51081d3 (patch) (unidiff) | |
tree | 662b1d314ba4b8695d92d277ba5f4a96891e7b34 /libopie2/opiepim | |
parent | f366c924a105ad41e974af959b23b0d30c603234 (diff) | |
download | opie-4fef85eb55dbef5f8546caee084e4f0ce51081d3.zip opie-4fef85eb55dbef5f8546caee084e4f0ce51081d3.tar.gz opie-4fef85eb55dbef5f8546caee084e4f0ce51081d3.tar.bz2 |
ok, removed last errors (i hope)
-rw-r--r-- | libopie2/opiepim/ui/oholidaypluginif.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libopie2/opiepim/ui/oholidaypluginif.h b/libopie2/opiepim/ui/oholidaypluginif.h index 874e5a3..99ed563 100644 --- a/libopie2/opiepim/ui/oholidaypluginif.h +++ b/libopie2/opiepim/ui/oholidaypluginif.h | |||
@@ -1,63 +1,62 @@ | |||
1 | #ifndef _O_HOLIDAY_PLUGIN_IF_H | 1 | #ifndef _O_HOLIDAY_PLUGIN_IF_H |
2 | #define _O_HOLIDAY_PLUGIN_IF_H | 2 | #define _O_HOLIDAY_PLUGIN_IF_H |
3 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <qpe/qcom.h> | 4 | #include <qpe/qcom.h> |
5 | #include <qpe/quuid.h> | ||
6 | 5 | ||
7 | #ifndef QT_NO_COMPONENT | 6 | #ifndef QT_NO_COMPONENT |
8 | //"b981b4e9-6d5d-4ee0-a193-f8d0e443809b" | 7 | //"b981b4e9-6d5d-4ee0-a193-f8d0e443809b" |
9 | #define IID_HOLIDAY_PLUGIN QUuid( 0xb981b4e9, 0x6d5d, 0x4ee0, 0xa1, 0x93,0xf8, 0xd0, 0xe4, 0x43, 0x80, 0x9b) | 8 | #define IID_HOLIDAY_PLUGIN QUuid( 0xb981b4e9, 0x6d5d, 0x4ee0, 0xa1, 0x93,0xf8, 0xd0, 0xe4, 0x43, 0x80, 0x9b) |
10 | #endif | 9 | #endif |
11 | 10 | ||
12 | namespace Opie { | 11 | namespace Opie { |
13 | namespace Datebook { | 12 | namespace Datebook { |
14 | 13 | ||
15 | class HolidayPlugin; | 14 | class HolidayPlugin; |
16 | 15 | ||
17 | class HolidayPluginIf:public QUnknownInterface | 16 | class HolidayPluginIf:public QUnknownInterface |
18 | { | 17 | { |
19 | public: | 18 | public: |
20 | HolidayPluginIf():QUnknownInterface(){} | 19 | HolidayPluginIf():QUnknownInterface(){} |
21 | virtual ~HolidayPluginIf(){} | 20 | virtual ~HolidayPluginIf(){} |
22 | 21 | ||
23 | virtual HolidayPlugin*plugin()=0; | 22 | virtual HolidayPlugin*plugin()=0; |
24 | }; | 23 | }; |
25 | 24 | ||
26 | template<class T> class HolidayPluginWrapper:public HolidayPluginIf | 25 | template<class T> class HolidayPluginWrapper:public HolidayPluginIf |
27 | { | 26 | { |
28 | public: | 27 | public: |
29 | HolidayPluginWrapper():HolidayPluginIf(),_plugin(0){} | 28 | HolidayPluginWrapper():HolidayPluginIf(),_plugin(0){} |
30 | virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;} | 29 | virtual ~HolidayPluginWrapper(){if (_plugin) delete _plugin;} |
31 | 30 | ||
32 | QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { | 31 | QRESULT queryInterface( const QUuid& uuid, QUnknownInterface** iface ) { |
33 | odebug << "HolidayPluginWrapper::queryInterface()" << oendl; | 32 | odebug << "HolidayPluginWrapper::queryInterface()" << oendl; |
34 | *iface = 0; | 33 | *iface = 0; |
35 | if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) { | 34 | if (uuid == IID_HOLIDAY_PLUGIN || uuid == IID_QUnknown) { |
36 | *iface = this; | 35 | *iface = this; |
37 | } else { | 36 | } else { |
38 | return QS_FALSE; | 37 | return QS_FALSE; |
39 | } | 38 | } |
40 | if (*iface) *iface->addRef(); | 39 | if (*iface) (*iface)->addRef(); |
41 | return QS_OK; | 40 | return QS_OK; |
42 | } | 41 | } |
43 | 42 | ||
44 | // from qcom | 43 | // from qcom |
45 | Q_REFCOUNT | 44 | Q_REFCOUNT |
46 | 45 | ||
47 | virtual T*plugin() { | 46 | virtual T*plugin() { |
48 | if (!_plugin) {_plugin = new T();} | 47 | if (!_plugin) {_plugin = new T();} |
49 | return _plugin; | 48 | return _plugin; |
50 | } | 49 | } |
51 | protected: | 50 | protected: |
52 | T*_plugin; | 51 | T*_plugin; |
53 | }; | 52 | }; |
54 | 53 | ||
55 | #define EXPORT_HOLIDAY_PLUGIN( Plugin ) \ | 54 | #define EXPORT_HOLIDAY_PLUGIN( Plugin ) \ |
56 | Q_EXPORT_INTERFACE() { \ | 55 | Q_EXPORT_INTERFACE() { \ |
57 | Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \ | 56 | Q_CREATE_INSTANCE( Opie::Datebook::HolidayPluginWrapper<Plugin> ) \ |
58 | } | 57 | } |
59 | 58 | ||
60 | } | 59 | } |
61 | } | 60 | } |
62 | #endif | 61 | #endif |
63 | 62 | ||