equal
deleted
inserted
replaced
76 |
76 |
77 Q_GLOBAL_STATIC(CFSEngine,fsEngine); |
77 Q_GLOBAL_STATIC(CFSEngine,fsEngine); |
78 |
78 |
79 CFSEngine::CFSEngine() |
79 CFSEngine::CFSEngine() |
80 { |
80 { |
|
81 connect(QCoreApplication::instance(), SIGNAL(aboutToQuit()), this, SLOT(cleanupFSBackend())); |
|
82 |
81 TRAPD(err, { |
83 TRAPD(err, { |
82 m_factory = CEmailInterfaceFactory::NewL(); |
84 m_factory = CEmailInterfaceFactory::NewL(); |
83 m_ifPtr = m_factory->InterfaceL(KEmailClientApiInterface); |
85 m_ifPtr = m_factory->InterfaceL(KEmailClientApiInterface); |
84 }); |
86 }); |
85 |
87 |
90 Q_UNUSED(err2); |
92 Q_UNUSED(err2); |
91 #endif |
93 #endif |
92 } |
94 } |
93 |
95 |
94 CFSEngine::~CFSEngine() |
96 CFSEngine::~CFSEngine() |
|
97 { |
|
98 |
|
99 } |
|
100 |
|
101 void CFSEngine::cleanupFSBackend() |
95 { |
102 { |
96 m_mtmAccountList.clear(); |
103 m_mtmAccountList.clear(); |
97 for (TInt i = 0; i < m_attachments.Count(); i++){ |
104 for (TInt i = 0; i < m_attachments.Count(); i++){ |
98 m_attachments[i]->Release(); |
105 m_attachments[i]->Release(); |
99 } |
106 } |