summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/chm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /parts/documentation/plugins/chm
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz
tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/plugins/chm')
-rw-r--r--parts/documentation/plugins/chm/docchmplugin.cpp46
-rw-r--r--parts/documentation/plugins/chm/docchmplugin.h14
2 files changed, 30 insertions, 30 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;
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<KFile::Mode, QString> catalogLocatorProps();
- virtual DocumentationCatalogItem* createCatalog(KListView* contents, const QString& title, const QString& url);
+ virtual TQString catalogTitle(const TQString& url);
+ virtual QPair<KFile::Mode, TQString> 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