summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/devhelp
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/devhelp
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/devhelp')
-rw-r--r--parts/documentation/plugins/devhelp/docdevhelpplugin.cpp40
-rw-r--r--parts/documentation/plugins/devhelp/docdevhelpplugin.h7
2 files changed, 24 insertions, 23 deletions
diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp
index 11c2b6a7..79106157 100644
--- a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp
+++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp
@@ -41,13 +41,13 @@ class DevHelpDocumentationCatalogItem: public DocumentationCatalogItem
{
public:
DevHelpDocumentationCatalogItem(const TQString &devHelpFile, DocumentationPlugin* plugin,
- KListView *parent, const TQString &name)
- :DocumentationCatalogItem(plugin, parent, name), m_devHelpFile(devHelpFile)
+ KListView *tqparent, const TQString &name)
+ :DocumentationCatalogItem(plugin, tqparent, name), m_devHelpFile(devHelpFile)
{
}
DevHelpDocumentationCatalogItem(const TQString &devHelpFile, DocumentationPlugin* plugin,
- DocumentationItem *parent, const TQString &name)
- :DocumentationCatalogItem(plugin, parent, name), m_devHelpFile(devHelpFile)
+ DocumentationItem *tqparent, const TQString &name)
+ :DocumentationCatalogItem(plugin, tqparent, name), m_devHelpFile(devHelpFile)
{
}
TQString devHelpFile() const { return m_devHelpFile; }
@@ -73,9 +73,9 @@ static const KDevPluginInfo data("docdevhelpplugin");
typedef KDevGenericFactory<DocDevHelpPlugin> DocDevHelpPluginFactory;
K_EXPORT_COMPONENT_FACTORY( libdocdevhelpplugin, DocDevHelpPluginFactory(data) )
-DocDevHelpPlugin::DocDevHelpPlugin(TQObject* parent, const char* name,
+DocDevHelpPlugin::DocDevHelpPlugin(TQObject* tqparent, const char* name,
const TQStringList /*args*/)
- :DocumentationPlugin(DocDevHelpPluginFactory::instance()->config(), parent, name)
+ :DocumentationPlugin(DocDevHelpPluginFactory::instance()->config(), tqparent, name)
{
setCapabilities(Index | FullTextSearch | ProjectDocumentation);
autoSetup();
@@ -90,29 +90,29 @@ DocumentationCatalogItem* DocDevHelpPlugin::createCatalog(KListView* contents, c
return new DevHelpDocumentationCatalogItem(url, this, contents, title);
}
-QPair<KFile::Mode, TQString> DocDevHelpPlugin::catalogLocatorProps()
+TQPair<KFile::Mode, TQString> DocDevHelpPlugin::catalogLocatorProps()
{
- return QPair<KFile::Mode, TQString>(KFile::File, "*.devhelp");
+ return TQPair<KFile::Mode, TQString>(KFile::File, "*.devhelp");
}
TQString DocDevHelpPlugin::catalogTitle(const TQString& url)
{
TQFileInfo fi(url);
if (!fi.exists())
- return TQString::null;
+ return TQString();
TQFile f(url);
if (!f.open(IO_ReadOnly))
- return TQString::null;
+ return TQString();
TQDomDocument doc;
if (!doc.setContent(&f))
- return TQString::null;
+ return TQString();
f.close();
TQDomElement docEl = doc.documentElement();
- return docEl.attribute("title", TQString::null);
+ return docEl.attribute("title", TQString());
}
TQString DocDevHelpPlugin::pluginName() const
@@ -194,7 +194,7 @@ void DocDevHelpPlugin::autoSetupPlugin()
continue;
scanList << dir.path();
- const QFileInfoList *dirEntries = dir.entryInfoList();
+ const TQFileInfoList *dirEntries = dir.entryInfoList();
if ( !dirEntries ) continue;
TQPtrListIterator<TQFileInfo> it(*dirEntries);
for (; it.current(); ++it)
@@ -224,8 +224,8 @@ void DocDevHelpPlugin::scanDevHelpDir(const TQString &path)
d.setFilter(TQDir::Files);
//scan for *.devhelp files
- const QFileInfoList *list = d.entryInfoList();
- QFileInfoListIterator it( *list );
+ const TQFileInfoList *list = d.entryInfoList();
+ TQFileInfoListIterator it( *list );
TQFileInfo *fi;
while ( (fi = it.current()) != 0 )
{
@@ -240,7 +240,7 @@ void DocDevHelpPlugin::scanDevHelpDir(const TQString &path)
void DocDevHelpPlugin::pushToScanStack(TQValueStack<TQString> &stack, const TQString &value)
{
- if ( (!value.isEmpty()) && (!stack.contains(value)) )
+ if ( (!value.isEmpty()) && (!stack.tqcontains(value)) )
{
stack << value;
kdDebug() << "Devhelp scan stack: +: " << value << endl;
@@ -320,7 +320,7 @@ void DocDevHelpPlugin::createTOC(DocumentationCatalogItem* item)
addTocSect(dhItem, childEl, baseUrl, true);
}
-void DocDevHelpPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl,
+void DocDevHelpPlugin::addTocSect(DocumentationItem *tqparent, TQDomElement childEl,
TQString baseUrl, bool book)
{
while (!childEl.isNull())
@@ -330,11 +330,11 @@ void DocDevHelpPlugin::addTocSect(DocumentationItem *parent, TQDomElement childE
TQString name = childEl.attribute("name");
TQString url = childEl.attribute("link");
- if (name.isEmpty() && url.contains("ix"))
+ if (name.isEmpty() && url.tqcontains("ix"))
name = "Index";
DocumentationItem *item = new DocumentationItem(
- book ? DocumentationItem::Book : DocumentationItem::Document, parent, name);
+ book ? DocumentationItem::Book : DocumentationItem::Document, tqparent, name);
item->setURL(KURL(baseUrl+"/"+url));
TQDomElement grandchildEl = childEl.lastChild().toElement();
@@ -371,7 +371,7 @@ void DocDevHelpPlugin::setCatalogURL(DocumentationCatalogItem* item)
if (item->url().isEmpty())
{
- KURL url(fi.dirPath(true) + "/" + docEl.attribute("link", TQString::null));
+ KURL url(fi.dirPath(true) + "/" + docEl.attribute("link", TQString()));
item->setURL(url);
}
}
diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.h b/parts/documentation/plugins/devhelp/docdevhelpplugin.h
index 9e4df5c2..dde545d3 100644
--- a/parts/documentation/plugins/devhelp/docdevhelpplugin.h
+++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.h
@@ -28,8 +28,9 @@
class DocDevHelpPlugin: public DocumentationPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- DocDevHelpPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList());
+ DocDevHelpPlugin(TQObject* tqparent, const char* name, const TQStringList args = TQStringList());
~DocDevHelpPlugin();
virtual TQString pluginName() const;
@@ -47,14 +48,14 @@ public:
virtual TQStringList fullTextSearchLocations();
virtual void autoSetupPlugin();
- virtual QPair<KFile::Mode, TQString> catalogLocatorProps();
+ virtual TQPair<KFile::Mode, TQString> catalogLocatorProps();
virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType type);
protected:
void pushToScanStack(TQValueStack<TQString> &stack, const TQString &value);
void scanDevHelpDir(const TQString &path);
- void addTocSect(DocumentationItem *parent, TQDomElement childEl, TQString baseUrl, bool book=false);
+ void addTocSect(DocumentationItem *tqparent, TQDomElement childEl, TQString baseUrl, bool book=false);
};
#endif