summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/kdevtoc
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/plugins/kdevtoc')
-rw-r--r--parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp36
-rw-r--r--parts/documentation/plugins/kdevtoc/dockdevtocplugin.h7
2 files changed, 22 insertions, 21 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()))));
}
}
diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h
index 626848b9..fc980247 100644
--- a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h
+++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h
@@ -27,8 +27,9 @@
class DocKDevTOCPlugin : public DocumentationPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- DocKDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList());
+ DocKDevTOCPlugin(TQObject* tqparent, const char* name, const TQStringList args = TQStringList());
~DocKDevTOCPlugin();
virtual TQString pluginName() const;
@@ -43,11 +44,11 @@ public:
virtual TQStringList fullTextSearchLocations();
- virtual QPair<KFile::Mode, TQString > catalogLocatorProps();
+ virtual TQPair<KFile::Mode, TQString > catalogLocatorProps();
virtual void autoSetupPlugin();
protected:
- void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level);
+ void addTocSect(DocumentationItem *tqparent, TQDomElement childEl, const TQString &base, uint level);
static TQString constructURL(const TQString &base, const TQString &url) ;
};