summaryrefslogtreecommitdiffstats
path: root/buildtools/lib/parsers/autotools
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 /buildtools/lib/parsers/autotools
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 'buildtools/lib/parsers/autotools')
-rw-r--r--buildtools/lib/parsers/autotools/autotools.ll2
-rw-r--r--buildtools/lib/parsers/autotools/autotools.yy2
-rw-r--r--buildtools/lib/parsers/autotools/autotools_lex.cpp6
-rw-r--r--buildtools/lib/parsers/autotools/autotools_yacc.cpp2
-rw-r--r--buildtools/lib/parsers/autotools/autotoolsast.cpp14
-rw-r--r--buildtools/lib/parsers/autotools/autotoolsast.h10
-rw-r--r--buildtools/lib/parsers/autotools/autotoolsdriver.h8
-rw-r--r--buildtools/lib/parsers/autotools/tests/viewer.cpp18
-rw-r--r--buildtools/lib/parsers/autotools/tests/viewer.h5
-rw-r--r--buildtools/lib/parsers/autotools/tests/viewer_main.cpp2
-rw-r--r--buildtools/lib/parsers/autotools/tests/viewerbase.ui40
11 files changed, 55 insertions, 54 deletions
diff --git a/buildtools/lib/parsers/autotools/autotools.ll b/buildtools/lib/parsers/autotools/autotools.ll
index f05f8ff6..d6f2a9bb 100644
--- a/buildtools/lib/parsers/autotools/autotools.ll
+++ b/buildtools/lib/parsers/autotools/autotools.ll
@@ -98,7 +98,7 @@ rule [\t]+[^\n]*
<list>{id_list} {
yylval.value = yytext;
- yylval.value = yylval.value.mid(0, yylval.value.findRev("\\"));
+ yylval.value = yylval.value.mid(0, yylval.value.tqfindRev("\\"));
unput('\\');
BEGIN(INITIAL);
return (ID_LIST);
diff --git a/buildtools/lib/parsers/autotools/autotools.yy b/buildtools/lib/parsers/autotools/autotools.yy
index d76cc5fe..350fbd77 100644
--- a/buildtools/lib/parsers/autotools/autotools.yy
+++ b/buildtools/lib/parsers/autotools/autotools.yy
@@ -89,7 +89,7 @@ currently on the top in the stack.
When a scope or function scope statement is parsed, the child ProjectAST is created
and pushed onto the stack. Therefore all statements which belong to the scope
-or function scope are added as childs to their direct parent (scope or function scope).
+or function scope are added as childs to their direct tqparent (scope or function scope).
*/
QValueStack<ProjectAST*> projects;
diff --git a/buildtools/lib/parsers/autotools/autotools_lex.cpp b/buildtools/lib/parsers/autotools/autotools_lex.cpp
index d5f690b5..e534d74f 100644
--- a/buildtools/lib/parsers/autotools/autotools_lex.cpp
+++ b/buildtools/lib/parsers/autotools/autotools_lex.cpp
@@ -539,8 +539,8 @@ at the left of the operator in assignments (like "SOURCES" in "SOURCES+=foo.cpp
-id_list: those are "value list identifiers" at the right side in assignments
(like "foo.cpp goo.cpp" in "SOURCES+=foo.cpp goo.cpp");
-id_args: function arguments recognized as one identifier
-(example: ""${QMAKE_FILE} is intended only for Windows!""
-in "!win32-*:!wince-*:error("${QMAKE_FILE} is intended only for Windows!")" statements).
+(example: ""${TQMAKE_FILE} is intended only for Windows!""
+in "!win32-*:!wince-*:error("${TQMAKE_FILE} is intended only for Windows!")" statements).
.
To recognize those identifiers two additional start conditions are used: list and funcargs.
@@ -841,7 +841,7 @@ YY_RULE_SETUP
#line 99 "autotools.ll"
{
yylval.value = yytext;
- yylval.value = yylval.value.mid(0, yylval.value.findRev("\\"));
+ yylval.value = yylval.value.mid(0, yylval.value.tqfindRev("\\"));
unput('\\');
BEGIN(INITIAL);
return (ID_LIST);
diff --git a/buildtools/lib/parsers/autotools/autotools_yacc.cpp b/buildtools/lib/parsers/autotools/autotools_yacc.cpp
index 93cdb733..e0b92999 100644
--- a/buildtools/lib/parsers/autotools/autotools_yacc.cpp
+++ b/buildtools/lib/parsers/autotools/autotools_yacc.cpp
@@ -204,7 +204,7 @@ currently on the top in the stack.
When a scope or function scope statement is parsed, the child ProjectAST is created
and pushed onto the stack. Therefore all statements which belong to the scope
-or function scope are added as childs to their direct parent (scope or function scope).
+or function scope are added as childs to their direct tqparent (scope or function scope).
*/
TQValueStack<ProjectAST*> projects;
diff --git a/buildtools/lib/parsers/autotools/autotoolsast.cpp b/buildtools/lib/parsers/autotools/autotoolsast.cpp
index ddcbddc3..f6ac032f 100644
--- a/buildtools/lib/parsers/autotools/autotoolsast.cpp
+++ b/buildtools/lib/parsers/autotools/autotoolsast.cpp
@@ -28,7 +28,7 @@ namespace AutoTools {
AST::~AST()
{
- for (TQValueList<AST*>::iterator it = m_children.begin(); it != m_children.end(); ++it)
+ for (TQValueList<AST*>::iterator it = m_tqchildren.begin(); it != m_tqchildren.end(); ++it)
{
AST *node = *it;
delete node;
@@ -37,13 +37,13 @@ AST::~AST()
void AST::addChildAST(AST *node)
{
- m_children.append(node);
+ m_tqchildren.append(node);
}
void AST::writeBack(TQString &buffer)
{
- for (TQValueList<AST*>::const_iterator it = m_children.constBegin();
- it != m_children.constEnd(); ++it)
+ for (TQValueList<AST*>::const_iterator it = m_tqchildren.constBegin();
+ it != m_tqchildren.constEnd(); ++it)
{
if (*it)
(*it)->writeBack(buffer);
@@ -60,12 +60,12 @@ TQString AST::indentation()
bool AST::hasChildren() const
{
- return !m_children.isEmpty();
+ return !m_tqchildren.isEmpty();
}
-TQValueList<AST*> AST::children() const
+TQValueList<AST*> AST::tqchildren() const
{
- return m_children;
+ return m_tqchildren;
}
//ProjectAST
diff --git a/buildtools/lib/parsers/autotools/autotoolsast.h b/buildtools/lib/parsers/autotools/autotoolsast.h
index 768e3e07..e690baa4 100644
--- a/buildtools/lib/parsers/autotools/autotoolsast.h
+++ b/buildtools/lib/parsers/autotools/autotoolsast.h
@@ -37,7 +37,7 @@ namespace AutoTools
* AST node.
* This is the base class. Objects of this type are not created by the parser.
*
- * Each AST node holds the list of its children which are always deleted in the
+ * Each AST node holds the list of its tqchildren which are always deleted in the
* destructor. This way, it's possible call delete for only root AST node and
* others will be deleted automatically.
*
@@ -85,20 +85,20 @@ public:
/** @return The indentation string based on node depth.*/
virtual TQString indentation();
- //! \return true if this AST has children
+ //! \return true if this AST has tqchildren
bool hasChildren() const;
/**
- * Get the children of this ast
+ * Get the tqchildren of this ast
* \return the list of this ast's childre
*/
- TQValueList<AST*> children() const;
+ TQValueList<AST*> tqchildren() const;
protected:
NodeType m_nodeType;
- TQValueList<AST*> m_children;
+ TQValueList<AST*> m_tqchildren;
private:
int m_depth;
diff --git a/buildtools/lib/parsers/autotools/autotoolsdriver.h b/buildtools/lib/parsers/autotools/autotoolsdriver.h
index 5f6ac7e7..8e29bec6 100644
--- a/buildtools/lib/parsers/autotools/autotoolsdriver.h
+++ b/buildtools/lib/parsers/autotools/autotoolsdriver.h
@@ -20,8 +20,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef QMAKEQMAKEDRIVER_H
-#define QMAKEQMAKEDRIVER_H
+#ifndef TQMAKETQMAKEDRIVER_H
+#define TQMAKETQMAKEDRIVER_H
#include <tqvaluelist.h>
#include <kurl.h>
@@ -56,12 +56,12 @@ public:
static void walkAST(Op &op, const ProjectAST *ast)
{
// op(ast);
- for (TQValueList<QMake::AST*>::const_iterator it = ast->statements.constBegin();
+ for (TQValueList<TQMake::AST*>::const_iterator it = ast->statements.constBegin();
it != ast->statements.constEnd(); ++it)
{
const AST *child = *it;
if (child->nodeType() == AST::ProjectAST)
- walkAST<Op>(op, static_cast<const QMake::ProjectAST*>(child));
+ walkAST<Op>(op, static_cast<const TQMake::ProjectAST*>(child));
else
op(child);
}
diff --git a/buildtools/lib/parsers/autotools/tests/viewer.cpp b/buildtools/lib/parsers/autotools/tests/viewer.cpp
index 0dc8e733..66401c2c 100644
--- a/buildtools/lib/parsers/autotools/tests/viewer.cpp
+++ b/buildtools/lib/parsers/autotools/tests/viewer.cpp
@@ -34,8 +34,8 @@
using namespace AutoTools;
-Viewer::Viewer(TQWidget *parent, const char *name)
- :ViewerBase(parent, name)
+Viewer::Viewer(TQWidget *tqparent, const char *name)
+ :ViewerBase(tqparent, name)
{
if (TQFile::exists(TQDir::currentDirPath() + "/" + "qtlist"))
{
@@ -46,7 +46,7 @@ Viewer::Viewer(TQWidget *parent, const char *name)
files->insertItem(str.readLine());
}
ast->setSorting(-1);
- parentProject.push((TQListViewItem*)0);
+ tqparentProject.push((TQListViewItem*)0);
}
void Viewer::addAll_clicked()
@@ -99,12 +99,12 @@ void Viewer::tabWidget2_selected(const TQString& text)
void Viewer::processAST(ProjectAST *projectAST, TQListViewItem *globAfter)
{
TQListViewItem *projectIt;
- if (!parentProject.top())
+ if (!tqparentProject.top())
projectIt = new TQListViewItem(ast, "Project");
else
{
if ( projectAST->isConditionalScope() || projectAST->isRule() )
- projectIt = new TQListViewItem(parentProject.top(), globAfter, projectAST->scopedID);
+ projectIt = new TQListViewItem(tqparentProject.top(), globAfter, projectAST->scopedID);
}
projectIt->setOpen(true);
@@ -128,7 +128,7 @@ void Viewer::processAST(ProjectAST *projectAST, TQListViewItem *globAfter)
{
AutomakeTargetAST* ata = static_cast<AutomakeTargetAST*>(ast);
TQListViewItem* item = new TQListViewItem(projectIt, after,
- ata->target, TQString::null, ata->deps.join(""));
+ ata->target, TQString(), ata->deps.join(""));
after = item;
}
break;
@@ -145,14 +145,14 @@ void Viewer::processAST(ProjectAST *projectAST, TQListViewItem *globAfter)
{
ConditionAST* ata = static_cast<ConditionAST*>(ast);
TQListViewItem* item = new TQListViewItem(projectIt, after,
- ata->type, ata->conditionName, TQString::null );
+ ata->type, ata->conditionName, TQString() );
after = item;
}
case AST::ProjectAST: {
ProjectAST *projectAST = static_cast<ProjectAST*>(ast);
- parentProject.push(projectIt);
+ tqparentProject.push(projectIt);
processAST(projectAST, after);
- parentProject.pop(); }
+ tqparentProject.pop(); }
break;
}
}
diff --git a/buildtools/lib/parsers/autotools/tests/viewer.h b/buildtools/lib/parsers/autotools/tests/viewer.h
index 5ee63c54..c0653020 100644
--- a/buildtools/lib/parsers/autotools/tests/viewer.h
+++ b/buildtools/lib/parsers/autotools/tests/viewer.h
@@ -30,8 +30,9 @@ class TQListViewItem;
class Viewer: public ViewerBase {
Q_OBJECT
+ TQ_OBJECT
public:
- Viewer(TQWidget *parent = 0, const char *name = 0);
+ Viewer(TQWidget *tqparent = 0, const char *name = 0);
void processAST(AutoTools::ProjectAST *projectAST, TQListViewItem *globAfter = 0);
public slots:
virtual void tabWidget2_selected(const TQString&);
@@ -40,7 +41,7 @@ public slots:
virtual void addAll_clicked();
private:
AutoTools::ProjectAST *projectAST;
- TQValueStack<TQListViewItem *> parentProject;
+ TQValueStack<TQListViewItem *> tqparentProject;
};
#endif
diff --git a/buildtools/lib/parsers/autotools/tests/viewer_main.cpp b/buildtools/lib/parsers/autotools/tests/viewer_main.cpp
index 380767a9..0fc5157b 100644
--- a/buildtools/lib/parsers/autotools/tests/viewer_main.cpp
+++ b/buildtools/lib/parsers/autotools/tests/viewer_main.cpp
@@ -28,7 +28,7 @@ int main(int argc, char **argv)
app.setMainWidget(&viewer);
viewer.show();
viewer.resize(800, 600);
- //viewer.setWindowState(viewer.windowState() | Qt::WindowMaximized);
+ //viewer.setWindowState(viewer.windowState() | TQt::WindowMaximized);
return app.exec();
}
diff --git a/buildtools/lib/parsers/autotools/tests/viewerbase.ui b/buildtools/lib/parsers/autotools/tests/viewerbase.ui
index 7c228299..75ed7559 100644
--- a/buildtools/lib/parsers/autotools/tests/viewerbase.ui
+++ b/buildtools/lib/parsers/autotools/tests/viewerbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ViewerBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ViewerBase</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="4" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="1" rowspan="4" colspan="1">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<property name="name">
<cstring>source</cstring>
</property>
@@ -40,7 +40,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget2</cstring>
</property>
@@ -52,7 +52,7 @@
<verstretch>2</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -63,7 +63,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListView" row="0" column="0">
+ <widget class="TQListView" row="0" column="0">
<column>
<property name="text">
<string>Name</string>
@@ -103,7 +103,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -114,7 +114,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTextEdit" row="0" column="0">
+ <widget class="TQTextEdit" row="0" column="0">
<property name="name">
<cstring>writeBack</cstring>
</property>
@@ -124,22 +124,22 @@
</widget>
</vbox>
</widget>
- <widget class="QLineEdit" row="0" column="0">
+ <widget class="TQLineEdit" row="0" column="0">
<property name="name">
<cstring>allLocation</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>150</width>
<height>32767</height>
</size>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>addAll</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>150</width>
<height>32767</height>
@@ -149,11 +149,11 @@
<string>Add All From Directory</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="TQPushButton" row="2" column="0">
<property name="name">
<cstring>choose</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>150</width>
<height>32767</height>
@@ -163,7 +163,7 @@
<string>Choose File to Add...</string>
</property>
</widget>
- <widget class="QListBox" row="3" column="0">
+ <widget class="TQListBox" row="3" column="0">
<property name="name">
<cstring>files</cstring>
</property>
@@ -175,7 +175,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>150</width>
<height>32767</height>
@@ -210,11 +210,11 @@
<slot>tabWidget2_selected(const QString&amp;)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>addAll_clicked()</slot>
<slot>choose_clicked()</slot>
<slot>files_currentChanged(QListBoxItem*)</slot>
<slot>tabWidget2_selected(const QString&amp;)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>