本文整理汇总了C++中Attachment::isUri方法的典型用法代码示例。如果您正苦于以下问题:C++ Attachment::isUri方法的具体用法?C++ Attachment::isUri怎么用?C++ Attachment::isUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Attachment
的用法示例。
在下文中一共展示了Attachment::isUri方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createEmbeddedURLPages
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());
}
}
}
}