void KOIncidenceEditor::createEmbeddedURLPages(Incidence *i)
{
    kdDebug(5850) << "KOIncidenceEditor::createEmbeddedURLPages()" << endl;

    if(!i) return;
    if(!mEmbeddedURLPages.isEmpty())
    {
        kdDebug(5850) << "mEmbeddedURLPages are not empty, clearing it!" << endl;
        mEmbeddedURLPages.setAutoDelete(true);
        mEmbeddedURLPages.clear();
        mEmbeddedURLPages.setAutoDelete(false);
    }
    if(!mAttachedDesignerFields.isEmpty())
    {
        for(QPtrList<QWidget>::Iterator it = mAttachedDesignerFields.begin();
                it != mAttachedDesignerFields.end(); ++it)
        {
            if(mDesignerFieldForWidget.contains(*it))
            {
                mDesignerFields.remove(mDesignerFieldForWidget[ *it ]);
            }
        }
        mAttachedDesignerFields.setAutoDelete(true);
        mAttachedDesignerFields.clear();
        mAttachedDesignerFields.setAutoDelete(false);
    }

    Attachment::List att = i->attachments();
    for(Attachment::List::Iterator it = att.begin(); it != att.end(); ++it)
    {
        Attachment *a = (*it);
        kdDebug(5850) << "Iterating over the attachments " << endl;
        kdDebug(5850) << "label=" << a->label() << ", url=" << a->uri() << ", mimetype=" << a->mimeType() << endl;
        if(a && a->showInline() && a->isUri())
        {
            // TODO: Allow more mime-types, but add security checks!
            /*      if ( a->mimeType() == "application/x-designer" ) {
                    QString tmpFile;
                    if ( KIO::NetAccess::download( a->uri(), tmpFile, this ) ) {
                      mAttachedDesignerFields.append( addDesignerTab( tmpFile ) );
                      KIO::NetAccess::removeTempFile( tmpFile );
                    }
                  } else*/
            // TODO: Enable that check again!
            if(a->mimeType() == "text/html")
            {
                setupEmbeddedURLPage(a->label(), a->uri(), a->mimeType());
            }
        }
    }
}