diff options
Diffstat (limited to 'parts/documentation/plugins/chm')
-rw-r--r-- | parts/documentation/plugins/chm/docchmplugin.cpp | 30 | ||||
-rw-r--r-- | parts/documentation/plugins/chm/docchmplugin.h | 5 |
2 files changed, 18 insertions, 17 deletions
diff --git a/parts/documentation/plugins/chm/docchmplugin.cpp b/parts/documentation/plugins/chm/docchmplugin.cpp index e0b19de9..fb033a7f 100644 --- a/parts/documentation/plugins/chm/docchmplugin.cpp +++ b/parts/documentation/plugins/chm/docchmplugin.cpp @@ -38,9 +38,9 @@ static const KDevPluginInfo data("docchmplugin"); typedef KDevGenericFactory<DocCHMPlugin> DocCHMPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(data) ) -DocCHMPlugin::DocCHMPlugin(TQObject* parent, const char* name, TQStringList // args +DocCHMPlugin::DocCHMPlugin(TQObject* tqparent, const char* name, TQStringList // args ) - :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), parent, name) + :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), tqparent, name) { setCapabilities(CustomDocumentationTitles); // | Index | FullTextSearch | ProjectDocumentation autoSetup(); @@ -59,15 +59,15 @@ DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const return item; } -QPair<KFile::Mode, TQString> DocCHMPlugin::catalogLocatorProps() +TQPair<KFile::Mode, TQString> DocCHMPlugin::catalogLocatorProps() { - return QPair<KFile::Mode, TQString>(KFile::File, "*.chm"); + return TQPair<KFile::Mode, TQString>(KFile::File, "*.chm"); } TQString DocCHMPlugin::catalogTitle(const TQString& // url ) { - return TQString::null; + return TQString(); } TQString DocCHMPlugin::pluginName() const @@ -127,9 +127,9 @@ void DocCHMPlugin::createIndex(IndexBox* // index } -static KListViewItem* chainEnd(KListViewItem *parent) { - if(parent == 0) return 0; - KListViewItem* ret = dynamic_cast<KListViewItem*>(parent->firstChild()); +static KListViewItem* chainEnd(KListViewItem *tqparent) { + if(tqparent == 0) return 0; + KListViewItem* ret = dynamic_cast<KListViewItem*>(tqparent->firstChild()); if(ret == 0) return 0; while(ret->nextSibling() != 0) { ret = dynamic_cast<KListViewItem*>(ret->nextSibling()); @@ -138,15 +138,15 @@ static KListViewItem* chainEnd(KListViewItem *parent) { } static TQString decodeHTML(const TQString& s) { - TQRegExp rx(TQString::fromLatin1("&#(\\d+);| ")); + TQRegExp rx(TQString::tqfromLatin1("&#(\\d+);| ")); TQString out = s; int pos = rx.search(out); while(pos > -1) { TQString found = rx.cap(0); if(found != " ") { - out.replace(pos, found.length(), static_cast<char>(rx.cap(1).toInt())); + out.tqreplace(pos, found.length(), static_cast<char>(rx.cap(1).toInt())); }else{ - out.replace(pos, found.length(), " "); + out.tqreplace(pos, found.length(), " "); } pos = rx.search(out, pos+1); } @@ -163,11 +163,11 @@ void DocCHMPlugin::createTOC(DocumentationCatalogItem* item) items.push_back(item); for(TQStringList::Iterator it = lines.begin(); it != lines.end();) { bool ok1 = true, ok2 = true; - int parent = (*it).toInt(&ok1); + int tqparent = (*it).toInt(&ok1); ++it; int current = (*it).toInt(&ok2); ++it; - if(int(items.size()) != current || !ok1 || !ok2 || parent < 0 || parent >= int(items.size()) || current < 0 || current != int(items.size())) { + if(int(items.size()) != current || !ok1 || !ok2 || tqparent < 0 || tqparent >= int(items.size()) || current < 0 || current != int(items.size())) { kdDebug(9002) << "DocCHMPlugin::createTOC error while parsing output of ioslave" << endl; break; } @@ -178,9 +178,9 @@ void DocCHMPlugin::createTOC(DocumentationCatalogItem* item) ++it; items.push_back(new DocumentationItem( - DocumentationItem::Document, items[parent], chainEnd(items[parent]), decodeHTML(name))); + DocumentationItem::Document, items[tqparent], chainEnd(items[tqparent]), decodeHTML(name))); items[current]->setURL(url); - if(parent != 0) items[parent]->setType(DocumentationItem::Book); + if(tqparent != 0) items[tqparent]->setType(DocumentationItem::Book); } diff --git a/parts/documentation/plugins/chm/docchmplugin.h b/parts/documentation/plugins/chm/docchmplugin.h index ca90a978..3f069faf 100644 --- a/parts/documentation/plugins/chm/docchmplugin.h +++ b/parts/documentation/plugins/chm/docchmplugin.h @@ -25,15 +25,16 @@ class DocCHMPlugin :public DocumentationPlugin { Q_OBJECT + TQ_OBJECT public: - DocCHMPlugin(TQObject* parent, const char* name, TQStringList args = TQStringList()); + DocCHMPlugin(TQObject* tqparent, const char* name, TQStringList args = TQStringList()); ~DocCHMPlugin(); virtual TQString pluginName() const; virtual void setCatalogURL(DocumentationCatalogItem* item); virtual TQString catalogTitle(const TQString& url); - virtual QPair<KFile::Mode, TQString> catalogLocatorProps(); + virtual TQPair<KFile::Mode, TQString> catalogLocatorProps(); virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); |