diff options
Diffstat (limited to 'parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp')
-rw-r--r-- | parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp index 6dd73707..5829b0bb 100644 --- a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp @@ -43,13 +43,13 @@ class TOCDocumentationCatalogItem: public DocumentationCatalogItem { public: TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - KListView *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + KListView *tqparent, const TQString &name) + :DocumentationCatalogItem(plugin, tqparent, name), m_tocFile(tocFile) { } TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + DocumentationItem *tqparent, const TQString &name) + :DocumentationCatalogItem(plugin, tqparent, name), m_tocFile(tocFile) { } TQString tocFile() const { return m_tocFile; } @@ -63,9 +63,9 @@ static const KDevPluginInfo data("dockdevtocplugin"); typedef KDevGenericFactory<DocKDevTOCPlugin> DocKDevTOCPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdockdevtocplugin, DocKDevTOCPluginFactory(data) ) -DocKDevTOCPlugin::DocKDevTOCPlugin(TQObject* parent, const char* name, +DocKDevTOCPlugin::DocKDevTOCPlugin(TQObject* tqparent, const char* name, const TQStringList /*args*/) - :DocumentationPlugin(DocKDevTOCPluginFactory::instance()->config(), parent, name) + :DocumentationPlugin(DocKDevTOCPluginFactory::instance()->config(), tqparent, name) { setCapabilities(Index); autoSetup(); @@ -85,24 +85,24 @@ DocumentationCatalogItem* DocKDevTOCPlugin::createCatalog(KListView* contents, c return new TOCDocumentationCatalogItem(url, this, contents, title); } -QPair<KFile::Mode, TQString> DocKDevTOCPlugin::catalogLocatorProps() +TQPair<KFile::Mode, TQString> DocKDevTOCPlugin::catalogLocatorProps() { - return QPair<KFile::Mode, TQString>(KFile::File, "*.toc"); + return TQPair<KFile::Mode, TQString>(KFile::File, "*.toc"); } TQString DocKDevTOCPlugin::catalogTitle(const TQString& url) { TQFileInfo fi(url); if (!fi.exists()) - return TQString::null; + return TQString(); TQFile f(url); if (!f.open(IO_ReadOnly)) - return TQString::null; + return TQString(); TQDomDocument doc; if (!doc.setContent(&f) || (doc.doctype().name() != "kdeveloptoc")) - return TQString::null; + return TQString(); f.close(); TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); @@ -159,7 +159,7 @@ void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it TQString base; if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString::null); + base = baseEl.attribute("href", TQString()); TQDomElement indexEl = docEl.namedItem("index").toElement(); TQDomElement childEl = indexEl.firstChild().toElement(); @@ -204,22 +204,22 @@ void DocKDevTOCPlugin::createTOC(DocumentationCatalogItem* item) TQString base; if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString::null); + base = baseEl.attribute("href", TQString()); TQDomElement childEl = docEl.lastChild().toElement(); addTocSect(tocItem, childEl, base, 1); } -void DocKDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) +void DocKDevTOCPlugin::addTocSect(DocumentationItem *tqparent, TQDomElement childEl, const TQString &base, uint level) { while (!childEl.isNull()) { - if (childEl.tagName() == TQString("tocsect%1").arg(level)) + if (childEl.tagName() == TQString("tocsect%1").tqarg(level)) { TQString name = childEl.attribute("name"); TQString url = childEl.attribute("url"); - DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); + DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, tqparent, name); item->setURL(KURL(constructURL(base, url))); TQDomElement grandchildEl = childEl.lastChild().toElement(); @@ -259,8 +259,8 @@ void DocKDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) if (baseEl.isNull()) item->setURL(KURL()); else - item->setURL(KURL(constructURL(baseEl.attribute("href", TQString::null), - baseEl.attribute("url", TQString::null)))); + item->setURL(KURL(constructURL(baseEl.attribute("href", TQString()), + baseEl.attribute("url", TQString())))); } } |