summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/chm/docchmplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/plugins/chm/docchmplugin.cpp')
-rw-r--r--parts/documentation/plugins/chm/docchmplugin.cpp46
1 files changed, 23 insertions, 23 deletions
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 <kio/netaccess.h>
#include <iostream>
#include <fstream>
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kdevgenericfactory.h>
#include <kdevplugininfo.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "../../../../config.h"
@@ -38,7 +38,7 @@ static const KDevPluginInfo data("docchmplugin");
typedef KDevGenericFactory<DocCHMPlugin> 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<KFile::Mode, QString> DocCHMPlugin::catalogLocatorProps()
+QPair<KFile::Mode, TQString> DocCHMPlugin::catalogLocatorProps()
{
- return QPair<KFile::Mode, QString>(KFile::File, "*.chm");
+ return QPair<KFile::Mode, TQString>(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+);|&nbsp;"));
- QString out = s;
+static TQString decodeHTML(const TQString& s) {
+ TQRegExp rx(TQString::fromLatin1("&#(\\d+);|&nbsp;"));
+ TQString out = s;
int pos = rx.search(out);
while(pos > -1) {
- QString found = rx.cap(0);
+ TQString found = rx.cap(0);
if(found != "&nbsp;") {
out.replace(pos, found.length(), static_cast<char>(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<DocumentationItem*> items;
+ TQValueVector<DocumentationItem*> 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;