bool Manager::add(const QUrl &templateSourceURL, const QString &name, const QUrl &icon) { KileDocument::Extensions *extensions = m_kileInfo->extensions(); KileDocument::Type type = extensions->determineDocumentType(templateSourceURL); return add(templateSourceURL, type, name, icon); }
bool Manager::add(const KURL& templateSourceURL, KileDocument::Type type, const QString& name, const KURL& icon) { KileDocument::Extensions *extensions = m_kileInfo->extensions(); QString extension = extensions->defaultExtensionForDocumentType(type); return copyAppData(templateSourceURL, "templates", "template_" + name + extension) && copyAppData(icon, "pics", "type_" + name + extension + ".kileicon"); }