Exemplo n.º 1
0
// Return the viewer plugin object matching the specified ID
static ViewerPluginDescriptor* mapping(const QString& key)
{
    PluginMap::ConstIterator it;
    if ((it = pluginMap().find(key)) != pluginMap().end())
        return it.value();

    return 0;
}
Exemplo n.º 2
0
// Return the composer plugin object matching the specified ID
static QMailComposerInterface* mapping(const QString& key)
{
    PluginMap::ConstIterator it;
    if ((it = pluginMap().find(key)) != pluginMap().end())
        return it.value();

    qWarning() << "Failed attempt to map composer:" << key;
    return 0;
}