summaryrefslogtreecommitdiffstats
path: root/kate/cppsymbolviewer
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 17:00:31 +0000
commit395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch)
tree9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/cppsymbolviewer
parent399f47c376fdf4d19192732a701ea9578d11619d (diff)
downloadtdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz
tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/cppsymbolviewer')
-rw-r--r--kate/cppsymbolviewer/cpp_parser.cpp56
-rw-r--r--kate/cppsymbolviewer/plugin_katesymbolviewer.cpp14
-rw-r--r--kate/cppsymbolviewer/plugin_katesymbolviewer.h9
-rw-r--r--kate/cppsymbolviewer/tcl_parser.cpp6
4 files changed, 44 insertions, 41 deletions
diff --git a/kate/cppsymbolviewer/cpp_parser.cpp b/kate/cppsymbolviewer/cpp_parser.cpp
index b666983..c99d455 100644
--- a/kate/cppsymbolviewer/cpp_parser.cpp
+++ b/kate/cppsymbolviewer/cpp_parser.cpp
@@ -3,7 +3,7 @@
-------------------
begin : Apr 2 2003
author : 2003 Massimo Callegari
***************************************************************************/
/***************************************************************************
* *
@@ -67,21 +67,21 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
cl = cl.stripWhiteSpace();
func_close = 0;
if(cl.at(0) == '/' && cl.at(1) == '/') continue;
- if(cl.find("/*") == 0 && (cl.find("*/") == ((signed)cl.length() - 2)) && graph == 0) continue; // workaround :(
- if(cl.find("/*") >= 0 && graph == 0) comment = 1;
- if(cl.find("*/") >= 0 && graph == 0) comment = 0;
- if(cl.find("#") >= 0 && graph == 0 ) macro = 1;
+ if(cl.tqfind("/*") == 0 && (cl.tqfind("*/") == ((signed)cl.length() - 2)) && graph == 0) continue; // workaround :(
+ if(cl.tqfind("/*") >= 0 && graph == 0) comment = 1;
+ if(cl.tqfind("*/") >= 0 && graph == 0) comment = 0;
+ if(cl.tqfind("#") >= 0 && graph == 0 ) macro = 1;
if (comment != 1)
{
/* *********************** MACRO PARSING *****************************/
if(macro == 1)
{
- //macro_pos = cl.find("#");
+ //macro_pos = cl.tqfind("#");
for (j = 0; j < cl.length(); j++)
{
if(cl.at(j)=='/' && cl.at(j+1)=='/') { macro = 4; break; }
- if( (uint)cl.find("define") == j &&
- !((uint)cl.find("defined") == j))
+ if( (uint)cl.tqfind("define") == j &&
+ !((uint)cl.tqfind("defined") == j))
{
macro = 2;
j += 6; // skip the word "define"
@@ -99,7 +99,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
if(j == cl.length() && macro == 1) macro = 0;
if(macro == 4)
{
- //stripped.replace(0x9, " ");
+ //stripped.tqreplace(0x9, " ");
stripped = stripped.stripWhiteSpace();
if (macro_on == true)
{
@@ -129,7 +129,7 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
/* ******************************************************************** */
- if ((cl.find("class") >= 0 && graph == 0 && block == 0))
+ if ((cl.tqfind("class") >= 0 && graph == 0 && block == 0))
{
mclass = 1;
for (j = 0; j < cl.length(); j++)
@@ -158,19 +158,19 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
}
if (mclass == 3)
{
- if (cl.find('{') >= 0)
+ if (cl.tqfind('{') >= 0)
{
- cl = cl.right(cl.find('{'));
+ cl = cl.right(cl.tqfind('{'));
mclass = 4;
}
}
- if(cl.find("(") >= 0 && cl.at(0) != '#' && block == 0 && comment != 2)
+ if(cl.tqfind("(") >= 0 && cl.at(0) != '#' && block == 0 && comment != 2)
{ structure = false; block = 1; }
- if((cl.find("typedef") >= 0 || cl.find("struct") >= 0) &&
+ if((cl.tqfind("typedef") >= 0 || cl.tqfind("struct") >= 0) &&
graph == 0 && block == 0)
{ structure = true; block = 2; stripped = ""; }
- //if(cl.find(";") >= 0 && graph == 0)
+ //if(cl.tqfind(";") >= 0 && graph == 0)
// block = 0;
if(block > 0 && mclass != 1 )
@@ -216,21 +216,21 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
break;
}
- if(cl.at(j)=='{' && structure == false && cl.find(";") < 0 ||
- cl.at(j)=='{' && structure == false && cl.find('}') > (int)j)
+ if(cl.at(j)=='{' && structure == false && cl.tqfind(";") < 0 ||
+ cl.at(j)=='{' && structure == false && cl.tqfind('}') > (int)j)
{
- stripped.replace(0x9, " ");
+ stripped.tqreplace(0x9, " ");
if(func_on == true)
{
if (types_on == false)
{
- while (stripped.find('(') >= 0)
- stripped = stripped.left(stripped.find('('));
- while (stripped.find("::") >= 0)
- stripped = stripped.mid(stripped.find("::") + 2);
+ while (stripped.tqfind('(') >= 0)
+ stripped = stripped.left(stripped.tqfind('('));
+ while (stripped.tqfind("::") >= 0)
+ stripped = stripped.mid(stripped.tqfind("::") + 2);
stripped = stripped.stripWhiteSpace();
- while (stripped.find(0x20) >= 0)
- stripped = stripped.mid(stripped.find(0x20, 0) + 1);
+ while (stripped.tqfind(0x20) >= 0)
+ stripped = stripped.mid(stripped.tqfind(0x20, 0) + 1);
}
//kdDebug(13000)<<"Function -- Inserted: "<<stripped<<" at row: "<<tmpPos<<" mclass: "<<(uint)mclass<<endl;
if (treeMode)
@@ -290,9 +290,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
{
if(cl.at(j) == ';')
{
- //stripped.replace(0x9, " ");
+ //stripped.tqreplace(0x9, " ");
stripped.remove('{');
- stripped.replace('}', " ");
+ stripped.tqreplace('}', " ");
if(struct_on == true)
{
if (treeMode)
@@ -319,9 +319,9 @@ void KatePluginSymbolViewerView::parseCppSymbols(void)
} // BLOCK > 0
if (mclass == 4 && block == 0 && func_close == 0)
{
- if (cl.find('}') >= 0)
+ if (cl.tqfind('}') >= 0)
{
- cl = cl.right(cl.find('}'));
+ cl = cl.right(cl.tqfind('}'));
mclass = 0;
}
}
diff --git a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
index 9165878..5bf0906 100644
--- a/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
+++ b/kate/cppsymbolviewer/plugin_katesymbolviewer.cpp
@@ -3,7 +3,7 @@
* -------------------
* begin : Apr 2 2003
* author : 2003 Massimo Callegari
- * email : [email protected]
+ * email : [email protected]
*
* Changes:
* Nov 09 2004 v.1.3 - For changelog please refer to KDE CVS
@@ -133,7 +133,7 @@ void KatePluginSymbolViewerView::slotInsertSymbol()
//connect(symbols, TQT_SIGNAL(resizeEvent(TQResizeEvent *)), this, TQT_SLOT(slotViewChanged(TQResizeEvent *)));
m_Active = true;
- //symbols->addColumn(i18n("Symbols"), symbols->parentWidget()->width());
+ //symbols->addColumn(i18n("Symbols"), symbols->tqparentWidget()->width());
symbols->addColumn(i18n("Symbols"));
symbols->addColumn(i18n("Position"));
symbols->setColumnWidthMode(1, TQListView::Manual);
@@ -192,7 +192,7 @@ void KatePluginSymbolViewerView::slotDocChanged()
void KatePluginSymbolViewerView::slotViewChanged(TQResizeEvent *)
{
kdDebug(13000)<<"View changed !!!!"<<endl;
- symbols->setColumnWidth(0, symbols->parentWidget()->width());
+ symbols->setColumnWidth(0, symbols->tqparentWidget()->width());
}
void KatePluginSymbolViewerView::slotShowContextMenu(TQListViewItem *, const TQPoint &p, int)
@@ -241,8 +241,8 @@ void KatePluginSymbolViewerView::goToSymbol(TQListViewItem *it)
kv->gotoLineNumber(it->text(1).toInt(NULL, 10));
}
-KatePluginSymbolViewer::KatePluginSymbolViewer( TQObject* parent, const char* name, const TQStringList& )
- : Kate::Plugin ( (Kate::Application*)parent, name ),
+KatePluginSymbolViewer::KatePluginSymbolViewer( TQObject* tqparent, const char* name, const TQStringList& )
+ : Kate::Plugin ( (Kate::Application*)tqparent, name ),
pConfig("katecppsymbolviewerpluginrc")
{
pConfig.setGroup("global");
@@ -307,8 +307,8 @@ void KatePluginSymbolViewer::applyConfig( KatePluginSymbolViewerConfigPage* p )
// BEGIN KatePluginSymbolViewerConfigPage
KatePluginSymbolViewerConfigPage::KatePluginSymbolViewerConfigPage(
- TQObject* /*parent*/ /*= 0L*/, TQWidget *parentWidget /*= 0L*/)
- : Kate::PluginConfigPage( parentWidget )
+ TQObject* /*tqparent*/ /*= 0L*/, TQWidget *tqparentWidget /*= 0L*/)
+ : Kate::PluginConfigPage( tqparentWidget )
{
TQVBoxLayout* top = new TQVBoxLayout(this, 0,
KDialogBase::spacingHint());
diff --git a/kate/cppsymbolviewer/plugin_katesymbolviewer.h b/kate/cppsymbolviewer/plugin_katesymbolviewer.h
index e8ac0e0..d247852 100644
--- a/kate/cppsymbolviewer/plugin_katesymbolviewer.h
+++ b/kate/cppsymbolviewer/plugin_katesymbolviewer.h
@@ -3,7 +3,7 @@
-------------------
begin : Apr 2 2003
author : 2003 Massimo Callegari
***************************************************************************/
/***************************************************************************
@@ -46,6 +46,7 @@
class KatePluginSymbolViewerView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
KatePluginSymbolViewerView (Kate::MainWindow *w);
@@ -88,11 +89,12 @@ class KatePluginSymbolViewerView : public TQObject, public KXMLGUIClient
class KatePluginSymbolViewerConfigPage : public Kate::PluginConfigPage
{
Q_OBJECT
+ TQ_OBJECT
friend class KatePluginSymbolViewer;
public:
- KatePluginSymbolViewerConfigPage (TQObject* parent = 0L, TQWidget *parentWidget = 0L);
+ KatePluginSymbolViewerConfigPage (TQObject* tqparent = 0L, TQWidget *tqparentWidget = 0L);
~KatePluginSymbolViewerConfigPage ();
/**
@@ -123,9 +125,10 @@ class KatePluginSymbolViewerConfigPage : public Kate::PluginConfigPage
class KatePluginSymbolViewer : public Kate::Plugin, Kate::PluginViewInterface, Kate::PluginConfigInterfaceExtension
{
Q_OBJECT
+ TQ_OBJECT
public:
- KatePluginSymbolViewer( TQObject* parent = 0, const char* name = 0, const TQStringList& = TQStringList() );
+ KatePluginSymbolViewer( TQObject* tqparent = 0, const char* name = 0, const TQStringList& = TQStringList() );
virtual ~KatePluginSymbolViewer();
void addView (Kate::MainWindow *win);
diff --git a/kate/cppsymbolviewer/tcl_parser.cpp b/kate/cppsymbolviewer/tcl_parser.cpp
index c2eae61..fca2a5d 100644
--- a/kate/cppsymbolviewer/tcl_parser.cpp
+++ b/kate/cppsymbolviewer/tcl_parser.cpp
@@ -3,7 +3,7 @@
-------------------
begin : Apr 2 2003
author : 2003 Massimo Callegari
***************************************************************************/
/***************************************************************************
* *
@@ -80,8 +80,8 @@ void KatePluginSymbolViewerView::parseTclSymbols(void)
{
stripped = currline.right(currline.length() - 3);
stripped = stripped.simplifyWhiteSpace();
- int fnd = stripped.find(' ');
- //fnd = stripped.find(";");
+ int fnd = stripped.tqfind(' ');
+ //fnd = stripped.tqfind(";");
if(fnd > 0) stripped = stripped.left(fnd);
if (treeMode)