Diffstat (limited to 'noncore/net/opietooth/manager/popuphelper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/popuphelper.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/noncore/net/opietooth/manager/popuphelper.cpp b/noncore/net/opietooth/manager/popuphelper.cpp index 2a6dad0..d8404d6 100644 --- a/noncore/net/opietooth/manager/popuphelper.cpp +++ b/noncore/net/opietooth/manager/popuphelper.cpp | |||
@@ -1,7 +1,9 @@ | |||
1 | 1 | ||
2 | #include "stdpopups.h" | ||
3 | |||
2 | #include "popuphelper.h" | 4 | #include "popuphelper.h" |
3 | 5 | ||
4 | using namespace OpieTooth; | 6 | using namespace OpieTooth; |
5 | 7 | ||
6 | PopupHelper::PopupHelper() { | 8 | PopupHelper::PopupHelper() { |
7 | init(); | 9 | init(); |
@@ -9,17 +11,18 @@ PopupHelper::PopupHelper() { | |||
9 | PopupHelper::~PopupHelper() { | 11 | PopupHelper::~PopupHelper() { |
10 | 12 | ||
11 | } | 13 | } |
12 | void PopupHelper::insert( int id, popupFactory fact ) { | 14 | void PopupHelper::insert( int id, popupFactory fact ) { |
13 | m_map.insert(id, fact ); | 15 | m_map.insert(id, fact ); |
14 | } | 16 | } |
15 | QPopupMenu* PopupHelper::find( int id ) { | 17 | QPopupMenu* PopupHelper::find( int id, const Services& ser, QListViewItem* item ) { |
16 | FactoryMap::Iterator it = m_map.find(id ); | 18 | FactoryMap::Iterator it = m_map.find(id ); |
17 | if ( it != m_map.end() ) { | 19 | if ( it != m_map.end() ) { |
18 | popupFactory fact = it.data(); | 20 | popupFactory fact = it.data(); |
19 | return (*fact)(); | 21 | return (*fact)(ser, item); |
20 | } | 22 | } |
21 | return 0l; | 23 | return 0l; |
22 | } | 24 | } |
23 | void PopupHelper::init() { | 25 | void PopupHelper::init() { |
24 | 26 | insert( 1, newRfcComPopup ); | |
27 | insert(2, newObexPushPopup ); | ||
25 | } | 28 | } |