From d6f8bbb45b267065a6907e71ff9c98bb6d161241 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:56:07 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- parts/documentation/plugins/chm/docchmplugin.cpp | 46 ++-- parts/documentation/plugins/chm/docchmplugin.h | 14 +- .../plugins/custom/doccustomplugin.cpp | 18 +- .../documentation/plugins/custom/doccustomplugin.h | 12 +- .../plugins/devhelp/docdevhelpplugin.cpp | 156 +++++++------- .../plugins/devhelp/docdevhelpplugin.h | 22 +- parts/documentation/plugins/djvu/docdjvuplugin.cpp | 18 +- parts/documentation/plugins/djvu/docdjvuplugin.h | 12 +- .../plugins/doxygen/docdoxygenplugin.cpp | 234 ++++++++++----------- .../plugins/doxygen/docdoxygenplugin.h | 28 +-- .../plugins/kdevtoc/dockdevtocplugin.cpp | 120 +++++------ .../plugins/kdevtoc/dockdevtocplugin.h | 18 +- parts/documentation/plugins/pdb/docpdbplugin.cpp | 18 +- parts/documentation/plugins/pdb/docpdbplugin.h | 12 +- parts/documentation/plugins/pdf/docpdfplugin.cpp | 18 +- parts/documentation/plugins/pdf/docpdfplugin.h | 12 +- parts/documentation/plugins/qt/docqtplugin.cpp | 136 ++++++------ parts/documentation/plugins/qt/docqtplugin.h | 18 +- 18 files changed, 456 insertions(+), 456 deletions(-) (limited to 'parts/documentation/plugins') diff --git a/parts/documentation/plugins/chm/docchmplugin.cpp b/parts/documentation/plugins/chm/docchmplugin.cpp index e2a4172e..e0b19de9 100644 --- a/parts/documentation/plugins/chm/docchmplugin.cpp +++ b/parts/documentation/plugins/chm/docchmplugin.cpp @@ -27,10 +27,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include "../../../../config.h" @@ -38,7 +38,7 @@ static const KDevPluginInfo data("docchmplugin"); typedef KDevGenericFactory DocCHMPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(data) ) -DocCHMPlugin::DocCHMPlugin(QObject* parent, const char* name, QStringList // args +DocCHMPlugin::DocCHMPlugin(TQObject* parent, const char* name, TQStringList // args ) :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), parent, name) { @@ -51,7 +51,7 @@ DocCHMPlugin::~DocCHMPlugin() } -DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title); item->setURL(KURL(url)); @@ -59,29 +59,29 @@ DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const return item; } -QPair DocCHMPlugin::catalogLocatorProps() +QPair DocCHMPlugin::catalogLocatorProps() { - return QPair(KFile::File, "*.chm"); + return QPair(KFile::File, "*.chm"); } -QString DocCHMPlugin::catalogTitle(const QString& // url +TQString DocCHMPlugin::catalogTitle(const TQString& // url ) { - return QString::null; + return TQString::null; } -QString DocCHMPlugin::pluginName() const +TQString DocCHMPlugin::pluginName() const { return i18n("CHM Documentation Collection"); } -QString DocCHMPlugin::getSpecialData(const QString& name, KURL url) { - QString ret = ""; +TQString DocCHMPlugin::getSpecialData(const TQString& name, KURL url) { + TQString ret = ""; url.setProtocol("ms-its"); url.addPath("/:" + name); - QString tmpFile; + TQString tmpFile; if( KIO::NetAccess::download( url, tmpFile, 0 ) ) { std::filebuf fb; @@ -102,10 +102,10 @@ QString DocCHMPlugin::getSpecialData(const QString& name, KURL url) { ///this currently is useless, because htdig cannot use kioslaves -QStringList DocCHMPlugin::fullTextSearchLocations() +TQStringList DocCHMPlugin::fullTextSearchLocations() { - //return QStringList::split( '\n', getSpecialData("contents", m_url)); - return QStringList(); + //return TQStringList::split( '\n', getSpecialData("contents", m_url)); + return TQStringList(); } bool DocCHMPlugin::needRefreshIndex(DocumentationCatalogItem* // item @@ -137,12 +137,12 @@ static KListViewItem* chainEnd(KListViewItem *parent) { return ret; } -static QString decodeHTML(const QString& s) { - QRegExp rx(QString::fromLatin1("&#(\\d+);| ")); - QString out = s; +static TQString decodeHTML(const TQString& s) { + TQRegExp rx(TQString::fromLatin1("&#(\\d+);| ")); + TQString out = s; int pos = rx.search(out); while(pos > -1) { - QString found = rx.cap(0); + TQString found = rx.cap(0); if(found != " ") { out.replace(pos, found.length(), static_cast(rx.cap(1).toInt())); }else{ @@ -156,12 +156,12 @@ static QString decodeHTML(const QString& s) { void DocCHMPlugin::createTOC(DocumentationCatalogItem* item) { - QStringList lines = QStringList::split("\n", getSpecialData("catalog", item->url()) ); + TQStringList lines = TQStringList::split("\n", getSpecialData("catalog", item->url()) ); if(lines.count() % 4 != 0) { kdDebug(9002) << "DocCHMPlugin::createTOC: wrong count of strings"; return;} - QValueVector items; + TQValueVector items; items.push_back(item); - for(QStringList::Iterator it = lines.begin(); it != lines.end();) { + for(TQStringList::Iterator it = lines.begin(); it != lines.end();) { bool ok1 = true, ok2 = true; int parent = (*it).toInt(&ok1); ++it; @@ -172,7 +172,7 @@ void DocCHMPlugin::createTOC(DocumentationCatalogItem* item) break; } - QString& name(*it); + TQString& name(*it); ++it; KURL url(*it); ++it; diff --git a/parts/documentation/plugins/chm/docchmplugin.h b/parts/documentation/plugins/chm/docchmplugin.h index 8db470b0..ca90a978 100644 --- a/parts/documentation/plugins/chm/docchmplugin.h +++ b/parts/documentation/plugins/chm/docchmplugin.h @@ -26,25 +26,25 @@ class DocCHMPlugin :public DocumentationPlugin { Q_OBJECT public: - DocCHMPlugin(QObject* parent, const char* name, QStringList args = QStringList()); + DocCHMPlugin(TQObject* parent, const char* name, TQStringList args = TQStringList()); ~DocCHMPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; virtual void setCatalogURL(DocumentationCatalogItem* item); - virtual QString catalogTitle(const QString& url); - virtual QPair catalogLocatorProps(); - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual TQString catalogTitle(const TQString& url); + virtual QPair catalogLocatorProps(); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); virtual bool needRefreshIndex(DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); virtual void autoSetupPlugin(); protected: - QString getSpecialData(const QString& name, KURL url); + TQString getSpecialData(const TQString& name, KURL url); }; #endif diff --git a/parts/documentation/plugins/custom/doccustomplugin.cpp b/parts/documentation/plugins/custom/doccustomplugin.cpp index 9fa5ad99..ae95aff1 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.cpp +++ b/parts/documentation/plugins/custom/doccustomplugin.cpp @@ -32,7 +32,7 @@ static const KDevPluginInfo data("doccustomplugin"); typedef KDevGenericFactory DocCustomPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdoccustomplugin, DocCustomPluginFactory(data) ) -DocCustomPlugin::DocCustomPlugin(QObject* parent, const char* name, const QStringList // args +DocCustomPlugin::DocCustomPlugin(TQObject* parent, const char* name, const TQStringList // args ) :DocumentationPlugin(DocCustomPluginFactory::instance()->config(), parent, name) { @@ -50,31 +50,31 @@ bool DocCustomPlugin::needRefreshIndex(DocumentationCatalogItem* // item return false; } -QString DocCustomPlugin::pluginName() const +TQString DocCustomPlugin::pluginName() const { return i18n("Custom Documentation Collection"); } -DocumentationCatalogItem* DocCustomPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocCustomPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title); item->setURL(KURL(url)); return item; } -QPair DocCustomPlugin::catalogLocatorProps() +QPair DocCustomPlugin::catalogLocatorProps() { - return QPair(KFile::File, "all/allfiles"); + return QPair(KFile::File, "all/allfiles"); } -QString DocCustomPlugin::catalogTitle(const QString& /*url*/) +TQString DocCustomPlugin::catalogTitle(const TQString& /*url*/) { - return QString::null; + return TQString::null; } -QStringList DocCustomPlugin::fullTextSearchLocations() +TQStringList DocCustomPlugin::fullTextSearchLocations() { - return QStringList(); + return TQStringList(); } diff --git a/parts/documentation/plugins/custom/doccustomplugin.h b/parts/documentation/plugins/custom/doccustomplugin.h index e72261a6..77bc9750 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.h +++ b/parts/documentation/plugins/custom/doccustomplugin.h @@ -24,12 +24,12 @@ class DocCustomPlugin : public DocumentationPlugin { public: - DocCustomPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocCustomPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocCustomPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); @@ -37,10 +37,10 @@ public: virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString& url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString& url); virtual void autoSetupPlugin(); diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp index 95c404ae..11c2b6a7 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,32 +40,32 @@ class DevHelpDocumentationCatalogItem: public DocumentationCatalogItem { public: - DevHelpDocumentationCatalogItem(const QString &devHelpFile, DocumentationPlugin* plugin, - KListView *parent, const QString &name) + DevHelpDocumentationCatalogItem(const TQString &devHelpFile, DocumentationPlugin* plugin, + KListView *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_devHelpFile(devHelpFile) { } - DevHelpDocumentationCatalogItem(const QString &devHelpFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const QString &name) + DevHelpDocumentationCatalogItem(const TQString &devHelpFile, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_devHelpFile(devHelpFile) { } - QString devHelpFile() const { return m_devHelpFile; } + TQString devHelpFile() const { return m_devHelpFile; } - virtual QString cacheVersion() const { + virtual TQString cacheVersion() const { unsigned int checksum=0; for(int a=0;a DocDevHelpPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdevhelpplugin, DocDevHelpPluginFactory(data) ) -DocDevHelpPlugin::DocDevHelpPlugin(QObject* parent, const char* name, - const QStringList /*args*/) +DocDevHelpPlugin::DocDevHelpPlugin(TQObject* parent, const char* name, + const TQStringList /*args*/) :DocumentationPlugin(DocDevHelpPluginFactory::instance()->config(), parent, name) { setCapabilities(Index | FullTextSearch | ProjectDocumentation); @@ -85,55 +85,55 @@ DocDevHelpPlugin::~DocDevHelpPlugin() { } -DocumentationCatalogItem* DocDevHelpPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocDevHelpPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { return new DevHelpDocumentationCatalogItem(url, this, contents, title); } -QPair DocDevHelpPlugin::catalogLocatorProps() +QPair DocDevHelpPlugin::catalogLocatorProps() { - return QPair(KFile::File, "*.devhelp"); + return QPair(KFile::File, "*.devhelp"); } -QString DocDevHelpPlugin::catalogTitle(const QString& url) +TQString DocDevHelpPlugin::catalogTitle(const TQString& url) { - QFileInfo fi(url); + TQFileInfo fi(url); if (!fi.exists()) - return QString::null; + return TQString::null; - QFile f(url); + TQFile f(url); if (!f.open(IO_ReadOnly)) - return QString::null; + return TQString::null; - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f)) - return QString::null; + return TQString::null; f.close(); - QDomElement docEl = doc.documentElement(); + TQDomElement docEl = doc.documentElement(); - return docEl.attribute("title", QString::null); + return docEl.attribute("title", TQString::null); } -QString DocDevHelpPlugin::pluginName() const +TQString DocDevHelpPlugin::pluginName() const { return i18n("Devhelp Documentation Collection"); } -QStringList DocDevHelpPlugin::fullTextSearchLocations() +TQStringList DocDevHelpPlugin::fullTextSearchLocations() { - QStringList locs; + TQStringList locs; - QMap entryMap = config->entryMap("Locations"); + TQMap entryMap = config->entryMap("Locations"); - for (QMap::const_iterator it = entryMap.begin(); + for (TQMap::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { config->setGroup("Search Settings"); if (config->readBoolEntry(it.key(), false)) { config->setGroup("Locations"); - QFileInfo fi(config->readPathEntry(it.key())); + TQFileInfo fi(config->readPathEntry(it.key())); locs << fi.dirPath(true); } } @@ -147,9 +147,9 @@ bool DocDevHelpPlugin::needRefreshIndex(DocumentationCatalogItem* item) if (!dhItem) return false; - QFileInfo fi(dhItem->devHelpFile()); + TQFileInfo fi(dhItem->devHelpFile()); config->setGroup("Index"); - if (fi.lastModified() > config->readDateTimeEntry(dhItem->text(0), new QDateTime())) + if (fi.lastModified() > config->readDateTimeEntry(dhItem->text(0), new TQDateTime())) { kdDebug() << "need rebuild index for " << dhItem->text(0) << endl; config->writeEntry(item->text(0), fi.lastModified()); @@ -161,16 +161,16 @@ bool DocDevHelpPlugin::needRefreshIndex(DocumentationCatalogItem* item) void DocDevHelpPlugin::autoSetupPlugin() { - QValueStack scanStack; + TQValueStack scanStack; pushToScanStack(scanStack, getenv("DEVHELP_SEARCH_PATH")); - pushToScanStack(scanStack, QString(getenv("HOME")) + "/.devhelp/books"); + pushToScanStack(scanStack, TQString(getenv("HOME")) + "/.devhelp/books"); - QString dhexepath = DocDevHelpPluginFactory::instance()->dirs()->findExe("devhelp"); + TQString dhexepath = DocDevHelpPluginFactory::instance()->dirs()->findExe("devhelp"); if (!dhexepath.isEmpty()) { - QFileInfo fi(dhexepath); - QString path = KURL(fi.dirPath(true)).upURL().path(1); + TQFileInfo fi(dhexepath); + TQString path = KURL(fi.dirPath(true)).upURL().path(1); pushToScanStack(scanStack, path + "share/devhelp/books"); pushToScanStack(scanStack, path + "share/gtk-doc/html"); } @@ -185,8 +185,8 @@ void DocDevHelpPlugin::autoSetupPlugin() pushToScanStack(scanStack, "/opt/gnome2/share/gtk-doc/html"); //fill the list of scan dirs (with subdirectories) - QStringList scanList; - QDir dir; + TQStringList scanList; + TQDir dir; do { dir.setPath(scanStack.pop()); @@ -196,13 +196,13 @@ void DocDevHelpPlugin::autoSetupPlugin() const QFileInfoList *dirEntries = dir.entryInfoList(); if ( !dirEntries ) continue; - QPtrListIterator it(*dirEntries); + TQPtrListIterator it(*dirEntries); for (; it.current(); ++it) { - QString fileName = it.current()->fileName(); + TQString fileName = it.current()->fileName(); if (fileName == "." || fileName == "..") continue; - QString path = it.current()->absFilePath(); + TQString path = it.current()->absFilePath(); if (it.current()->isDir()) { scanStack.push(path); @@ -210,23 +210,23 @@ void DocDevHelpPlugin::autoSetupPlugin() } } while (!scanStack.isEmpty()); - for (QStringList::const_iterator it = scanList.begin(); it != scanList.end(); ++it) + for (TQStringList::const_iterator it = scanList.begin(); it != scanList.end(); ++it) { scanDevHelpDir(*it); } } -void DocDevHelpPlugin::scanDevHelpDir(const QString &path) +void DocDevHelpPlugin::scanDevHelpDir(const TQString &path) { - QDir d(path); + TQDir d(path); if (! d.exists() || !d.isReadable()) return; - d.setFilter(QDir::Files); + d.setFilter(TQDir::Files); //scan for *.devhelp files const QFileInfoList *list = d.entryInfoList(); QFileInfoListIterator it( *list ); - QFileInfo *fi; + TQFileInfo *fi; while ( (fi = it.current()) != 0 ) { if (fi->extension() == "devhelp") @@ -238,7 +238,7 @@ void DocDevHelpPlugin::scanDevHelpDir(const QString &path) } } -void DocDevHelpPlugin::pushToScanStack(QValueStack &stack, const QString &value) +void DocDevHelpPlugin::pushToScanStack(TQValueStack &stack, const TQString &value) { if ( (!value.isEmpty()) && (!stack.contains(value)) ) { @@ -253,16 +253,16 @@ void DocDevHelpPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it if (!dhItem) return; - QFileInfo fi(dhItem->devHelpFile()); + TQFileInfo fi(dhItem->devHelpFile()); - QFile f(dhItem->devHelpFile()); + TQFile f(dhItem->devHelpFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << dhItem->devHelpFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f)) { kdDebug() << "Not a valid devhelp file: " << dhItem->devHelpFile() << endl; @@ -270,17 +270,17 @@ void DocDevHelpPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it } f.close(); - QString baseUrl = KURL(dhItem->devHelpFile()).directory(); + TQString baseUrl = KURL(dhItem->devHelpFile()).directory(); - QDomElement docEl = doc.documentElement(); - QDomElement chaptersEl = docEl.namedItem("functions").toElement(); - QDomElement childEl = chaptersEl.firstChild().toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement chaptersEl = docEl.namedItem("functions").toElement(); + TQDomElement childEl = chaptersEl.firstChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "function") { - QString name = childEl.attribute("name"); - QString url = childEl.attribute("link"); + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("link"); IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); ii->addURL(KURL(baseUrl+"/"+url)); @@ -295,16 +295,16 @@ void DocDevHelpPlugin::createTOC(DocumentationCatalogItem* item) if (!dhItem) return; - QFileInfo fi(dhItem->devHelpFile()); + TQFileInfo fi(dhItem->devHelpFile()); - QFile f(dhItem->devHelpFile()); + TQFile f(dhItem->devHelpFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << dhItem->devHelpFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f)) { kdDebug() << "Not a valid devhelp file: " << dhItem->devHelpFile() << endl; @@ -312,23 +312,23 @@ void DocDevHelpPlugin::createTOC(DocumentationCatalogItem* item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement chaptersEl = docEl.namedItem("chapters").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement chaptersEl = docEl.namedItem("chapters").toElement(); - QDomElement childEl = chaptersEl.lastChild().toElement(); - QString baseUrl = KURL(dhItem->devHelpFile()).directory(); + TQDomElement childEl = chaptersEl.lastChild().toElement(); + TQString baseUrl = KURL(dhItem->devHelpFile()).directory(); addTocSect(dhItem, childEl, baseUrl, true); } -void DocDevHelpPlugin::addTocSect(DocumentationItem *parent, QDomElement childEl, - QString baseUrl, bool book) +void DocDevHelpPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, + TQString baseUrl, bool book) { while (!childEl.isNull()) { if ( (childEl.tagName() == "sub") || (childEl.tagName() == "chapter")) { - QString name = childEl.attribute("name"); - QString url = childEl.attribute("link"); + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("link"); if (name.isEmpty() && url.contains("ix")) name = "Index"; @@ -337,7 +337,7 @@ void DocDevHelpPlugin::addTocSect(DocumentationItem *parent, QDomElement childEl book ? DocumentationItem::Book : DocumentationItem::Document, parent, name); item->setURL(KURL(baseUrl+"/"+url)); - QDomElement grandchildEl = childEl.lastChild().toElement(); + TQDomElement grandchildEl = childEl.lastChild().toElement(); addTocSect(item, grandchildEl, baseUrl); } childEl = childEl.previousSibling().toElement(); @@ -350,15 +350,15 @@ void DocDevHelpPlugin::setCatalogURL(DocumentationCatalogItem* item) if (!dhItem) return; - QFileInfo fi(dhItem->devHelpFile()); + TQFileInfo fi(dhItem->devHelpFile()); - QFile f(dhItem->devHelpFile()); + TQFile f(dhItem->devHelpFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << dhItem->devHelpFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f)) { kdDebug(9002) << "Not a valid Devhelp file: " << dhItem->devHelpFile() << endl; @@ -366,12 +366,12 @@ void DocDevHelpPlugin::setCatalogURL(DocumentationCatalogItem* item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement titleEl = docEl.namedItem("book").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement titleEl = docEl.namedItem("book").toElement(); if (item->url().isEmpty()) { - KURL url(fi.dirPath(true) + "/" + docEl.attribute("link", QString::null)); + KURL url(fi.dirPath(true) + "/" + docEl.attribute("link", TQString::null)); item->setURL(url); } } diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.h b/parts/documentation/plugins/devhelp/docdevhelpplugin.h index 3d73cb63..9e4df5c2 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.h +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.h @@ -20,8 +20,8 @@ #ifndef DOCDEVHELPPLUGIN_H #define DOCDEVHELPPLUGIN_H -#include -#include +#include +#include #include @@ -29,32 +29,32 @@ class DocDevHelpPlugin: public DocumentationPlugin { Q_OBJECT public: - DocDevHelpPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocDevHelpPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocDevHelpPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual QString catalogTitle(const QString& url); + virtual TQString catalogTitle(const TQString& url); virtual void setCatalogURL(DocumentationCatalogItem* item); virtual void createTOC(DocumentationCatalogItem* item); - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); virtual void autoSetupPlugin(); - virtual QPair catalogLocatorProps(); + virtual QPair catalogLocatorProps(); virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType type); protected: - void pushToScanStack(QValueStack &stack, const QString &value); - void scanDevHelpDir(const QString &path); - void addTocSect(DocumentationItem *parent, QDomElement childEl, QString baseUrl, bool book=false); + void pushToScanStack(TQValueStack &stack, const TQString &value); + void scanDevHelpDir(const TQString &path); + void addTocSect(DocumentationItem *parent, TQDomElement childEl, TQString baseUrl, bool book=false); }; #endif diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.cpp b/parts/documentation/plugins/djvu/docdjvuplugin.cpp index 2dcaae62..f9761155 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.cpp +++ b/parts/documentation/plugins/djvu/docdjvuplugin.cpp @@ -31,7 +31,7 @@ static const KAboutData data("docdjvuplugin", I18N_NOOP("Djvu documentation plug typedef KDevGenericFactory DocDjvuPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdjvuplugin, DocDjvuPluginFactory(&data) ) -DocDjvuPlugin::DocDjvuPlugin(QObject* parent, const char* name, const QStringList args) +DocDjvuPlugin::DocDjvuPlugin(TQObject* parent, const char* name, const TQStringList args) :DocumentationPlugin(DocDjvuPluginFactory::instance()->config(), parent, name) { setCapabilities(CustomDocumentationTitles | ProjectUserManual); @@ -47,31 +47,31 @@ bool DocDjvuPlugin::needRefreshIndex(DocumentationCatalogItem* item) return false; } -QString DocDjvuPlugin::pluginName() const +TQString DocDjvuPlugin::pluginName() const { return i18n("Djvu Documentation Collection"); } -DocumentationCatalogItem* DocDjvuPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocDjvuPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title); item->setURL(KURL(url)); return item; } -QPair DocDjvuPlugin::catalogLocatorProps() +QPair DocDjvuPlugin::catalogLocatorProps() { - return QPair(KFile::File, "all/allfiles"); + return QPair(KFile::File, "all/allfiles"); } -QString DocDjvuPlugin::catalogTitle(const QString& /*url*/) +TQString DocDjvuPlugin::catalogTitle(const TQString& /*url*/) { - return QString::null; + return TQString::null; } -QStringList DocDjvuPlugin::fullTextSearchLocations() +TQStringList DocDjvuPlugin::fullTextSearchLocations() { - return QStringList(); + return TQStringList(); } diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.h b/parts/documentation/plugins/djvu/docdjvuplugin.h index e9fdb30a..05689bd8 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.h +++ b/parts/documentation/plugins/djvu/docdjvuplugin.h @@ -24,12 +24,12 @@ class DocDjvuPlugin : public DocumentationPlugin { public: - DocDjvuPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocDjvuPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocDjvuPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); @@ -37,10 +37,10 @@ public: virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString& url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString& url); virtual void autoSetupPlugin(); diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp index 3fa7d5cb..a92eb60f 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp @@ -21,12 +21,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -43,20 +43,20 @@ class DoxyDocumentationCatalogItem: public DocumentationCatalogItem { public: - DoxyDocumentationCatalogItem(const QString &origUrl, DocumentationPlugin* plugin, - KListView *parent, const QString &name) + DoxyDocumentationCatalogItem(const TQString &origUrl, DocumentationPlugin* plugin, + KListView *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_origUrl(origUrl) { } - DoxyDocumentationCatalogItem(const QString &origUrl, DocumentationPlugin* plugin, - DocumentationItem *parent, const QString &name) + DoxyDocumentationCatalogItem(const TQString &origUrl, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_origUrl(origUrl) { } - QString origUrl() const { return m_origUrl; } + TQString origUrl() const { return m_origUrl; } private: - QString m_origUrl; + TQString m_origUrl; }; @@ -64,7 +64,7 @@ static const KDevPluginInfo data("docdoxygenplugin"); typedef KDevGenericFactory DocDoxygenPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdoxygenplugin, DocDoxygenPluginFactory(data) ) -DocDoxygenPlugin::DocDoxygenPlugin(QObject* parent, const char* name, const QStringList) +DocDoxygenPlugin::DocDoxygenPlugin(TQObject* parent, const char* name, const TQStringList) :DocumentationPlugin(DocDoxygenPluginFactory::instance()->config(), parent, name) { setCapabilities(Index | FullTextSearch | ProjectDocumentation | CustomDocumentationTitles ); @@ -75,71 +75,71 @@ DocDoxygenPlugin::~DocDoxygenPlugin() { } -QPair DocDoxygenPlugin::catalogLocatorProps() +QPair DocDoxygenPlugin::catalogLocatorProps() { - return QPair(KFile::File, "index.html *.tag"); + return QPair(KFile::File, "index.html *.tag"); } -QString DocDoxygenPlugin::catalogTitle(const QString& url) +TQString DocDoxygenPlugin::catalogTitle(const TQString& url) { - QFileInfo fi(url); + TQFileInfo fi(url); if (!fi.exists()) - return QString::null; + return TQString::null; if (fi.extension(false) == "html") { - QFile f(url); + TQFile f(url); if (!f.open(IO_ReadOnly)) - return QString::null; + return TQString::null; - QTextStream ts(&f); - QString contents = ts.read(); - QRegExp re(".*(.*).*"); + TQTextStream ts(&f); + TQString contents = ts.read(); + TQRegExp re(".*(.*).*"); re.setCaseSensitive(false); re.search(contents); return re.cap(1); } else if (fi.extension(false) == "tag") { - QFile *f = 0; - QFile f1(fi.dirPath(true) + "/html/index.html"); + TQFile *f = 0; + TQFile f1(fi.dirPath(true) + "/html/index.html"); if (f1.open(IO_ReadOnly)) f = &f1; - QFile f2(fi.dirPath(true) + "/index.html"); + TQFile f2(fi.dirPath(true) + "/index.html"); if (f2.open(IO_ReadOnly)) f = &f2; if (f != 0) { - QTextStream ts(f); - QString contents = ts.read(); - QRegExp re(".*(.*).*"); + TQTextStream ts(f); + TQString contents = ts.read(); + TQRegExp re(".*(.*).*"); re.setCaseSensitive(false); re.search(contents); return re.cap(1); } } - return QString::null; + return TQString::null; } -QString DocDoxygenPlugin::pluginName() const +TQString DocDoxygenPlugin::pluginName() const { return i18n("Doxygen Documentation Collection"); } -QStringList DocDoxygenPlugin::fullTextSearchLocations() +TQStringList DocDoxygenPlugin::fullTextSearchLocations() { - QStringList locs; + TQStringList locs; - QMap entryMap = config->entryMap("Locations"); + TQMap entryMap = config->entryMap("Locations"); - for (QMap::const_iterator it = entryMap.begin(); + for (TQMap::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { config->setGroup("Search Settings"); if (config->readBoolEntry(it.key(), false)) { config->setGroup("Locations"); - QFileInfo fi(config->readPathEntry(it.key())); + TQFileInfo fi(config->readPathEntry(it.key())); locs << fi.dirPath(true); } } @@ -151,13 +151,13 @@ void DocDoxygenPlugin::setCatalogURL(DocumentationCatalogItem* item) { if (item->url().url().endsWith("tag")) { - QFileInfo fi(item->url().directory(false) + "html/index.html"); + TQFileInfo fi(item->url().directory(false) + "html/index.html"); if (fi.exists()) { item->setURL(KURL::fromPathOrURL(fi.absFilePath())); return; } - QFileInfo fi2(item->url().directory(false) + "index.html"); + TQFileInfo fi2(item->url().directory(false) + "index.html"); if (fi2.exists()) { item->setURL(KURL::fromPathOrURL(fi2.absFilePath())); @@ -173,9 +173,9 @@ bool DocDoxygenPlugin::needRefreshIndex(DocumentationCatalogItem* item) if (!doxyItem) return false; - QFileInfo fi(doxyItem->origUrl()); + TQFileInfo fi(doxyItem->origUrl()); config->setGroup("Index"); - if (fi.lastModified() > config->readDateTimeEntry(item->text(0), new QDateTime())) + if (fi.lastModified() > config->readDateTimeEntry(item->text(0), new TQDateTime())) { kdDebug() << "need rebuild index for " << item->text(0) << endl; config->writeEntry(item->text(0), fi.lastModified()); @@ -192,19 +192,19 @@ void DocDoxygenPlugin::autoSetupPlugin() } -void DocDoxygenPlugin::autoSetupDocs(const QString &defaultDir, const QString &searchDir, - const QString &name) +void DocDoxygenPlugin::autoSetupDocs(const TQString &defaultDir, const TQString &searchDir, + const TQString &name) { - QString doxyDocDir(defaultDir); + TQString doxyDocDir(defaultDir); doxyDocDir = URLUtil::envExpand(doxyDocDir); if (doxyDocDir.isEmpty()) { - QStringList apiDirs = DocDoxygenPluginFactory::instance()->dirs()->findDirs("html", searchDir); - for (QStringList::const_iterator it = apiDirs.begin(); it != apiDirs.end(); ++it ) + TQStringList apiDirs = DocDoxygenPluginFactory::instance()->dirs()->findDirs("html", searchDir); + for (TQStringList::const_iterator it = apiDirs.begin(); it != apiDirs.end(); ++it ) { doxyDocDir = *it; - QString indexFile = doxyDocDir + "index.html"; - if (QFile::exists(indexFile)) + TQString indexFile = doxyDocDir + "index.html"; + if (TQFile::exists(indexFile)) { doxyDocDir = doxyDocDir + "/" + searchDir; break; @@ -219,13 +219,13 @@ void DocDoxygenPlugin::autoSetupDocs(const QString &defaultDir, const QString &s config->setGroup("Index Settings"); config->writeEntry(name, true); config->setGroup("Locations"); - config->writePathEntry(name, doxyDocDir + QString("/index.html")); + config->writePathEntry(name, doxyDocDir + TQString("/index.html")); } } void DocDoxygenPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) { - QFileInfo fi(item->url().path()); + TQFileInfo fi(item->url().path()); if (!fi.exists()) return; @@ -236,11 +236,11 @@ void DocDoxygenPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it //doxygen documentation mode (if catalog points to a .tag) if (doxyItem->origUrl().endsWith("tag")) { - QString htmlUrl; - QFileInfo fi2(item->url().directory(false) + "index.html"); + TQString htmlUrl; + TQFileInfo fi2(item->url().directory(false) + "index.html"); if (fi2.exists()) htmlUrl = fi2.dirPath(true) + "/"; - QFileInfo fi(item->url().directory(false) + "html/index.html"); + TQFileInfo fi(item->url().directory(false) + "html/index.html"); if (fi.exists()) htmlUrl = fi.dirPath(true) + "/"; @@ -248,8 +248,8 @@ void DocDoxygenPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it } //KDE doxygen documentation mode (if catalog points to a index.html) - QDir d; - QValueStack dirStack; + TQDir d; + TQValueStack dirStack; dirStack.push(fi.dirPath(true)); do { d.setPath(dirStack.pop()); @@ -258,24 +258,24 @@ void DocDoxygenPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it const QFileInfoList *dirEntries = d.entryInfoList(); if (!dirEntries) continue; - QPtrListIterator it(*dirEntries); + TQPtrListIterator it(*dirEntries); for (; it.current(); ++it) { - QString fileName = it.current()->fileName(); + TQString fileName = it.current()->fileName(); if (fileName == "." || fileName == ".." || fileName == "common" || fileName == "html") continue; if (it.current()->isDir()) dirStack.push(it.current()->absFilePath()); } - if (QFile::exists(d.absPath() + "/html/index.html")) + if (TQFile::exists(d.absPath() + "/html/index.html")) createBookIndex(d.absPath() + "/" + d.dirName() + ".tag", index, item); } while (!dirStack.isEmpty()); } void DocDoxygenPlugin::createTOC(DocumentationCatalogItem* item) { - QFileInfo fi(item->url().path()); + TQFileInfo fi(item->url().path()); if (!fi.exists()) return; @@ -286,11 +286,11 @@ void DocDoxygenPlugin::createTOC(DocumentationCatalogItem* item) //doxygen documentation mode (if catalog points to a .tag) if (doxyItem->origUrl().endsWith("tag")) { - QString htmlUrl; - QFileInfo fi2(item->url().directory(false) + "index.html"); + TQString htmlUrl; + TQFileInfo fi2(item->url().directory(false) + "index.html"); if (fi2.exists()) htmlUrl = fi2.dirPath(true) + "/"; - QFileInfo fi(item->url().directory(false) + "html/index.html"); + TQFileInfo fi(item->url().directory(false) + "html/index.html"); if (fi.exists()) htmlUrl = fi.dirPath(true) + "/"; if (!htmlUrl.isEmpty()) @@ -298,8 +298,8 @@ void DocDoxygenPlugin::createTOC(DocumentationCatalogItem* item) } //KDE doxygen documentation mode (if catalog points to a index.html) - QDir d; - QValueStack dirStack; + TQDir d; + TQValueStack dirStack; dirStack.push(fi.dirPath(true)); do { d.setPath(dirStack.pop()); @@ -308,17 +308,17 @@ void DocDoxygenPlugin::createTOC(DocumentationCatalogItem* item) const QFileInfoList *dirEntries = d.entryInfoList(); if (!dirEntries) continue; - QPtrListIterator it(*dirEntries); + TQPtrListIterator it(*dirEntries); for (; it.current(); ++it) { - QString fileName = it.current()->fileName(); + TQString fileName = it.current()->fileName(); if (fileName == "." || fileName == ".." || fileName == "common" || fileName == "html") continue; if (it.current()->isDir()) dirStack.push(it.current()->absFilePath()); } - if (QFile::exists(d.absPath() + "/html/index.html")) + if (TQFile::exists(d.absPath() + "/html/index.html")) { DocumentationItem *docItem = new DocumentationItem(DocumentationItem::Book, item, d.dirName()); docItem->setURL(KURL(d.absPath() + "/html/index.html")); @@ -328,7 +328,7 @@ void DocDoxygenPlugin::createTOC(DocumentationCatalogItem* item) } while (!dirStack.isEmpty()); } -DocumentationCatalogItem *DocDoxygenPlugin::createCatalog(KListView *contents, const QString &title, const QString &url) +DocumentationCatalogItem *DocDoxygenPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url) { kdDebug() << "DocDoxygenPlugin::createCatalog: url=" << url << endl; DocumentationCatalogItem *item = new DoxyDocumentationCatalogItem(url, this, contents, title); @@ -336,41 +336,41 @@ DocumentationCatalogItem *DocDoxygenPlugin::createCatalog(KListView *contents, c return item; } -void DocDoxygenPlugin::createBookTOC(DocumentationItem *item, const QString &tagUrl, const QString &baseHtmlUrl) +void DocDoxygenPlugin::createBookTOC(DocumentationItem *item, const TQString &tagUrl, const TQString &baseHtmlUrl) { - QString tagName; + TQString tagName; if (tagUrl.isEmpty()) tagName = item->url().upURL().directory(false) + item->text(0) + ".tag"; else tagName = tagUrl; - QString baseUrl; + TQString baseUrl; if (baseHtmlUrl.isEmpty()) baseUrl = item->url().directory(false); else baseUrl = baseHtmlUrl; //@todo list html files in the directory if tag was not found - if (!QFile::exists(tagName)) + if (!TQFile::exists(tagName)) return; - QStringList tagFileList; + TQStringList tagFileList; if (tagName.endsWith(".tag")) - tagFileList = tagFiles(QFileInfo(tagName).dirPath() + "/"); + tagFileList = tagFiles(TQFileInfo(tagName).dirPath() + "/"); else tagFileList += tagName; - QStringList::ConstIterator end = tagFileList.constEnd(); - for (QStringList::ConstIterator it = tagFileList.constBegin(); it != end; ++it) + TQStringList::ConstIterator end = tagFileList.constEnd(); + for (TQStringList::ConstIterator it = tagFileList.constBegin(); it != end; ++it) { - QFile f(*it); + TQFile f(*it); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not open tag file: " << f.name() << endl; return; } - QDomDocument dom; + TQDomDocument dom; if (!dom.setContent(&f) || dom.documentElement().nodeName() != "tagfile") { kdDebug(9002) << "No valid tag file" << endl; @@ -378,17 +378,17 @@ void DocDoxygenPlugin::createBookTOC(DocumentationItem *item, const QString &tag } f.close(); - QDomElement docEl = dom.documentElement(); + TQDomElement docEl = dom.documentElement(); - QDomElement childEl = docEl.lastChild().toElement(); + TQDomElement childEl = docEl.lastChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "compound" && childEl.attribute("kind") == "class") { - QString classname = childEl.namedItem("name").firstChild().toText().data(); - QString filename = childEl.namedItem("filename").firstChild().toText().data(); + TQString classname = childEl.namedItem("name").firstChild().toText().data(); + TQString filename = childEl.namedItem("filename").firstChild().toText().data(); - if (QFile::exists(baseUrl + filename)) + if (TQFile::exists(baseUrl + filename)) { DocumentationItem *docItem = new DocumentationItem(DocumentationItem::Document, item, classname); @@ -400,27 +400,27 @@ void DocDoxygenPlugin::createBookTOC(DocumentationItem *item, const QString &tag } } -void DocDoxygenPlugin::createBookIndex(const QString &tagfile, IndexBox* index, DocumentationCatalogItem* item, const QString &baseHtmlUrl) +void DocDoxygenPlugin::createBookIndex(const TQString &tagfile, IndexBox* index, DocumentationCatalogItem* item, const TQString &baseHtmlUrl) { - QString tagName = tagfile; + TQString tagName = tagfile; kdDebug() << tagfile << endl; - if (!QFile::exists(tagName)) + if (!TQFile::exists(tagName)) return; - QString prefix = baseHtmlUrl.isEmpty() ? KURL(tagfile).directory(false) + "html/" : baseHtmlUrl; + TQString prefix = baseHtmlUrl.isEmpty() ? KURL(tagfile).directory(false) + "html/" : baseHtmlUrl; - QStringList tagFileList = tagFiles(QFileInfo(tagName).dirPath() + "/"); + TQStringList tagFileList = tagFiles(TQFileInfo(tagName).dirPath() + "/"); - QStringList::ConstIterator end = tagFileList.constEnd(); - for (QStringList::ConstIterator it = tagFileList.constBegin(); it != end; ++it) + TQStringList::ConstIterator end = tagFileList.constEnd(); + for (TQStringList::ConstIterator it = tagFileList.constBegin(); it != end; ++it) { - QFile f(*it); + TQFile f(*it); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not open tag file: " << f.name() << endl; return; } - QDomDocument dom; + TQDomDocument dom; if (!dom.setContent(&f) || dom.documentElement().nodeName() != "tagfile") { kdDebug(9002) << "No valid tag file" << endl; @@ -428,17 +428,17 @@ void DocDoxygenPlugin::createBookIndex(const QString &tagfile, IndexBox* index, } f.close(); - QDomElement docEl = dom.documentElement(); + TQDomElement docEl = dom.documentElement(); createIndexFromTag(dom, index, item, docEl, prefix); } } -void DocDoxygenPlugin::createIndexFromTag(QDomDocument &dom, IndexBox *index, - DocumentationCatalogItem *item, QDomElement &parentEl, const QString &prefix) +void DocDoxygenPlugin::createIndexFromTag(TQDomDocument &dom, IndexBox *index, + DocumentationCatalogItem *item, TQDomElement &parentEl, const TQString &prefix) { - QDomElement docEl = parentEl; + TQDomElement docEl = parentEl; - QDomElement childEl = docEl.firstChild().toElement(); + TQDomElement childEl = docEl.firstChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "compound" && @@ -446,8 +446,8 @@ void DocDoxygenPlugin::createIndexFromTag(QDomDocument &dom, IndexBox *index, || (childEl.attribute("kind") == "struct") || (childEl.attribute("kind") == "namespace") )) { - QString classname = childEl.namedItem("name").firstChild().toText().data(); - QString filename = childEl.namedItem("filename").firstChild().toText().data(); + TQString classname = childEl.namedItem("name").firstChild().toText().data(); + TQString filename = childEl.namedItem("filename").firstChild().toText().data(); IndexItemProto *indexItem = new IndexItemProto(this, item, index, classname, i18n("%1 Class Reference").arg(classname)); @@ -460,10 +460,10 @@ void DocDoxygenPlugin::createIndexFromTag(QDomDocument &dom, IndexBox *index, || (childEl.attribute("kind") == "slot") || (childEl.attribute("kind") == "signal") )) { - QString classname = parentEl.namedItem("name").firstChild().toText().data(); - QString membername = childEl.namedItem("name").firstChild().toText().data(); - QString anchor = childEl.namedItem("anchor").firstChild().toText().data(); - QString arglist = childEl.namedItem("arglist").firstChild().toText().data(); + TQString classname = parentEl.namedItem("name").firstChild().toText().data(); + TQString membername = childEl.namedItem("name").firstChild().toText().data(); + TQString anchor = childEl.namedItem("anchor").firstChild().toText().data(); + TQString arglist = childEl.namedItem("arglist").firstChild().toText().data(); if (classname != membername) { @@ -482,44 +482,44 @@ ProjectDocumentationPlugin *DocDoxygenPlugin::projectDocumentationPlugin(Project return DocumentationPlugin::projectDocumentationPlugin(type); } -QStringList DocDoxygenPlugin::tagFiles(const QString& path, int level) +TQStringList DocDoxygenPlugin::tagFiles(const TQString& path, int level) { - QStringList r; - QDir dir(path); + TQStringList r; + TQDir dir(path); if (level > 10) return r; if (!dir.isReadable()) return r; if (!dir.exists()) return r; - QStringList dirList; - QStringList fileList; - QStringList::Iterator it; + TQStringList dirList; + TQStringList fileList; + TQStringList::Iterator it; - dir.setFilter ( QDir::Dirs); + dir.setFilter ( TQDir::Dirs); dirList = dir.entryList(); dirList.remove("."); dirList.remove(".."); - dir.setFilter(QDir::Files | QDir::Hidden | QDir::System); + dir.setFilter(TQDir::Files | TQDir::Hidden | TQDir::System); fileList = dir.entryList(); - QStringList::Iterator end = dirList.end(); + TQStringList::Iterator end = dirList.end(); for ( it = dirList.begin(); it != end; ++it ) { - QString name = *it; - if (QFileInfo( dir, *it ).isSymLink()) + TQString name = *it; + if (TQFileInfo( dir, *it ).isSymLink()) continue; r += tagFiles(path + name + "/", level + 1 ); } - QStringList::Iterator fend = fileList.end(); + TQStringList::Iterator fend = fileList.end(); for ( it = fileList.begin(); it != fend; ++it ) { - QString name = *it; - QFileInfo fi( dir, *it ); + TQString name = *it; + TQFileInfo fi( dir, *it ); if (fi.isSymLink() || !fi.isFile()) continue; - if (QDir::match(QString("*.tag"), name)) + if (TQDir::match(TQString("*.tag"), name)) r += (path+name); } diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.h b/parts/documentation/plugins/doxygen/docdoxygenplugin.h index 75d36787..a272b8df 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.h +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.h @@ -29,12 +29,12 @@ class DocDoxygenPlugin: public DocumentationPlugin { Q_OBJECT public: - DocDoxygenPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocDoxygenPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocDoxygenPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem *createCatalog(KListView *contents, const QString &title, const QString &url); + virtual DocumentationCatalogItem *createCatalog(KListView *contents, const TQString &title, const TQString &url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); @@ -42,25 +42,25 @@ public: virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString& url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString& url); virtual void autoSetupPlugin(); virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType type); protected: - void createBookTOC(DocumentationItem* item, const QString &tagUrl = QString::null, - const QString &baseHtmlUrl = QString::null); - void createBookIndex(const QString &tagfile, IndexBox* index, DocumentationCatalogItem* item, const QString &baseHtmlUrl = QString::null); + void createBookTOC(DocumentationItem* item, const TQString &tagUrl = TQString::null, + const TQString &baseHtmlUrl = TQString::null); + void createBookIndex(const TQString &tagfile, IndexBox* index, DocumentationCatalogItem* item, const TQString &baseHtmlUrl = TQString::null); - void createIndexFromTag(QDomDocument &dom, IndexBox* index, DocumentationCatalogItem* item, - QDomElement &parentEl, const QString &prefix); + void createIndexFromTag(TQDomDocument &dom, IndexBox* index, DocumentationCatalogItem* item, + TQDomElement &parentEl, const TQString &prefix); - void autoSetupDocs(const QString &defaultDir, const QString &searchDir, - const QString &name); + void autoSetupDocs(const TQString &defaultDir, const TQString &searchDir, + const TQString &name); /** * Returns all the tag files from a directory and its subdirectories. @@ -68,7 +68,7 @@ protected: * @param level the depth of the current search * @return a list with the absolute path to the ".tag" files in startDir */ - QStringList tagFiles(const QString &startDir, int level = 0); + TQStringList tagFiles(const TQString &startDir, int level = 0); }; diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp index a4480cbf..6dd73707 100644 --- a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp @@ -21,10 +21,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -42,20 +42,20 @@ class TOCDocumentationCatalogItem: public DocumentationCatalogItem { public: - TOCDocumentationCatalogItem(const QString &tocFile, DocumentationPlugin* plugin, - KListView *parent, const QString &name) + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + KListView *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) { } - TOCDocumentationCatalogItem(const QString &tocFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const QString &name) + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) { } - QString tocFile() const { return m_tocFile; } + TQString tocFile() const { return m_tocFile; } private: - QString m_tocFile; + TQString m_tocFile; }; @@ -63,8 +63,8 @@ static const KDevPluginInfo data("dockdevtocplugin"); typedef KDevGenericFactory DocKDevTOCPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdockdevtocplugin, DocKDevTOCPluginFactory(data) ) -DocKDevTOCPlugin::DocKDevTOCPlugin(QObject* parent, const char* name, - const QStringList /*args*/) +DocKDevTOCPlugin::DocKDevTOCPlugin(TQObject* parent, const char* name, + const TQStringList /*args*/) :DocumentationPlugin(DocKDevTOCPluginFactory::instance()->config(), parent, name) { setCapabilities(Index); @@ -75,45 +75,45 @@ DocKDevTOCPlugin::~DocKDevTOCPlugin() { } -QString DocKDevTOCPlugin::pluginName() const +TQString DocKDevTOCPlugin::pluginName() const { return i18n("KDevelopTOC Documentation Collection"); } -DocumentationCatalogItem* DocKDevTOCPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocKDevTOCPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { return new TOCDocumentationCatalogItem(url, this, contents, title); } -QPair DocKDevTOCPlugin::catalogLocatorProps() +QPair DocKDevTOCPlugin::catalogLocatorProps() { - return QPair(KFile::File, "*.toc"); + return QPair(KFile::File, "*.toc"); } -QString DocKDevTOCPlugin::catalogTitle(const QString& url) +TQString DocKDevTOCPlugin::catalogTitle(const TQString& url) { - QFileInfo fi(url); + TQFileInfo fi(url); if (!fi.exists()) - return QString::null; + return TQString::null; - QFile f(url); + TQFile f(url); if (!f.open(IO_ReadOnly)) - return QString::null; + return TQString::null; - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || (doc.doctype().name() != "kdeveloptoc")) - return QString::null; + return TQString::null; f.close(); - QDomElement titleEl = doc.documentElement().namedItem("title").toElement(); + TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); return titleEl.firstChild().toText().data(); } -QStringList DocKDevTOCPlugin::fullTextSearchLocations() +TQStringList DocKDevTOCPlugin::fullTextSearchLocations() { - return QStringList(); + return TQStringList(); } bool DocKDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) @@ -123,9 +123,9 @@ bool DocKDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) void DocKDevTOCPlugin::autoSetupPlugin() { - QStringList tocsDir = DocKDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "kdevdocumentation/tocs/*.toc"); + TQStringList tocsDir = DocKDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "kdevdocumentation/tocs/*.toc"); - for (QStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) + for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) { config->setGroup("Locations"); config->writePathEntry(catalogTitle(*it), *it); @@ -138,15 +138,15 @@ void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it if (!tocItem) return; - QFileInfo fi(tocItem->tocFile()); + TQFileInfo fi(tocItem->tocFile()); - QFile f(tocItem->tocFile()); + TQFile f(tocItem->tocFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "kdeveloptoc") { kdDebug(9002) << "Not a valid kdeveloptoc file: " << tocItem->tocFile() << endl; @@ -154,21 +154,21 @@ void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* it } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement baseEl = docEl.namedItem("base").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); - QString base; + TQString base; if (!baseEl.isNull()) - base = baseEl.attribute("href", QString::null); + base = baseEl.attribute("href", TQString::null); - QDomElement indexEl = docEl.namedItem("index").toElement(); - QDomElement childEl = indexEl.firstChild().toElement(); + TQDomElement indexEl = docEl.namedItem("index").toElement(); + TQDomElement childEl = indexEl.firstChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "entry") { - QString name = childEl.attribute("name"); - QString url = childEl.attribute("url"); + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); ii->addURL(KURL(constructURL(base, url))); @@ -183,15 +183,15 @@ void DocKDevTOCPlugin::createTOC(DocumentationCatalogItem* item) if (!tocItem) return; - QFileInfo fi(tocItem->tocFile()); + TQFileInfo fi(tocItem->tocFile()); - QFile f(tocItem->tocFile()); + TQFile f(tocItem->tocFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "kdeveloptoc") { kdDebug(9002) << "Not a valid kdeveloptoc file: " << tocItem->tocFile() << endl; @@ -199,30 +199,30 @@ void DocKDevTOCPlugin::createTOC(DocumentationCatalogItem* item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement baseEl = docEl.namedItem("base").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); - QString base; + TQString base; if (!baseEl.isNull()) - base = baseEl.attribute("href", QString::null); + base = baseEl.attribute("href", TQString::null); - QDomElement childEl = docEl.lastChild().toElement(); + TQDomElement childEl = docEl.lastChild().toElement(); addTocSect(tocItem, childEl, base, 1); } -void DocKDevTOCPlugin::addTocSect(DocumentationItem *parent, QDomElement childEl, const QString &base, uint level) +void DocKDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) { while (!childEl.isNull()) { - if (childEl.tagName() == QString("tocsect%1").arg(level)) + if (childEl.tagName() == TQString("tocsect%1").arg(level)) { - QString name = childEl.attribute("name"); - QString url = childEl.attribute("url"); + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); item->setURL(KURL(constructURL(base, url))); - QDomElement grandchildEl = childEl.lastChild().toElement(); + TQDomElement grandchildEl = childEl.lastChild().toElement(); addTocSect(item, grandchildEl, base, level+1); } childEl = childEl.previousSibling().toElement(); @@ -235,15 +235,15 @@ void DocKDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) if (!tocItem) return; - QFileInfo fi(tocItem->tocFile()); + TQFileInfo fi(tocItem->tocFile()); - QFile f(tocItem->tocFile()); + TQFile f(tocItem->tocFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "kdeveloptoc") { kdDebug(9002) << "Not a valid kdeveloptoc file: " << tocItem->tocFile() << endl; @@ -251,20 +251,20 @@ void DocKDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement baseEl = docEl.namedItem("base").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); if (item->url().isEmpty()) { if (baseEl.isNull()) item->setURL(KURL()); else - item->setURL(KURL(constructURL(baseEl.attribute("href", QString::null), - baseEl.attribute("url", QString::null)))); + item->setURL(KURL(constructURL(baseEl.attribute("href", TQString::null), + baseEl.attribute("url", TQString::null)))); } } -QString DocKDevTOCPlugin::constructURL(const QString &base, const QString &url) +TQString DocKDevTOCPlugin::constructURL(const TQString &base, const TQString &url) { if (base.isEmpty() && !url.isEmpty()) return url; diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h index 68bfd0e2..626848b9 100644 --- a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h @@ -20,7 +20,7 @@ #ifndef DOCKDEVTOCPLUGIN_H #define DOCKDEVTOCPLUGIN_H -#include +#include #include @@ -28,27 +28,27 @@ class DocKDevTOCPlugin : public DocumentationPlugin { Q_OBJECT public: - DocKDevTOCPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocKDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocKDevTOCPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual QString catalogTitle(const QString& url); - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual TQString catalogTitle(const TQString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); + virtual QPair catalogLocatorProps(); virtual void autoSetupPlugin(); protected: - void addTocSect(DocumentationItem *parent, QDomElement childEl, const QString &base, uint level); - static QString constructURL(const QString &base, const QString &url) ; + void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level); + static TQString constructURL(const TQString &base, const TQString &url) ; }; #endif diff --git a/parts/documentation/plugins/pdb/docpdbplugin.cpp b/parts/documentation/plugins/pdb/docpdbplugin.cpp index 901eeffe..8fdc4643 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.cpp +++ b/parts/documentation/plugins/pdb/docpdbplugin.cpp @@ -31,7 +31,7 @@ static const KAboutData data("docpdbplugin", I18N_NOOP("PalmDoc documentation pl typedef KDevGenericFactory DocPDBPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdbplugin, DocPDBPluginFactory(&data) ) -DocPDBPlugin::DocPDBPlugin(QObject* parent, const char* name, const QStringList args) +DocPDBPlugin::DocPDBPlugin(TQObject* parent, const char* name, const TQStringList args) :DocumentationPlugin(DocPDBPluginFactory::instance()->config(), parent, name) { setCapabilities(CustomDocumentationTitles | ProjectUserManual); @@ -47,31 +47,31 @@ bool DocPDBPlugin::needRefreshIndex(DocumentationCatalogItem* item) return false; } -QString DocPDBPlugin::pluginName() const +TQString DocPDBPlugin::pluginName() const { return i18n("PalmDoc Documentation Collection"); } -DocumentationCatalogItem* DocPDBPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocPDBPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title); item->setURL(KURL(url)); return item; } -QPair DocPDBPlugin::catalogLocatorProps() +QPair DocPDBPlugin::catalogLocatorProps() { - return QPair(KFile::File, "all/allfiles"); + return QPair(KFile::File, "all/allfiles"); } -QString DocPDBPlugin::catalogTitle(const QString& /*url*/) +TQString DocPDBPlugin::catalogTitle(const TQString& /*url*/) { - return QString::null; + return TQString::null; } -QStringList DocPDBPlugin::fullTextSearchLocations() +TQStringList DocPDBPlugin::fullTextSearchLocations() { - return QStringList(); + return TQStringList(); } diff --git a/parts/documentation/plugins/pdb/docpdbplugin.h b/parts/documentation/plugins/pdb/docpdbplugin.h index f639e0cf..b9544a7b 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.h +++ b/parts/documentation/plugins/pdb/docpdbplugin.h @@ -24,12 +24,12 @@ class DocPDBPlugin : public DocumentationPlugin { public: - DocPDBPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocPDBPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocPDBPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); @@ -37,10 +37,10 @@ public: virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString& url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString& url); virtual void autoSetupPlugin(); diff --git a/parts/documentation/plugins/pdf/docpdfplugin.cpp b/parts/documentation/plugins/pdf/docpdfplugin.cpp index 5d8b7a78..79dab511 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.cpp +++ b/parts/documentation/plugins/pdf/docpdfplugin.cpp @@ -31,7 +31,7 @@ static const KAboutData data("docpdfplugin", I18N_NOOP("PDF documentation plugin typedef KDevGenericFactory DocPDFPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdfplugin, DocPDFPluginFactory(&data) ) -DocPDFPlugin::DocPDFPlugin(QObject* parent, const char* name, const QStringList args) +DocPDFPlugin::DocPDFPlugin(TQObject* parent, const char* name, const TQStringList args) :DocumentationPlugin(DocPDFPluginFactory::instance()->config(), parent, name) { setCapabilities(CustomDocumentationTitles | ProjectUserManual); @@ -47,31 +47,31 @@ bool DocPDFPlugin::needRefreshIndex(DocumentationCatalogItem* item) return false; } -QString DocPDFPlugin::pluginName() const +TQString DocPDFPlugin::pluginName() const { return i18n("PDF Documentation Collection"); } -DocumentationCatalogItem* DocPDFPlugin::createCatalog(KListView* contents, const QString& title, const QString& url) +DocumentationCatalogItem* DocPDFPlugin::createCatalog(KListView* contents, const TQString& title, const TQString& url) { DocumentationCatalogItem *item = new DocumentationCatalogItem(this, contents, title); item->setURL(KURL(url)); return item; } -QPair DocPDFPlugin::catalogLocatorProps() +QPair DocPDFPlugin::catalogLocatorProps() { - return QPair(KFile::File, "*.pdf"); + return QPair(KFile::File, "*.pdf"); } -QString DocPDFPlugin::catalogTitle(const QString& /*url*/) +TQString DocPDFPlugin::catalogTitle(const TQString& /*url*/) { - return QString::null; + return TQString::null; } -QStringList DocPDFPlugin::fullTextSearchLocations() +TQStringList DocPDFPlugin::fullTextSearchLocations() { - return QStringList(); + return TQStringList(); } diff --git a/parts/documentation/plugins/pdf/docpdfplugin.h b/parts/documentation/plugins/pdf/docpdfplugin.h index c78325d4..b7e8b26b 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.h +++ b/parts/documentation/plugins/pdf/docpdfplugin.h @@ -24,12 +24,12 @@ class DocPDFPlugin : public DocumentationPlugin { public: - DocPDFPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocPDFPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocPDFPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url); + virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url); virtual void createTOC(DocumentationCatalogItem* item); virtual void setCatalogURL(DocumentationCatalogItem* item); @@ -37,10 +37,10 @@ public: virtual bool needRefreshIndex(DocumentationCatalogItem* item); virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString& url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString& url); virtual void autoSetupPlugin(); diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp index 90237b7c..b4118f97 100644 --- a/parts/documentation/plugins/qt/docqtplugin.cpp +++ b/parts/documentation/plugins/qt/docqtplugin.cpp @@ -21,9 +21,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -40,27 +40,27 @@ class QtDocumentationCatalogItem: public DocumentationCatalogItem { public: - QtDocumentationCatalogItem(const QString &dcfFile, DocumentationPlugin* plugin, - KListView *parent, const QString &name) + QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, + KListView *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile) { } - QtDocumentationCatalogItem(const QString &dcfFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const QString &name) + QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile) { } - QString dcfFile() const { return m_dcfFile; } + TQString dcfFile() const { return m_dcfFile; } private: - QString m_dcfFile; + TQString m_dcfFile; }; static const KDevPluginInfo data("docqtplugin"); typedef KDevGenericFactory DocQtPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocQtPluginFactory(data) ) -DocQtPlugin::DocQtPlugin(QObject* parent, const char* name, const QStringList) +DocQtPlugin::DocQtPlugin(TQObject* parent, const char* name, const TQStringList) :DocumentationPlugin(DocQtPluginFactory::instance()->config(), parent, name) { setCapabilities(Index | FullTextSearch | CustomDocumentationTitles); @@ -77,15 +77,15 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) if (!qtItem) return; - QFileInfo fi(qtItem->dcfFile()); + TQFileInfo fi(qtItem->dcfFile()); - QFile f(qtItem->dcfFile()); + TQFile f(qtItem->dcfFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << qtItem->dcfFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "DCF") { kdDebug(9002) << "Not a valid DCF file: " << qtItem->dcfFile() << endl; @@ -93,28 +93,28 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement titleEl = docEl.namedItem("DCF").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement titleEl = docEl.namedItem("DCF").toElement(); - QDomElement childEl = docEl.lastChild().toElement(); + TQDomElement childEl = docEl.lastChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "section") { - QString ref = childEl.attribute("ref"); - QString title = childEl.attribute("title"); + TQString ref = childEl.attribute("ref"); + TQString title = childEl.attribute("title"); DocumentationItem *sectionItem = new DocumentationItem(DocumentationItem::Book, item, title); KURL sectionUrl(fi.dirPath(true) + "/" + ref); sectionItem->setURL(sectionUrl); - QDomElement grandChild = childEl.lastChild().toElement(); + TQDomElement grandChild = childEl.lastChild().toElement(); while(!grandChild.isNull()) { if (grandChild.tagName() == "keyword") { - QString keyRef = grandChild.attribute("ref"); - QString keyTitle = grandChild.text(); + TQString keyRef = grandChild.attribute("ref"); + TQString keyTitle = grandChild.text(); DocumentationItem *keyItem = new DocumentationItem(DocumentationItem::Document, sectionItem, keyTitle); KURL keyUrl(fi.dirPath(true) + "/" + keyRef); @@ -122,8 +122,8 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) } if (grandChild.tagName() == "section") { - QString keyRef = grandChild.attribute("ref"); - QString keyTitle = grandChild.attribute("title"); + TQString keyRef = grandChild.attribute("ref"); + TQString keyTitle = grandChild.attribute("title"); DocumentationItem *keyItem = new DocumentationItem(DocumentationItem::Book, sectionItem, keyTitle); KURL keyUrl(fi.dirPath(true) + "/" + keyRef); keyItem->setURL(keyUrl); @@ -137,7 +137,7 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) void DocQtPlugin::autoSetupPlugin() { - QString qtDocDir(QT_DOCDIR); + TQString qtDocDir(QT_DOCDIR); qtDocDir = URLUtil::envExpand(qtDocDir); if (qtDocDir.isEmpty()) { @@ -150,11 +150,11 @@ void DocQtPlugin::autoSetupPlugin() config->setGroup("Index Settings"); config->writeEntry("Qt Reference Documentation", true); config->setGroup("Locations"); - config->writePathEntry("Qt Reference Documentation", qtDocDir + QString("/qt.dcf")); - config->writePathEntry("Qt Assistant Manual", qtDocDir + QString("/assistant.dcf")); - config->writePathEntry("Qt Designer Manual", qtDocDir + QString("/designer.dcf")); - config->writePathEntry("Guide to the Qt Translation Tools", qtDocDir + QString("/linguist.dcf")); - config->writePathEntry("qmake User Guide", qtDocDir + QString("/qmake.dcf")); + config->writePathEntry("Qt Reference Documentation", qtDocDir + TQString("/qt.dcf")); + config->writePathEntry("Qt Assistant Manual", qtDocDir + TQString("/assistant.dcf")); + config->writePathEntry("Qt Designer Manual", qtDocDir + TQString("/designer.dcf")); + config->writePathEntry("Guide to the Qt Translation Tools", qtDocDir + TQString("/linguist.dcf")); + config->writePathEntry("qmake User Guide", qtDocDir + TQString("/qmake.dcf")); } } @@ -164,15 +164,15 @@ void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item) if (!qtItem) return; - QFileInfo fi(qtItem->dcfFile()); + TQFileInfo fi(qtItem->dcfFile()); - QFile f(qtItem->dcfFile()); + TQFile f(qtItem->dcfFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << qtItem->dcfFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "DCF") { kdDebug(9002) << "Not a valid DCF file: " << qtItem->dcfFile() << endl; @@ -180,17 +180,17 @@ void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement titleEl = docEl.namedItem("DCF").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement titleEl = docEl.namedItem("DCF").toElement(); if (item->url().isEmpty()) { - KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", QString::null)); + KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", TQString::null)); item->setURL(url); } } -QString DocQtPlugin::pluginName() const +TQString DocQtPlugin::pluginName() const { return i18n("Qt Documentation Collection"); } @@ -201,9 +201,9 @@ bool DocQtPlugin::needRefreshIndex(DocumentationCatalogItem *item) if (!qtItem) return false; - QFileInfo fi(qtItem->dcfFile()); + TQFileInfo fi(qtItem->dcfFile()); config->setGroup("Index"); - if (fi.lastModified() > config->readDateTimeEntry(qtItem->text(0), new QDateTime())) + if (fi.lastModified() > config->readDateTimeEntry(qtItem->text(0), new TQDateTime())) { kdDebug() << "need rebuild index for " << qtItem->text(0) << endl; config->writeEntry(item->text(0), fi.lastModified()); @@ -219,15 +219,15 @@ void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) if (!qtItem) return; - QFileInfo fi(qtItem->dcfFile()); + TQFileInfo fi(qtItem->dcfFile()); - QFile f(qtItem->dcfFile()); + TQFile f(qtItem->dcfFile()); if (!f.open(IO_ReadOnly)) { kdDebug(9002) << "Could not read" << qtItem->dcfFile() << endl; return; } - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || doc.doctype().name() != "DCF") { kdDebug(9002) << "Not a valid DCF file: " << qtItem->dcfFile() << endl; @@ -235,10 +235,10 @@ void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) } f.close(); - QDomElement docEl = doc.documentElement(); - QDomElement titleEl = docEl.namedItem("DCF").toElement(); + TQDomElement docEl = doc.documentElement(); + TQDomElement titleEl = docEl.namedItem("DCF").toElement(); - QDomElement childEl = docEl.firstChild().toElement(); + TQDomElement childEl = docEl.firstChild().toElement(); while (!childEl.isNull()) { if (childEl.tagName() == "section") @@ -249,26 +249,26 @@ void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) } } -void DocQtPlugin::createSectionIndex(QFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, - QDomElement section) +void DocQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, + TQDomElement section) { //adymo: do not load section to index for Qt reference documentation - QString title = section.attribute("title"); + TQString title = section.attribute("title"); if (fi.fileName() != "qt.dcf") { - QString ref = section.attribute("ref"); + TQString ref = section.attribute("ref"); IndexItemProto *ii = new IndexItemProto(this, item, index, title, item->text(0)); ii->addURL(KURL(fi.dirPath(true) + "/" + ref)); } - QDomElement grandChild = section.firstChild().toElement(); + TQDomElement grandChild = section.firstChild().toElement(); while(!grandChild.isNull()) { if (grandChild.tagName() == "keyword") { - QString keyRef = grandChild.attribute("ref"); - QString keyTitle = grandChild.text(); + TQString keyRef = grandChild.attribute("ref"); + TQString keyTitle = grandChild.text(); //adymo: a little hack to avoid unwanted elements if (keyRef != "qdir-example.html") @@ -285,20 +285,20 @@ void DocQtPlugin::createSectionIndex(QFileInfo &fi, IndexBox *index, Documentati } } -QStringList DocQtPlugin::fullTextSearchLocations() +TQStringList DocQtPlugin::fullTextSearchLocations() { - QStringList locs; + TQStringList locs; - QMap entryMap = config->entryMap("Locations"); + TQMap entryMap = config->entryMap("Locations"); - for (QMap::const_iterator it = entryMap.begin(); + for (TQMap::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { config->setGroup("Search Settings"); if (config->readBoolEntry(it.key(), false)) { config->setGroup("Locations"); - QFileInfo fi(config->readPathEntry(it.key())); + TQFileInfo fi(config->readPathEntry(it.key())); locs << fi.dirPath(true); } } @@ -306,32 +306,32 @@ QStringList DocQtPlugin::fullTextSearchLocations() return locs; } -QPair DocQtPlugin::catalogLocatorProps() +QPair DocQtPlugin::catalogLocatorProps() { - return QPair(KFile::File, "*.xml *.dcf"); + return QPair(KFile::File, "*.xml *.dcf"); } -QString DocQtPlugin::catalogTitle(const QString &url) +TQString DocQtPlugin::catalogTitle(const TQString &url) { - QFileInfo fi(url); + TQFileInfo fi(url); if (!fi.exists()) - return QString::null; + return TQString::null; - QFile f(url); + TQFile f(url); if (!f.open(IO_ReadOnly)) - return QString::null; + return TQString::null; - QDomDocument doc; + TQDomDocument doc; if (!doc.setContent(&f) || (doc.doctype().name() != "DCF")) - return QString::null; + return TQString::null; f.close(); - QDomElement docEl = doc.documentElement(); + TQDomElement docEl = doc.documentElement(); - return docEl.attribute("title", QString::null); + return docEl.attribute("title", TQString::null); } -DocumentationCatalogItem *DocQtPlugin::createCatalog(KListView *contents, const QString &title, const QString &url) +DocumentationCatalogItem *DocQtPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url) { return new QtDocumentationCatalogItem(url, this, contents, title); } diff --git a/parts/documentation/plugins/qt/docqtplugin.h b/parts/documentation/plugins/qt/docqtplugin.h index 551a6ac7..e09ce7a5 100644 --- a/parts/documentation/plugins/qt/docqtplugin.h +++ b/parts/documentation/plugins/qt/docqtplugin.h @@ -21,7 +21,7 @@ #define DOCQTPLUGIN_H #include -#include +#include class KConfig; @@ -29,25 +29,25 @@ class DocQtPlugin : public DocumentationPlugin { Q_OBJECT public: - DocQtPlugin(QObject* parent, const char* name, const QStringList args = QStringList()); + DocQtPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); ~DocQtPlugin(); - virtual QString pluginName() const; + virtual TQString pluginName() const; - virtual DocumentationCatalogItem *createCatalog(KListView *contents, const QString &title, const QString &url); + virtual DocumentationCatalogItem *createCatalog(KListView *contents, const TQString &title, const TQString &url); virtual void createTOC(DocumentationCatalogItem *item); virtual void setCatalogURL(DocumentationCatalogItem *item); virtual bool needRefreshIndex(DocumentationCatalogItem *item); virtual void createIndex(IndexBox *index, DocumentationCatalogItem *item); - virtual void createSectionIndex(QFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, - QDomElement section); + virtual void createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, + TQDomElement section); - virtual QStringList fullTextSearchLocations(); + virtual TQStringList fullTextSearchLocations(); - virtual QPair catalogLocatorProps(); - virtual QString catalogTitle(const QString &url); + virtual QPair catalogLocatorProps(); + virtual TQString catalogTitle(const TQString &url); virtual void autoSetupPlugin(); -- cgit v1.2.1