qtmobility/tests/auto/qcontactasync/maliciousplugin/maliciousplugin.cpp
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    56 MaliciousAsyncManagerEngine::MaliciousAsyncManagerEngine()
    56 MaliciousAsyncManagerEngine::MaliciousAsyncManagerEngine()
    57         : QContactManagerEngine()
    57         : QContactManagerEngine()
    58 {
    58 {
    59 }
    59 }
    60 
    60 
    61 void MaliciousAsyncManagerEngine::deref()
    61 QString MaliciousAsyncManagerEngine::synthesizedDisplayLabel(const QContact& contact, QContactManager::Error* error) const
    62 {
       
    63     // does this leak?
       
    64 }
       
    65 
       
    66 QString MaliciousAsyncManagerEngine::synthesizedDisplayLabel(const QContact& contact, QContactManager::Error& error) const
       
    67 {
    62 {
    68     Q_UNUSED(contact);
    63     Q_UNUSED(contact);
    69     error = QContactManager::NotSupportedError;
    64     *error = QContactManager::NotSupportedError;
    70     return QString();
    65     return QString();
    71 }
    66 }
    72 
    67 
    73 QString MaliciousAsyncManagerEngine::managerName() const
    68 QString MaliciousAsyncManagerEngine::managerName() const
    74 {
    69 {
   111 {
   106 {
   112     return QString(makename(MALICIOUSPLUGINNAME));
   107     return QString(makename(MALICIOUSPLUGINNAME));
   113 }
   108 }
   114 Q_EXPORT_PLUGIN2(MALICIOUSPLUGINTARGET, MaliciousEngineFactory);
   109 Q_EXPORT_PLUGIN2(MALICIOUSPLUGINTARGET, MaliciousEngineFactory);
   115 
   110 
   116 QContactManagerEngine* MaliciousEngineFactory::engine(const QMap<QString, QString>& parameters, QContactManager::Error& error)
   111 QContactManagerEngine* MaliciousEngineFactory::engine(const QMap<QString, QString>& parameters, QContactManager::Error* error)
   117 {
   112 {
   118     Q_UNUSED(parameters);
   113     Q_UNUSED(parameters);
   119     error = QContactManager::NoError;
   114     *error = QContactManager::NoError;
   120     return &mame;
   115     return new MaliciousAsyncManagerEngine();
   121 }
   116 }