summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/chm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-14 16:45:05 +0000
commit48d4a26399959121f33d2bc3bfe51c7827b654fc (patch)
tree5ae5e6e00d3ba330b7b8be9bc097154b6bc739e8 /parts/documentation/plugins/chm
parent7e701ace6592d09e1f2c0cf28c7d6d872d78f4f5 (diff)
downloadtdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.tar.gz
tdevelop-48d4a26399959121f33d2bc3bfe51c7827b654fc.zip
TQt4 port kdevelop
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1236710 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/plugins/chm')
-rw-r--r--parts/documentation/plugins/chm/docchmplugin.cpp30
-rw-r--r--parts/documentation/plugins/chm/docchmplugin.h5
2 files changed, 18 insertions, 17 deletions
diff --git a/parts/documentation/plugins/chm/docchmplugin.cpp b/parts/documentation/plugins/chm/docchmplugin.cpp
index e0b19de9..fb033a7f 100644
--- a/parts/documentation/plugins/chm/docchmplugin.cpp
+++ b/parts/documentation/plugins/chm/docchmplugin.cpp
@@ -38,9 +38,9 @@ static const KDevPluginInfo data("docchmplugin");
typedef KDevGenericFactory<DocCHMPlugin> DocCHMPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(data) )
-DocCHMPlugin::DocCHMPlugin(TQObject* parent, const char* name, TQStringList // args
+DocCHMPlugin::DocCHMPlugin(TQObject* tqparent, const char* name, TQStringList // args
)
- :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), parent, name)
+ :DocumentationPlugin(DocCHMPluginFactory::instance()->config(), tqparent, name)
{
setCapabilities(CustomDocumentationTitles); // | Index | FullTextSearch | ProjectDocumentation
autoSetup();
@@ -59,15 +59,15 @@ DocumentationCatalogItem* DocCHMPlugin::createCatalog(KListView* contents, const
return item;
}
-QPair<KFile::Mode, TQString> DocCHMPlugin::catalogLocatorProps()
+TQPair<KFile::Mode, TQString> DocCHMPlugin::catalogLocatorProps()
{
- return QPair<KFile::Mode, TQString>(KFile::File, "*.chm");
+ return TQPair<KFile::Mode, TQString>(KFile::File, "*.chm");
}
TQString DocCHMPlugin::catalogTitle(const TQString& // url
)
{
- return TQString::null;
+ return TQString();
}
TQString DocCHMPlugin::pluginName() const
@@ -127,9 +127,9 @@ void DocCHMPlugin::createIndex(IndexBox* // index
}
-static KListViewItem* chainEnd(KListViewItem *parent) {
- if(parent == 0) return 0;
- KListViewItem* ret = dynamic_cast<KListViewItem*>(parent->firstChild());
+static KListViewItem* chainEnd(KListViewItem *tqparent) {
+ if(tqparent == 0) return 0;
+ KListViewItem* ret = dynamic_cast<KListViewItem*>(tqparent->firstChild());
if(ret == 0) return 0;
while(ret->nextSibling() != 0) {
ret = dynamic_cast<KListViewItem*>(ret->nextSibling());
@@ -138,15 +138,15 @@ static KListViewItem* chainEnd(KListViewItem *parent) {
}
static TQString decodeHTML(const TQString& s) {
- TQRegExp rx(TQString::fromLatin1("&#(\\d+);|&nbsp;"));
+ TQRegExp rx(TQString::tqfromLatin1("&#(\\d+);|&nbsp;"));
TQString out = s;
int pos = rx.search(out);
while(pos > -1) {
TQString found = rx.cap(0);
if(found != "&nbsp;") {
- out.replace(pos, found.length(), static_cast<char>(rx.cap(1).toInt()));
+ out.tqreplace(pos, found.length(), static_cast<char>(rx.cap(1).toInt()));
}else{
- out.replace(pos, found.length(), " ");
+ out.tqreplace(pos, found.length(), " ");
}
pos = rx.search(out, pos+1);
}
@@ -163,11 +163,11 @@ void DocCHMPlugin::createTOC(DocumentationCatalogItem* item)
items.push_back(item);
for(TQStringList::Iterator it = lines.begin(); it != lines.end();) {
bool ok1 = true, ok2 = true;
- int parent = (*it).toInt(&ok1);
+ int tqparent = (*it).toInt(&ok1);
++it;
int current = (*it).toInt(&ok2);
++it;
- if(int(items.size()) != current || !ok1 || !ok2 || parent < 0 || parent >= int(items.size()) || current < 0 || current != int(items.size())) {
+ if(int(items.size()) != current || !ok1 || !ok2 || tqparent < 0 || tqparent >= int(items.size()) || current < 0 || current != int(items.size())) {
kdDebug(9002) << "DocCHMPlugin::createTOC error while parsing output of ioslave" << endl;
break;
}
@@ -178,9 +178,9 @@ void DocCHMPlugin::createTOC(DocumentationCatalogItem* item)
++it;
items.push_back(new DocumentationItem(
- DocumentationItem::Document, items[parent], chainEnd(items[parent]), decodeHTML(name)));
+ DocumentationItem::Document, items[tqparent], chainEnd(items[tqparent]), decodeHTML(name)));
items[current]->setURL(url);
- if(parent != 0) items[parent]->setType(DocumentationItem::Book);
+ if(tqparent != 0) items[tqparent]->setType(DocumentationItem::Book);
}
diff --git a/parts/documentation/plugins/chm/docchmplugin.h b/parts/documentation/plugins/chm/docchmplugin.h
index ca90a978..3f069faf 100644
--- a/parts/documentation/plugins/chm/docchmplugin.h
+++ b/parts/documentation/plugins/chm/docchmplugin.h
@@ -25,15 +25,16 @@
class DocCHMPlugin :public DocumentationPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- DocCHMPlugin(TQObject* parent, const char* name, TQStringList args = TQStringList());
+ DocCHMPlugin(TQObject* tqparent, const char* name, TQStringList args = TQStringList());
~DocCHMPlugin();
virtual TQString pluginName() const;
virtual void setCatalogURL(DocumentationCatalogItem* item);
virtual TQString catalogTitle(const TQString& url);
- virtual QPair<KFile::Mode, TQString> catalogLocatorProps();
+ virtual TQPair<KFile::Mode, TQString> catalogLocatorProps();
virtual DocumentationCatalogItem* createCatalog(KListView* contents, const TQString& title, const TQString& url);
virtual void createTOC(DocumentationCatalogItem* item);