summaryrefslogtreecommitdiffstats
path: root/parts/documentation/plugins/qt
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/qt
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/qt')
-rw-r--r--parts/documentation/plugins/qt/docqtplugin.cpp86
-rw-r--r--parts/documentation/plugins/qt/docqtplugin.h13
2 files changed, 50 insertions, 49 deletions
diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp
index b4118f97..5efe880f 100644
--- a/parts/documentation/plugins/qt/docqtplugin.cpp
+++ b/parts/documentation/plugins/qt/docqtplugin.cpp
@@ -37,17 +37,17 @@
#include "../../../../config.h"
-class QtDocumentationCatalogItem: public DocumentationCatalogItem
+class TQtDocumentationCatalogItem: public DocumentationCatalogItem
{
public:
- QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin,
- KListView *parent, const TQString &name)
- :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile)
+ TQtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin,
+ KListView *tqparent, const TQString &name)
+ :DocumentationCatalogItem(plugin, tqparent, name), m_dcfFile(dcfFile)
{
}
- QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin,
- DocumentationItem *parent, const TQString &name)
- :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile)
+ TQtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin,
+ DocumentationItem *tqparent, const TQString &name)
+ :DocumentationCatalogItem(plugin, tqparent, name), m_dcfFile(dcfFile)
{
}
TQString dcfFile() const { return m_dcfFile; }
@@ -57,23 +57,23 @@ private:
};
static const KDevPluginInfo data("docqtplugin");
-typedef KDevGenericFactory<DocQtPlugin> DocQtPluginFactory;
-K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocQtPluginFactory(data) )
+typedef KDevGenericFactory<DocTQtPlugin> DocTQtPluginFactory;
+K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocTQtPluginFactory(data) )
-DocQtPlugin::DocQtPlugin(TQObject* parent, const char* name, const TQStringList)
- :DocumentationPlugin(DocQtPluginFactory::instance()->config(), parent, name)
+DocTQtPlugin::DocTQtPlugin(TQObject* tqparent, const char* name, const TQStringList)
+ :DocumentationPlugin(DocTQtPluginFactory::instance()->config(), tqparent, name)
{
setCapabilities(Index | FullTextSearch | CustomDocumentationTitles);
autoSetup();
}
-DocQtPlugin::~DocQtPlugin()
+DocTQtPlugin::~DocTQtPlugin()
{
}
-void DocQtPlugin::createTOC(DocumentationCatalogItem *item)
+void DocTQtPlugin::createTOC(DocumentationCatalogItem *item)
{
- QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item);
+ TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item);
if (!qtItem)
return;
@@ -135,32 +135,32 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item)
}
}
-void DocQtPlugin::autoSetupPlugin()
+void DocTQtPlugin::autoSetupPlugin()
{
TQString qtDocDir(QT_DOCDIR);
qtDocDir = URLUtil::envExpand(qtDocDir);
if (qtDocDir.isEmpty())
{
- qtDocDir = getenv("QTDIR");
+ qtDocDir = getenv("TQTDIR");
}
if (!qtDocDir.isEmpty())
{
config->setGroup("Search Settings");
- config->writeEntry("Qt Reference Documentation", true);
+ config->writeEntry("TQt Reference Documentation", true);
config->setGroup("Index Settings");
- config->writeEntry("Qt Reference Documentation", true);
+ config->writeEntry("TQt Reference Documentation", true);
config->setGroup("Locations");
- 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("TQt Reference Documentation", qtDocDir + TQString("/qt.dcf"));
+ config->writePathEntry("TQt Assistant Manual", qtDocDir + TQString("/assistant.dcf"));
+ config->writePathEntry("TQt Designer Manual", qtDocDir + TQString("/designer.dcf"));
+ config->writePathEntry("Guide to the TQt Translation Tools", qtDocDir + TQString("/linguist.dcf"));
config->writePathEntry("qmake User Guide", qtDocDir + TQString("/qmake.dcf"));
}
}
-void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item)
+void DocTQtPlugin::setCatalogURL(DocumentationCatalogItem *item)
{
- QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item);
+ TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item);
if (!qtItem)
return;
@@ -185,19 +185,19 @@ void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item)
if (item->url().isEmpty())
{
- KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", TQString::null));
+ KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", TQString()));
item->setURL(url);
}
}
-TQString DocQtPlugin::pluginName() const
+TQString DocTQtPlugin::pluginName() const
{
- return i18n("Qt Documentation Collection");
+ return i18n("TQt Documentation Collection");
}
-bool DocQtPlugin::needRefreshIndex(DocumentationCatalogItem *item)
+bool DocTQtPlugin::needRefreshIndex(DocumentationCatalogItem *item)
{
- QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item);
+ TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item);
if (!qtItem)
return false;
@@ -213,9 +213,9 @@ bool DocQtPlugin::needRefreshIndex(DocumentationCatalogItem *item)
return false;
}
-void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item)
+void DocTQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item)
{
- QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item);
+ TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item);
if (!qtItem)
return;
@@ -249,10 +249,10 @@ void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item)
}
}
-void DocQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item,
+void DocTQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item,
TQDomElement section)
{
- //adymo: do not load section to index for Qt reference documentation
+ //adymo: do not load section to index for TQt reference documentation
TQString title = section.attribute("title");
if (fi.fileName() != "qt.dcf")
{
@@ -285,7 +285,7 @@ void DocQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, Documentat
}
}
-TQStringList DocQtPlugin::fullTextSearchLocations()
+TQStringList DocTQtPlugin::fullTextSearchLocations()
{
TQStringList locs;
@@ -306,34 +306,34 @@ TQStringList DocQtPlugin::fullTextSearchLocations()
return locs;
}
-QPair<KFile::Mode, TQString> DocQtPlugin::catalogLocatorProps()
+TQPair<KFile::Mode, TQString> DocTQtPlugin::catalogLocatorProps()
{
- return QPair<KFile::Mode, TQString>(KFile::File, "*.xml *.dcf");
+ return TQPair<KFile::Mode, TQString>(KFile::File, "*.xml *.dcf");
}
-TQString DocQtPlugin::catalogTitle(const TQString &url)
+TQString DocTQtPlugin::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) || (doc.doctype().name() != "DCF"))
- return TQString::null;
+ return TQString();
f.close();
TQDomElement docEl = doc.documentElement();
- return docEl.attribute("title", TQString::null);
+ return docEl.attribute("title", TQString());
}
-DocumentationCatalogItem *DocQtPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url)
+DocumentationCatalogItem *DocTQtPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url)
{
- return new QtDocumentationCatalogItem(url, this, contents, title);
+ return new TQtDocumentationCatalogItem(url, this, contents, title);
}
#include "docqtplugin.moc"
diff --git a/parts/documentation/plugins/qt/docqtplugin.h b/parts/documentation/plugins/qt/docqtplugin.h
index e09ce7a5..1bc1e865 100644
--- a/parts/documentation/plugins/qt/docqtplugin.h
+++ b/parts/documentation/plugins/qt/docqtplugin.h
@@ -17,20 +17,21 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef DOCQTPLUGIN_H
-#define DOCQTPLUGIN_H
+#ifndef DOCTQTPLUGIN_H
+#define DOCTQTPLUGIN_H
#include <kdevdocumentationplugin.h>
#include <tqdom.h>
class KConfig;
-class DocQtPlugin : public DocumentationPlugin
+class DocTQtPlugin : public DocumentationPlugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- DocQtPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList());
- ~DocQtPlugin();
+ DocTQtPlugin(TQObject* tqparent, const char* name, const TQStringList args = TQStringList());
+ ~DocTQtPlugin();
virtual TQString pluginName() const;
@@ -46,7 +47,7 @@ public:
virtual TQStringList fullTextSearchLocations();
- virtual QPair<KFile::Mode, TQString> catalogLocatorProps();
+ virtual TQPair<KFile::Mode, TQString> catalogLocatorProps();
virtual TQString catalogTitle(const TQString &url);
virtual void autoSetupPlugin();